Home > Software engineering >  Windows 7 64 - bit, call CreateFileA set GENERIC_READ mode, return ERROR_ACCESS_DENIED?
Windows 7 64 - bit, call CreateFileA set GENERIC_READ mode, return ERROR_ACCESS_DENIED?

Time:11-14

Excuse me, I call usb hid protocol

Handle=CreateFileA (path,
GENERIC_READ,
Share_mode,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL FILE_FLAG_OVERLAPPED,/* and */
0);

Int ret=GetLastError ();
Printf (" CreateFileA ret=% d \ n ", ret);
Return the handle.

Return ERROR_ACCESS_DENIED?
Can set GENERIC_WRITE access, but theft ReadFile tip ERROR_ACCESS_DENIED too?
Can't get the mouse information system, this kind of situation, how to deal with?

CodePudding user response:

FILE_SHARE_READ | FILE_SHARE_WRITE?




CodePudding user response:

reference 1st floor zgl7903 response:
FILE_SHARE_READ | FILE_SHARE_WRITE?
the third parameter, it has a problem?

CodePudding user response:

Keyboard or belong to a Shared resource, may not be able to directly access, what is the purpose of your?

CodePudding user response:

Our side external a USB device, use is hid protocol, I for the device information, access is CreateFile ERROR_ACCESS_DENIED state, but the use of Bus hound is can capture to the device's instructions, to find a solution?

CodePudding user response:

reference zgl7903 reply: 3/f
keyboard or belong to a Shared resource, may not be able to directly access, what is the purpose of you?
our side external a USB device, using is hid protocol, I for the device information, access is CreateFile ERROR_ACCESS_DENIED state, but the use of Bus hound is can capture to the device's instructions, to find a solution?

CodePudding user response:

Bus hound is using a filter driver, can search

CodePudding user response:

refer to 6th floor zgl7903 response:
Bus hound is using a filter driver, you can search
ok thank you very much
  • Related