49 WORD wReplyCommandId,
void **lplpReplyMsg,
DWORD *lpdwMsgBodySize );
63 if( lpThreadInfo ==
NULL )
74 ERR(
"Unable to duplicate event handle\n" );
82 lpThreadInfo->
hStart = hStart;
83 lpThreadInfo->
hDeath = hDeath;
95 ERR(
"Unable to create msg thread\n" );
101 return dwMsgThreadId;
115 TRACE(
"Msg thread created. Waiting on app startup\n" );
121 FIXME(
"Should signal app/wait creation failure (0x%08x)\n", dwWaitResult );
133 ERR(
"App Read connection setting timeout fail (0x%08x)\n", dwWaitResult );
140 TRACE(
"App created && initialized starting main message reception loop\n" );
149 TRACE(
"Msg thread exiting!\n" );
166 DPQ_INSERT(
This->dp2->repliesExpected, lpReplyStructList, repliesExpected );
191 dwMsgSize =
This->dp2->spData.dwSPHeaderSize +
sizeof( *lpMsgBody );
196 This->dp2->spData.dwSPHeaderSize );
212 data.idPlayerFrom = 0;
213 data.lpMessage = lpMsg;
214 data.dwMessageSize = dwMsgSize;
216 data.lpISP =
This->dp2->spData.lpISP;
218 TRACE(
"Asking for player id w/ dwFlags 0x%08x\n",
222 &lpMsg, &dwMsgSize );
257 dwMsgSize =
This->dp2->spData.dwSPHeaderSize +
sizeof( *lpMsgBody );
262 This->dp2->spData.dwSPHeaderSize );
277 ERR(
"Player Data size is 0x%08lx\n"
278 "[%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x]\n"
279 "[%02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x %02x%02x]\n",
282 lpPData[0], lpPData[1], lpPData[2], lpPData[3], lpPData[4],
283 lpPData[5], lpPData[6], lpPData[7], lpPData[8], lpPData[9],
284 lpPData[10], lpPData[11], lpPData[12], lpPData[13], lpPData[14],
285 lpPData[15], lpPData[16], lpPData[17], lpPData[18], lpPData[19],
286 lpPData[20], lpPData[21], lpPData[22], lpPData[23], lpPData[24],
287 lpPData[25], lpPData[26], lpPData[27], lpPData[28], lpPData[29],
288 lpPData[30], lpPData[31]
316 TRACE(
"Setting first magic to 0x%08x\n", lpMsgBody->
unknown4[3] );
323 TRACE(
"Setting second magic to 0x%08x\n", lpMsgBody->
unknown4[7] );
339 data.idPlayerFrom = dpidServer;
340 data.lpMessage = lpMsg;
341 data.dwMessageSize = dwMsgSize;
343 data.lpISP =
This->dp2->spData.lpISP;
345 TRACE(
"Sending forward player request with 0x%08x\n", dpidServer );
350 &lpMsg, &dwMsgSize );
356 FIXME(
"Name Table reply received: stub\n" );
369 WORD wReplyCommandId,
void **lplpReplyMsg,
DWORD *lpdwMsgBodySize )
380 TRACE(
"Sending msg and expecting cmd %u in reply within %u ticks\n",
381 wReplyCommandId, dwWaitTime );
382 hr = (*
This->dp2->spData.lpCB->Send)( lpData );
396 ERR(
"Wait failed 0x%08x\n", dwWaitReturn );
409 DWORD dwMsgBodySize )
425 ==, wCommandId, lpReplyList );
428 if( lpReplyList !=
NULL )
435 lpcMsgBody, dwMsgBodySize );
442 ERR(
"No receipt event set - only expecting in reply mode\n" );
453 dwMsgSize =
This->dp2->spData.dwSPHeaderSize +
sizeof( *lpMsgBody );
458 This->dp2->spData.dwSPHeaderSize );
470 data.idPlayerTo = dpidSelf;
471 data.idPlayerFrom = 0;
472 data.lpMessage = lpMsg;
473 data.dwMessageSize = dwMsgSize;
475 data.lpISP =
This->dp2->spData.lpISP;
480 &lpMsg, &dwMsgSize );
485 DWORD dwMsgBodySize )
489 lpcErrorMsg = lpMsgBody;
491 ERR(
"Received error message %u. Error is %s\n",
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
#define DPSEND_GUARANTEED
#define IDirectPlaySP_GetSPPlayerData(p, a, b, c, d)
LPCSTR DPLAYX_HresultToString(HRESULT hr)
void DP_MSG_ErrorReceived(IDirectPlayImpl *This, WORD wCommandId, const void *lpMsgBody, DWORD dwMsgBodySize)
struct tagMSGTHREADINFO * LPMSGTHREADINFO
struct tagMSGTHREADINFO MSGTHREADINFO
static void * DP_MSG_ExpectReply(IDirectPlayImpl *This, DPSP_SENDDATA *data, DWORD dwWaitTime, WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize)
void DP_MSG_ReplyReceived(IDirectPlayImpl *This, WORD wCommandId, const void *lpcMsgBody, DWORD dwMsgBodySize)
DWORD CreateLobbyMessageReceptionThread(HANDLE hNotifyEvent, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead)
void DP_MSG_ToSelf(IDirectPlayImpl *This, DPID dpidSelf)
static HANDLE DP_MSG_BuildAndLinkReplyStruct(IDirectPlayImpl *This, DP_MSG_REPLY_STRUCT_LIST *lpReplyStructList, WORD wReplyCommandId)
HRESULT DP_MSG_SendRequestPlayerId(IDirectPlayImpl *This, DWORD dwFlags, DPID *lpdpidAllocatedId)
static LPVOID DP_MSG_CleanReplyStruct(LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, LPVOID *lplpReplyMsg, LPDWORD lpdwMsgBodySize)
static DWORD CALLBACK DPL_MSG_ThreadMain(LPVOID lpContext)
HRESULT DP_MSG_ForwardPlayerCreation(IDirectPlayImpl *This, DPID dpidServer)
struct tagDPMSG_REQUESTNEWPLAYERID * LPDPMSG_REQUESTNEWPLAYERID
#define DPMSGCMD_GETNAMETABLEREPLY
#define DPMSG_WAIT_5_SECS
struct tagDPMSG_SENDENVELOPE * LPDPMSG_SENDENVELOPE
#define DPMSGCMD_FORWARDADDPLAYER
#define DPMSGCMD_REQUESTNEWPLAYERID
#define DPMSGCMD_NEWPLAYERIDREPLY
#define DPMSG_WAIT_60_SECS
#define DPMSGCMD_JUSTENVELOPE
#define DPMSGMAGIC_DPLAYMSG
struct tagDPMSG_FORWARDADDPLAYER * LPDPMSG_FORWARDADDPLAYER
#define DPMSG_DEFAULT_WAIT_TIME
#define DPQ_REMOVE_ENTRY(head, elm, field, fieldCompareOperator, fieldToCompare, rc)
#define DPQ_INSERT(a, b, c)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
DWORD NS_GetNsMagic(LPVOID lpNSInfo)
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DP_MSG_REPLY_STRUCT replyExpected
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI DebugBreak(void)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define DUPLICATE_SAME_ACCESS