
Writing Registry Values in Windows NT (Permissions issue?)
Quote:
>I have no problems reading values in NT, but RegSetValueExA always
>returns 5 when I attempt to write. I believe a return code of 5
>coresponds to a Permissions error, but I am running my program as
>Administrator and have Full Permissions on the Key I am attempting to
>write to.
Possibly a permissions issue, possibly not. Win95/98 will often work with
function declares that are "not quite right" while NT is not lenient at all. How
does your declare compare to this one:
Declare Function RegSetValueEx& Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal
hKey&, ByVal lpszValueName$, ByVal dwRes&, ByVal dwType&, ByVal lpDataBuff$,
ByVal nSize&)
That one is taken from my RegSetValue function, which definitely works in NT.
www.arcatapet.com/vbsource/regset.txt
Don Bradner
MSVB MVP
www.arcatapet.com