我正在开发一个嵌入Flash组件的.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]我想看看我的应用程序正在尝试加载什么clsid。有像ActiveX-Spy这样的东西吗?
编辑:清晰。
发布于 2011-09-20 21:26:21
您可能希望启动一个工具,比如procmon (sysinternals.com),并捕获错误发生时正在读取的注册表项。对RegOpenKey操作进行筛选(操作为RegOpenKey),并查找不成功的结果(结果不成功)。这有点乏味,但通过比较两台机器之间的reg跟踪,您应该可以找到答案。
发布于 2011-09-20 21:27:28
我用来监视遗留的c++ dlls的是ProcMon。您可以监视所有dlls活动(注册表、文件系统、网络等)。
https://stackoverflow.com/questions/7491927
复制相似问题