Error Codes

Windows Media Device Manager methods can return a variety of error codes. Some of these are specific to the Windows Media Device Manager, while others are defined by other SDKs or porting kits used to build a device and bubbled up to the Windows Media Device Manager methods. This section describes the various error codes that can be returned by Windows Media technologies, organized by origin.

Windows Media Device Manager Error Codes

The following error codes are defined by the Windows Media Device Manager SDK.

Return code Description
WMDM_E_BUFFERTOOSMALLThe buffer supplied by the caller is too small. The client should increase the size of the buffer and retry the call.
WMDM_E_BUSYThe device is busy and cannot satisfy the new request.
WMDM_E_CALL_OUT_OF_SEQUENCEOperations were called in the wrong order. (For example, calling Read without Open.)
WMDM_E_INCORRECT_APPSECThe minimum level of application security is not correct. This can be caused if a device's key/certificate pair is not a high enough security level.
WMDM_E_CANTOPEN_PMSN_SERVICE_PIPEPMSN service pipe can not be opened.
WMDM_E_INCORRECT_RIGHTSThe rights for a file are not correct.
WMDM_E_INTERFACEDEADThe object has disconnected itself from the clients.
WMDM_E_INVALIDTYPEThe type is not valid.
WMDM_E_LICENSE_EXPIREDThe license has expired.
WMDM_E_LICENSE_NOTEXISTThe license does not exist.
WMDM_E_MAC_CHECK_FAILEDThe message authentication code check failed.
WMDM_E_MOREDATAThere is more data.
WMDM_E_NORIGHTSThe caller does not have rights for this operation.
WMDM_E_NOTCERTIFIEDThe caller is not authenticated to make this call.
WMDM_E_NOTSUPPORTEDThis operation is not supported.
WMDM_E_PROCESSFAILEDThe process failed.
WMDM_E_REVOKEDThe license has been revoked.
WMDM_E_SDMI_NOMORECOPIESNo more copies can be made per SDMI compliance.
WMDM_E_SDMI_TRIGGERSDMI validation failed.
WMDM_E_TOO_MANY_SESSIONSToo many sessions exist.
WMDM_E_USER_CANCELLEDThe user cancelled the operation.

 

A service provider should refrain from returning generic failure codes, for example, E_FAIL. It should return as specific an error code as possible, so that if the error is propagated to an application, the application can give meaningful feedback to the user.

For errors in storage and device related operations, service providers should resort to Win32 error codes. Service providers can use HRESULT_FROM_WIN32 to convert Windows error codes to HRESULT values and use them as the return values. This macro and the error codes are defined in winerror.h which is a part of the Platform SDK.

MTP Error Codes

Devices that supports Media Transport Protocol (MTP) can return the following error codes. Most of the error codes imply an error in the MTP stack, but are helpful in diagnosing the error situation.

HRESULT MTP response code MTP response code description Details
0x800420030x2003Session Not OpenIndicates that the session handle of the operation is not a currently open session. This indicates an internal error in the MTP stack.
0x800420040x2004Invalid TransactionIDIndicates that the TransactionID is zero or does not refer to a valid transaction. This indicates an internal error in the MTP stack.
0x800420050x2005Operation Not SupportedIndicates that the operation code appears to be a valid code, but the device does not support the operation. This indicates an internal error in the MTP stack.
0x800420060x2006Parameter Not SupportedIndicates that a non-zero parameter was specified in conjunction with the operation, and the parameter is not used for that operation. This indicates an internal error in the MTP stack.
0x800420070x2007Incomplete TransferIndicates that the transfer did not complete, and any data transferred should be discarded. This response does not correspond to a cancelled transaction.
0x800420080x2008Invalid StorageIDIndicates that a storage ID sent with an operation does not refer to an actual valid store that is present on the device. This indicates an internal error in the MTP stack.
0x800420090x2009Invalid ObjectHandleIndicates that an object handle does not refer to an actual object that is present on the device. The application should enumerate the storages again.
0x8004200A0x200ADeviceProp Not SupportedIndicates that the device property code appears to be a valid code, but that property is not supported by the device. This indicates an internal error in the MTP stack.
0x8004200B0x200BInvalid ObjectFormatCodeIndicates that the device does not support the particular object format code supplied in the given context.
0x800420120x2012Partial DeletionIndicates that only a subset of the storages indicated for deletion were actually deleted, because some were write-protected or were on stores that are read-only.
0x800420130x2013Store Not AvailableIndicates that the store (or the store that contains the indicated object) is not physically available. This can be caused by media ejection. This response shall not be used to indicate that the store is busy.
0x800420140x2014Specification By Format UnsupportedIndicates that the operation attempted to specify action only on objects of a particular format, and that capability is not supported. The operation should be attempted again without specifying by format. Any response of this nature infers that any future attempt to specify by format with the indicated operation will result in the same response. This indicates an internal error in the MTP stack.
0x800420150x2015No Valid ObjectInfoIndicates that the host did not provide valid object info to device before transferring the object. This indicates an internal error in the MTP stack.
0x800420160x2016Invalid Code FormatIndicates that the data code does not have the correct format, and is therefore not valid. This indicates an internal error in the MTP stack.
0x800420170x2017Unknown Vendor CodeDevice does not know how to handle the vendor extended code.
0x8004201A0x201AInvalid ParentObjectIndicates that the object is not a valid parent object. This indicates an internal error in the MTP stack.
0x8004201B0x201BInvalid DeviceProp FormatIndicates that an attempt was made to set a device property, but the data is not of the correct size or format. This indicates an internal error in the MTP stack.
0x8004201C0x201CInvalid DeviceProp ValueIndicates that an attempt was made to set a device property to a value that is not allowed by the device. This indicates an internal error in the MTP stack.
0x8004201E0x201ESession Already OpenIndicates that the host tried to open session while a session is already open. This indicates an internal error in the MTP stack.
0x8004201F0x201FTransaction CancelledMay be used to indicate that the operation was interrupted due to manual cancellation.
0x800420200x2020Specification of Destination UnsupportedIndicates that device does not support the specification of destination by the host. This indicates an internal error in the MTP stack.
0x8004A8010xA801Invalid_ObjectPropCodeIndicates that the device does not support the sent Object Property Code in this context. This indicates an internal error in the MTP stack.
0x8004A8020xA802Invalid_ObjectProp_FormatIndicates that an object property sent to the device is in an unsupported size or type. This indicates an internal error in the MTP stack.
0x8004A8030xA803Invalid_ObjectProp_ValueIndicates that an object property sent to the device is the correct type, but contains a value that is not supported. This indicates an internal error in the MTP stack.
0x8004A8040xA804Invalid_ObjectReferenceIndicates that a sent Object Reference is not valid. Either the reference contains an object handle not present on the device, or the reference attempting to be set is unsupported in context. This can be due to an error in the MTP stack or due to application using a stale storage object.
0x8004A8060xA806Invalid_DatasetIndicates that the dataset sent in the data phase of this operation is invalid. This indicates an internal error in the MTP stack.
0x8004A8070xA807Object_Too_LargeIndicates that the object desired to be sent cannot be stored in the file system of the device. This shall not be returned when there is insufficient space on the storage.

 

Windows Media DRM for Portable Devices Porting Kit errors

The following error codes are defined in the Windows Media DRM for Portable Devices Porting Kit, and may be returned by methods that call a device built on this porting kit. These error codes are related to DRM issues.

Return Code Description Hexadecimal value
DRM_FAILED(Status)The operation failed.(Status)<0
DRM_SUCCEEDED(Status)The operation completed successfully.(Status) >= 0
DRM_SUCCESSThe operation completed successfully.0x00000000L
DRM_S_FALSEThe method succeeded and returned the Boolean value FALSE.0x00000001L
DRM_E_FAILAn unspecified failure has occurred.0x80004005L
DRM_E_INVALIDARGA parameter is not valid or is a NULL pointer.0x80070057L
DRM_E_OUTOFMEMORYThe method failed to allocate the necessary memory.0x80000002L
DRM_E_FILENOTFOUNDThe system cannot find the file specified.0x80030002L
DRM_E_BUFFERTOOSMALLA buffer is too small for the data.0x8007007AL
DRM_E_NOTIMPLNot implemented.0x80004001L
DRM_E_NOMOREThe end of the enumeration, or no more data available.0x80070103L
DRM_E_ARITHMETIC_OVERFLOWAn arithmetic operation resulted in overflow (loss of important bits).0x8007534L
DRM_E_ALGORITHMNOTSETThe encryption algorithm required for this operation is not supported.0x8004c017
DRM_E_APPCERT_REVOKEDThe application certificate given to DRM is revoked.0X8004C053
DRM_E_BACKUP_EXISTSThe backup file already exists.0x8004c032
DRM_E_CH_ATTR_MISSINGA content header attribute is missing.0x80041107L
DRM_E_CH_BAD_KEYA key is not valid.0x8004110EL
DRM_E_CH_CHECKSUM_MISSINGThe content header checksum is missing.0x80041106L
DRM_E_CH_INVALID_HEADERThe content header is not valid.0x80041108L
DRM_E_CH_KID_MISSINGThe KID attribute is missing from the content header.0x80041104L
DRM_E_CH_LAINFO_MISSINGThe LAINFO attribute is mising from the content header.0x80041105L
DRM_E_CH_NOT_SIGNEDThe header was not signed.0x80041113L
DRM_E_CH_UNABLE_TO_VERIFYThe signature of the content header cannot be verified.0x8004110AL
DRM_E_CH_UNKNOWN_ERRORAn unknown error occurred.0x80041116L
DRM_E_CH_UNSUPPORTED_HASH_ALGORITHMThe hash algorithm is not supported.0x8004110CL
DRM_E_CH_UNSUPPORTED_SIGN_ALGORITHMThe signature algorithm is not supported.0x8004110DL
DRM_E_CH_UNSUPPORTED_VERSIONThe content header version is not supported.0x8004110BL
DRM_E_CH_VERSION_MISSINGThe content header version is missing.0x80041103L
DRM_E_CIPHER_NOTINITIALIZEDThe DRM Cipher routines were not correctly initialized before calling the encryption/decryption routines.0x800480D2L
DRM_E_CLIENTTIMEINVALIDThe time/clock on the device is not synchronized with the license server within tolerance.0x8004c01c
DRM_E_CLK_INVALID_DATEThe secure clock response is not valid.0x8004c040
DRM_E_CLK_INVALID_RESPONSEThe secure clock response is not valid.0x8004c03f
DRM_E_CLK_NOT_SETA license may exist but cannot be used because the secure clock is not set.0x8004C05B
DRM_E_CLK_NOT_SUPPORTEDThe secure clock is not supported.0x8004c04a
DRM_E_CLK_RESETSTATEREADERRORThe secure clock Reset State cannot be read.0x8004c04d
DRM_E_CLK_RESETSTATEWRITEERRORThe secure clock Reset State cannot be written.0x8004c04e
DRM_E_CLK_UNSUPPORTED_VALUEThe secure clock response contains an unsupported value.0x8004c041
DRM_E_CONDITIONFAILA condition in the license failed to pass.0x8004c007
DRM_E_CONDITIONNOTSUPPORTEDA condition in the license is not supported by this version of DRM.0x8004c008
DRM_E_CRYPTO_FAILEDA cryptographic operation failed.0X8004C054
DRM_E_DECRYPT_NOTINITIALIZEDThe DRM decryption routines were not correctly initialized before trying to decrypt data.0x800480D3L
DRM_E_DEVCERTEXCEEDSSIZELIMITThe device certificate exceeds the maximum size.0x8004c043
DRM_E_DEVCERTINDIV_NOT_SUPPORTEDDevice certificate individualization is not supported.0x8004c04b
DRM_E_DEVCERTREADERRORThe device certificate cannot be read.0x8004c045
DRM_E_DEVCERTTEMPLATEEXCEEDSSIZELIMITThe device certificate template exceeds the maximum size.0x8004c044
DRM_E_DEVCERTTEMPLATEREADERRORThe device certificate template cannot be read.0x8004c049
DRM_E_DEVCERTWRITEERRORThe device certificate cannot be stored.0x8004c046
DRM_E_DEVICENOTINITThis device has not been initialized against a DRM initialization service.0x8004c001
DRM_E_DRMNOTINITThe application did not call DRM_MGR_Initialize properly.0x8004c002
DRM_E_DUPLICATEDHEADERATTRIBUTEThe header contains a duplicate attribute.0x8004c02d
DRM_E_FILEREADERRORThere was an error reading a file.0x8004c01a
DRM_E_FILESEEKERRORThere was an error seeking in a file.0x8004c037
DRM_E_FILEWRITEERRORThere was an error writing a file.0x8004c01b
DRM_E_HASHMISMATCHA keyed hash check failed.0x8004c010
DRM_E_HDSBLOCKMISMATCHThe Checksum attribute is missing from the header.0x8004c031
DRM_E_HDSEXCLUSIVELOCKONLYOnly exclusive lock is accepted.0x8004c039
DRM_E_HDSFILECORRUPTEDThe HDS file is corrupted.0x8004c026
DRM_E_HDSFILEEXISTSThe HDS file already exists.0x8004c034
DRM_E_HDSLOCKFAILEDLocking a segment of the HDS file failed.0x8004c036
DRM_E_HDSNAMESPACEFULLThe HDS namespace is full.0x8004c022
DRM_E_HDSNAMESPACEINUSENo HDS namespace in is in use.0x8004c028
DRM_E_HDSNAMESPACENOTFOUNDNo HDS namespace can be found.0x8004c023
DRM_E_HDSNOTLOCKEDEXCLUSIVEThe existing lock is not exclusive.0x8004c038
DRM_E_HDSRESERVEDKEYDETECTEDAn HDS reserved key value was detected in UniqueKey.0x8004c03A
DRM_E_HDSSEEKERRORThere was an error attempting to seek in the HDS file.0x8004c027
DRM_E_HDSSLOTEXISTNo HDS dataslot exists.0x8004c025
DRM_E_HDSSLOTNOTFOUNDThe HDS dataslot cannot be found.0x8004c024
DRM_E_HDSSTOREFULLThe HDS data file is full.0x8004c01d
DRM_E_HEADER_NOT_SETA V2 content header is not set0x8004c03C
DRM_E_INCOMPATABLELICENSESIZEThe size of the license is incompatible. DRM does not understand this license.0x8004c004
DRM_E_INVALID_SECURESTORE_PASSWORDThe password used to open the secure store key was not able to validate the secure store hash.0x8004c029
DRM_E_INVALID_SIGNATUREThe license signature is not valid.0x800480CFL
DRM_E_INVALIDBINDIDThe bind ID is not valid.0x8004c015
DRM_E_INVALIDDEVICECERTIFICATEThe device certificate is not valid.0x8004c035
DRM_E_INVALIDDEVICECERTIFICATETEMPLATEThe device certificate is not valid.0x8004c042
DRM_E_INVALIDLICENSEThe license is not valid.0x8004c006
DRM_E_INVALIDLICENSEFLAGSThe flags in the license are not valid. DRM does not understand them or they are conflicting.0x8004c005
DRM_E_INVALIDLICENSESTOREThe license store version number is incorrect, or in some other way the store is not valid.0x8004c019
DRM_E_INVALIDRIGHTA right in the license in not valid.0x8004c003
DRM_E_INVALIDTIMEA time structure is not valid.0x8004c011
DRM_E_INVALIDXMLTAGAn XML tag is not valid.0x8004c020
DRM_E_KEY_MISMATCHA public-private key pair is mismatched.0x80048013L
DRM_E_LIC_KEY_AND_CERT_MISMATCHA key and a certificate are mismatched.0x80048013L
DRM_E_LIC_KEY_DECODE_FAILUREA key cannot be decoded.0x80048007L
DRM_E_LIC_SIGNATURE_FAILUREThe license signature is not valid.0x80048008L
DRM_E_LICENSE_TOOLONGThe license size is too long.0x8004c032
DRM_E_LICENSEEXPIREDThe license has expired either by depleting a play count or reaching an end date.0x8004c009
DRM_E_LICENSEMISMATCHThe license content ID or SDK ID does not match that requested by the application.0x8004c00c
DRM_E_LICENSENOTBOUNDA license has not been bound to. Decryption cannot happen without a successful bind call.0x8004c00f
DRM_E_LICENSENOTFOUNDA license was not found in the external license store.0x8004c013
DRM_E_LICENSENOTYETVALIDThe current time is prior to the license start time, so the license is not yet valid.0x8004c00a
DRM_E_LICENSESERVERNEEDSKEYThe license server needs a version of the device bind key from the initialization service.0x8004c018
DRM_E_LICENSESTORENOTFOUNDThe external license store was not found.0x8004c012
DRM_E_LICENSEVERSIONNOTSUPPORTEDThe DRM license version is not supported by the DRM version on the device.0x8004c014
DRM_E_LOGICERRThe DRM code has a logic error in it. This result should never be returned. There is an unhandled code path if it is returned0x8004c3e8
DRM_E_LRB_INVALIDLICENSEDATAThe license revocation response is signed with a public key different from the license server's public key.0x8004c073
DRM_E_LRB_INVALIDSIGNATUREThe signature in the license revocation response is not valid.0x8004c071
DRM_E_LRB_LGPUBKEY_MISMATCHThe license revocation response is signed with a public key different from the license server's public key.0x8004c072
DRM_E_LRB_NOLGPUBKEYThe license revocation response does not contain a valid license server public key.0x8004c070
DRM_E_MACHINEIDMISMATCHThe device has a machine ID different from that in the device certificate.0x8004c03e
DRM_E_METERING_INVALID_COMMANDAn invalid command was sent when processing the metering response.0X8004C051
DRM_E_METERING_MID_MISMATCHThe metering ID is not the same in the metering certificate and the metering response data.0X8004C05F
DRM_E_METERING_NOT_SUPPORTEDMetering is not supported.0x8004c04c
DRM_E_METERING_RESPONSE_DECRYPT_FAILEDThe encrypted section of the metering response cannot be decrypted0X8004C060
DRM_E_METERING_STORE_CORRUPTThe metering store is corrupted.0X8004C052
DRM_E_METERING_WRONG_TIDThe metering response contains the wrong transaction ID.0X8004C050
DRM_E_NEEDDEVCERTINDIVThe device certificate is a template. It needs to be individualized.0x8004c03d
DRM_E_NO_CLK_SUPPORTEDThis device does not support any clock. So time-bound licenses cannot be played.0x8004C05C
DRM_E_NO_URLThe URL information cannot be found.0x8004C05D
DRM_E_NOACTIONINLICENSEREQUESTThe license request does not contain any actions.0x8004c02c
DRM_E_NOCHECKSUMINHEADERThe checksum attribute is missing from the header.0x8004c030
DRM_E_NOKIDINHEADERThe key ID attribute is missing from the header.0x8004c02e
DRM_E_NOLAINFOINHEADERThe LAINFO attribute is missing from the header.0x8004c02f
DRM_E_NORIGHTSREQUESTEDThe application did not request any rights before trying to bind.0x8004c00e
DRM_E_NOXMLCDATANo XML CDATA can be found.0x8004c021
DRM_E_NOXMLCLOSETAGAn XML close tag cannot be found.0x8004c01f
DRM_E_NOXMLOPENTAGAn XML open tag cannot be found.0x8004c01e
DRM_E_PKCRYPTO_FAILUREAn error occurred in an asymmetric cryptographic operation.0x800480D5L
DRM_E_POLICY_METERING_DISABLEDMetering code was called but metering is disabled by group or user policy.0x8004C059
DRM_E_POLICY_ONLINE_DISABLEDOnline communication is disabled by group policy.0x8004C05A
DRM_E_PRIVKEYREADERRORThe private key for the device cannot be read.0x8004c047
DRM_E_PRIVKEYWRITEERRORThe private key for the device cannot be stored.0x8004c048
DRM_E_RIGHTSNOTAVAILABLEThe rights requested by the application are not available in the license.0x8004c00b
DRM_E_SECURESTORE_CORRUPTThe secure store is corrupted.0x8004c02a
DRM_E_SECURESTORE_FULLThe current secure store key is full. No more data can be added.0x8004c02b
DRM_E_SECURESTORE_LOCKNOTOBTAINEDBefore reading or writing data to the secure store in raw mode, the lock must be obtained by using DRM_SST_OpenData.0x800480D4L
DRM_E_STACK_CORRUPTThe stack allocator context is corrupted. This is usually caused by a buffer overrun.0X8004C055
DRM_E_STACKTOOSMALLThe stack supplied to the DRM API was too small.0x800480D1L
DRM_E_SYNC_ENTRYNOTFOUNDThe entry cannot be found in the synchronization store.0x800480D0L
DRM_E_UNKNOWN_BINDING_KEYA matching binding key cannot be found for the license.0x8004C056
DRM_E_UNKNOWN_PROPERTYA device property is unknown.0x8004C05E
DRM_E_UNSUPPORTEDALGORITHMThe encryption algorithm required for this operation is not supported.0x8004c016
DRM_E_V1_LICENSE_CHAIN_NOT_SUPPORTEDLicense chaining with V1 content is not supported.0x8004C057
DRM_E_V1_NOT_SUPPORTEDV1 license acquisition is not supported.0x8004c03B
DRM_E_WRONG_TOKEN_TYPEThe wrong type of token was used.0x8004C058
DRM_E_WRONGTOKENTYPEThe token parameter is of an incompatible type.0x8004c00d
DRM_E_XMLNOTFOUNDA required XML tag cannot be found.0X8004C04F
NS_E_DRM_DEBUGGING_NOT_ALLOWEDA command cannot be run with a debugger attached.0xC00D2767
The DRM security elements must be updated. The user can go to the Windows Media Individualization Page to update their computer.0x800480CF
The DRM security elements must be updated. The user can go to the Windows Media Individualization Page to update their computer.0x80049006

 

Windows Media Rights Manager SDK errors

Occasionally, you might encounter an error defined in the Windows Media Rights Manager SDK. A list of errors defined by that SDK is given in the MSDN library. However, the following Windows Media Rights Manager SDK errors were not documented.

Return code Description Hexadecimal value
NS_E_DRM_DEBUGGING_NOT_ALLOWEDYou cannot debug when accessing DRM-protected content.0xC00D2767
NS_E_NOT_LICENSEDThe content is not licensed.0xC00D00CD
NS_E_DRM_LICENSE_UNUSABLEThe license is unusable for an unspecified reason.0xC00D2748

 

Related topics

Programming Reference

 

 

Community Additions

ADD
Show: