Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMPErrorItem.errorCode (VB and C#)
The errorCode property gets the current error code.
Property Value
A System.Int32 that is the error code.
Remarks
You should set IWMPSettings.enableErrorDialogs to false if you choose to display custom error messages.
Example Code
The following example uses errorCode in an Error event handler to display the error code to the user. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
Public Sub player_ErrorEvent_errorCode(ByVal sender As Object, ByVal e As System.EventArgs) Handles player.ErrorEvent
' Get the error code for the first error item.
Dim errCode As Integer = player.Error.Item(0).errorCode
' Display the error code.
System.Windows.Forms.MessageBox.Show("Error number: " + errCode.ToString())
End Sub
FakePre-0075ffadc4d440218e749b4fc246bbd7-c5255dcc125547179aadf5ddc615306f
private void player_ErrorEvent_errorCode(object sender, System.EventArgs e)
{
// Get the error code for the first error item.
int errCode = player.Error.get_Item(0).errorCode;
// Display the error code.
System.Windows.Forms.MessageBox.Show("Error number: " + errCode.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 |