On Mon, 08 Apr 2013 09:47:00 +0100, Deanna Earley
<
dee.e...@icode.co.uk> wrote:
>> 3)Lone Form SendMessage, no hooks.
>
>No hooks? To receive most messages you will at least need to subclass (a
>form of hook)
>Again, cross process, can be sync or async. but VERY limited amount of
>data. Without subclassing, you'll need to hijack the normal messages and
>events.
>
>> 4)SendMessage with message hook on receiving form.
>
>A limited amount of data can be passed cross process. The message system
>is designed for high throughput of small messages, not for marshalling
>large chunks of data.
>
> DDE
>Old but still used by the Windows shell.
>I've not used it in the last 15 years so couldn't say what its
>limitations are.
>
I'll add a short word for my favorite "hammer" -> DDE.
I kept Deanna's comments on SendMessage, because DDE basically uses
Windows Messaging - merely adding the ability to manage larger amounts
of data and simplify the management of message sending and collection.
First the limitations:
DDE follows the Publisher / Subscriber model. If your needs don't fit
- skip it.
It uses the queue just like a thousand other things out there. The
client has to reserve time or insure it does in fact manage the
events.
VB out of the box, using its inherent DDE support, has a limited
number of Topics it can support and depends on data binding - an
active control and GUI, eg, TextBoxes. You can get around this by
writing your data aware classes or controls.
Advanatages:
Analogous to a newspaper. The publisher cares less who his users are,
or whether they are reading or not. The reader just expects his
newspaper to be there. If not - it is not a tragedy, there isn't any
new data. The client can complain, skip it, try something else, etc.
This reduces most "synchronization" beyond the obvious.
Another advantage is it has been around forever. It is the orginal
mechanism behind VBXs, and unless Microsoft wants to kill about a
million SCADA applications, it is likely to remain. <g>
Simple and quick to setup, configure, modify, and debug/test.
-ralph