如何远程调用从C#应用程序的另一个工艺方法 [英] How to remote invoke another process method from C# application
问题描述
我有一个C#应用程序,我想打电话给从我app.But例如SendChatMessage函数名(字符串消息,INT用户ID),这个功能是属于我的电脑上运行的其它客户端/服务器应用程序的基础。我找不到我怎么能做到这一点的方式。
I have a C# app, i want to call a function name for example SendChatMessage(string message, int userid) from my app.But this function belongs another running client/server based application on my computer. I couldn't find the way how i can do this.
我尝试用反射库,使这个但没有成功。希望有人能帮我这件事。
I try to make this with Reflection library but failed. Hope someone help me about this.
感谢您的帮助。
推荐答案
欢迎到世界< A HREF =http://en.wikipedia.org/wiki/Inter-process_communication>进程间通信。有许多方法来做到这一点,如命名管道,RPC,共享内存等。
Welcome to the world of Inter-process communication. There are many methods to do this, like named pipes, RPC, shared memory, etc.
在简单地说,你的程序是一个进程内运行。另一个方案是另一个进程内运行。这就像你的父亲试图询问从男孩隔壁的东西。这些进程可以相互通信并相互调用的方法,或者使用彼此的数据。但是,不要随意或课程。他们需要交流的一些通用标准
In a nutshell, your program is running inside a process. The other program is running inside another process. It's like your father trying to asking something from the boy next-door. These processes can communicate with each other and invoke each other's methods, or use each other's data. But not arbitrarily or course. They need some common standard for communication.
看看这些问题:
这篇关于如何远程调用从C#应用程序的另一个工艺方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!