createprocess problem

This is a discussion on createprocess problem within the Windows Programming forums, part of the Platform Specific Boards category; Hi I have problem ? questions: borland C windows api called. C:\Documents and Settings\user\Desktop\a.ppt running Code: #include <iostream.h> #include <windows.h> ...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    3

    createprocess problem

    Hi

    I have problem ?

    questions: borland C windows api called.

    C:\\Documents and Settings\\user\\Desktop\\a.ppt running
    Code:
    #include <iostream.h>
    #include <windows.h>
    
    const int BUF_SIZE = 1024;
    
    int main(int argc, char *argv[])
    {
    
    
    
    
        STARTUPINFO         siStartupInfo;
        PROCESS_INFORMATION piProcessInfo;
    
        memset(&siStartupInfo, 0, sizeof(siStartupInfo));
        memset(&piProcessInfo, 0, sizeof(piProcessInfo));
    
        siStartupInfo.cb = sizeof(siStartupInfo);
    
        if(CreateProcess("C:\\Documents and Settings\\user\\Desktop\\a.ppt ",
                          "a.ppt ",
                         0,
                         0,
                         FALSE,
                         CREATE_DEFAULT_ERROR_MODE,
                         0,
                         0,
                         &siStartupInfo,
                         &piProcessInfo) == FALSE)
         return 0;
    }
    Where is the problem ?

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Where is the problem ?
    You bumped an old thread which isn't allowed. Please take the time to read the forum guidelines which explain this and other points that will help you to get better advice for your programming problems.

    I've moved your question here and posted this information here since, apparently, I'm unable to send you a private message.


    **********

    iostream.h is non-standard but your compiler might complain if you include the standard 'iostream' header - consider using a more recent compiler.

    On failure of the CreateProcess function, use GetLastError to provide more information about that failure.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

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