launching on Wintel/inter-process communication

Ken Ray kray at sonsothunder.com
Mon Dec 2 20:00:01 EST 2002


> >> It seems less reasonable, certainly less convenient, to tell them they
> >> need to switch to the first instance and hunt down the document in an
> >> "Open file" menu item.
> >
> > Can you use DDE? Ken would know more about this...
>
> Hmmm... I hate relying on externals, esp. using a protocol MS warns us
will
> be phased out.  But there are some advantages to DDE...hmmm...

But also limitations. The current implementation only allows a hard-coded
registration of an application called "EXT"... if you have more than one app
running at the same time for whatever reason, you can't use DDE with both.

> But with my app, rather than either the single-window or multiple-window
> models, mine uses something more like what the Win HIG describes as the
> project model, as discussed at
>
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html
> /ch10f.asp>.  This is arguably the closest match to Rev's model as well.
>
> 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.


Richard, have you considered UDP? It is quite effective in Windows (although
it is a little buggy on the Mac, but it should be resolved with 2.5 I hope).
Basically one app opens a UDP socket that the other app communicates on.
Works pretty nicely...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the metacard mailing list