RtlInitializeSidEx function

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

Syntax

NTSYSAPI NTSTATUS RtlInitializeSidEx(
  PSID                      Sid,
  PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
  UCHAR                     SubAuthorityCount,
  ...                       
);

Parameters

Sid

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

IdentifierAuthority

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

SubAuthorityCount

Number of sub-authorities to set in the SID.

Arg1

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 the documentation on these topics in the Microsoft Windows SDK.

Requirements

   
Windows version This routine is available on Windows 10 and later.
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