Ryan Michela
Ryan Michela

Reputation: 8374

How do I spy on ActiveX component loads?

I'm working on a .net WinForms application that embeds the Flash ActiveX component. When the application is compiled on my computer, Flash loads fine. When the application is compiled on our build server, it throws the following exception when run:

System.Runtime.InteropServices.COMException (0x80040154):     Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
[Internal Stack Trace]

I want to see what clsid my application is trying to load. Is there such a thing as ActiveX-Spy?

Edit: Clarity.

Upvotes: 0

Views: 934

Answers (2)

Igor Zelaya
Igor Zelaya

Reputation: 4277

What I have used for spying on legacy c++ dlls is ProcMon. You can Spy on all the dlls activity (registry,filesystem, network, etc.)

Upvotes: 0

JohnD
JohnD

Reputation: 14757

You might want to fire up a tool like procmon (sysinternals.com) and capture what registry entries are being read at the time that the error occurs. Filter on RegOpenKey operations (Operation is RegOpenKey) and look for unsuccessful results (Result is not SUCCESS). It's a bit tedious but by comparing reg traces between the 2 machines it should point you to the answer.

Upvotes: 3

Related Questions