|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
communicate between two exe applicationsHi,
There are are two app,named App1 and App2. When run App1, it will run App2 automatically. On the other hand, when terminate App1, App2 will aslo be terminated. I think App1 and App2 in a different domain, how to communicate them? I don't want to use process.kill() method to find and kill app2 process when App1 terminated. does "delegate" can do it? Napo wrote:
> Hi, Use .NET Remoting for this. App2 should expose a remote object with > There are are two app,named App1 and App2. > When run App1, it will run App2 automatically. > On the other hand, when terminate App1, App2 will aslo be terminated. > I think App1 and App2 in a different domain, how to communicate them? > I don't want to use process.kill() method to find and kill app2 process > when App1 terminated. > does "delegate" can do it? Close() method that App1 could use to tell App2 to shut down. You could also use sockets, named pipes (no explicit support in .NET here) or just plain files to ensure communication between two applications. Best regards! Marcin Hi Napo,
If your work in vs2005 (framework 2.0.) you can use IPC channel (do google search on that topic) and other stuff i mentioned below for fr. 1.1.. If you are working in vs2003 (framework 1.1.) you have few other ways: 1. Like Marcin told you - .NET Remoting 2. TCP/IP protocol (sockets) 3. API - CreateEvent, SetEvent ... ( named event ) 4. API - CreateNamedPipe .... Other solution is to use some 3rd library that allows communication between different processes.... like my: http://www.habjansoftware.com/ipc_library.aspx .... it supports IPC, Shared Memory and Shared Events (all writen in vb.net)... Regards, Josip Habjan Show quote "Napo" <N***@discussions.microsoft.com> wrote in message news:E2978D1C-E3E3-4D39-9B62-478B88D4AAA8@microsoft.com... > Hi, > There are are two app,named App1 and App2. > When run App1, it will run App2 automatically. > On the other hand, when terminate App1, App2 will aslo be terminated. > I think App1 and App2 in a different domain, how to communicate them? > I don't want to use process.kill() method to find and kill app2 process > when App1 terminated. > does "delegate" can do it? |
|||||||||||||||||||||||