Tech Support > Microsoft Windows > Development Resources > How do I Create a new process (a console app) so that it opens in a new window?
How do I Create a new process (a console app) so that it opens in a new window?
Posted by Dave on May 12th, 2007


I have two console applications. I want one to launch another one so
that the new process launches in its own command window. To date,
I've only started new processes with the 'CreateProcess' call, but
that always seems to launch the new process in the same command window
as the existing one. How can I get a new one to launch?

Thanks!

Posted by Barry on May 13th, 2007



"Dave" <davechandler@gmail.com> wrote in message
news:1179008561.554732.129570@o5g2000hsb.googlegro ups.com...
I haven't actually tried it but it looks like you set the
CREATE_NEW_CONSOLE flag in the dwCreationFlags
parameter of the CreateProcess() call.



Posted by Pradeep on May 13th, 2007


On May 13, 3:22 am, Dave <davechand...@gmail.com> wrote:
STARTUPINFO start;
PROCESS_INFORMATION info;
ZeroMemory( &start, sizeof(start) );
start.cb = sizeof(start);
ZeroMemory( &info, sizeof(info) );
BOOL bl=CreateProcess(NULL,TEXT("notepad.exe"),NULL,NUL L,FALSE,
0,NULL,NULL,&start,&info);
this code you can add in to ur one console application............
in CreateProcess function in second parameter just give the path of ur
second console application
path means path of exe file of second console application
still if u have doubt u can come back to me


Posted by Dave on May 14th, 2007


The Create_new_console flag was EXACTLY what I needed. Works
perfectly. Thanks


On May 13, 6:00 am, "Barry" <bar...@nullhighstream.net> wrote:



Similar Posts