Utils.ConvertStringToSid Method
The ConvertStringToSid method converts a string containing a security identifier to a byte array.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)
Usage
'Usage
Dim textSid As String
Dim returnValue As Byte()
returnValue = Utils.ConvertStringToSid(textSid)
Syntax
'Declaration
<PermissionSetAttribute(SecurityAction.Demand, Unrestricted:=True)> _
Public Shared Function ConvertStringToSid ( _
textSid As String _
) As Byte()
[PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true)]
public static byte[] ConvertStringToSid (
string textSid
)
[PermissionSetAttribute(SecurityAction::Demand, Unrestricted=true)]
public:
static array<unsigned char>^ ConvertStringToSid (
String^ textSid
)
/** @attribute PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true) */
public static byte[] ConvertStringToSid (
String textSid
)
public static function ConvertStringToSid (
textSid : String
) : byte[]
Parameters
- textSid
A string representation of a security identifier.
Return Value
A 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