您的位置:首页 > 其它

MFC 启动外部进程的问题

2013-12-02 14:37 309 查看
四种方法:

 

(1)HINSTANCE ShellExecute(

    HWND hwnd, 

    LPCTSTR lpOperation,

    LPCTSTR lpFile, 

    LPCTSTR lpParameters, 

    LPCTSTR lpDirectory,

    INT nShowCmd

);

(2)WINSHELLAPI BOOL WINAPI ShellExecuteEx(

    LPSHELLEXECUTEINFO lpExecInfo
);

(3)BOOL CreateProcess(

  LPCTSTR lpApplicationName,

                         // pointer to name of executable module

  LPTSTR lpCommandLine,  // pointer to command line string

  LPSECURITY_ATTRIBUTES lpProcessAttributes,  // process security attributes

  LPSECURITY_ATTRIBUTES lpThreadAttributes,   // thread security attributes

  BOOL bInheritHandles,  // handle inheritance flag

  DWORD dwCreationFlags, // creation flags

  LPVOID lpEnvironment,  // pointer to new environment block

  LPCTSTR lpCurrentDirectory,   // pointer to current directory name

  LPSTARTUPINFO lpStartupInfo,  // pointer to STARTUPINFO

  LPPROCESS_INFORMATION lpProcessInformation  // pointer to PROCESS_INFORMATION

);

(4)UINT WinExec(

  LPCSTR lpCmdLine,  // address of command line

  UINT uCmdShow      // window style for new application

);

  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐