Share via


IWMSBoundIPAddresses Object (C#)

The IWMSBoundIPAddresses object contains a collection of string values used by control protocol plug-ins to bind certain protocols, such as HTTP, to specific IP addresses. It is exposed by the following system plug-ins:

  • WMS HTTP Server Control Protocol plug-in

  • WMS MMS Server Control Protocol plug-in

  • WMS RTSP Server Control Protocol plug-in

Note

Note   In Windows Server 2008 operating systems, the MMS protocol is not supported, and Windows Media Services does not provide an MMS Server Control Protocol plug-in.

The IWMSBoundIPAddresses object exposes the following methods.

Method

Description

Add

Adds a new item to the bound IP address collection.

Count

Retrieves the number of objects in the IWMSBoundIPAddresses collection.

Item

Retrieves a specific object from the IWMSBoundIPAddresses collection.

length

Retrieves the number of objects in the IWMSBoundIPAddresses collection. This method is included for JScript compatibility.

RemoveAll

Removes all IP addresses from the collection.

Example

The following example illustrates how to retrieve an IWMSBoundIPAddresses object.

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSCPPluginAdmin CPAdmin;
IWMSBoundIPAddresses BoundIPAddresses;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the plug-in to be configured.
    Plugin = Server.ControlProtocols[
                        "WMS RTSP Server Control Protocol"];

    // Retrieve the custom interface of the plug-in.
    CPAdmin =
        (IWMSCPPluginAdmin)Plugin.CustomInterface;

    // Retrieve the list of bound IP addresses.
    BoundIPAddresses = CPAdmin.BoundIPAddresses;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Concepts

System Plug-ins (C#)