On 07-Oct-2014 23:04, xxxxx@gmail.com wrote:
Back again with my problem.
Now I’ve my windows handle I try to register my USB with the RegisterDeviceNotification function.
Everything seems to work correctly until I try to write to the device , I have an error like this “Can’t write to device”
DeviceHandle=CreateFile
(detailData->DevicePath,
0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
How about opening the handle with write access? Try to change the 2nd
parameter to GENERIC_READ|GENERIC_WRITE.
– pa