Re: Communicating processes using WM_COPYDATA

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Fri, 01 Apr 2005 16:38:42 -0800, Bernie Ryan
<guest at RapidEuphoria.com> wrote:

>Pete:
>
>   Your setting DWORD cbData as ZERO
>
>typedef struct tagCOPYDATASTRUCT {  // cds 
>    DWORD dwData; 
>    DWORD cbData; 
>    PVOID lpData; 
>} COPYDATASTRUCT; 
> 
Bernie, my instinctive idea was that P send no data whatsoever to Q,
just a request. I was expecting back a memory address (which I got
correctly, but could not peek).

However, I think you may have hinted at the concept I am missing.
If P creates and passes a memory area, and *SendMessage* marks that
memory area (or more likely an entire page of the heap) as writeable
by Q then my fears are allayed. Still seems a bit odd though. Far
safer (and easier, IMO) that Q should only ever be allowed to write to
(heap) pages it owns, rather than a read by P triggering a segfault.

Nevermind, I'm sure there are even worse guffs in the windows API.

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu