RtlInitializeSidEx function (ntifs.h)

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

Syntax

NTSYSAPI NTSTATUS RtlInitializeSidEx(
  [out] PSID                      Sid,
  [in]  PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
  [in]  UCHAR                     SubAuthorityCount,
        ...                       
);

Parameters

[out] Sid

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

[in] IdentifierAuthority

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

[in] SubAuthorityCount

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.

Requirements

Requirement Value
Minimum supported client Windows 10
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

RtlSubAuthoritySid

SID

SID_IDENTIFIER_AUTHORITY