Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RegisterRawInputDevices problems

33 views
Skip to first unread message

John Lee

unread,
Jun 16, 2003, 10:01:00 PM6/16/03
to
Hi all,

I have an error returned code = 5 (ACCESS IS DENIED)

when I call


/***************************************************************************
*****/
RAWINPUTDEVICE Rid;

Rid.usUsagePage = 0x01;
Rid.usUsage = 0x02;
Rid.dwFlags = RIDEV_NOLEGACY; // adds HID mouse and also ignores
legacy mouse messages


if (RegisterRawInputDevices(&Rid, 1, sizeof (RAWINPUTDEVICE)) ==
FALSE) {
LogMemo->Lines->Add("Regiter Input failed");
DWORD err = GetLastError();
if (err == ERROR_ACCESS_DENIED)
LogMemo->Lines->Add("Access Denied");
}

/***************************************************************************
*****/

it always gives me that error,

anyone knows what's going on here?

PS/ I have also tried to GetRegisteredInputDevices().... and no good results
+ I have printed my devices using GetRawInputDeviceList, however it gave me
like 4 mice, when I have only 3 connected.... what's going on here, also it
gave me 2 keyboards, but I have only 1 connected.

does this mean that when it get registered onto the system, it stays there?
even when the device is disconnected?

John


0 new messages