How to supress command window ?

I am using the system(); function call from a C/C++ application for certain command line calls to the OS (WinXp / Win-Vista-32 are intended target platforms). Every time I invoke the function, a command window opens up, and displays the output. I have tried a number of things from turning echo off to writing the output of the command to a file (for example system(" dir /q > f1.txt") ), BUT, nothing stops the command window from popping up.

How do I stop it from showing up at all?

I am using DevC++ for development, so any mingW/gcc specific makefile options are most welcome.

many thanks!

Comments

  • : I am using the system(); function call from a C/C++ application for
    : certain command line calls to the OS (WinXp / Win-Vista-32 are
    : intended target platforms).

    Never use system() !
    Use Win32 apis, which have been made for that.
    You can ask on specialized Win32 api newsgroup :
    news://194.177.96.26/comp.os.ms-windows.programmer.win32
    to get any win32 api.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion