CreateProcess and CreatePipe to execute a process and return output as a string in VC++
问题 I am trying to use CreateProcess and CreatePipe to execute a process from within a Windows Forms C++/CLR application in Visual Studio 2010. From within my Windows forms app I want to execute a child process (console app) and return the output as a std::string , std::wstring , or System::String^ within my Windows forms app. Additionally, I do not want the newly created child process to spawn a window. The console application is of my own creation, so I have control of it's source too. I have