IWMSAccessControlEntry.Trustee (Visual Basic .NET)

banner art

Previous Next

IWMSAccessControlEntry.Trustee (Visual Basic .NET)

The Trustee property retrieves the name of the account or logon session to which the access control entry applies.


  String = IWMSAccessControlEntry.Trustee

Property Value

A String containing the name of the trustee. The name can identify one of the following account or session types.

Type Description
Domain Account The name specifies a domain account of the form domain\user_account.
NT Security Principal The name identifies an NT-based security system attribute.
Built-in group The name identifies a built-in user group identified by the NT-based security system. It has the form BUILTIN\user_group_name.

If this property fails, it throws an exception.

Number Description
0x8007000E The server could not allocate memory.


This property is read-only.

Example Code

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetAccountName()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim ACLCheckAdmin As IWMSACLCheckAdmin
    Dim AccessCtrlList As IWMSAccessControlList
    Dim AccessCtrlEntry As IWMSAccessControlEntry
    Dim Trustee As String

    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers.Item( _
         "WMS Publishing Points ACL Authorization")

    ' Retrieve the custom interface of the plug-in.
    ACLCheckAdmin = Plugin.CustomInterface

    ' Retrieve the list of access control entries.
    AccessCtrlList = ACLCheckAdmin.AccessControlList

    For Each AccessCtrlEntry In AccessCtrlList
        ' Retrieve the account name associated with the
        ' current entry.
        Trustee = AccessCtrlEntry.Trustee

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
    ' TODO: Clean-up code goes here.
End Try

End Sub


Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows ServerĀ 2003 family, Windows ServerĀ 2008 family.

See Also

Previous Next