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

  • SEARCH
  • Home
  • 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 6546159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:40:25+00:00 2026-05-25T11:40:25+00:00

I have a C++ app that launches another one with CreateProcess(). I fill the

  • 0

I have a C++ app that launches another one with CreateProcess(). I fill the STARTUPINFO data with GetStartupInfo() before. Here is the code:

STARTUPINFOA si;
PROCESS_INFORMATION pi;

GetStartupInfoA( &si );

cout << si.dwFlags << endl;
cout << si.hStdError << endl;
cout << si.hStdInput << endl;
cout << si.hStdOutput << endl;

I use Win7/x64, SP1, VS2005, ICC 9.1 (Intel)

When I start the app from CubicExplorer it returns:

dwFlags = 1

hStdError = 0xffffffffffffffff

hStdInput = 0xffffffffffffffff

hStdOutput = 0xffffffffffffffff

(…and the second app I’m starting with CreateProcess using this STARTUPINFO works.)

When I start the app from the standard Windows Explorer it returns:

dwFlags = 1025 (0x401)

hStdError = 0x0000000000000000

hStdInput = 0x0000000000000000

hStdOutput = 0x0000000000010001

(… and CreateProcess fails with the error ACCESS_DENIED.)

My question: since the only difference is that the application is launched from a different folder explorer (Windows Explorer vs Cubic Explorer) what can produce these different info?

  • 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-25T11:40:26+00:00Added an answer on May 25, 2026 at 11:40 am

    The STARTUPINFO record you receive comes from the CreateProcess call that started your program. Two different and completely independent programs called CreateProcess, and they evidently chose to populate the STARTUPINFO record differently. Nothing remarkable about that.

    Incidentally, unless dwFlags includes STARTF_USESTDHANDLES, it’s meaningless to read the hStdX fields.

    I recommend not simply forwarding your own startup parameters to the next program. Instead, explicitly populate exactly the startup fields you need for the next program. That wy, you know what you’re getting.

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

Sidebar

Related Questions

I have a button that launches the google maps app on my device via
We have a scripting engine (running under Windows) that launches another application several thousand
I have a c++ console application that launches another application and communicates with it
I have an app that goes between many different activities. One activity, my main
Suppose that, I have an android app that launches browser with some url supplied
I have a URLHandler that launches some application, the main code is as follows.
i have a winForm app. The program.cs launches form1 and another thread sThread. I
I have an asp.net app that launches a modal window upon button_click event. That
have an app that finds your GPS location successfully, but I need to be
Have an app that has listings - think classified ads - and each listing

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.