Getting output from executed shell program
[platform]
Language=C++
System=Windows
[/platform]
I would like to gain access to the output of a shell program I currently run using ShellExecute. How is that done?
Thanks, but before I go into it: In the example it seems that the child process'' programming is directed towards its existence as a child process. The program I am targeting is a standalone which I have not programmed and to the source of which I have do not have access.
The technique works with normal C/C++ file console I/O techniques in the child process.
[edited by - SiCrane on May 26, 2004 8:27:42 PM]
[edited by - SiCrane on May 26, 2004 8:27:42 PM]
Ok I got it working like a charm now, but I have lost some functionality from ShellExecute that I really liked. When I create the process using this method I do not have the option of hiding the window associated with it. How is that done in this case?
Check out the member variables of the STARTUPINFO structure you pass to CreateProcess(). One of them should be wShowWindow, which you can use to pass any show window flags that you could use with ShellExecute().
Hmm... Thats wierd. I tried to use it like this:
But is does not seem to be working.
siStartInfo.wShowWindow = SW_HIDE;
But is does not seem to be working.
Did you set the STARTF_USESHOWWINDOW flag with dwFlags member variable of the STARTUPINFO structure?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement