从系统托盘中运行的Windows应用程序访问对象

时间:2021-03-23 21:03:41
I want to have one application running in the system tray managing the communication between the client / server and login's to the server.  Then I want to have multiple c# applications access a class inside the application running in the system tray.  When the calling windows application calls the system tray application - the system tray should start up if it is not running.

Tech Note:
1. all applications are using c# 3.5 2. This was very easy with VB activeX EXE - not sure how to do it with C#

技术说明:1。所有应用程序都使用c#3.5 2.使用VB activeX EXE非常容易 - 不确定如何使用C#

1 个解决方案

#1


In VB you would have been using DCOM to provide interprocess communications.

在VB中,您可能一直使用DCOM来提供进程间通信。

The easiest way in .NET is likely to be: expose a WCF service (easy enough to self host a WCF server: use the ServiceHost class) and have the client's connect to that.

.NET中最简单的方法可能是:公开WCF服务(很容易自我托管WCF服务器:使用ServiceHost类)并让客户端连接到该服务。

#1


In VB you would have been using DCOM to provide interprocess communications.

在VB中,您可能一直使用DCOM来提供进程间通信。

The easiest way in .NET is likely to be: expose a WCF service (easy enough to self host a WCF server: use the ServiceHost class) and have the client's connect to that.

.NET中最简单的方法可能是:公开WCF服务(很容易自我托管WCF服务器:使用ServiceHost类)并让客户端连接到该服务。