Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quick Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00667413
Message ID:
00668726
Vues:
23
>Sure, see Message #667876

In my tests all values are returned. They just returned in the format the are stored. Here's the code that converts those values
       *? lRetVal, STRTRAN(ALLTRIM(sValueName),CHR(0), " " ), STRTRAN(ALLTRIM(sData), CHR(0), "")
	? lRetVal, STRTRAN(ALLTRIM(sValueName),CHR(0), " " ), " "
	lvKeyVal = LEFT(sData, iDataSize)
	DO CASE
	CASE iCode = 1    && REG_SZ
		?? LEFT(lvKeyVal, LEN(lvKeyVal)-1)
	CASE iCode = 3    && REG_BINARY
		FOR i=1 TO LEN(lvKeyVal)
			?? RIGHT(TRANSFORM(ASC(SUBSTR(lvKeyVal,i,1)), "@0"),2) + " "
		ENDFOR

	CASE iCode = 4    && REG_DWORD  ENDCASE
		lnVal = 0
		FOR i=1 TO LEN(lvKeyVal)
			lnVal = lnVal + ASC(SUBSTR(lvKeyVal,i,1)) * (256 ^ (i-1))
		ENDFOR
		?? lnVal 
	OTHERWISE

	ENDCASE
I just put this code together so there's no guaranty that it is bug free. However it should give you some pointers.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform