RtlInitializeSid routine

The RtlInitializeSid routine initializes a security identifier (SID) structure.

Syntax


NTSTATUS RtlInitializeSid(
  _Out_ PSID                      Sid,
  _In_  PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
  _In_  UCHAR                     SubAuthorityCount
);

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 subauthorities to set in the SID. Subauthority values must be set separately, as described in the following Remarks section.

Return value

RtlInitializeSid returns one of the following:

Return codeDescription
STATUS_SUCCESS

The SID was successfully initialized.

STATUS_INVALID_PARAMETER

The specified SubAuthorityCount value is invalid.

 

Remarks

Although RtlInitializeSid sets the number of subauthorities for the SID, it does not set the subauthority values. This must be done separately by calling RtlSubAuthoritySid.

For more information about security and access control, see the documentation on these topics in the Microsoft Windows SDK.

Requirements

Target platform

Universal

Version

This routine is available on Microsoft Windows 2000 and later.

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe (kernel mode);
Ntdll.dll (user mode)

IRQL

< DISPATCH_LEVEL

See also

RtlSubAuthoritySid
SID
SID_IDENTIFIER_AUTHORITY

 

 

Send comments about this topic to Microsoft

Show: