Communication between applications - HowTo

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dominik Gorsler

    #1

    Communication between applications - HowTo

    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


  • Simon Tamman

    #2
    Re: Communication between applications - HowTo

    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

    "Dominik Gorsler" <dominik@gorsle r.netwrote in message
    news:%23dcEtEF1 GHA.1040@TK2MSF TNGP06.phx.gbl. ..
    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
    >
    >

    Comment

    • Ciaran O''Donnell

      #3
      RE: Communication between applications - HowTo

      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 filesystemwatch er 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

      "Dominik Gorsler" wrote:
      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
      >
      >
      >

      Comment

      Working...