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_LISTstructure. 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_TERMINATIONCREATE_DEFAULT_ERROR_MODECREATE_NEW_CONSOLECREATE_NEW_PROCESS_GROUPCREATE_NO_WINDOWCREATE_PROTECTED_PROCESSCREATE_SUSPENDEDCREATE_UNIQUE_PROCESSDEBUG_ONLY_THIS_PROCESSDEBUG_PROCESSDETACHED_PROCESSEXTENDED_STARTUPINFO_PRESENTHIGH_PRIORITY_CLASSIDLE_PRIORITY_CLASSNORMAL_PRIORITY_CLASSREALTIME_PRIORITY_CLASSBELOW_NORMAL_PRIORITY_CLASSABOVE_NORMAL_PRIORITY_CLASS
lpStartupInfo-
A pointer to a
STARTUPINFOstructure that specifies the window station, desktop, standard handles, and appearance of the main window for the new process. lpProcessInformation-
A pointer to a
PROCESS_INFORMATIONstructure 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 |
|---|---|