i use libevent-2.0.20-stable in my MFC project
here is code:
BOOL CDemoApp::InitInstance()
{
WSADATA wsadata;
if (WSAStartup( MAKEWORD( 2, 2 ), &wsadata ) )
return false;
//there is no memory leak after delete evthread_use_windows_threads().
evthread_use_windows_threads()
assuming extern returning int
then i edit the Makefile.nmake file,remove the 'evthread_win32.obj'. build
finaly success.
2012/11/16 Nick Mathewson
>
> On Thu, Nov 15, 2012 at 9:01 PM, JiangHao wrote:
>
>> i only use select in windows,and don't care about thread
it's easy to build libevent2 in windows
open vs2008/vs2010 -> tools -> "Visual Studio Command Prompt"
cd libevent2's directory
run "nmake /F Makefile.nmake static_libs"
Regards,
2011/7/1, Ed Day :
> Attached are some VS2008 project files that I use which are by no
> means complete. It's not
set the event priority?
2011/4/12 Fu Jiantao
> Thanks in advance!
sorry ,i read your question again .
may be we could do this:
event* ev = event_new(0, -1,0, 0,0);
event_set(ev,base, socket, flags, cb_func, ev);
then you could pass the event as argument .
2011/4/7 Michał Król
> Hi,
>
> I was wondering if there is any way I can access event object within
> cal