Archived

This topic is now archived and is closed to further replies.

sdrichardson

DirectPlay MessageHandler

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites