General information
Category:
Windows API functions
Hi Sergey,
I still can't get it to work. What am I missing?
#DEFINE HKEY_LOCAL_MACHINE -2147483646
#DEFINE ERROR_SUCCESS 0
LOCAL lnOpenHKey, lcOpenKey, lnOpenResult
STORE "" TO lcOpenKey
STORE 0 TO lnOpenHKey, lnOpenResult
DECLARE Integer RegOpenKey IN Win32API ;
INTEGER nHKey, STRING cSubKey, INTEGER @nHandle
lnOpenHKey = HKEY_LOCAL_MACHINE
lcOpenKey = "System\\CurrentControlSet\\Control\\ComputerName\\ComputerName\\MyNewReg"
lnSuccess = RegOpenKey(lnOpenHKey, lcOpenKey, @lnOpenResult)
* Check if there was an ERROR
IF lnSuccess <> ERROR_SUCCESS
MESSAGEBOX(TRANS(lnSuccess), 64, "FAILED Open")
RETURN
ENDIF
lnSuccess == 87 && This is the value returned.
The key exists. I can see it with "RegEdit" I can open & delete it with "RegEdit" But not in code. I ran the ".prg" from "WestWind" The keys were created. But not deleted. I un-commented Rick's code for the deletion. But it failed.
FYI: VFP 6 SP5 on a Win2000 OS
Thanks for your patience
Mike
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only