IWMSServerCurrentCounters.StreamErrorRate (Visual Basic .NET)

banner art

Previous Next

IWMSServerCurrentCounters.StreamErrorRate (Visual Basic .NET)

The StreamErrorRate property retrieves the number of dropped packets per second.

Syntax

  Integer = IWMSServerCurrentCounters.StreamErrorRate

Property Value

Integer containing the error rate in dropped packets per second.

Remarks

This property is read-only. The server uses a 1-second interval to calculate the rate. To calculate a more current value, use the IWMSServerTotalCounters.StreamErrors method.

Example Code

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

Private Sub GetErrorRate()

    ' Declare variables.
    Dim Server As WMSServer
    Dim CurrentCounters As IWMSServerCurrentCounters
    Dim iValue As Integer

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

    ' Retrieve a list of current statistics
    ' for the server.
    CurrentCounters = Server.CurrentCounters

    ' Retrieve the number of dropped packets per second.
    iValue = CurrentCounters.StreamErrorRate

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

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next