开发者

How to access variables from a console application in a Windows Forms based application?

开发者 https://www.devze.com 2023-02-20 17:29 出处:网络
One solution is to use EMS and communicate back the variables. Any 开发者_开发问答other possible way?You can try to implement this by using:

One solution is to use EMS and communicate back the variables. Any 开发者_开发问答other possible way?


You can try to implement this by using:

  • IPC (Inter Process Communication via Named pipes)
  • Shared memory (Memory mapped files)
  • Socket (TCP/IP)

Example of using WCF: Many to One Local IPC using WCF and NetNamedPipeBindin

Other example: A C# Framework for Interprocess Synchronization and Communication

Everything depends on what version of .Net Framework you use. If you use .net 3.0. and above then you can take a look into WCF. If not then you are on your own and you can google on keywords P/Invoke (CreateFileMapping, MapViewOfFile, CreatePipe...)


You named it. Remoting is your friend. Unless you are using .NET 3+, in which case WCF should be preferred.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号