Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RegQueryValueEx & RegSetValueEx
Message
 
To
17/08/1999 14:08:41
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00254192
Message ID:
00254874
Views:
19
>Hi Peter.
>
>>Any one know that where I can find an example in Visual FoxPro using these two Windows API functions? Thanks.
>
>Look at the Registry class included with the FFC files with VFP.
>
>Doug

Thanks, Doug. When I used the following code, the Entry was created but the value of the entry is stored as hex instead of characters in quotes in the Registry. What have I missed? Thanks.

nErrCode=RegOpenKey(HKEY_CURRENT_USER,PDFWRITERPATH,@nKeyHandle)
do while .t.
store 0 to lpdwReserved,nErrCode
lpdwType=1
store space(256) to lpbData
lpszEntry="PDFFileName"
store 256 to lpcchValue,lpcbData
ErrCode=RegQueryValueExnKeyHandle,lpszEntry,lpdwReserved,@lpdwType,@lpbData,@lpcbData)
if empty(left(m.lpbData,m.lpcbData-1))
lpbData="c:/interview/apps/amia/"+gsPDFPath+pcDocID+".pdf"
lpcbData=len(lpbData)
ErrCode=RegSetValueExnKeyHandle,lpszEntry,lpdwReserved,lpdwType,lpbData,lpcbData)
exit
else
wait nowait timeout .2
endif
enddo
nErrCode=RegCloseKey(nKeyHandle)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform