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

后端 未结 3 1186
Happy的楠姐
Happy的楠姐 2020-12-30 08:49

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.

H

相关标签:
3条回答
  • 2020-12-30 09:08

    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)

    0 讨论(0)
  • 2020-12-30 09:11

    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...)

    0 讨论(0)
  • 2020-12-30 09:12

    Is it possible to download the component from that machine and examine it locally in Visual Studio? (That'd be my first suggestion.) (And BTW, the .NET versions of Visual Studio also feature a VB6-like Object Explorer which works nicely for this.)

    Alternatively, and it's not free, but you might try ActiveXplorer. (I haven't tried this, but it looks promising.) (Discontinued)

    0 讨论(0)
提交回复
热议问题