Home > Software engineering >  Read from the definition of HID device, in reading way opened the equipment CreateFile GENERIC_READ
Read from the definition of HID device, in reading way opened the equipment CreateFile GENERIC_READ

Time:10-14

//read way to open the equipment 
HReadHandle=CreateFile (MyDevPathName,
GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES) NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,//| FILE_FLAG_OVERLAPPED
NULL);

Is the source of the tutorial program,
Find some related information, permissions, environment is a Windows 7 + VS2010 in VS2010 improved access, is still the same problem,
B: where is someone didn't meet the same problem, but also need to set up?
Thank you for the

CodePudding user response:

You with administrator privileges to run your program

CodePudding user response:

reference 1st floor VisualEleven response:
you with administrator privileges to run your program can ~

No, have tried,

CodePudding user response:

5 the Access is denied. ERROR_ACCESS_DENIED

CodePudding user response:

The
reference 3 floor schlafenhamster response:
5 Access is denied. ERROR_ACCESS_DENIED

I know well, the problem is that how to solve ah, tried a variety of methods, VS2010 to promote the application to administrator privileges,
Is is to use administrator privileges to open all not a line,

CodePudding user response:

That, no one encountered this problem?
People ah,

CodePudding user response:

reboot

CodePudding user response:

refer to 6th floor zhao4zhong1 response:
reboot

Ha ha, restart the computer to solve,

CodePudding user response:

Is it something else exclusive opened

CodePudding user response:

refer to the eighth floor hurryboylqs response:
is something exclusive opened the

How to view isn't being used? But GENERIC_WRITE is OK! Not only GENERIC_READ,

CodePudding user response:

You should be reading hid the usb interface, online a lot of code, estimate your other code problem, you capture the look not to come out a few lines, I've done before, online,,,,
  • Related