>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.
x=ox.TypeLibInfoFromRegistry('{97D25DB0-0363-11CF-ABC4-02608C9E7553}',1,0,0)
oInt = x.Interfaces
For i = 1 To oInt.Count
If oInt.Item(i).Name = lcInterface
Return .t.
Endif
EndFor
Return .f.
*-- Code ends here
Mike Stewart