Share via


IWMSAccessControlEntry.AccessMask (Visual Basic .NET)

banner art

Previous Next

IWMSAccessControlEntry.AccessMask (Visual Basic .NET)

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

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

Private Sub SetAccessRights()

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

Try
    ' 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
        ' Set the access rights associated with the
        ' current entry.
        AccessCtrlEntry.AccessMask = WMS_ACCESS_CONTROL.WMS_ACL_DENY_WRITE
    Next

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

End Sub

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