executing programmes

This is a discussion on executing programmes within the Windows Programming forums, part of the Platform Specific Boards category; i can execute a programme using the system() function but is there another way because this black console box comes ...

  1. #1
    yes, I'm registered!!! algi's Avatar
    Join Date
    Nov 2004
    Location
    Ipswich
    Posts
    161

    executing programmes

    i can execute a programme using the system() function but is there another way because this black console box comes up in the process.
    I started out with nothing and I still have most of it left.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    Code:
    STARTUPINFO startInfo;
    PROCESS_INFORMATION procInfo;
    ZeroMemory(&procInfo,sizeof(PROCESS_INFORMATION));
    ZeroMemory(&startInfo,sizeof(STARTUPINFO));
    char Buff[2048]="C:\\program.exe";
    
    CreateProcess(NULL, Buff, NULL, NULL, NULL, NULL, NULL, NULL, &startInfo, &procInfo);
    Change Buff to suit your needs.

  3. #3
    yes, I'm registered!!! algi's Avatar
    Join Date
    Nov 2004
    Location
    Ipswich
    Posts
    161
    thanks.
    I started out with nothing and I still have most of it left.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing an external shell command
    By g4j31a5 in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2007, 08:47 PM
  2. Giving instruction to an executing C code
    By darkwalk in forum C Programming
    Replies: 2
    Last Post: 10-24-2006, 01:01 PM
  3. Replies: 40
    Last Post: 09-01-2006, 01:09 AM
  4. Executing a program
    By trancedeejay in forum C Programming
    Replies: 7
    Last Post: 03-06-2006, 08:55 AM
  5. Problem executing sample program:
    By mrabiu in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2004, 06:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21