Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I browse the classes and methods of an ActiveX DLL?

Basically, what I want to is be able to explore an ActiveX DLL. I normally fire up VB 6, add the DLL to the "References" of the project, and use Object Explorer.

However, in this particular machine I can't install VB / VS.
I'm sure there's a tool out there that does this. Does anyone know of one?

Thanks

like image 645
Daniel Magliola Avatar asked Nov 04 '08 15:11

Daniel Magliola


2 Answers

If the machine has Microsoft Office installed, you can go into the built-in Visual Basic for Applications IDE and load the object there:

Tools menu -> Macro -> Visual Basic Editor (or press Alt+F11)

Then when inside the VBA window, Tools menu -> References -> Browse to locate your DLL

and View menu -> Object Browser to view the object's content (or press F2)

like image 174
fwzgekg Avatar answered Oct 23 '22 05:10

fwzgekg


I've used Microsoft's OLE/COM Object Viewer for this. It used to be installed with older versions of Visual Studio, and is still part of the Windows SDK.

It also seems to be available separately -- this is from an older version of the Windows SDK, but I don't imagine this tool has changed much recently.

To view the type information for a particular DLL or OCX, File, View TypeLib... is the option you're looking for. You can also dig through the Controls group in the main window to view details on a registered control. Right-click the entry for the control and click View Type Information to see details on the types and methods it exposes.

This will show rather more information than VB6 would. If you're looking at an ActiveX control, the coclass and dispinterface sections of the type library display are the things to look at.

(There's also an Expert Mode option in the View menu -- this will show you pretty much everything stored in the Registry to do with COM, OLE and ActiveX. This is generally rather a lot of information...)

like image 34
Stephen Veiss Avatar answered Oct 23 '22 04:10

Stephen Veiss