无法加载 64 位 ActiveX 控件

Can not load 64-bit ActiveX Control

我构建了一个64位的ActiveX控件,我已经注册成功了。然后我建立一个MFC项目,我想把ActiveX控件插入其中。

当我打开 "Insert ActiveX Control" 对话框时,找不到我的 ActiveX 控件。

如果我将 64 位控件更改为 32 位,问题就解决了。为什么? MFC 不支持 64 位 ActiveX 控件吗?

奇怪的是,我可以通过 QT5 支持的 ActiveX 控件测试容器工具 -- "testcon.exe" 加载 64 位控件。 ActiveX Control Test Container supported by QT5

Control UUID in regedit

Control UUID

这不是因为 MFC 不支持 64 位,而是因为 Visual Studio IDE 及其支持的 GUI 工具仅适用于 32 位。

问:

I have a special type to display but the type require a 64bit dll thus I have to compile the custom visualizer in x64. However I got bad image error when viewing the variable. Does visual studio 2019 support for visualizer compile in 64 bit mode? Or because VS is 32 bit program thus the visualizer also require to be 32 bit?

甲:

The Visual Studio IDE is 32bit (and because of the many existing extensions and the long history of the Visual Studio IDE this is not going to chance easily).

So any extensions, including custom visualisers, need to be 32bit.

If you cannot get a 32bit build of your dll, then you would need to have some kind of container process and then communicate with that (this is unlikely to be easy, because none of the internal APIs would be accessible to the helper process).

Visual Studio 64 bit? [closed]
问:

Is there any 64 bit Visual Studio at all? Why not?

典型短A:

No, but the 32-bit version runs just fine on 64-bit Windows.


你应该分别制作32位/64位的ActiveX控件,导入32位的ActiveX来创建32位的应用程序,并添加在64位编译应用程序的设置。