RtlConvertSidToUnicodeString function (winternl.h)

[The RtlConvertSidToUnicodeString function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the ConvertSidToStringSid function.]

The RtlConvertSidToUnicodeString function converts a security identifier (SID) to its Unicode character representation. This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.

Syntax

NTSTATUS RtlConvertSidToUnicodeString(
  [out] PUNICODE_STRING UnicodeString,
  [in]  PSID            Sid,
  [in]  BOOLEAN         AllocateDestinationString
);

Parameters

[out] UnicodeString

A pointer to the Unicode character representation of the security identifier.

[in] Sid

A pointer to the SID structure that represents the security identifier.

[in] AllocateDestinationString

If TRUE, then UnicodeString is allocated on behalf of the caller, and it is the caller's responsibility to free the allocated memory by calling the RtlFreeUnicodeString function. If FALSE, the caller is responsible for allocating and freeing UnicodeString.

Return value

The return value is an NTSTATUS code. A value of STATUS_SUCCESS (0x00000000L) is returned if the function succeeds.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winternl.h
Library ntdll.lib
DLL ntdll.dll