[英]ActiveX Control in 64 bit windows
For 64bit OS, out C# App will use BeauGague ActiveX Control ( www.beaugauge.com ). 对于64位操作系统,C#App将使用BeauGague ActiveX控件( www.beaugauge.com )。
Compile successfully, but display error “HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)” when running. 编译成功,但是在运行时显示错误“ HRESULT:0x80040154(REGDB_E_CLASSNOTREG)”。 What can I do resolve the problem?
我该如何解决该问题?
It works in design mode because Visual Studio is a 32-bit program. 因为Visual Studio是32位程序,所以它可以在设计模式下工作。 But not at runtime, in VS2008 and earlier the project is built to target AnyCPU.
但不是在运行时,在VS2008及更早版本中,该项目是针对AnyCPU构建的。 Which gets you a 64-bit process on a 64-bit version of Windows.
这将使您在64位版本的Windows上获得64位进程。 Which cannot load ActiveX components that are only available as 32-bit DLLs.
无法加载只能作为32位DLL使用的ActiveX组件。
It doesn't look like your vendor has done much lately to keep up with developments. 看来您的供应商最近没有做太多事情来跟上发展。 The workaround is simple: right-click your EXE project in the Solution Explorer window, Properties, Compile tab.
解决方法很简单:在“解决方案资源管理器”窗口的“属性”,“编译”选项卡中右键单击您的EXE项目。 Change the Platform target setting to x86.
将平台目标设置更改为x86。 Which ensures that your program always runs as a 32-bit process.
这样可以确保您的程序始终作为32位进程运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.