J
James Crouch
I am trying to create a managed c++ wrapper and have run into a problem is
when SetNewNetworkCallBack is run. It doesn't like that NetworkID isn't an
UInt16. I get the error:
CCommManager::SetNewNetworkCallBack' : cannot convert parameter 1 from 'void
(unsigned short,void *)' to 'void (__cdecl *)(UInt16,void *)'
Any help would be appreicated. Offending code is below.
James
Managed Code:
CCommApp::CCommApp(char chan, long baud, String * ServerAddress, int
ListenPort, bool Logging)
{
m_pComm->SetNewNetworkCallBack(NewNetwork, this); //Problem
line
}
void CCommApp::NewNetwork(unsigned short NetworkID, void *Parameter)
Unmanaged Code Header:
void SetNewNetworkCallBack(void(*NewNetworkCallBack)(UInt16 NetworkID, void*
Parameter), void* Parameter);
when SetNewNetworkCallBack is run. It doesn't like that NetworkID isn't an
UInt16. I get the error:
CCommManager::SetNewNetworkCallBack' : cannot convert parameter 1 from 'void
(unsigned short,void *)' to 'void (__cdecl *)(UInt16,void *)'
Any help would be appreicated. Offending code is below.
James
Managed Code:
CCommApp::CCommApp(char chan, long baud, String * ServerAddress, int
ListenPort, bool Logging)
{
m_pComm->SetNewNetworkCallBack(NewNetwork, this); //Problem
line
}
void CCommApp::NewNetwork(unsigned short NetworkID, void *Parameter)
Unmanaged Code Header:
void SetNewNetworkCallBack(void(*NewNetworkCallBack)(UInt16 NetworkID, void*
Parameter), void* Parameter);