Re: Communicating between Applications



Stefan Berglund wrote:
On Tue, 14 Mar 2006 22:25:12 -0000, "Mike Williams"
<Mike@xxxxxxxxxxxxxxxxx> wrote:
in <eSrpmY7RGHA.1728@xxxxxxxxxxxxxxxxxxxx>

"Karl E. Peterson" <karl@xxxxxxxx> wrote in message news:e9m70M7RGHA.1688@xxxxxxxxxxxxxxxxxxxxxxx

There are scores of methods. Probably the simplest would be to pass
an hWnd to AppB on its command line, and then send progress messages
back to that window. Would require a hook --
Actually that's the way I do it, except that I do it in a way that doesn't require a hook. I pass the "slave" app the hwnd of an otherwise unused (and invisible) textBox in the main "master" app and then the slave app uses the SendMessage API to send the hwnd a WM_SETTEXT message along with a string of your own choosing. The "master" app knows exactly when the message is received because it triggers the invisible Text Box's Change event. An added bonus of this method is that you can send all sorts of different messages back simply by choosing an appropriate string.

Mike



Uhh, err um, uhh that would be mailslots.


I've been pondering the appropriateness of mailslots for interprocess comms in
a project of my own. Can you point me to any good tutorial/example/sample/demo
resources?



Bob
--
.



Relevant Pages

  • Re: Application LostFocus?
    ... Public Function GetActivehWnd() ... Dim hwnd As Long ... Dim hWndCurrent As Long ... non-zero number when the Access app containing this function has the focus ...
    (microsoft.public.access.modulesdaovba)
  • HtmlHelp schliesst meine App...
    ... ich habe ein Problem mit der Funktion "HtmlHelp". ... Wenn ich die CHM-Datei ein paar mal von meiner App aus öffne, ... HWND g_hWnd = NULL; ...
    (microsoft.public.de.vc)
  • Re: Choosing between different COM servers?
    ... By the way, what about HWND? ... Window Handles are quaranteed unique for all running processes. ... be your main app. ... PCDInstance pcdInst; ...
    (microsoft.public.vb.com)
  • Re: Sending WM_LBUTTONDBLCLK to a ListView control
    ... To simplify the troubleshooting I have built a simple .NET app with a label ... then to the ListView control in App A. Both ... public const UInt32 WM_MOUSEACTIVATE = 0x0021; ... public static extern IntPtr SendNotifyMessage(IntPtr hWnd, uint Msg, IntPtr ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Communicating between Applications
    ... Would require a hook -- ... I pass the "slave" app the hwnd of an otherwise unused (and ... Uhh, err um, uhh that would be mailslots. ...
    (microsoft.public.vb.general.discussion)

Loading