从今天开始学习windows编程了,先来个简单的
#include <windows.h>
int main()
{
STARTUPINFO si = {sizeof(si)};
SECURITY_ATTRIBUTES saProcess,saThread;
PROCESS_INFORMATION piProcessB,piProcessC;
TCHAR szPath1[MAX_PATH] = {TEXT("C://Program Files//TTPlayer//TTPlayer.exe")};
TCHAR szPath2[MAX_PATH] = {TEXT("ProcessC")};
saProcess.nLength = sizeof(saProcess);
saProcess.lpSecurityDescriptor = NULL;
saProcess.bInheritHandle = TRUE;
saThread.nLength = sizeof(saThread);
saThread.lpSecurityDescriptor = NULL;
saThread.bInheritHandle = FALSE;
CreateProcess(NULL,szPath1,&saProcess,&saThread,FALSE,0,NULL,NULL,&si,&piProcessB);
CreateProcess(NULL,szPath1,NULL,NULL,TRUE,0,NULL,NULL,&si,&piProcessC);
return 0;
}