The ConvertSidToString method converts a byte array containing a security identifier to a string.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in microsoft.metadirectoryservicesex.dll)

Usage

Visual Basic
Dim sid As Byte()
Dim returnValue As String

returnValue = Utils.ConvertSidToString(sid)

Syntax

Visual Basic
<PermissionSetAttribute(SecurityAction.Demand, Unrestricted:=True)> _
Public Shared Function ConvertSidToString ( _
		sid As Byte() _
) As String
C#
[PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true)] 
public static string ConvertSidToString (
		byte[] sid
)
C++
[PermissionSetAttribute(SecurityAction::Demand, Unrestricted=true)] 
public:
static String^ ConvertSidToString (
		array<unsigned char>^ sid
)
J#
/** @attribute PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true) */ 
public static String ConvertSidToString (
		byte[] sid
)
JScript
public static function ConvertSidToString (
		sid : byte[]
) : String

Parameters

sid

The security identifier to convert.

Return Value

A string representation of the security identifier.

Exceptions

Exception type Condition
System.ArgumentNullException

The argument is null.

System.ComponentModel.Win32Exception

The Win32 function returns a failure.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also