David, Thank you. I really should have seen that. But I thank you so much. You come to VA Beach steaks are on me. Thanks again, Joe.
>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)
~Joe Johnston USA
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams