32位ActiveX控件在64位.NET应用程序 [英] 32 bit ActiveX Control in a 64 bit .NET App

查看:523
本文介绍了32位ActiveX控件在64位.NET应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造,我希望能够编译所有CPU一个C#.net应用程序。我也想有一个特定的ActiveX控件在此应用程序的用户界面,但ActiveX控件我试图使用不支持32位。有一些诀窍或解决,我可以用用得到这个控制工作?

I'm creating a C#.Net application which I want to be able to compile for "All CPUs". I also want to include a specific ActiveX control in the UI of this app, but the ActiveX control I'm trying to use does not support 32 bit. Is there some trick or work around I can use to use get this control to work?

有关嵌入ActiveX控件在Web浏览器的控制呢?这会甚至工作?

What about embedding the ActiveX control in a Web-browser control? Would this even work?

推荐答案

您必须运行ActiveX控件在一个单独的32位进程。这将是困难的,这将有自己的窗口,是不会成为你的64位程序的用户界面的一部分。虽然是前$ P $的SDK文档pssly禁止的,可以尝试利用Windows 3 appcompat内置到的setparent()API函数的优势。它可能会奏效。

You have to run the ActiveX control in a separate 32-bit process. That's going to be difficult, it would have its own window that isn't going to be part of the UI of your 64-bit process. Although it is expressly forbidden by the SDK docs, you can try to take advantage of the Windows 3 appcompat built into the SetParent() API function. It might work.

您会有很多额外的麻烦,进程之间的通信是棘手不够(你需要远程或WCF),最困难的部分是处理异常。一个进程轰炸与另一个幸存的,从来没有注意到的东西是错误的不会是pretty的。

You'll have lots of additional trouble, communicating between processes is tricky enough (you'll need Remoting or WCF), the hard part is dealing with exceptions. One process bombing with the other one surviving and never noticing that something is wrong is not going to be pretty.

也许,平台目标选项启动冠冕堂皇的吸引力?

Perhaps the Platform Target option starts sounding attractive?

这篇关于32位ActiveX控件在64位.NET应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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