查看完整版本: [-- 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) --]

APlayer 开发者论坛 -> APlayer 讨论区 -> 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

bxcx 2020-04-17 15:19

没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))

我是C# winform,引用的是昨天刚下载的SDK,版本号为3.11.0.832,
在我自己的win10x64的环境下可以正常运行,然后分别在win7x64、和3台win10x64上测试,
4台电脑都已运行过regsvr32,

regsvr32 /s .\bin\APlayer.dll
regsvr32 /s .\bin\APlayerUI.dll
regsvr32 /s .\bin\npaplayer.dll
其中win7x64正常,一台win10x64正常,另外两台不正常,均是以下错误:


System.Runtime.InteropServices.COMException (0x80040154): 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
   在 System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   在 System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   在 System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   在 System.Windows.Forms.AxHost.CreateInstance()
   在 System.Windows.Forms.AxHost.GetOcxCreate()
   在 System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   在 System.Windows.Forms.AxHost.CreateHandle()
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.AxHost.EndInit()
   在 player.Main.InitializeComponent()
   在 player.Main..ctor()
   在 player.Program.Main(String[] args)

vs2013里已经设置目标平台为x86,请问还有哪些没对呢?

aplayer 2020-04-21 16:42
两个办法:
1、管理员运行 regsvr32
2、使用免注册模式,即调用 APlayerCaller.dll 来做,你会发现纯净了许多。


查看完整版本: [-- 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) --] [-- top --]


Powered by phpwind v8.7 Code ©2003-2011 phpwind
Time 0.006858 second(s),query:0 Gzip enabled