C2664
Hello
I have a fuction that one of the parameters is address of another function :
defenistion of callback function in my header file and a member of my class :
BOOL CALLBACK EnumJoysticksCallback(
const DIDEVICEINSTANCE* pdidInstance,VOID* pContext );where i want use it:
HRESULT CJoyDLL::InitDirectInput(HWND hDlg)
{
...
hr = g_pDI->EnumDevices( DI8DEVCLASS_GAMECTRL,
&CJoyDLL::EnumJoysticksCallback, /*here fuction needs address of EnumJoysticksCallBack, but this code generate C2664 ? */
NULL, DIEDFL_ATTACHEDONLY );
if ( FAILED(hr) )return hr;......
}
but when i define my function in my source file as a global function it works well :
hr = g_pDI->EnumDevices( DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback , NULL, DIEDFL_ATTACHEDONLY );

