When my windows application (a game) starts, I register it to receive raw input messages:
RAWINPUTDEVICE Rid[2];
Rid[0].usUsagePage = HID_USAGE_PAGE_GENERIC; // 0x01
Rid[0].usUsage = HID_USAGE_GENERIC_MOUSE; // 0x02
Rid[0].dwFlags = RIDEV_INPUTSINK;
Rid[0].hwndTarget = sMainWindow; // HWND from created window
Rid[1].usUsagePage = HID_USAGE_PAGE_GENERIC; // 0x01
Rid[1].usUsage = HID_USAGE_GENERIC_KEYBOARD; // 0x06
Rid[1].dwFlags = RIDEV_INPUTSINK;
Rid[1].hwndTarget = sMainWindow;
BOOL result = RegisterRawInputDevices( Rid, 2, sizeof( Rid[0] ) );
if( !result )
{
EGSystemError( "RegisterRawInputDevices Error: ", GetLastError() );
}
This game has been released and many users seem to have no trouble with it, but I have one user who is getting the error message:
"RegisterRawInputDevices Error: The system cannot find the file specified"
So, the question is- why would RegisterRawInputDevices() ever generate a ERROR_FILE_NOT_FOUND error? I haven't seen any references in the docs that help. Does anyone have experience with this?
Aucun commentaire:
Enregistrer un commentaire