在同一系统上的两个应用程序:间传递数据的首选方式?
问题说明
我有一个应用程序 (A) 需要启动另一个应用程序 (B).我需要在应用程序之间传递数据.我可以想到两种方法.首先是打开一个套接字.第二种是通过dll共享数据.
I have an application (A) that needs to launch another application (B). I need to pass data between the applications. I can think of two approaches. The first is to open a socket. The second is to share data via a dll.
打开套接字方法很简单.
The opening socket approach is straight forward.
dll 方法我有一些问题吗?我可以将插件dll加载到B中.我想创建一个A可以用来将数据传递给B的dll.加载dll时,是否只加载了一个dll实例?如果是这样,这是否意味着可以在加载 dll 的应用程序之间共享数据?
The dll approach I have some questions? I can load plug-in dlls into B. I want to create a dll that A can use to pass data to B. When loading dlls, is only one instance of the dll loaded? If so, does this mean that data can be shared between applications that load the dll?
什么是更好的选择?
还有其他方法可以做到这一点吗?
Are there other ways of doing this?
正确答案
您无法通过 DLL 有效地共享数据.其他方式:
You can't effectively share data via a DLL. Other ways:
- 磁盘文件
- 管道
- 共享内存
- 消息
- RPC
- CORBA
- COM
- 等
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanghhccb
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20