Search code examples
dllactivexabapole

How do I know whether an application support OLE2 and which methods & attributes are exposed?


I want to call an ActiveX DLL or OLE2 object from ABAP.

I already know the syntax of how to instantiate the object & execute the methods:

data: my_object type ole2_object.

create object my_object <ole2object>.

call method of my_object <objectmethod>.

But given a particular application, how do I know if this is supported, what the values/names of ole2object and objectmethod is?

Transaction SOLE supplies a table of OLE Applications, among this is Excel.Application which I know can be instantiated as an OLE object, so it looks like you have to add the OLE2 app to this table first, but once again where can I read the data like CLSID & LibType from - is it published as part of the application?


Solution

  • In this case, you're simply using OLE2 to access a COM interface. If you're into accessing Office applications, you might want to take a look at KB222101. For other applications and libraries, you'll need the API documentation, some suitable examples (not necessarily in ABAP, VB will do just fine). a pointed stick to poke the developer with or all three of them...

    Oh, and there's a tool called OLE/COM Object Explorer by MiTeC that can be downloaded for free from their website. Haven't used it myself, but it looks like it might be helpful.