reading HKLM within dll causes error

closed account (Dz8M4iN6)
Pre windows 7, all my written programs used read and write to the registry via separate user defined DLL without any problems,

Now all that happens is an access right error,

Is a way to set/check access rights within DLL, or am I missing something.

HKLM is used by the installing 3rd party I have no say where stored
Just need to read position

Easy solved by just moving from Dll to ExtDll
Last edited on
Do not use HKLM to write application data, use HKCU instead. If you insist of using HKLM, run the executable as an administrator or disable UAC.

You can open for reading only HKLM without problems, no administrator rights required.
Just need to read position

If you just need to read the key values then, as modoran has alread said, you should have no problems.

It sounds like you are trying to open the key with unnecessary write access rights.

What value are you using for the samDesired parameter of your RegOpenKeyEx call??

Andy
Topic archived. No new replies allowed.