Windows Media Player 11 SDK IWMPNetwork.lostPackets (VB and C#) 

Windows Media Player SDK banner art

Previous Next

IWMPNetwork.lostPackets (VB and C#)

The lostPackets property gets the number of packets lost.

  

Property Value

A System.Int32 that is the number of lost packets.

Remarks

This property includes streaming media packets only, and will return zero when using the HTTP protocol, which is lossless.

Packets can be lost for a number of reasons, such as the type and quality of the network connection.

Each time playback is stopped and restarted, this property is reset to zero. The value is not reset if playback is paused. This property gets valid information only during run time when the URL for playback is set by using the AxWindowsMediaPlayer.URL property.

Example Code

The following code example uses lostPackets to display the total number of packets lost during playback. The information is displayed in a label when the user clicks a button. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

  
Public Sub showLostPackets_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showLostPackets.Click

    lostPacketsLabel.Text = ("Packets lost: " + player.network.lostPackets.ToString())

End Sub

FakePre-44c292cc433a47528bc2a722ff72dd61-5fb981d6273c4e439a156eedb5b7fe2a

private void showLostPackets_Click(object sender, System.EventArgs e)
{
    lostPacketsLabel.Text = ("Packets lost: " + player.network.lostPackets.ToString());
}

Requirements

Version: Windows Media Player 9 Series or later

Namespace: WMPLib

Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next