RtlInitializeSidEx - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10)

NTSYSAPI
NTSTATUS
NTAPI
RtlInitializeSidEx(
    _Out_writes_bytes_(SECURITY_SID_SIZE(SubAuthorityCount)) PSID Sid,
    _In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
    _In_ UCHAR SubAuthorityCount,
    ...
    );

#endif
#endif

View code on GitHub
// ntifs.h

NTSYSAPI NTSTATUS RtlInitializeSidEx(
  [out] PSID                      Sid,
  [in]  PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
  [in]  UCHAR                     SubAuthorityCount,
        ...                       
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntifs-rtlinitializesidex)

RtlInitializeSidEx function

Description

The RtlInitializeSidEx routine initializes a pre-allocated security identifier (SID) structure.

Parameters

Sid [out]

Pointer to a caller-allocated SID structure to be initialized.

IdentifierAuthority [in]

Pointer to an SID_IDENTIFIER_AUTHORITY structure to set in the SID structure.

SubAuthorityCount [in]

Number of sub-authorities to set in the SID.

...

The values to set each sub-authority. The caller must specify the SubAuthorityCount argument.

Return value

RtlInitializeSid returns one of the following:

Return code Description
STATUS_SUCCESS The SID was successfully initialized.
STATUS_INVALID_PARAMETER The specified SubAuthorityCount value is invalid.

Remarks

For more information about security and access control, see Windows security model for driver developers and the documentation on these topics in the Windows SDK.

See also

RtlSubAuthoritySid

SID

SID_IDENTIFIER_AUTHORITY