Re: Can remote thread use event handle from local process?
Memory mapped files, sockets, mailslots, pipes, maybe COM
or RPC...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Vincent Fatica" <vince@blackholespam.net> wrote in message
news:46c335c8$1@news.vefatica.net...
On Wed, 15 Aug 2007 12:48:50 -0400, "Igor Tandetnik" <itandetnik@mvps.org>
wrote:
A handle is only valid in a process that created it. You can use
DuplicateHandle to create a new handle to the same object, suitable for
some other process.
I should have known that. :-)
The remote thread produces data in memory that must be freed eventually.
I want
the local app to get that data. I could let the remote thread end without
freeing the memory, get the data with ReadProcessMemory, and start another
remote thread to free the memory. An event could be used by the remote
thread
to say "time to read the data" and by the local app to reply "got it, you
can
exit now". If I gave the local app a window, I could transfer the data
with
WM_COPYDATA. All of these seem cumbersome. Is there a better way?
--
- Vince