Share via


IWMSAvailableIPAddresses Interface

The IWMSAvailableIPAddresses interface contains a collection of IP addresses. You can use this interface to specify an IP address for a control protocol plug-in.

In addition to the methods inherited from IDispatch, the IWMSAvailableIPAddresses interface exposes the following methods.

Method

Description

get_Count

Retrieves the number of IP addresses in the IWMSAvailableIPAddresses collection.

get_Item

Retrieves a specific IP address, by index, from the IWMSAvailableIPAddresses collection.

get_length

Retrieves the number of IP addresses in the IWMSAvailableIPAddresses collection. This method is provided for JScript compatibility.

Example

The following example illustrates how to retrieve a pointer to an IWMSAvailableIPAddresses interface:

#include <windows.h>
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer                  *pServer;
IWMSAvailableIPAddresses    *pAvlIPAddresses;

HRESULT         hr;

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
                      NULL,
                      CLSCTX_ALL,
                      IID_IWMSServer,
                      (void **)&pServer);
if (FAILED(hr)) goto EXIT;

// Retrieve a pointer to the IWMSAvailableIPAddresses
// interface.
hr = pServer->get_AvailableIPAddresses(&pAvlIPAddresses);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

See Also

Concepts

Server Object Model Interfaces (C++)