简体   繁体   中英

ActiveX Control in 64 bit windows

For 64bit OS, out C# App will use BeauGague ActiveX Control ( www.beaugauge.com ). 在此处输入图片说明

Compile successfully, but display error “HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)” when running. What can I do resolve the problem?

It works in design mode because Visual Studio is a 32-bit program. But not at runtime, in VS2008 and earlier the project is built to target AnyCPU. Which gets you a 64-bit process on a 64-bit version of Windows. Which cannot load ActiveX components that are only available as 32-bit DLLs.

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. Change the Platform target setting to x86. Which ensures that your program always runs as a 32-bit process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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