Re: interprocess communication

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The fastest way of course is shared memory. Just reserve
some space in config.bib and then use MmMapIoSpace
or VirtualAlloc/Copy to receive a pointer to this buffer
from two and more apps.

Another way (a bit slowly, but not so dirty) is FileMapping.
Use CreateFileForMapping,CreateFileMapping,
MapViewOfFile to create file mapping and access shared
buffer.

Create a hidden window in one app, and then use
FindWindow to obtain window handle and then
send data using a custom message (eg. UM_USER + something).

You may also want to use WM_COPYDATA message, however
this requre to have a window (at least hidden one).

Btw HWND_BROADCAST works ok on any windows
platform, should be something wrong with Your code. BUT
note You can not pass more than 8 bytes (WPARAM+LPARAM)
at once using HWND_BROADCAST or just any custom message.
Use WM_COPYDATA instead to pass more than 8 bytes
at a time.


"Ozb" <ozgurbali@xxxxxxxxxxx> wrote in message news:OEOUW7ioFHA.2472@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Is there any sample of messaging between two distinct process(xx.exe and
> device.exe).
>
> I tried postmessage with HWND_:BROADCAST parameter but I could not managed
> to get the message with
> PeekMessage..
>
> What are the other ways of interprocess communication??
> like filemapping, virtual memory, which gives best performence, does anyone
> benchmarked in range miliseconds.
>
> Thanks...
> Ozby
>
>
>
>


.



Relevant Pages

  • Re: In window mode, pD3DDevice->SetViewport?
    ... the back buffer is always stretchblit to ... // Holds Our Window Handle ... HINSTANCE hInstance; // Holds The Instance Of The Application ... void ReSizeD3DScene(int width, int height) // Resize And Initialize The ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: opengl program to load a bmp runtime error (using freeglut 2.4)
    ... but when i do ./a.out the following error appears and no window ... // Do the buffer Swap ... int gltIsExtSupported(const char *extension) ... GLint gltWriteTGA ...
    (comp.graphics.api.opengl)
  • Scenario to make recv(MSG_WAITALL) stuck
    ... Below is a scenario how to make recvwith MSG_WAITALL flag get stuck. ... Let's the size of the receive buffer is SOBUF_SIZE. ... TCP window probes. ... partial SOBUF_SIZE request. ...
    (freebsd-net)
  • Re: Scenario to make recv(MSG_WAITALL) stuck
    ... Below is a scenario how to make recvwith MSG_WAITALL flag get stuck. ... Let's the size of the receive buffer is SOBUF_SIZE. ... TCP window probes. ... partial SOBUF_SIZE request. ...
    (freebsd-net)
  • Re: A mailslot question
    ... the same problem exists whether you use a single buffer or multiple ... buffers - if you have a bug in your code it will leak memory or else ... processing of a mail slot messages by consuming additional system resources ... the right window dynamically. ...
    (microsoft.public.win32.programmer.kernel)