The RtlInitializeSid routine initializes a security identifier (SID) structure.
NTSYSAPI NTSTATUS RtlInitializeSid( PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount );
Pointer to a caller-allocated SID structure to be initialized.
Pointer to an SID_IDENTIFIER_AUTHORITY structure to set in the SID structure.
Number of subauthorities to set in the SID. Subauthority values must be set separately, as described in the following Remarks section.
RtlInitializeSid returns one of the following:
||The SID was successfully initialized.|
||The specified SubAuthorityCount value is invalid.|
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.
|Windows version||This routine is available on Microsoft Windows 2000 and later.|
|Header||ntifs.h (include Ntifs.h)|
|DLL||NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)|