Bewerken

Delen via


RtlCopySid function (ntifs.h)

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

Syntax

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

Parameters

[in] DestinationSidLength

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

[in] DestinationSid

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

[in] 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 Windows security model for driver developers and the documentation on these topics in the Windows SDK.

Requirements

Requirement Value
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