mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
4da59ea6dd
- Correct suspended process resumption - Don't use sys/queue.h anymore - Properly initialize the global semaphore across processes - Create a mapped file for shared data structures - Change some trace messages - Allocate dynamic shared data from the mapped file - Rework setting and retrieving lobby settings from shared memory - Add infrastructure for syncronization after app launch - Small documentation update - Include some stuff missing from header - Start on dp and dpl message infrastructure - Unicode versions of player/group commands added - Combined Connect/ConnectEx and Open/SecureOpen - More implementation
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/* DirectPlay & DirectPlayLobby messaging implementation
|
|
*
|
|
* Copyright 2000 - Peter Hunnisett
|
|
*
|
|
* <presently under construction - contact hunnise@nortelnetworks.com>
|
|
*
|
|
*/
|
|
|
|
#include "winbase.h"
|
|
#include "debugtools.h"
|
|
|
|
#include "dplayx_messages.h"
|
|
|
|
DEFAULT_DEBUG_CHANNEL(dplay)
|
|
|
|
|
|
static DWORD CALLBACK DPLAYX_MSG_ThreadMain( LPVOID lpContext );
|
|
|
|
/* Create the message reception thread to allow the application to receive
|
|
* asynchronous message reception
|
|
*/
|
|
DWORD CreateMessageReceptionThread( HANDLE hNotifyEvent )
|
|
{
|
|
DWORD dwMsgThreadId;
|
|
|
|
if( !DuplicateHandle( 0, hNotifyEvent, 0, NULL, 0, FALSE, 0 ) )
|
|
{
|
|
ERR( "Unable to duplicate event handle\n" );
|
|
return 0;
|
|
}
|
|
|
|
/* FIXME: Should most likely store that thread handle */
|
|
CreateThread( NULL, /* Security attribs */
|
|
0, /* Stack */
|
|
DPLAYX_MSG_ThreadMain, /* Msg reception function */
|
|
(LPVOID)hNotifyEvent, /* Msg reception function parameter */
|
|
0, /* Flags */
|
|
&dwMsgThreadId /* Updated with thread id */
|
|
);
|
|
|
|
return dwMsgThreadId;
|
|
}
|
|
static DWORD CALLBACK DPLAYX_MSG_ThreadMain( LPVOID lpContext )
|
|
{
|
|
HANDLE hMsgEvent = (HANDLE)lpContext;
|
|
|
|
for ( ;; )
|
|
{
|
|
FIXME( "Ho Hum. Msg thread with nothing to do on handle %u\n", hMsgEvent );
|
|
|
|
SleepEx( 10000, FALSE ); /* 10 secs */
|
|
}
|
|
|
|
CloseHandle( hMsgEvent );
|
|
}
|
|
|