RegQueryValueEx function error on Windows7

I have a dll made in cpp that tries to read / write some registry keys. This code works fine on Windows XP (32-bit), but it doesn't work on Windows 7 (64-bit).

The registry keys accessed by this application are shared registry keys. These keys are not included in the 32-bit registry cache (wow32 bit) or 64-bit registry cache.

Please provide your valuable details.

Thanks in advance.

Jits

+2


a source to share


3 answers


when you say general, what do you mean, for example, in HKLM? Only higher applications are allowed to be written for those running Windows 7 and Vista. If this is news to you, I suggest doing a search in User Account Control or UAC.



+1


a source


Check this out: RegQueryValueEx Function

And this: Security rights and registry access rights



IMO you should check your permission settings you are using to open the key. Remove settings that require elevated privileges, or run the application in elevated mode.

+1


a source


Perhaps you should initialize the value "lpcbData", the last parameter is RegQueryValueEx.

0


a source







All Articles