我在ActiveX的Member Function 中用DirectPlay 8
HRESULT CVoiceClient::ConnectSPServer( void)
{
.....
hr = g_pDPClient->Initialize( NULL, DirectPlayMessageHandler, DPNINITIALIZE_DISABLEPARAMVAL ) ;........
}
编译时出错
ompiling...
VoiceClient.cpp
C:\Windows\Desktop\game\loveChat\VoiceClient.cpp(58) : error C2664: 'Initialize' : cannot convert parameter 2 from 'long (void *,unsigned long,void *)' to 'long (__stdcall *const )(void *,unsigned long,void *)'
None of the functions with this name in scope match the target type
Error executing cl.exe.loveChat.dll - 1 error(s), 0 warning(s)
HRESULT CVoiceClient::ConnectSPServer( void)
{
.....
hr = g_pDPClient->Initialize( NULL, DirectPlayMessageHandler, DPNINITIALIZE_DISABLEPARAMVAL ) ;........
}
编译时出错
ompiling...
VoiceClient.cpp
C:\Windows\Desktop\game\loveChat\VoiceClient.cpp(58) : error C2664: 'Initialize' : cannot convert parameter 2 from 'long (void *,unsigned long,void *)' to 'long (__stdcall *const )(void *,unsigned long,void *)'
None of the functions with this name in scope match the target type
Error executing cl.exe.loveChat.dll - 1 error(s), 0 warning(s)
long WINAPI DirectPlayMessageHandler(void*, UINT, void*);
#define WINAPI __stdcall