如何在两个应用程序之间进行通信 [英] How to communicaton between two applications

查看:811
本文介绍了如何在两个应用程序之间进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有很多应用程序已经由C ++编写。在一个应用程序中使用

PostMessage很容易,并在另一个

应用程序的WndProc函数中捕获此消息。

从那以后。 net有一些强大的库。我使用C#开发新的

应用程序。但是我不知道如何在C#中使用simlar函数来与我现有的C ++应用程序进行
通信。

任何帮助都会受到赞赏。


George chen

Hi

I have lots applications are already written by C++. It ''s easy to use
PostMessage in one application and catch this message in another
application''s WndProc Function.
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.
Any help would be appreciate.

George chen

推荐答案

你好!

你写的是2005年5月17日星期二11:42:24 -0700:


GC>由于.net有一些强大的库。我使用C#开发新的

GC>应用。但我不知道如何在C#中使用simlar函数来支持
GC>与我现有的C ++应用程序的通信。


您可以尝试MsgConnect( http://www.eldos.com/msgconnect/ )为此。

MsgConnect允许您在驻留在相同或

上的应用程序之间进行通信不同的系统可以轻松使用TCP,UDP,HTTP,内存映射文件。


最诚挚的问候,

Eugene Mayevski

Hello!
You wrote on Tue, 17 May 2005 11:42:24 -0700:

GC> Since .net have some powerful library. I use C# to develop new
GC> application. But I do not know how to using simlar function in C# to
GC> communication to my exist C++ application.

You can try MsgConnect ( http://www.eldos.com/msgconnect/ ) for this.
MsgConnect lets you communicate between applications residing on the same or
different systems easily using TCP, UDP, HTTP, memory-mapped files.

With best regards,
Eugene Mayevski


感谢Eugene,


由于我的应用程序在PocketPC上运行,我担心MsgConnecct无法在PocketPC上运行


我只是想找一个简单的方法来互相通知。这是我的代码
$ c $ b in C ++:

App a:

#define WM_SCANBARCODE WM_APP + 100

:: PostMessage(HWND_BROADCAST,WM_SCANBARCODE,0,0);

App b:

case WM_SCANBARCODE:// WM_SCANBARCODE = WM_APP + 100

break;


非常感谢,

George Chen


Eugene Mayevski <毫安****** @ eldos.com>写在消息

新闻:uQ ************** @ tk2msftngp13.phx.gbl ...
Thanks Eugene,

Since my application runs on PocketPC, I am afraid MsgConnecct can not
run on PocketPC.
I just want to find a simple method to notify each other. Here is my code
in C++:
App a:
#define WM_SCANBARCODE WM_APP + 100
::PostMessage(HWND_BROADCAST, WM_SCANBARCODE , 0, 0);
App b:
case WM_SCANBARCODE: // WM_SCANBARCODE = WM_APP + 100
break;

Thanks anyway,
George Chen


"Eugene Mayevski" <ma******@eldos.com> wrote in message
news:uQ**************@tk2msftngp13.phx.gbl...
你好!
你在2005年5月17日星期二11:42:24 -0700写道:

GC>由于.net有一些强大的库。我使用C#开发新的GC>应用。但我不知道如何在C#中使用simlar函数来实现GC>与我现有的C ++应用程序的通信。

您可以尝试MsgConnect( http ://www.eldos.com/msgconnect/ )为此。
MsgConnect允许您使用TCP,UDP轻松地在同一个或不同系统上的应用程序之间进行通信, HTTP,内存映射文件。

最诚挚的问候,
Eugene Mayevski
Hello!
You wrote on Tue, 17 May 2005 11:42:24 -0700:

GC> Since .net have some powerful library. I use C# to develop new
GC> application. But I do not know how to using simlar function in C# to
GC> communication to my exist C++ application.

You can try MsgConnect ( http://www.eldos.com/msgconnect/ ) for this.
MsgConnect lets you communicate between applications residing on the same
or
different systems easily using TCP, UDP, HTTP, memory-mapped files.

With best regards,
Eugene Mayevski



因为.net有一些强大的库。我使用C#开发新的
应用程序。但是我不知道如何在C#中使用simlar函数与我现有的C ++应用程序进行通信。
Since .net have some powerful library. I use C# to develop new
application. But I do not know how to using simlar function in C# to
communication to my exist C++ application.




仍然可以使用PostMessage。


Mattias


-

Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com

请回复到新闻组。



PostMessage can still be used.

Mattias

--
Mattias Sj?gren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


这篇关于如何在两个应用程序之间进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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