NTSTATUS __stdcall ZwCreateUserProcess(OUT PHANDLE ProcessHandle,OUT PHANDLE ThreadHandle,IN ACCESS_MASK ProcessDesiredAccess,
IN ACCESS_MASK ThreadDesiredAccess,IN POBJECT_ATTRIBUTES ProcessObjectAttributes OPTIONAL,
IN POBJECT_ATTRIBUTES ThreadObjectAttributes OPTIONAL,IN ULONG CreateProcessFlags,IN ULONG CreateThreadFlags,
IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters,IN PVOID Parameter10,IN PNT_PROC_THREAD_ATTRIBUTE_LIST AttributeList);
DWORD WINAPI GetProcessId(
_In_ HANDLE Process
);
Process [in]
A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.
Minimum supported client
Windows Vista, Windows XP with SP1 [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
WinBase.h on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h); Processthreadsapi.h on Windows 8 and Windows Server 2012
NTSTATUS
NTAPI
NtCreateUserProcess(
OUT PHANDLE ProcessHandle,
OUT PHANDLE ThreadHandle,
IN ACCESS_MASK ProcessDesiredAccess,
IN ACCESS_MASK ThreadDesiredAccess,
IN POBJECT_ATTRIBUTES ProcessObjectAttributes OPTIONAL,
IN POBJECT_ATTRIBUTES ThreadObjectAttributes OPTIONAL,
IN ULONG ProcessFlags, // PROCESS_CREATE_FLAGS_*
IN ULONG ThreadFlags, // THREAD_CREATE_FLAGS_*
IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters,
IN OUT PPS_CREATE_INFO CreateInfo,
IN PPS_ATTRIBUTE_LIST AttributeList
);