1 /* DirectPlay & DirectPlayLobby messaging implementation
3 * Copyright 2000 - Peter Hunnisett
5 * <presently under construction - contact hunnise@nortelnetworks.com>
10 #include "debugtools.h"
12 #include "dplayx_messages.h"
14 DEFAULT_DEBUG_CHANNEL(dplay)
17 static DWORD CALLBACK DPLAYX_MSG_ThreadMain( LPVOID lpContext );
19 /* Create the message reception thread to allow the application to receive
20 * asynchronous message reception
22 DWORD CreateMessageReceptionThread( HANDLE hNotifyEvent )
26 if( !DuplicateHandle( 0, hNotifyEvent, 0, NULL, 0, FALSE, 0 ) )
28 ERR( "Unable to duplicate event handle\n" );
32 /* FIXME: Should most likely store that thread handle */
33 CreateThread( NULL, /* Security attribs */
35 DPLAYX_MSG_ThreadMain, /* Msg reception function */
36 (LPVOID)hNotifyEvent, /* Msg reception function parameter */
38 &dwMsgThreadId /* Updated with thread id */
43 static DWORD CALLBACK DPLAYX_MSG_ThreadMain( LPVOID lpContext )
45 HANDLE hMsgEvent = (HANDLE)lpContext;
49 FIXME( "Ho Hum. Msg thread with nothing to do on handle %u\n", hMsgEvent );
51 SleepEx( 10000, FALSE ); /* 10 secs */
54 CloseHandle( hMsgEvent );