简体   繁体   English

如何监视ActiveX组件负载?

[英]How do I spy on ActiveX component loads?

I'm working on a .net WinForms application that embeds the Flash ActiveX component. 我正在开发一个嵌入Flash ActiveX组件的.net WinForms应用程序。 When the application is compiled on my computer, Flash loads fine. 在计算机上编译应用程序后,Flash可以正常加载。 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. 我想查看我的应用程序试图加载的clsid。 Is there such a thing as ActiveX-Spy? 是否有ActiveX-Spy之类的东西?

Edit: Clarity. 编辑:清晰度。

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. 您可能想要启动procmon(sysinternals.com)之类的工具,并捕获发生错误时正在读取的注册表项。 Filter on RegOpenKey operations (Operation is RegOpenKey) and look for unsuccessful results (Result is not SUCCESS). 对RegOpenKey操作(操作为RegOpenKey)进行过滤,并查找不成功的结果(结果不成功)。 It's a bit tedious but by comparing reg traces between the 2 machines it should point you to the answer. 这有点乏味,但是通过比较两台机器之间的reg跟踪,应该可以找到答案。

What I have used for spying on legacy c++ dlls is ProcMon . 我用来监视旧版c ++ dll的是ProcMon You can Spy on all the dlls activity (registry,filesystem, network, etc.) 您可以监视所有dll活动(注册表,文件系统,网络等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM