Κοινή χρήση μέσω


About the Error and ErrorItem Objects

[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 Error and ErrorItem objects govern the error-handling capabilities of Windows Media Player. The Error object is obtained from the Player object through the error property. You can get a specific code from the Error object by using the item property of the Error object to create the ErrorItem object. For example, to get the error code of the first error item, type:

myerrorcode = player.error.item(0).errorCode;

You can also invoke Web Help with the Error object by using the following code:

player.error.webHelp();

Error Object

ErrorItem Object

Player Object Model for Scripting Languages