INtime SDK Help
_PROCESS_INFORMATION (iwin32x)

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;

Fields

hProcess
A handle to the newly created process. The handle specifies the process in all functions that perform operations on the process object.
hThread
A handle to the primary thread of the newly created process. The handle specifies the thread in all functions that perform operations on the thread object.
dwProcessId
A value that can be used to identify a process. The value is valid from the time the process is created until all handles to the process close and the process object frees; at this point, the identifier may be reused.
dwThreadId
A value that can be used to identify a thread. The value is valid from the time the thread is created until all handles to the thread close and the thread object frees; at this point, the identifier may be reused.

Remarks

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.

See Also