General information
Category:
Windows API functions
>>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)
Correction: The data was saved as BINARY instead of String. What I did wrong? Thanks.
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