Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

win32 console application 1

Status
Not open for further replies.

Sidro

MIS
Sep 28, 2002
197
US
hi,
does anyone know and have an exemple code that calls or execute another ".EXE" file? This is for a MS C++ 6.0 Thanks in advance.
 
Code:
#include <process.h>  // or  <cstdlib>

int main()
{
    system( "something.exe" );
    return 0;
}
 
hi,
thanks alot.just what im looking for.
one more thing, do you know how to close or exit the exe?
maybe i can put that in the destructor.thanks in advance.
 
Use TerminateProcess, but to get the process handle you'll have to use ShellExecute or CreateProcess instead of system() to run the exe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top