楼上说得对。
不过ms现在推荐使用的是CreateProcess()

解决方案 »

  1.   

    举例:WinExec("c:\\temp\\AnotherProg.exe");
      

  2.   

    system()
    ---------------------------------------
    WinExec() // for 16 bit application
    ----------------------------------------
    LoadModule() //for 16 bit application
    ---------------------------------------
    CreateProcess() // for 32 bit
    例如:
       STARTUPINFO infoStart;
    PROCESS_INFORMATION infoProcess; memset(&infoStart,0,sizeof(infoStart));
    infoStart.cb=sizeof(infoStart);
    if (!CreateProcess("c:\\windows\\notepad.exe","open d:\\temp.txt",NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE,NULL,NULL,&infoStart,&infoProcess))
    {
    MessageBox("failed.");
    }----------------------------------------
    ShellExecute() //
    例如:
       ShellExecute(hwnd,"open","d:\\temp.txt",NULL,NULL,SW_SHOWNORMAL); //hwnd是有效的窗体句柄
         OR
       ShellExecute(hwnd,"open","c:\\w
      

  3.   

    system()
    WinExec()
    CreateProcess()
      

  4.   

    各位:我使用WinExec()好像是两个参数;成功了!但还有这么多兄弟说了这么多的方法:1,WinExec();
    2,CreateProcess();
    3,ShellExecute();
    4,LoadModual();
    5,System();????那位能说说他们的使用场合的区别。
      

  5.   

    system()怎么有console窗口弹出?其他都可以!
      

  6.   

    别用WinExec 具体解释请看 Windows核心程序设计的 第二章
      

  7.   

    1,WinExec(); //最好不用
    2,CreateProcess();//最好
    3,ShellExecute();//最好
    4,LoadModual();//过时
    5,System();//不好用