• 3366阅读
  • 1回复

没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) [复制链接]

上一主题 下一主题
离线bxcx
 

只看楼主 倒序阅读 使用道具 楼主  发表于: 2020-04-17
我是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
两个办法:
1、管理员运行 regsvr32
2、使用免注册模式,即调用 APlayerCaller.dll 来做,你会发现纯净了许多。
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个