Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WMI and VFP6?
Message
De
14/08/2002 10:57:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00689379
Message ID:
00689579
Vues:
26
Thanks Larry.


- Brian


Brian,
>There was a "deficiency" with GetObject in VFP 6 that was removed in VFP 7. Instead of using GetObject, use the Locator object of WMI.
>local loloc, lowmi
>loloc = createobject('WbemScripting.SWbemLocator')
>lowmi = loloc.ConnectServer()  && connects to local machine, default WMI namespace
>
>The above is the VFP 7 equivalent of:
>local lowmi
>lowmi = getobject('WinMgmts:')
>Both return a WMI Services object.
>
>HTH.
>
>>Ok, I think I missed class that day, but can't WMI be used with VFP 6 SP5?
>>
>>OLE error code 0x800401ea: Moniker cannot open file.
>>
>>I was playing around with WMI in VFP7 and everything works really well. But I guess I missed something since the same code doesn't work when I run it it VFP 6...
>>
>>
>>Thanks,
>>
>>- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform