How do I launch a process and obtain its output?
In the C language using the Windows API, how can I get the output of a process when I have its process information? I have code like this: STARTUPINFO si1; ZeroMemory(&si1,sizeof(si1)); PROCESS_INFORMATION pi1; ZeroMemory(&pi1,sizeof(pi1)); BOOL bRes1=CreateProcess(_T("C:\\User\\asd.exe"),cmd_line1,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL, &si1,&pi1); and the process asd.exe prints a certain output, I want to get it to my process(the one i used the code above in). This answer is probably a bit longer than you expected, but that's how the Windows API is sometimes. In any case, even though