how can i hide console from the user when using _popen()
-
Hi I am using _popen to execute an exe file and read back the result in to a text file and analyze it. but from the time that user clicks the button the console window appears on the screen and goes away when the process is finished. how can i hide the console window from the user and show something like work in progress instead. is there a way to hide _popen ?
char Buffer[9]; string commandline="address"; FILE *fp; if ( (fp= _popen(commandline.c_str(),"r"))==NULL) exit(1); fgets( Buffer, 9, fp );
-
Hi I am using _popen to execute an exe file and read back the result in to a text file and analyze it. but from the time that user clicks the button the console window appears on the screen and goes away when the process is finished. how can i hide the console window from the user and show something like work in progress instead. is there a way to hide _popen ?
char Buffer[9]; string commandline="address"; FILE *fp; if ( (fp= _popen(commandline.c_str(),"r"))==NULL) exit(1); fgets( Buffer, 9, fp );
mitil20390482304 wrote:
I am using _popen to execute an exe file...
To create a Windows application that redirects input and output, read the section "Creating a Child Process with Redirected Input and Output" in the Win32 SDK. See here and here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
mitil20390482304 wrote:
I am using _popen to execute an exe file...
To create a Windows application that redirects input and output, read the section "Creating a Child Process with Redirected Input and Output" in the Win32 SDK. See here and here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
thanks man..i have already read those,,,and I have a really hard time undrestanding how i can use it in my case...can you help me some more...how can i run my _popen inside a process that has a hiden window?
-
thanks man..i have already read those,,,and I have a really hard time undrestanding how i can use it in my case...can you help me some more...how can i run my _popen inside a process that has a hiden window?
yoho...i found the answer myself check this out if you have the same problem as i do http://www.codeproject.com/win32/runsilent.asp[^] use the runsilent function that this guy is using in your own program...it is great