Archived

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

help using DirectInput8 enumeration

This topic is 5889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey I''m trying to use the EnumDevicesBySemantics callback method within my LPDIRECTINPUT8 class, but it''s giving me weird scope errors about my class-defined callback function...
//in my .h file
BOOL CALLBACK DIEnumDevicesBySemanticsCallback( blah, blah)

//in my .cpp file
m_lpDI->EnumDevicesBySemantics(m_szUserName, &m_diaf, DIEnumDevicesBySemanticsCallback, this, 0L);

 
The above line gives me the compilation error:
error C2664: ''EnumDevicesBySemantics'' : cannot convert parameter 3 from ''int (const struct DIDEVICEINSTANCEA *,struct IDirectInputDevice8A *,unsigned long,unsigned long,void *)'' to ''int (__std
call *)(const struct DIDEVICEINSTANCEA *,struct IDirectInputDevice8A *,unsigned long,unsigned long,void *)''
        None of the functions with this name in scope match the target type
 
 
any idea?? please?? thanks,

Share this post


Link to post
Share on other sites