Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Windows XP
Windows XP Security
RegOpenKeyEx returns access denied (error 5)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Strigger, post: 524760"] Hi, I'm running under a user that is a member of the admistrators group and trying to retrieve a registry key value, using this code: Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" _ (ByVal lngHKey As Long, ByVal lpSubKey As String, ByVal _ lpReserved As Long, samDesired As Long, phkResult As Long) As Long Private Const HKEY_CURRENT_USER = &H80000001 Private Const KEY_QUERY_VALUE = &H1 Private Const KEY_READ = &H19 Private Const KEY_ALL_ACCESS = &H3F Dim lngReturn As Long lngReturn = RegOpenKeyEx(HKEY_CURRENT_USER, "Site", 0, KEY_QUERY_VALUE, myPtr) but I keep getting ACCESS DENIED (lngReturn=5)! Any ideas what causes this problem? (I have tried KEY_READ & KEY_ALL_ACCESS too but without any luck) Any suggestions? Strigger [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Windows XP
Windows XP Security
RegOpenKeyEx returns access denied (error 5)
Top