Communication between applications - HowTo

  • Thread starter Thread starter Dominik Gorsler
  • Start date Start date
D

Dominik Gorsler

Hi,

how can I enable my standard windows form application to react to a
"trigger" from another application (not necessarily managed code)?

The application has conventional windows form features and is usually used
stand alone.
Additionally it should "listen" to requests from another aplication and
process them.

That should be done in the following manner:
1. The user of the second application requests a certain process.
2. The second application tries to transfer this request along with some
data to the .Net application.
3. If this .Net application is already running and not busy, it should react
and process the request.
Otherwise an error MessageBox should indicate that the .Net application has
to be started first.

What is the best way to implement this?

Thanks,
Dominik
 
I'd usually use .NET remoting although if the other app isn't managed than
that makes the .NET remoting implementation trickier.

How about a database (or more simply a text file) that both applications
use, the first application writes to a certain table and the .NET
application checks the status of that table say every few seconds.

HTH

Simon
 
first the other app which isnt .net needs to determine if the .net
application is available. I would personally check the running processes
list.
For communicating there are a number of ways, more efficient then querying a
database table every few seconds would be to place a filesystemwatcher on a
file which could be written too by app2.
You could also write networking code to communicate through a tcp socket.
This would then allow the apps to possibly be setup on different machines
(although getting a running process list is trickier across the network).

Ciaran O'Donnell
 
Back
Top