IWMSAccessControlEntry Object (C#)

banner art

Previous Next

IWMSAccessControlEntry Object (C#)

An access control list (ACL) is a list of access control entries (ACE). Each ACE that is created by a publishing point ACL plug-in specifies the read and write permissions for a publishing point. Clients can have permission to read the content from a publishing point, and servers can have permission to write content to a publishing point. A file system ACL plug-in specifies the read and write permissions for file system access control lists. The IWMSAccessControlEntry object is exposed by the WMS Publishing Points ACL plug-in.

The IWMSAccessControlEntry object exposes the following properties.

Property Description
AccessMask Specifies and retrieves an enumeration value indicating the access rights to a publishing point or file system.
Trustee Retrieves the name of the account or logon session to which the access control entry applies.

Example Code

The following example illustrates how to retrieve an IWMSAccessControlEntry object.

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];
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Previous Next