Share via


Windows Media Player 11 SDK IWMPErrorItem.errorDescription (VB and C#) 

Windows Media Player SDK banner art

IWMPErrorItem.errorDescription (VB and C#)

The errorDescription property gets a description of the error.

  

Property Value

A System.String that is the error description.

Remarks

You should set IWMPSettings.enableErrorDialogs to false if you choose to display custom error messages.

Example Code

The following example uses errorDescription in an Error event handler to display the error description to the user. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

  
Public Sub player_ErrorEvent_errorDescription(ByVal sender As Object, ByVal e As System.EventArgs) Handles player.ErrorEvent

    ' Get the error description for the first error item.
    Dim errDesc As String = player.Error.Item(0).errorDescription

    ' Display the error description.
    System.Windows.Forms.MessageBox.Show("Error: " + errDesc)

End Sub

FakePre-7d627660743044edacc81d1a5f51fbf7-ffdb2a45b7144cf1847cbad52e768749

private void player_ErrorEvent_errorDescription(object sender, System.EventArgs e)
{
    // Get the error description for the first error item.
    string errDesc = player.Error.get_Item(0).errorDescription;

    // Display the error description.
    System.Windows.Forms.MessageBox.Show("Error: " + errDesc);
}

Requirements

Version: Windows Media Player 9 Series or later

Namespace: WMPLib

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

See Also