Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read Registry Thru WMI/API Not Working
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00674007
Message ID:
00696671
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform