IWMSIPEntry.Address (Visual Basic .NET)

The Address property specifies and retrieves the IP address.

IWMSIPEntry.Address = StringString = IWMSIPEntry.Address

Property Value

A String containing an IP address in either IPv4 decimal notation, xxx.xxx.xxx.xxx, or IPv6 hexadecimal notation, xxxx:xxxx::x.

If this property fails, it throws an exception.

Number

Description

0x8007000E

The server could not allocate memory.

Example

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

Private Sub GetIPAddress()

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

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 the information associated
    ' with each banned address.
    For Each IPEntry In IPList
        strIPAddress = IPEntry.Address
    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

Reference

IWMSIPEntry Object (Visual Basic .NET)