Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RegsetValueEX and DWORD values
Message
From
13/05/2002 09:20:36
 
 
To
13/05/2002 09:14:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00655631
Message ID:
00655634
Views:
25
Vladimir,
I'm using the following function from Ed Rauh for this purpose:
************************************************
FUNCTION NumToDword
************************************************
*  Author............: Ed Rauh
*                    : From clsHeap.prg found on the UT.
*) Description.......: Creates a C LONG (signed 32-bit) 4 byte string 
*)                   : from a number.
*)                   : For full description see clsHeap.prg
*  Calling Samples...: 
*  Parameter List....: tnNum - Number to convert.
*  Major change list.:
*--------------------------------------------------------------------------------------------------
LPARAMETER tnNum
DECLARE RtlMoveMemory IN WIN32API AS RtlCopyLong ;
	STRING @pDestString, ;
	INTEGER @pVoidSource, ;
	INTEGER nLength
LOCAL cString
cString = SPACE(4)
	=RtlCopyLong(@cString, BITOR(tnNum,0), 4)
RETURN cString
*-- EOF NumToDword --------------------------------------------------------------------------------
HTH
>Hello All
>
>
>are there people who can tell me how to save Integer values as DWORD values in registry using RegSetvalueEX. I've been trying the following:
>
>cValue = TRANSFORM(nvalue,"@0")
>nValueSize = LEN(m.cValue)
>* Set the key value here
>m.nErrCode = RegSetValueEx(THIS.nCurrentKey,m.cValueName,0,;
> REG_DWORD,m.cValue,nvaluesize)
>
>
>but it produces the key with "Invalid DWORD value" if you look at this key in regedit.
>
>Can someone shed some light on how to properly pass values to get them saved as DWORD?
>
>TIA
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform