Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The IWMSAvailableIPAddresses object contains a collection of IP addresses. You can use this object to specify an IP address for a control protocol plug-in.
The IWMSAvailableIPAddresses object exposes the following properties.
| Property | Description | 
|---|---|
| Count | Retrieves the number of IP addresses in the IWMSAvailableIPAddresses collection. | 
| length | Retrieves the number of IP addresses in the IWMSAvailableIPAddresses collection. This method is provided for JScript compatibility. | 
In C#, there are two ways to access objects in a collection:
- Access individual objects directly by using a string (where applicable) 
- Iterate through the objects by using an index 
You must use array notation when retrieving objects from a collection, except when using the get_Item method.
Example
The following example illustrates how to retrieve an IWMSAvailableIPAddresses object.
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer                   Server;
IWMSAvailableIPAddresses    AvlIPAddresses;
try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();
    // Retrieve the IWMSAvailableIPAddresses object.
    AvlIPAddresses = Server.AvailableIPAddresses;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}