diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2009-04-15 15:00:49 +0000 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2009-04-15 15:00:49 +0000 |
commit | deb7a7e6dbf744cbac9bd949177693e2db218a6b (patch) | |
tree | 88c745d8e4c7ddab7bc706a967db02da8887a151 | |
parent | 00430797cddbf9f40720d10137e0de22b13d92e0 (diff) | |
download | v-usb-deb7a7e6dbf744cbac9bd949177693e2db218a6b.tar.gz v-usb-deb7a7e6dbf744cbac9bd949177693e2db218a6b.tar.bz2 v-usb-deb7a7e6dbf744cbac9bd949177693e2db218a6b.zip |
- added comment about opening mice and keyboards
-rw-r--r-- | libs-host/hiddata.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs-host/hiddata.c b/libs-host/hiddata.c index c2c3322..0f1915a 100644 --- a/libs-host/hiddata.c +++ b/libs-host/hiddata.c @@ -73,6 +73,13 @@ HIDD_ATTRIBUTES deviceAttributes; /* this call is for real: */ SetupDiGetDeviceInterfaceDetail(deviceInfoList, &deviceInfo, deviceDetails, size, &size, NULL); DEBUG_PRINT(("checking HID path \"%s\"\n", deviceDetails->DevicePath)); +#if 0 + /* If we want to access a mouse our keyboard, we can only use feature + * requests as the device is locked by Windows. It must be opened + * with ACCESS_TYPE_NONE. + */ + handle = CreateFile(deviceDetails->DevicePath, ACCESS_TYPE_NONE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL); +#endif /* attempt opening for R/W -- we don't care about devices which can't be accessed */ handle = CreateFile(deviceDetails->DevicePath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, openFlag, NULL); if(handle == INVALID_HANDLE_VALUE){ |