我想启动另外一个程序:int intReValue;
char szAppPath[]="C:\Program Files\SEL5040";
char szAppName[]="SelReport.exe";
char szOperation[]="Open";intReValue=ShellExecute(@@,szTemp,szAppName,NULL,szAppName,SW_MAXIMIZE);//@@处应该怎么写??
//

解决方案 »

  1.   

    hwnd 
    [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. 
    没有父窗口,置为NULL也行。
      

  2.   

    ShellExecute一般用来打开一个文件
    如果只单纯的打开一个exe文件
    用WinExec就行了
      

  3.   

    hwnd 
    [in] Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting. 
    NULL试试~
      

  4.   

    ShellExecute(NULL,"open","calc.exe","","", SW_SHOW );

    ShellExecute(NULL,"open","notepad.exe",
    "c:\\MyLog.log","",SW_SHOW );
    As you can see, I haven't passed the full path of the programs. 
      

  5.   

    直接用NULL,如果想接收发生错的提示信息,则传入你自己的HWND.