ootsoo Posted May 11, 2006 Share Posted May 11, 2006 (edited) Hi.Reference to MSDN under the topic pipes/Anonymous Pipe/Pipe Handle InheritanceThe following are the steps mentioned for redirecting the standard output handle to the child process1.Call the GetStdHandle function to get the current standard output handle2.Call the SetStdHandle function to set the standard output handle to the write handle to the pipe. 3.Create the child process4.Call the CloseHandle function to close the write handle to the pipe.5.Call SetStdHandle to restore the original standard output handleMy Question is whether there will be any impact in the parent process when the restoring of the original handle is not done. Please reply back. its urgent.Moreover, the GetStdHandle() API in the step (1) is returning INVALID_HANDLE_VALUE. When does this API returns INVALID_HANDLE_VALUE. When GetLastError is called it returns 6 (invalid handle). Is there any scenario or condition in which this API return INVALID_HANDLE_VALUE.Thanks in advance Edited May 11, 2006 by ootsoo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now