Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

how to keep console window open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bumbrlik - 26 Aug 2003 14:32 GMT
When I spawn a console application from a another
application of mine using
_spawnl(_P_NOWAIT, my_program, ......),
it opens a new console window but when it is finished the
window is automatically closed.

Is there any way I can keep the window open even after the
program terminated (I want to be able check the output) ?

Thank you.
Jochen Kalmbach - 26 Aug 2003 14:37 GMT
> When I spawn a console application from a another
> application of mine using
[quoted text clipped - 4 lines]
> Is there any way I can keep the window open even after the
> program terminated (I want to be able check the output) ?

You can allocate the console before executing the app.

Just call "AllocConsole();".
After you checked the output you can call "FreeConsole();"

It works at least for CreateProcess (but should also work for spawn;
because it uses CreateProcess).

Signature

Greetings
 Jochen

 Do you need a memory-leak finder ?
 http://www.codeproject.com/useritems/leakfinder.asp

Bumbrlik - 26 Aug 2003 15:10 GMT
Thank you, that works great !!!

>-----Original Message-----
>
[quoted text clipped - 14 lines]
>It works at least for CreateProcess (but should also work for spawn;
>because it uses CreateProcess).
Ravidas Shet - 30 Mar 2005 09:43 GMT
Hi Jochen,

i am using _Spawnl ()to open the Outlook's CreateMail Window. Neither it
gives any error nor it is opening.

_spawnl (_P_NOWAIT, strExplorerPath,"sales@saledomain.com", NULL);

here strExplorerPath is from the Registry Location.
ie "%ProgramFiles%\Outlook Express\msimn.exe" /mailurl:%1

Its Urgent,
Thanks in Advance,

Regards,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.