RtlConvertSidToUnicodeString function

[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.


NTSTATUS WINAPI RtlConvertSidToUnicodeString(
  _Out_ PUNICODE_STRING UnicodeString,
  _In_  PSID            Sid,
  _In_  BOOLEAN         AllocateDestinationString


UnicodeString [out]

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

Sid [in]

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

AllocateDestinationString [in]

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.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]