Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
QueryRegValue Woes... Please help.
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00178313
Message ID:
00178320
Views:
21
Joe,

RegQueryValueEx needs the key handle stored in the lphKey call from the RegOpenKeyEx(). Not HKEY_CURRENT_USER like you are sending it. Once you open a key you use that handle to read/write it until you close the key.

>ret = RegOpenKeyEx(HKEY_CURRENT_USER, sKeyName, 0, 0, @lphKey)
>ret = RegSetValueEx(@lphKey, sDataName, 0, 1, sDataValue, lLen)

> nCurrentKey = HKEY_CURRENT_USER

> nErrCode=RegQueryValueEx(nCurrentKey,cValueName,;
> lpdwReserved,@lpdwType,@lpbData,@lpcbData)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform