VB, Registry on NT, 2000 - TechRepublic
General discussion
May 19, 2000 at 01:58 PM
amwalsh

VB, Registry on NT, 2000

by amwalsh . Updated 25 years, 8 months ago

I am having trouble saving to the registry on win NT, 2000. I need to save to the HKEY_LOCAL_MACHINE key so I can’t use VB’s
SaveSetting, I need to use the API. The following code worked on 9x:

RegCreateKeyEx HKEY_LOCAL_MACHINE,
“Software\” & AppName” & “\” & key, 0, 0, 0, KEY_ALL_ACCESS, vbNull, hKey, lDummy)

RegSetValueEx hKey, “Left”, 0, 1, ByVal sL, Len(sL)

I think it’s permission issue, but can’t get it to work on NT, 2000.

Thanks
Mike Walsh
mikew@augdev.com

This discussion is locked

All Comments