Share via


Utils.ConvertStringToSecurityDescriptor Method

The ConvertStringToSecurityDescriptor method converts a string containing a security descriptor to a byte array.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

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

returnValue = Utils.ConvertStringToSecurityDescriptor(sddl)

Syntax

'Declaration
<PermissionSetAttribute(SecurityAction.Demand, Unrestricted:=True)> _
Public Shared Function ConvertStringToSecurityDescriptor ( _
    sddl As String _
) As Byte()
[PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true)] 
public static byte[] ConvertStringToSecurityDescriptor (
    string sddl
)
[PermissionSetAttribute(SecurityAction::Demand, Unrestricted=true)] 
public:
static array<unsigned char>^ ConvertStringToSecurityDescriptor (
    String^ sddl
)
/** @attribute PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true) */ 
public static byte[] ConvertStringToSecurityDescriptor (
    String sddl
)
public static function ConvertStringToSecurityDescriptor (
    sddl : String
) : byte[]

Parameters

  • sddl
    An SDDL-formatted string representation of a security descriptor.

Return Value

A security descriptor.

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