launching on Wintel/inter-process communication

Larry_R_Huisingh at rl.gov Larry_R_Huisingh at rl.gov
Tue Dec 3 11:27:01 EST 2002


Richard,

See below

...snip...

> In the first of my two apps, I have an index of documents which can be
opend
> by clicking them in an index window.  The second app serves a different
> purpose, but from time to time needs to launch documents belonging to the
> first app.
> 
> In the worst case, I would accept being able to successfully launch a
second
> instance of the index app, but the launch command won't allow that without
> quitting the first instance (and even then I've had it unable to launch--
> must it hit idle?).
> 
> But really far better would be to have the index app notified so it could
> open the document within itself.  That preserves the user's state, keeps
> only one intance to avoid confusing the user ("Why are there two index
> windows?"), and is lighter on system resources.
> 

As far as communicating between processes I have used Win32 named pipes.
Reading and writing are very similar if not identical to reading/writing a
file.  I had to write a DLL that calls the Win32 API routines that open,
close, read and write to the pipe but it works great for me.  In my case my
MC app communicates with a C++ program on another computer via named pipes
and it is very fast.  Now this will require Windows NT/2000/XP (not Win9x)
if you will be communicating between two MC apps on the same computer.  This
approach can be used to communicate with a different program on the same
computer or one on a different computer on the network.  My program even
checks two different computers to see which one has the named pipe I am
looking for.  

Just one more possibility for you to consider.

Larry Huisingh



More information about the metacard mailing list