Compartilhar via


Utils.ConvertSidToString Method

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

'Usage
Dim sid As Byte()
Dim returnValue As String

returnValue = Utils.ConvertSidToString(sid)

Syntax

'Declaration
<PermissionSetAttribute(SecurityAction.Demand, Unrestricted:=True)> _
Public Shared Function ConvertSidToString ( _
    sid As Byte() _
) As String
[PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true)] 
public static string ConvertSidToString (
    byte[] sid
)
[PermissionSetAttribute(SecurityAction::Demand, Unrestricted=true)] 
public:
static String^ ConvertSidToString (
    array<unsigned char>^ sid
)
/** @attribute PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true) */ 
public static String ConvertSidToString (
    byte[] sid
)
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

Reference

Utils Class
Utils Members
Microsoft.MetadirectoryServices Namespace