Re: anonymous pipes
- From: Ian Semmel <isemmelNOJUNK@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 May 2006 06:12:58 +1000
You are probably better off using sockets unless you have some compelling reason to use pipes.
harshalshete@xxxxxxxxx wrote:
hi group,.
i am very new to mfc. and trying to communicate via ipc with the child
process.
but some things i didnot understand after reading the documents.
1) redirecting input and output of the child process i have to use two
pipes
--because it anonymous pipe is only one directional so that for data
to child process one pipe
--and for data from child process another pipe.(understood)
2)the child process inherits the handles so before creating child
process make duplicate copies of that hadle.(i didn't got this
point.)from what i read they say that child should not inherit that
handle.
3)
and actually i am to send the data to child and then able to get his
reply depending on that data for only one time.
if i want to do this untill some event then how i can do this?
means if
parent say's "hello child" then child should respond "hello
parent"
then if parent say's "help" then child "result"
like this untill parent says stop then child will get killed.
so for doing this do i need to handle synchronization?
4)and after every writefile do i need to make a call to CloseHandle();
and if i closed the handle then how i will communicate with child next
time
5) general architecture i want to develope
parent
child
p1
------------------------------------------------------->
p2
<----------------------------------------------------------
architecture
parent
child
step in
--------------------------------------------------------->
respective result
<---------------------------------------------------------
step out
----------------------------------------------------------->
respective result
<---------------------------------------------------------
stop
---------------------------------------------------------------->
will end
(main thing i want to do is that parent should be able to send request
multiple times and then child should respond multiple times)
how to do it?can i do it without threading?
please suggest a good method because i am doing IPC for first time.
Regards &Thanks
Harshal shete
- Follow-Ups:
- Re: anonymous pipes
- From: Luke Alcatel
- Re: anonymous pipes
- References:
- anonymous pipes
- From: harshalshete@xxxxxxxxx
- anonymous pipes
- Prev by Date: Re: Dragging dialog (custom handling)
- Next by Date: Re: OnPaint issues
- Previous by thread: Re: anonymous pipes
- Next by thread: Re: anonymous pipes
- Index(es):
Relevant Pages
|