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
Titre:
Read Registry Thru WMI/API Not Working
Divers
Thread ID:
00674007
Message ID:
00674007
Vues:
69
Why does this not work? It should say "Standard IDE/ESDI Hard Disk Controller"
The equivalent works fine in WSH/VBScript.
#include registry.h


	oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
	cKeyPath = "SYSTEM\CurrentControlSet\Services\atapi"
	Local cRetVal as String
	iErrNo = oReg.GetStringValue( HKEY_LOCAL_MACHINE , cKeyPath , "DisplayName" , cRetVal )
	
	? cRetVal
	? iErrNo
Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform