两个Windows窗体应用程序相互通信 [英] Two Windows Forms applications talking to each other

查看:130
本文介绍了两个Windows窗体应用程序相互通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个WinForms应用程序。我需要在它们之间传递一条消息。  它们都在同一台机器上运行。实现这一目标的最简单方法是什么?  我已经查看了pInvoke,WCF,MemoryMappedFiles等,但它们看起来都有点
不稳定或过度杀伤。

I have two WinForms applications. I need to pass a message between them.  They are both running on the same machine. What is the easiest way to accomplish this?  I have looked at pInvoke, WCF, MemoryMappedFiles, etc, but they all seem a little wonky or overkill.

建议?

推荐答案

将一个作为WCF主机,另一个作为WCF客户端。您可以为WCF使用不同的传输,例如套接字,命名管道等。
Have one as a WCF host and another as a WCF client. You can use different transport for WCF, such as socket, named pipe etc.


这篇关于两个Windows窗体应用程序相互通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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