Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Supported interfaces in live object
Message
De
13/07/2000 18:24:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00391907
Message ID:
00392111
Vues:
10
>>Where the heck is this thing documented?
>
>Here.
>
>>But what I really need it for is checking for supported interfaces in
>>ADSI objects. The ADSI IADsComputer object supports an optional
>>IADsComputerOperations interface that when implemented allows shutdown of a \
>>remote machine through its ADSI representation. The problem is, I can't figure
>>out how to tell if the interface is implemented before I make the call, and
>>ClassInfoFromObject pukes when you pass it any ADSI object.
>
>Perhaps something along these lines?
>
>*-- Code begins here
>? IsSupported("IADsComputerOperations")
>
>Function IsSupported
>Lparameters lcInterface
>Local ox
>ox=CreateObject("tli.tliapplication")
>
>*-- Assuming that it chokes on an ADSI object, we'll just go
>*-- after it via the GUID in the registry.

Really, nice try, but that won't work either. The WinNT provider decides what sort of computer object to return based on the services configured on the specified machine, so this information can't be retreived from the registry. ADSI objects arent' acquired with a simple ProgID or CLSID like most other COM objects, hence the need for the GETOBJECT call with a binding string.

Thanks for trying, and I am all ears to any further ideas.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform