如何在ActiveX EXE中包装ActiveX DLL? [英] How to wrap an activex dll in an activex exe?

查看:147
本文介绍了如何在ActiveX EXE中包装ActiveX DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个32位的ActiveX dll.我有一个C#用户控制项目,该项目包装ActiveX dll以在WPF应用程序中使用.现在的问题是我们想将应用程序更改为64位.我们创建了一个64位构建目标,但由于它是32位,因此无法使用ActiveX dll.我正在考虑将ActiveX dll包装在ActiveX exe(输出COM)中,并在C#用户控件中引用ActiveX exe.有人可以提供一些在ActiveX exe中包装ActiveX dll的指南/演练吗?谢谢.

I have an ActiveX dll which is 32bit. I have a C# user control project which wraps the ActiveX dll for use in a WPF application. Now the problem is we want to change the application to 64bit. We created a 64bit building target, but we were unable to use the ActiveX dll because it is 32bit. I am considering wrapping the ActiveX dll in an ActiveX exe (out-proc COM), and reference the ActiveX exe in my C# user control. Could somebody provide some guide/walkthrough for wrapping an ActiveX dll in an ActiveX exe? Thanks.

推荐答案

请参阅 http://support.microsoft.com/kb/896457 [
See http://stackoverflow.com/questions/2152449/32-bit-activex-control-in-a-64-bit-net-app[^]

Or also http://support.microsoft.com/kb/896457[^]

The easy answer is that you cannot do that. A 64 application can only host 64 bit control. A 32 bit application can only host 32 bit controls.

So you have the following possibilities:

  • Force your application to be 32 bit
  • Ask for a 64 bit version of your ActiveX control
  • Replace your control by something else (ideally a .NET component)
  • Do not offer that feature in your 64 bit version
  • Start a 32 bit application with a windows with your control (and loose integration)
  • Keep the whole UI (user interface) 32 bit and have inter-communication with your 64 bit application (service) with does not have any interface
  • ...


这篇关于如何在ActiveX EXE中包装ActiveX DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆