Click to See Complete Forum and Search --> : Data between apps?


ROOKIE
June 5th, 1999, 01:38 PM
Is there an easy way to pass data between two apps on the same pc? If someone has some very well-documented source of an easy way to pass data, I would greatly apprecitate it.

Gomez Addams
June 5th, 1999, 04:11 PM
Check out the article on IPC using WM_COPYDATA in the Win32 section of this site.
The sample passes a structure of data between two apps.

Masaaki
June 5th, 1999, 04:59 PM
Hi.

As long as I remember, Rick York sample code about WM_COPYDATA focuses on two different dialog on one application.
If I have a mistake, just sorry.

But I suppose that his code will be avaliable between two different application. That is, we can use SendMessage() to another
application if we can get the window handle of it. But in detail, I think that we may face more difficult points if we try to catch
the child widnow hander of another application. Anyway, try to check this by SPY++.

This topic is a famous one on this codeguru message board. If you use "search", you can find a varity of approaches.

One time, I posted about map memery(?) and txt file between Excel and our application.
Also, we can use CSoket program having Client and Server locally, or OLE client and server(?).

HTH.
-Masaaki Onishi-

Gomez Addams
June 5th, 1999, 10:26 PM
I just re-read the article. The message is sent between two applications.
It just so happens that they are two instances of the same app.

The specific question was about passing data between two apps and
WM_COPYDATA can do this. Another approach could be named pipes.
I use them both in different situtations.

Ashran
June 6th, 1999, 02:29 AM
If you want to exchange datas between 2 app's you could use mutexes, for more than 2 semaphores.
If you want help email me : ashran@mcb.at