"Abubakar" <em**********@y ahoo.comwrote in message
news:Of******** ******@TK2MSFTN GP05.phx.gbl...
Ok, can u tell me what does the following means:
"The system only does marshalling for system messages (those in the range
0 to (WM_USER-1)). To send other messages (those >= WM_USER) to another
process, you must do custom marshalling."
The issue has to do with pointers.
The "w" and "l" parameters of a message will be the same on the sending and
receiving sides. Sometimes, one of those parameters which is defined to be a
simple unsigned quantity is used to pass an address as in the case of
WM_SETTEXT.
Because applications do not share their address spaces, a pointer in one
application is meaningless to another. So if Windows didn't handle it as a
special case, you couldn't send a WM_SETTEXT message across a process
boundary.
What the documentation is (almost <g>) telling you here is when you send a
message with a pointer in one of the messages with a value less than
WM_USER, that windows will pass the data as well as modifying the pointer on
the receiving side so that the receiver can access it.
Of course, in order for Windows to do this it needs to know which parameters
are pointers in which messages. Those messages are roughly the ones which
were defined in Windows 3.1.
For your own message, or many of the common controls introduced after 16 bit
Windows, you need to marshal the data.
Regards,
Will