CreateProcessInfo Structure
Introduction
The CreateProcessInfo
structure is used by the CreateProcess
function to specify information about a newly created process. This structure is not directly used by applications; instead, its information is populated by the system after a process is successfully created.
This structure contains handles, identifiers, and other information for the new process and its primary thread.
Syntax
typedef struct _CREATEPROCESS_INFO {
DWORD cb;
HANDLE hProcess;
HANDLE hThread;
DWORD dwProcessId;
DWORD dwThreadId;
LPVOID lpAttributeList;
BOOL bInheritHandles;
DWORD dwCreationFlags;
LPVOID lpStartupInfo;
LPVOID lpProcessInformation;
} CREATEPROCESS_INFO, *LPCREATEPROCESS_INFO;
Note: The members of this structure are typically accessed indirectly through the `STARTUPINFO` and `PROCESS_INFORMATION` structures passed to `CreateProcess`.
Members
cb
-
The size of this structure, in bytes. This member must be set to
sizeof(CREATEPROCESS_INFO)
. hProcess
- A handle to the new process. This handle has the SYNCHRONIZE and PROCESS_ALL_ACCESS access rights.
hThread
- A handle to the primary thread of the new process. This handle has the SYNCHRONIZE and THREAD_ALL_ACCESS access rights.
dwProcessId
- The identifier of the new process.
dwThreadId
- The identifier of the primary thread of the new process.
lpAttributeList
-
A pointer to a list of attributes that can be inherited by the new process. This member is used with the
PROC_THREAD_ATTRIBUTE_LIST
structure. bInheritHandles
- If this member is TRUE, each inheritable handle in the calling process is inherited by the new process. Otherwise, the handles are not inherited.
dwCreationFlags
-
Flags that control the execution of the new process. This member can be a combination of the following values:
CREATE_BREAK_ON_TERMINATION
CREATE_DEFAULT_ERROR_MODE
CREATE_NEW_CONSOLE
CREATE_NEW_PROCESS_GROUP
CREATE_NO_WINDOW
CREATE_PROTECTED_PROCESS
CREATE_SUSPENDED
CREATE_UNIQUE_PROCESS
DEBUG_ONLY_THIS_PROCESS
DEBUG_PROCESS
DETACHED_PROCESS
EXTENDED_STARTUPINFO_PRESENT
HIGH_PRIORITY_CLASS
IDLE_PRIORITY_CLASS
NORMAL_PRIORITY_CLASS
REALTIME_PRIORITY_CLASS
BELOW_NORMAL_PRIORITY_CLASS
ABOVE_NORMAL_PRIORITY_CLASS
lpStartupInfo
-
A pointer to a
STARTUPINFO
structure that specifies the window station, desktop, standard handles, and appearance of the main window for the new process. lpProcessInformation
-
A pointer to a
PROCESS_INFORMATION
structure that receives identification information for the new process and its primary thread. This information includes the process handle, process identifier, thread handle, and thread identifier.
Requirements
Version | Minimum supported client | Minimum supported server |
---|---|---|
Windows 2000 Professional | Windows 2000 | Windows 2000 |
Header | windows.h |
---|---|