Compartir a través de


IWMSIPEntry Object (Visual Basic .NET)

You can use the IWMSIPEntry object to edit an IP address or range of IP addresses in an IWMSIPListIWMSIPList Object (Visual Basic .NET). The IWMSIPList object contains a collection of access lists used by the WMS IP Address Authorization plug-in to allow or disallow client connections based on IP addresses.

The IWMSIPEntry object exposes the following properties.

Property

Description

Address

Specifies and retrieves an IP address or range of IP addresses that can be used to allow or disallow client connections.

Mask

Specifies and retrieves an IP address mask.

Example

The following example illustrates how to retrieve an IWMSIPEntry object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim IPAdmin As IWMSIPAdmin
    Dim IPList As IWMSIPList
    Dim IPEntry As IWMSIPEntry
    Dim i As Integer

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

    ' Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers.Item("WMS IP Address Authorization")

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

    ' Retrieve the list of banned IP addresses.
    IPList = IPAdmin.DisallowIP

    ' Retrieve each banned address.
    For i = 0 To IPList.Count - 1
        IPEntry = IPList.Item(i)
    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

See Also

Concepts

System Plug-ins (Visual Basic .NET)