Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Supported interfaces in live object
Message
From
13/07/2000 16:26:41
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00391907
Message ID:
00392049
Views:
12
>How about one of my faves:
>
>ox=CreateObject("tli.tliapplication")
>oword=CreateObject("word.application")
>oClassInfo=ox.ClassInfoFromObject(oword)

Where the heck is this thing documented? I know that this is the TLBInf32.dll file that used to only ship with VB, but now appears to ship with Outlook 2000, Office 2000,etc. I have used TLIApplication before, but only found methods to extract data from the tlb itself.

Anyway, I was excited to see this 'new' method of TLIApplication, and it apears to work in some instances, but not in others. For objects that don't work, I get the error "No such interface is supported". So I though I might look up what interface the method needed to extract the TypeInfo object (I was guessing it was ITypeInfo). But of the several objects that did not throw an error when passed to ClassInfoFromObject, I could find no two interfaces in common. So much for that theory.

Fortunately, the method will do for half of what I want it for- exploring an HTML page in the IE object. It appears that all of the page elements in IE support the necessary interface to allow type info extraction.

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.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform