How can I see the interfaces of a ocx file?
I want to see the interfaces of an ".ocx" file. Like this:
开发者_Python百科But for some .ocx, I can only see 5 functions, Like this:
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:b) Then I used 'Dependency Walker' open the ocx, found the file dependences no DLL files .
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?
Did you try the OLE/COM Object Viewer? http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en
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.
Long time ago, I used this tool called XRay: X-Ray Vision. It was quite simple to use and still works in Windows 7 I believe. But as other tools, it requires the DLL/OCX to embed a Type Library, or you need to find the corresponding one.
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)
精彩评论