[DUG] Sending data between process on same computer on windows
Myles Penlington
myles at ams.co.nz
Tue May 8 11:10:50 NZST 2007
There are limits on the #msgs per thread etc, security issues eg Vista,
System shutdown, system message hooks (which may throw messages away -
and you have no way of knowing if this happens - e.g desktop/video
managers), Journal hooks, Message deadlocks (have to be unlucky to get
these).
Mind you some of these only apply to PostMessage.
In essence, you do not have full control over SendMessage - lots of
things can get in the way.
I would always use a system wide Mutex/Semaphore etc in preference and
WaitForMultipleObjectsEx.
Myles
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Leigh Wanstead
Sent: Tuesday, 8 May 2007 10:46
To: NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] Sending data between process on same computer on
windows
May I ask why sendmessage is not reliable? In what situation will cause
sendmessage fail to break the communication?
TIA
Leigh
-----Original Message-----
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz]On Behalf Of Myles Penlington
Sent: Tuesday, 8 May 2007 10:29 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] Sending data between process on same computer
on windows
The devil is in the detail in this kind of stuff, and your
actual implementation can have a great effect.
As implied, the best method will be to develop 2 or 3 different
methods, test and compare the results.
Myles.
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz] On Behalf Of Conor Boyd
Sent: Tuesday, 8 May 2007 10:19
To: NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] Sending data between process on same computer
on windows
Sorry Leigh, I haven't done enough testing with big volume
messages to be able to answer that for you.
I was more interested in something that worked and was reliable.
Cheers,
Conor
________________________________
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz] On Behalf Of Leigh Wanstead
May I ask which is faster, ipc or sendmessage?
-----Original Message-----
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz]On Behalf Of Conor Boyd
I found the IPC functionality from madshi.net
(http://help.madshi.net/IPC.htm <http://help.madshi.net/IPC.htm> ) to
work very nicely.
I needed a way to send messages from a screensaver I was
writing to another process on the same box, and SendMessage didn't seem
to work when a screensaver was active (which I found strange, but
anyway...), and the IPC stuff from madshi works flawlessly.
________________________________
From: delphi-bounces at delphi.org.nz
[mailto:delphi-bounces at delphi.org.nz] On Behalf Of Leigh Wanstead
May I ask what is the fastest way to send data between
process on same computer on windows? I assume sendmessage api faster
than semaphore waiting, of course faster than TCP/IP which will go
through huge amounts of tcp/ip stack. I just want lowest overhead on per
call. Anyone have any experiences on that?
Attention:
This communication is confidential and may be legally
privileged. If you are not the intended recipient, please do not use,
disclose, copy or distribute it, other than to return it to us with your
confirmation that it has been deleted from your system.
Attention:
This communication is confidential and may be legally privileged. If you are not the intended recipient, please do not use, disclose, copy or distribute it, other than to return it to us with your confirmation that it has been deleted from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.adventureeducation.co.nz/pipermail/delphi/attachments/20070508/482e092e/attachment.html
More information about the Delphi
mailing list