PROCESS_INFORMATION

The PROCESS_INFORMATION structure contains information about a newly created process and its primary thread. It is used by functions such as CreateProcess.

Syntax

typedef struct _PROCESS_INFORMATION {
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
} PROCESS_INFORMATION;

Members

Member Description
hProcess A handle to the newly created process. This handle is used to specify the process in all functions that operate on it.
hThread A handle to the primary thread of the newly created process. This handle is used to specify the thread in all functions that operate on it.
dwProcessId The identifier of the newly created process. The value is unique among all processes in the system.
dwThreadId The identifier of the newly created process's primary thread. The value is unique among all threads in the system.

Remarks

The handle returned in hProcess and hThread is a process handle and thread handle, respectively. These handles are needed to use or terminate the process or thread. They should be closed using the CloseHandle function when they are no longer needed.

Note: If the calling process is a 32-bit process, the handle returned in hProcess and hThread is a 32-bit handle. If the calling process is a 64-bit process, the handle returned is a 64-bit handle.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header processthreadsapi.h (include windows.h)

See Also