My problem is, i´m trying to write my class to manage a Joystick, in this class I define two member functions:
BOOL CALLBACK EnumJoy(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
DI_Init() calls EnumDevices wich is defined as follows:
The second parameter (lpCallback) is the
Address of a callback function to be called with a description of each DirectInput device.
My Call is implemented as follows:
if( !m_lpDIJoystick )
hr = m_lpDI->EnumDevices( DIDEVTYPE_JOYSTICK, EnumJoy, (LPVOID)FALSE,DIEDFL_ATTACHEDONLY) ;
When I try to compile it I get the following error message:
error C2664: 'EnumDevices' : cannot convert parameter 2 'int (const struct DIDEVICEINSTANCEA *,void *)' in 'int (__stdcall *)(const struct DIDEVICEINSTANCEA *,void *)'
If I define my member function EnumJoy out of my class as a global function than I compile my program but I would like to have it as a member function, how should I declare it?.
Thanks in Advance.