Contains information about a newly created process and its primary thread. It is used with RtCreateProcess.
typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION, *LPPROCESS_INFORMATION;
If the function succeeds, be sure to call CloseHandle to close the hProcess and hThread handles when you finish with them. Otherwise, when the child process exits, the system cannot clean up the process structures for the child process because the parent process still has open handles to the child process. However, the system closes these handles when the parent process terminates, so the structures related to the child process object are cleaned up at this point.