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 7707595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:24:01+00:00 2026-06-01T00:24:01+00:00

I came across a C++ program for my use, in which there was some

  • 0

I came across a C++ program for my use, in which there was some processing being done using some files and exes. Inside my C++ program, I had a snippet like

system(exe1 exe2 > TestFile1.txt  exe3 > TestFile2.txt)
system(exe2 exe3 > TestFile3.txt  exe3 > TestFile4.txt)
system(exe3 exe2 > TestFile5.txt  exe3 > TestFile6.txt)
system(exe4 exe1 > TestFile7.txt  exe3 > TestFile8.txt)

Now, I generated a .dll out of this C++ program to use in my C# app through P/Ivoke (Dllimport) but since the C++ had these system being used, it fires different processes and new cmd windows when I use this .dll in my C# program.

I thought to get rid of this by generating the dll’s of all the exes (exe1, exe2, exe3 etc.) and firing the main function from these dlls, but it doesn’t strike to me about how will I do that in C++ program?

I can export the main function from the C++ (exe1 dll, exe2 dll, exe3 dll etc.) and call it through C# P/Invoke, but I want an alternative like this for C++. to replace the above 4 line snippet. How can that be done?

  • 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-06-01T00:24:02+00:00Added an answer on June 1, 2026 at 12:24 am

    You can start processes (also those which operate in text mode) without them having opening a console window. Please don’t bolt me down on the details, since it’s been ages since I’ve done this the last time (on Windows, I do it on regular terms on *nix systems). What I can tell you is, that you have to look into the function CreateProcessEx. You’ll also have to reimplement the redirection of stdout into those textfiles.

    I strongly advise against putting those processes into DLLs because then they’ll run into your main process address space and will mess things up (BTW: You can load EXEs as if they were DLLs, but calling their entry function will b0rk your main process, so don’t do it).

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

Sidebar

Related Questions

I came across this weird C++ program. #include <iostream> using namespace std; int main()
While debugging a program using I came across a pecular behavior. I am running
Recently while surfing some C++ blogs, I came across a small C teaser program
I came across a #define in which they use __builtin_expect . The documentation says:
I am trying to experiment using basic shaders in my program, I came across
I recently came across a situation where I had to use XPath as part
I came across programs like ARCserve HA, which use windows session credentials as the
I'm reading my Deitel, Java How to Program book and came across the term
Recently I was trying some practice programs in python and I came across this
Came across something like this today, and was wondering if there was an equivalent

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.