Communicate between 2 applications on the same machine

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

Can anybody suggest as to what is the best way communicate between 2
applications residing on the same machine?

Thanks.
kd
 
kd said:
Can anybody suggest as to what is the best way communicate between 2
applications residing on the same machine?

There are many different ways to do that. You can use remoting, sockets,
other IPC mechanisms, or the 'WM_COPYDATA' message. A sample for using
'WM_COPYDATA' to exchange data between two applications written by Tom
Shelton [MVP] can be found here:

<URL:http://groups.google.de/[email protected]>
 
Named pipes always worked well for me.

You can also use memory mapped files but named pipes are a lot easier - and
more stable in my experience.
 
Hi,

Thanks for your replies.

One application is developed in visual foxpro 8.0 and the other is developed
in vb.net. This being the scenario, could you please suggest the easiet way
to communicate between the two applications?

Thanks.
kd
 
There's an article here http://foxproadvisor.com/doc/14609 on exactly this
topic - bad news is it looks like you have to subscribe to access it.

Don't know much about Foxpro but named pipes are fairly easy to work with
and are pretty much platform independant. You create a named pipe and then
access it like a file i.e. you can write bytes into it and read bytes out of
it. One app would write into the pipe, the other would read out of it.
 
Hi Richard,

Thanks for the link.

On a second thought, I could may be try named pipes. However, I could not
find help on named pipes in the visual foxpro help or in vb.net help. Could
you please suggest keywords that I can use to perform search in foxpro as
well as in vb.net?

Thanks
kd
 
Hi kd,

Try searching google groups for "vb.net named pipe" - throws up quite a few
hits...

Here's a link to a good Microsoft article for VB.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;871044. The bulk of
this example uses plain old Win32 function calls so it should port to any
Microsoft programming environment with a bit of bending.

I don't know much about Foxpro - so you'd be better off asking about the VFP
side of things in VPF groups.
 
kd said:
Hi All,

Can anybody suggest as to what is the best way communicate between 2
applications residing on the same machine?

Thanks.
kd

If both processes are running on the same PC, then using Windows messaging
SendMessageW and WM_COPYDATA performs quite well.

We offer a .NET component FREE for non-commercial use that does this:
http://www.mini-tools.com/goto/comm
 
Back
Top