I've written a small console application to wrap a third-party DLL that has issues. I am calling it from a GUI application using _popen, and just want to read a value from the console program's standard output. In doing so, an undesirable console window is briefly displayed.
I am aware that this can be avoided by using a certain STARTUPINFO configuration with CreateProcess. However, I would prefer to put the fix in the console application and still use _popen. Creating the child process using the windows subsystem (i.e. WinMain instead of main) does not make the console window go away. Apparently, a console is allocated by the operating system to facilitate the _popen communication.
Note that the third-party DLL is unstable, but necessary to interface with proprietary hardware. Therefore, any approach the loads the DLL in the GUI applications memory space is unacceptable.