>I'm using the \sample\solutions\registry class to read keys from the registry, but it will only read string (REG_SZ) values.
>
>how can I read a REG_DWORD?
>
Alter the code in REGISTRY.VCX to check for REG_DWORD type, and if so, convert the first 4 bytes of the buffer to a nuumber using something like DWORDToNum() in CLSHEAP. REG_DWORD values are 32 bit unsigned integers. If you plan to save them in an Integer field in VFP, they need to be recast as LONGs using BITOR(). The altered code looks something like:
IF m.lpdwType = REG_DWORD
SET PROCEDURE TO CLSHEAP ADDITIVE
m.cKeyValue = BITOR(DWORDToNum(m.cKeyValue),0)
RETURN ERROR_SUCCESS
ENDIF
This uses the UDF() in CLSHEAP for conversion; code your own if you prefer.