RtlCopySid function

The RtlCopySid routine copies the value of a security identifier (SID) to a buffer.

Syntax

NTSYSAPI NTSTATUS RtlCopySid(
  ULONG DestinationSidLength,
  PSID  DestinationSid,
  PSID  SourceSid
);

Parameters

DestinationSidLength

Length, in bytes, of the buffer to receive the copy of the SID.

DestinationSid

Pointer to a caller-allocated buffer to receive a copy of the source SID structure. The buffer must be at least sizeof(SID),

SourceSid

Pointer to the source SID structure to be copied.

Return Value

RtlCopySid returns STATUS_SUCCESS if the SID was successfully copied. Otherwise, it returns an NTSTATUS value such as one of the following:

Return code Description
STATUS_BUFFER_TOO_SMALL
The DestinationSid buffer was not large enough to receive a copy of the SID.

Remarks

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

Requirements

   
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)
IRQL "<= APC_LEVEL"

See Also

RtlEqualPrefixSid

RtlEqualSid

RtlLengthSid

RtlValidSid

SID