Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Registry Thru WMI/API Not Working
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Read Registry Thru WMI/API Not Working
Miscellaneous
Thread ID:
00674007
Message ID:
00674007
Views:
68
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.
Next
Reply
Map
View

Click here to load this message in the networking platform