Re: Communicating between Applications



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.

---
This posting is provided "AS IS" with no warranties, no guarantees, and no conferred rights.

Stefan Berglund
.



Relevant Pages

  • Re: Communicating between Applications
    ... an hWnd to AppB on its command line, ... Would require a hook -- ... I pass the "slave" app the hwnd of an ... WM_SETTEXT message along with a string of your own choosing. ...
    (microsoft.public.vb.general.discussion)
  • Re: Communicating between Applications
    ... Would require a hook -- ... I pass the "slave" app the hwnd of an otherwise unused (and ... back simply by choosing an appropriate string. ...
    (microsoft.public.vb.general.discussion)
  • Re: Communicating between Applications
    ... Would require a hook -- ... I pass the "slave" app the hwnd of an otherwise unused ... relies on windows messaging, if abused, messages can get lost. ...
    (microsoft.public.vb.general.discussion)
  • Re: Communicating between Applications
    ... I pass the "slave" app the hwnd of an otherwise unused 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. ... Uhh, err um, uhh that would be mailslots. ...
    (microsoft.public.vb.general.discussion)
  • Re: Lost with a systemwide hook
    ... They are controled by an app called QtDTAcer.exe. ... popup window does not appear when pressing the button. ... So I thought of a systemwide hook. ... LRESULT CALLBACK CInjectDll::HookProc(int nCode, WPARAM wParam, LPARAM ...
    (microsoft.public.vc.mfc)

Loading