IWMSAccessControlEntry.AccessMask (C#)
Previous | Next |
IWMSAccessControlEntry.AccessMask (C#)
The AccessMask property specifies and retrieves an enumeration value indicating the access rights to a publishing point or file system.
Syntax
IWMSAccessControlEntry .AccessMask = WMS_ACCESS_CONTROL; WMS_ACCESS_CONTROL = IWMSAccessControlEntry.AccessMask;
Property Value
A member of a WMS_ACCESS_CONTROL enumeration type containing the trustee access mask setting. This must be one of the following values.
Value | Description |
WMS_ACL_DENY_READ | Denies read access. |
WMS_ACL_DENY_WRITE | Denies write access. |
WMS_ACL_DENY_CREATE | Denies creation access. |
WMS_ACL_DENY_ALL | Denies read, write, and creation access. |
WMS_ACL_ALLOW_READ | Enables read access. |
WMS_ACL_ALLOW_WRITE | Enables write access. |
WMS_ACL_ALLOW_CREATE | Enables creation access. |
WMS_ACL_ALLOW_ALL | Enables read, write, and creation access. |
If this property fails, it throws an exception.
Number | Description |
0x80070057 | The value specified for the trustee access mask is not valid. |
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]; // Set the access rights associated with the current entry. AccessCtrlEntry.AccessMask = WMS_ACCESS_CONTROL. WMS_ACL_ALLOW_READ_DENY_WRITE; } } 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 |