Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

ACCESS_DENIED error message


  • Please log in to reply
No replies to this topic

#1 sriranga_s

sriranga_s

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:02:36 PM

Posted 02 December 2004 - 11:32 PM

Hi,
I have developed a minidriver for a non-standard USB keyboard, targetted for Win2k and WinXP. In my application I'm calling the usual SetupDiXXX(..) functions in order to get the device name. Then I'm calling CreateFile(..). Always my CreateFile(..) is returning INVALID_HANDLE_VALUE. Functions arguments are : name, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL. If I call GetLastError() it returns 5(== ERROR_ACCESS_DENIED). What could be the prob?
One more observation is, if I call CreateFile(..) with dwDesiredAccess as 0, it will open a ahndle but with this handle, I cannot do read\write operations.

How do I go about the prob?

Thanks,
Sri

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users