IWMSPublishingPointCurrentCounters Object (Visual Basic .NET)

You can use the IWMSPublishingPointCurrentCounters object to retrieve real-time information about the number of connections to the publishing point and the amount of bandwidth allocated to the connections.

The IWMSPublishingPointCurrentCounters object exposes the following properties.

Property

Description

AllCounters

Retrieves an array that contains all of the counters supported by the object.

ConnectedPlayers

Retrieves the total number of players connected to the publishing point.

OutgoingDistributionAllocatedBandwidth

Retrieves the bandwidth allocated for distribution connections.

OutgoingDistributionConnections

Retrieves the total number of distribution connections.

PlayerAllocatedBandwidth

Retrieves the bandwidth allocated for player connections.

StreamingHTTPPlayers

Retrieves the total number of players receiving streamed content by using the HTTP protocol.

StreamingMMSPlayers

Retrieves the total number of players receiving streamed content by using the MMS protocol. (The MMS protocol is not supported in Windows Server 2008 operating systems.)

StreamingPlayers

Retrieves the total number of players receiving streamed content from the publishing point.

StreamingRTSPPlayers

Retrieves the total number of players receiving streamed content by using the RTSP protocol.

StreamingUDPPlayers

Retrieves the total number of players receiving streamed content by using the User Datagram Protocol (UDP).

Example

The following example illustrates how to retrieve an IWMSPublishingPointCurrentCounters object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim CurrentCounters As IWMSPublishingPointCurrentCounters

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints

    ' Retrieve information about each publishing point.
    For Each PubPoint In PubPoints

        ' Retrieve a pointer to a list of current statistics
        ' for the publishing point.
        CurrentCounters = PubPoint.CurrentCounters

    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

See Also

Reference

IWMSPublishingPoint Object (Visual Basic .NET)

Concepts

Server Object Model (Visual Basic .NET)