Connecting Tech Pros Worldwide Help | Site Map

Inter Process Communication

  #1  
Old November 16th, 2005, 11:17 AM
A.M
Guest
 
Posts: n/a
Hi,

What is the best way to implemet Inter Process Communication in .NET ?

I developed two programs and I want to have them talk to each other.

Thanks,
Alan


  #2  
Old November 16th, 2005, 11:17 AM
Richard Blewett
Guest
 
Posts: n/a

re: Inter Process Communication


It depends on what degree of communication you need. If they just need
coordinate their actions you can use a named Mutex (see the System.Threading
namespace).

If you need proper calling with params, etc the only out-of-the-box solution
is remoting (System.Runtime.Remoting and friends).

However, a while back I wrote a wrapper round shared memory that may help
you do what you want - you can find it here (watch out for line breaks):

http://staff.develop.com/richardb/do...aredmemory.zip

HTH

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

"A.M" <nospam1@online.nospam> wrote in message
news:uTpwg%232lEHA.3524@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi,
>
> What is the best way to implemet Inter Process Communication in .NET ?
>
> I developed two programs and I want to have them talk to each other.
>
> Thanks,
> Alan
>
>[/color]


  #3  
Old November 16th, 2005, 11:32 AM
A.M
Guest
 
Posts: n/a

re: Inter Process Communication



Thanks for help.

So we don't have IPC (Inter Process Communication) in .NET platform?

Alan


"Richard Blewett" <richard@dotnetconsult.co.uk> wrote in message
news:eIyN1N3lEHA.3452@TK2MSFTNGP15.phx.gbl...[color=blue]
> It depends on what degree of communication you need. If they just need
> coordinate their actions you can use a named Mutex (see the[/color]
System.Threading[color=blue]
> namespace).
>
> If you need proper calling with params, etc the only out-of-the-box[/color]
solution[color=blue]
> is remoting (System.Runtime.Remoting and friends).
>
> However, a while back I wrote a wrapper round shared memory that may help
> you do what you want - you can find it here (watch out for line breaks):
>
> http://staff.develop.com/richardb/do...aredmemory.zip
>
> HTH
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://staff.develop.com/richardb/weblog
>
> "A.M" <nospam1@online.nospam> wrote in message
> news:uTpwg%232lEHA.3524@TK2MSFTNGP12.phx.gbl...[color=green]
> > Hi,
> >
> > What is the best way to implemet Inter Process Communication in .NET ?
> >
> > I developed two programs and I want to have them talk to each other.
> >
> > Thanks,
> > Alan
> >
> >[/color]
>
>[/color]


  #4  
Old November 16th, 2005, 11:36 AM
Kevin Yu [MSFT]
Guest
 
Posts: n/a

re: Inter Process Communication


Thanks for Richard's reply.

Hi Alan,

I think in .NET framework managed classes, the only way to do inter process
communication is remoting.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

  #5  
Old November 16th, 2005, 11:40 AM
Kevin Yu [MSFT]
Guest
 
Posts: n/a

re: Inter Process Communication


Hi Alan,

The following IPC mechanisms are supported by Windows:
" Clipboard
" COM
" Data Copy
" DDE
" File Mapping
" Mailslots
" Pipes
" RPC
" Windows Sockets

Some of them are also supported in .net, such as sockets. For others,
PInvoke is also OK. If you need to use pure .net technologe, you can use
remoting as well.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

  #6  
Old November 16th, 2005, 11:56 AM
Tim Behrsin
Guest
 
Posts: n/a

re: Inter Process Communication


I'm successfully using Remoting using Named Pipes as Channels for IPC
between a Service and a Client. No problems here... try it yourself.

http://www.thecodeproject.com/csharp...PipesPart1.asp
http://www.codeguru.com/Csharp/Cshar...cle.php/c7259/

I prefer the latter article.

Tim


  #7  
Old November 16th, 2005, 11:57 AM
A.M
Guest
 
Posts: n/a

re: Inter Process Communication


Thank you everyone for help.

Based on your posts I underestand that Remoting is a suggested method for
inter process communication in .Net. Therefore i am going to use remoting
rather than IPC.

Thanks again,
Alan


"A.M" <nospam1@online.nospam> wrote in message
news:uTpwg%232lEHA.3524@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi,
>
> What is the best way to implemet Inter Process Communication in .NET ?
>
> I developed two programs and I want to have them talk to each other.
>
> Thanks,
> Alan
>
>[/color]


  #8  
Old November 16th, 2005, 01:42 PM
dr
Guest
 
Posts: n/a

re: Inter Process Communication


Thanks for the links - so from what I've read Remoting and Web Services
really are the only two options for IPC in a .NET managed environment
(including moidifying Remoting as you have done with IPC). Is that correct?


"Tim Behrsin" wrote:
[color=blue]
> I'm successfully using Remoting using Named Pipes as Channels for IPC
> between a Service and a Client. No problems here... try it yourself.
>
> http://www.thecodeproject.com/csharp...PipesPart1.asp
> http://www.codeguru.com/Csharp/Cshar...cle.php/c7259/
>
> I prefer the latter article.
>
> Tim
>
>
>[/color]
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
C#-APP: Fastest Inter Process Communication dantz answers 0 November 3rd, 2008 06:41 AM
Inter Process Communication, full-duplex Kasper Lindberg answers 6 August 20th, 2008 02:05 AM
Inter-process communication, how? ecir.hana@gmail.com answers 6 December 22nd, 2007 08:35 PM
How to detect the real status of a socket? Frank Meng answers 4 November 16th, 2005 04:06 AM