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

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

returnValue = Utils.ConvertStringToSecurityDescriptor(sddl)

Syntax

Visual Basic
<PermissionSetAttribute(SecurityAction.Demand, Unrestricted:=True)> _
Public Shared Function ConvertStringToSecurityDescriptor ( _
		sddl As String _
) As Byte()
C#
[PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true)] 
public static byte[] ConvertStringToSecurityDescriptor (
		string sddl
)
C++
[PermissionSetAttribute(SecurityAction::Demand, Unrestricted=true)] 
public:
static array<unsigned char>^ ConvertStringToSecurityDescriptor (
		String^ sddl
)
J#
/** @attribute PermissionSetAttribute(SecurityAction.Demand, Unrestricted=true) */ 
public static byte[] ConvertStringToSecurityDescriptor (
		String sddl
)
JScript
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