IWMPErrorItem::errorDescription property
[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The errorDescription property gets a description of the error.
Syntax
public System.String errorDescription {get; set;}
Public ReadOnly Property errorDescription As System.String
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.
Examples
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.
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);
}
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
Requirements
Requirement | Value |
---|---|
Version |
Windows Media Player 9 Series or later |
Namespace |
WMPLib |
Assembly |
|