If ? BITOR(SOMECONSTANT ,0) returns negative number, cast it. If you still not sure, cast all of them.
>What is the pattern/methodology for figuring that out? I want to see how to do the same with HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER and etc.
>
>Thanks.
>
>>It looks like incorrect type is passed as the first parameter. Casting the value with BITOR fixes the problem.
#include registry.h
>>#UNDEFINE HKEY_CLASSES_ROOT
>>#DEFINE HKEY_CLASSES_ROOT BITOR(0x80000000,0)
>>cRetVal = ""
>>oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
>>cKeyPath = "dataproc.processor\CLSID"
>>iErrNo = oReg.GetStringValue( HKEY_CLASSES_ROOT, @cKeyPath , "", @cRetVal )
>>
--sb--