vc中运行外部程序的方法

}
   CloseHandle(ProcessInfo.hThread);
   CloseHandle(ProcessInfo.hProcess);
   return TRUE;
}

return bRet;

}

WinExec: 针对16位程序而保留的.

ShellExecute: 标准的调用外部程序函数, 一般应该用这个.
ShellExecuteEx: 以特定的方式调用外部函数, 可以通过设置参数
lpExecInfo来控制外部程序的运行特征.

还有比较复杂的用CreateProcess函数来运行外部程序. 运行的外部程序
可以作为调用程序的子进程.
ShellExecute 要在uses部分加Shellapi; 

#include

winexec
uses winprocs;
winexec("c:\winamp.exe",1); 还有些参数

参考:

http://www.hero-hyip.com/-t111678.htm

原文地址:https://www.cnblogs.com/mfryf/p/2353934.html