Christopher Faylor <[EMAIL PROTECTED]> said: > >I would also mention that there is an AttachConsole where you can use > >an already existing console, you just have to know the console owner's > >PID. > > The MSDN documentation indicates that AttachConsole is available on > Windows XP only. It's not a generic solution.
Win32's SetStdHandle () will allow us to attach to an already open console. However, we have to get the process id of the launching console before we can figure out what console handles we will pass to SetStdHandle (). I've tried looking for functions like GetParentProcess (), etc. but so far I can't find a function that will return a handle, or the process id, of the launching process. Does anyone know of such a function? Harold
