Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3789448
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:09:30+00:00 2026-05-19T12:09:30+00:00

I have a simple console app providing me with some pre-build functionality in Visual

  • 0

I have a simple console app providing me with some pre-build functionality in Visual Studio 2010. It goes on to spawn other child processes (though waits for the termination of those child processes.

When I run the app outside visual studio all its messages, etc, appear in the console window (ie stdout). However when I run this app under VS then I don’t see any of the output in the build window.

Does anybody know why this is?

Its very annoying.

Edit: On further inspection I have managed to get the stdout of my app to appear but the stdout of the child processes are not appearing. Any ideas?

I re-direct the stdout of the child processes using the following code:

STARTUPINFO si;
GetStartupInfo( &si );

si.dwFlags      = STARTF_USESTDHANDLES;
si.hStdError    = GetStdHandle( STD_ERROR_HANDLE );
si.hStdInput    = GetStdHandle( STD_INPUT_HANDLE );
si.hStdOutput   = GetStdHandle( STD_OUTPUT_HANDLE );

PROCESS_INFORMATION pi;

// Create the process.
if ( !CreateProcess( applicationName.GetCStr(), cmd.CStr(), NULL, NULL, TRUE, 0, NULL, workingDir.GetCStr(), &si, &pi ) )
{
    // Failed to create process!!
    return false;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:09:31+00:00Added an answer on May 19, 2026 at 12:09 pm

    I believe you need to make explicit handles for the child process to hook them up. MSDN has an article on it (or several), see http://msdn.microsoft.com/en-us/library/ms682499%28v=vs.85%29.aspx for example.

    Child processes inherit open object handles, but have their own stdin/stdout/etc. handles, unless you go through the proper hoops to create them explicitly for it. That’s my understanding, anyway; read the article for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What am I doing wrong? I have a simple console app in VS08. When
Have a simple console app where user is asked for several values to input.
I have a simple C# Console App that reads in an XML file specified
I have a very simple console app where I'm using dataset.WriteXml(@c:\temp) but I'm getting
I have a URI here in which a simple document.cookie query through the console
I develop tools in Autodesk Maya. Many of the tools I build have simple
I have a simple managed C++ assembly which I am providing unmanaged wrappers for
I created a super simple console app to test out the Enterprise Library Caching
I am working on a simple console app to get my feet wet with
I'm in the process of writing a simple console app that monitors a particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.