#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10_RS2)
/**
* The RtlCreateUserProcessEx routine creates a new process and its primary thread, with extended parameters.
*
* \param NtImagePathName Pointer to a UNICODE_STRING that specifies the path of the image to be executed.
* \param ProcessParameters Pointer to a RTL_USER_PROCESS_PARAMETERS structure that contains process parameter information.
* \param InheritHandles If TRUE, each inheritable handle in the calling process is inherited by the new process.
* \param ProcessExtendedParameters Optional pointer to a RTL_USER_PROCESS_EXTENDED_PARAMETERS structure for additional process creation options. Can be NULL.
* \param ProcessInformation Pointer to a RTL_USER_PROCESS_INFORMATION structure that receives information about the new process and its primary thread.
* \return NTSTATUS Successful or errant status.
* \remarks This function is available on Windows 10 RS2 and later. It allows for more advanced process creation scenarios than RtlCreateUserProcess.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
*/
NTSYSAPI
NTSTATUS
NTAPI
RtlCreateUserProcessEx(
_In_ PCUNICODE_STRING NtImagePathName,
_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters,
_In_ BOOLEAN InheritHandles,
_In_opt_ PRTL_USER_PROCESS_EXTENDED_PARAMETERS ProcessExtendedParameters,
_Out_ PRTL_USER_PROCESS_INFORMATION ProcessInformation
);
View code on GitHubNo description available.