如何监视ActiveX组件加载

本文关键字:ActiveX 组件 加载 监视 何监视 | 更新日期: 2023-09-27 18:09:14

我正在开发一个嵌入Flash ActiveX组件的。net WinForms应用程序。当应用程序在我的计算机上编译时,Flash加载得很好。当应用程序在构建服务器上编译时,它会在运行时抛出以下异常:

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]

我想看看我的应用程序试图加载什么类。有ActiveX-Spy这种东西吗?

编辑:清晰。

如何监视ActiveX组件加载

您可能希望启动procmon (sysinternals.com)之类的工具,并捕获在错误发生时正在读取的注册表项。过滤RegOpenKey操作(Operation为RegOpenKey),查找不成功的结果(Result不为SUCCESS)。这有点繁琐,但通过比较两台机器之间的reg跟踪,它应该会为您指出答案。

我用来监视遗留c++ dll的是ProcMon。您可以监视所有dll活动(注册表、文件系统、网络等)