-
January 13th, 2004, 10:00 PM
#1
Is there a way to pass a HANDLE from one process to another?
I am playing with Pipes which allow me to intercommunicate from one process to another but if you have ever played with pipes you quickly realize that the CreatePipe() function returns
back two handles one for reading and one for writing. The one handle is for the one process, the other handle for the other process. The problem is how do you get a VALID handle
to the other process so the communication can begin? I noticed they Created a new process and had it Inherit the handles of the process that did the creating BUT what i want to
know is, is there a way to pass one of these handles to an already existing process. I know i can pass anything i want to another process with such techniques as the clipboard, or
WM_COPYDATA but it is this HANDLE that it seems that it becomes invalid once it gets into another process. I am hoping there is a way to pass a handle to another process and
still remain valid. Are there any existing API functions to resolve this?
-
January 13th, 2004, 11:00 PM
#2
*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/
"It's hard to believe in something you don't understand." -- the sidhi X-files episode
galathaea: prankster, fablist, magician, liar
-
January 13th, 2004, 11:09 PM
#3
Originally posted by galathaea
DuplicateHandle
ha ha beat me too it I'll just add there is a lot of documentation on using duplicatehandle(...) if you just search your own local msdn or msdn.microsoft.com and example code too boot.
-
January 14th, 2004, 05:28 AM
#4
THANK YOU!!! You guys are lifesavers!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|