Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RegQueryValueEx & RegSetValueEx
Message
 
À
17/08/1999 14:08:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00254192
Message ID:
00254874
Vues:
20
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform