Share via


IWMSAccessControlEntry.Trustee (C#)

banner art

Previous Next

IWMSAccessControlEntry.Trustee (C#)

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

Syntax

  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.

Remarks

This property is read-only.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSACLCheckAdmin ACLCheckAdmin;
IWMSAccessControlList AccessCtrlList;
IWMSAccessControlEntry AccessCtrlEntry;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers[
        "WMS Publishing Points ACL Authorization"];

    // Retrieve the custom interface of the plug-in.
    ACLCheckAdmin =
               (IWMSACLCheckAdmin)Plugin.CustomInterface;

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

    for (int i = 0; i < AccessCtrlList.Count; i++)
    {
        // Retrieve the next entry in the list.
        AccessCtrlEntry = AccessCtrlList[i];

        // Retrieve the account name associated with the current entry.
        string Trustee = AccessCtrlEntry.Trustee;
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

Requirements

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