DirectPlay MessageHandler

Started by
1 comment, last by sdrichardson 20 years ago
i''m having trouble manipulating values outside of the DirectPlay message handler. For example... HRESULT WINAPI DirectPlayMessageHandler( PVOID pvUserContext, DWORD dwMessageId, PVOID pMsgBuffer) { switch( dwMessageId ) { case DPN_MSGID_RECEIVE: { PDPNMSG_RECEIVE pMsg; TCHAR strBuffer[256]; pMsg = (PDPNMSG_RECEIVE) pMsgBuffer; DXUtil_ConvertWideStringToGenericCch( strBuffer, (WCHAR*) pMsg->pReceiveData, 256 ); DS(strBuffer); NetworkMoveMade = true; break; } } return S_OK; } throws up the error: ERROR: Chess3D v0.1 error LNK2005: "bool NetworkMoveMade" (?NetworkMoveMade@@3_NA) already defined in DirectPlay.obj can anyone help? Scotty.
Scotty.
Advertisement
For clarification, this is more of a C/C++ question than it is a DirectX question. If you ever need some general help, try searching the General Programming forum.

Are there any other extern/global variables called NetworkMoveMade? Also, are you defining NetworkModeMade multiple times in the same source file, through includes or something?


Dustin Franklin
Mircrosoft DirectX MVP
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
NetworkMoveMade is just a global variable that is declared in the same cpp file. Nothing else calls it and nothing else has the same name at this point.



Scotty.

[edited by - sdrichardson on April 21, 2004 8:18:30 AM]
Scotty.

This topic is closed to new replies.

Advertisement