Share via


IWMSPublishingPointPeakCounters Interface

banner art

Previous Next

IWMSPublishingPointPeakCounters Interface

You can use the IWMSPublishingPointPeakCounters interface to retrieve properties that contain information about peak events that occur during publishing point operation.

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

Method Description
get_AllCounters Retrieves an array that contains all of the counters supported by the interface.
get_ConnectedPlayers Retrieves the maximum number of players that have been connected to the publishing point simultaneously.
get_CountersStartTime Retrieves the date and time at which the publishing point started monitoring the peak counters.
get_OutgoingDistributionAllocatedBandwidth Retrieves the maximum bandwidth that has been allocated to a distribution connection.
get_OutgoingDistributionConnections Retrieves the maximum number of permitted distribution connections.
get_PlayerAllocatedBandwidth Retrieves the maximum bandwidth that has been allocated to player connections.
get_StreamingPlayers Retrieves the maximum number of players that have streamed content simultaneously from the publishing point.
get_StreamingHTTPPlayers Retrieves the maximum number of players that have streamed content simultaneously by using the HTTP protocol from the publishing point.
get_StreamingRTSPPlayers Retrieves the maximum number of players that have streamed content simultaneously by using the RTSP protocol from the publishing point.
get_StreamingUDPPlayers Retrieves the maximum number of players that have streamed content simultaneously by using the User Datagram Protocol (UDP) from the publishing point.
Reset Resets the counters to the current values.

Example Code

The following example illustrates how to retrieve a pointer to an IWMSPublishingPointPeakCounters interface.

#include <windows.h>
#include <atlbase.h>    // Includes CComVariant.
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer                      *pServer;
IWMSPublishingPoints            *pPubPoints;
IWMSPublishingPoint             *pPubPoint;
IWMSPublishingPointPeakCounters *pPeakCounters;

HRESULT         hr;
CComVariant     varIndex;
long            lCount;

// 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;



hr = pServer->get_PublishingPoints(&pPubPoints);
if (FAILED(hr)) goto EXIT;
hr = pPubPoints->get_Count(&lCount);
if (FAILED(hr)) goto EXIT;

// Retrieve information about each publishing point.
for (long x = 0; x < lCount; x++)
{
    varIndex = x;
    hr = pPubPoints->get_Item(varIndex, &pPubPoint);
    if (FAILED(hr)) goto EXIT;

    // Retrieve a pointer to a list of peak statistics
    // for the publishing point.
    hr = pPubPoint->get_PeakCounters(&pPeakCounters);
    if (FAILED(hr)) goto EXIT;

    // Release temporary COM objects.
    pPubPoint->Release();
    pPeakCounters->Release();
}

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

See Also

Previous Next