- CreatePress:创建一个新的进程和该进程的主线程;
- BOOL CreateProcess
(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
); - 函数返回之前会初始化LPPROCESS_INFORMATION lpProcessInformation 的结构成员。
- 父进程必须有一个线程调用CloseHandle关闭CreateProcess函数创建的进程,通过CreateProcess返回的LPPROCESS_INFORMATION lpProcessInformation 的结构获取要关闭进程的句柄和线程句柄。
-
typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
}
CreateProcess
最新推荐文章于 2021-08-09 22:17:16 发布