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 2006

Tip: Looking for answers? Try searching our database.

how to redirect the ouput from the windows console to vc++ ouput window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pri - 10 Mar 2006 11:24 GMT
i need to run a command line tool by clicking on an add in toolbar button.i have tried it using ShellExecute & CreateProcess methods.But both open up the default console window.Is there any way in which I can redirect the output from the console to the output window in vc++?Or maybe im not using the correct methods.Any suggestions please?

From http://developmentnow.com/g/42_2004_9_8_0_0/dotnet-languages-vc.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Bruno van Dooren - 10 Mar 2006 11:40 GMT
>i need to run a command line tool by clicking on an add in toolbar button.i
>have tried it using ShellExecute CreateProcess methods.But both open up the
>default console window.Is there any way in which I can redirect the output
>from the console to the output window in vc++?Or maybe im not using the
>correct methods.Any suggestions please?

search for 'console redirect' on www.codeproject.com
there are plenty of examples on how to do this in C++.

If you are using C++/CLI you can also use the .NET class 'Process' which has
easy to use methods for redirecting the input, output and error streams of a
console application.

If you don't want the console windows itself you have to run it hidden. in
.NET you can do this by configuring Process.StartInfo. in native you can do
something similar. I believe one of the codeproject articles explains this.

Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


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.