How can I see the interfaces of a ocx file?

13,362

Solution 1

Did you try the OLE/COM Object Viewer? http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en

Solution 2

The interface is described in the type library (TLB). Your DLL (OCX is a DLL) should contain the TLB in a TypeLibrary resource. You can extract this TLB and get the interface description. This job should also be done by OLE View.

If your DLL does not contain a TLB and no TLB file is provided you won't get the interface description.

Edit: Tools like "DLL Export Viewer" showed less information than OLE View. It's worth to use the tools provided by Microsoft.

When you have the decorated names in your files screenshot, you get the function signatures with the "Microsoft (R) C++ Name Undecorator" (undname.exe)

Solution 3

Import the type library with the Type Library Importer.

Since you are using C++, it's probably easiest to do this with #import.

This Code Project article gives step-by-step procedures.

Share:
13,362
Sid Zhang
Author by

Sid Zhang

Updated on June 23, 2022

Comments

  • Sid Zhang
    Sid Zhang almost 2 years

    I want to see the interfaces of an ".ocx" file. Like this:

    enter image description here

    But for some .ocx, I can only see 5 functions, Like this:

    enter image description here

    The question is: How can I see the interfaces of these ocx file. I have try this:

    A.
    a) I want register it and see it in visual studio. But when I register it, an error appears "LoadLibrary(path:\filename.ocx) failed". Like this:

    enter image description here

    b) Then I used 'Dependency Walker' open the ocx, found the file dependences no DLL files . enter image description here

    c) How can I register it?

    B. I use "Dll Export Viewer" and now I can see the function's name but still can not get the function's parameters. How can i get the parameters of a function?