从 64 位应用程序使用 32 位进程内 COM 服务器的简单方法有哪些?

发布于 2024-08-10 18:02:28 字数 125 浏览 3 评论 0原文

我有一个 32 位本机 C++ ATL 进程内 COM 服务器,它依赖于大量旧版 32 位库。我需要在 64 位应用程序中使用它并尽可能进行最小的更改。

一种选择是将其放入 COM+ 应用程序中。还有哪些其他简单的选择?

I have a 32-bit native C++ ATL in-proc COM server which depends on a huge set of legacy 32-bit libraries. I need to use it from a 64-bit application with the smallest changes possible.

One option is putting it into a COM+ application. What are other easy options?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

老街孤人 2024-08-17 18:02:28

创建一个加载 inproc 服务器 dll 的 32 位帮助程序应用程序,但充当本地服务器。

编译 64 位代理存根代码。

然后,当 64 位应用程序尝试加载 ActiveX 时,它将加载 32 位本地服务器(一个单独的进程),而不是使用 32 位 inproc(它无法加载),这是合法的。

代理存根是从 IDL 自动生成的代码,应该可以很好地构建 64 位。

Create a 32bit helper application that loads the inproc server dll, but that acts as a local server.

Compile the proxy stub code for 64 bits.

Then, when a 64bit app tries to load your ActiveX, instead of using a 32bit inproc (which it cannot load) it will load the 32bit local server - a separate process - which is legal.

The proxy stub which is auto generated code from your IDL should build for 64bits just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文