在同一系统上的两个应用程序之间传递数据的首选方法是什么? [英] What is the preferred way of passing data between two applications on the same system?

查看:202
本文介绍了在同一系统上的两个应用程序之间传递数据的首选方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序(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.我想创建一个dll,A可以使用传递数据到B.加载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?

什么是更好的选择?

有其他方法吗?

推荐答案

通过DLL有效地共享数据。其他方式:

You can't effectively share data via a DLL. Other ways:


  • 磁碟档案

  • 管道

  • 共享内存

  • 消息

  • RPC

  • CORBA

  • COM

  • 等。

  • disk files
  • pipes
  • shared memory
  • messages
  • RPC
  • CORBA
  • COM
  • etc.

这篇关于在同一系统上的两个应用程序之间传递数据的首选方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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