64位应用程序与32位进程通信 [英] 64 Bit application communicating with 32bit process

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

问题描述

我在使用32位的第三方库的32位应用程序。现在,我必须让我的应用程序的64位,以便它可以充分利用64位地址空间(大内存)。 因为我无法加载32位的库到64位应用程序的过程中,我想创建32位可执行程序封装在第三方库,并利用IPC(命名管道/插座)我的64位应用程序进行通信。 所以我的问题是将它们这样做的什么问题? 另外,如果我要在64位系统上安装我的应用程序,涉及到我的应用程序中的所有文件将被复制到C:\ Program Files文件目录。现在,我可以让我的32位第三方的exe包装在同一个C:\ Program Files文件或者我需要复制到C:\ Program Files文件(x86)的?目录

I have 32 bit application using 32 bit third party library. Now I have to make my application 64 bit , so that it can take advantage of 64 bit address space ( large memory ). Since I can not load 32bit library into 64bit application process, I am thinking of creating 32bit executable wrapper over third party library and communicate from my 64 bit app using IPC ( named pipe/socket ). So my question is would their any issue in doing so ?. Also if I have to install my application on 64 bit systems, all files related to my application will be copied to "c:\Program Files" directory. Now can I keep my 32 bit third party exe wrapper in the same "c:\Program Files" or I need to copy to "c:\Program Files(x86)" directory ?

推荐答案

这正是微软建议这样那样的问题的方式。如果您正在使用COM,可以使COM EXE服务器。对于.NET使用WCF。在你的情况 - 本机C ++,没有COM - 内存映射文件或管道是一个不错的选择。

This is exactly the way Microsoft recommends for such kind of problems. If you are working with COM, you can make COM exe server. For .NET use WCF. In your case - native C++, no COM - memory-mapped file or pipe is a good choice.

对于安装目标文件夹 - 你需要有用来构建安装包的工具进行测试。如果整个安装目标为64位,单可执行文件是32位 - 该工具可能会显示有关该文件的警告。当执行文件,不要紧它是否在程序文件或程序文件(x86),或任何其他目录

Regarding installation destination folder - you need to test this with the tool used to build installation packages. If the whole installation target is 64 bit, and single executable is 32 bit - the tool may show warning about this file. When the file is executed, it doesn't matter whether it is in Program Files or Program Files (x86), or any other directory.

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

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