Edit

Share via


Error Codes (Windows Media Device Manager 11 SDK)

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_BUFFERTOOSMALL The buffer supplied by the caller is too small. The client should increase the size of the buffer and retry the call.
WMDM_E_BUSY The device is busy and cannot satisfy the new request.
WMDM_E_CALL_OUT_OF_SEQUENCE Operations were called in the wrong order. (For example, calling Read without Open.)
WMDM_E_INCORRECT_APPSEC The 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_PIPE PMSN service pipe cannot be opened.
WMDM_E_INCORRECT_RIGHTS The rights for a file are not correct.
WMDM_E_INTERFACEDEAD The object has disconnected itself from the clients.
WMDM_E_INVALIDTYPE The type is not valid.
WMDM_E_LICENSE_EXPIRED The license has expired.
WMDM_E_LICENSE_NOTEXIST The license does not exist.
WMDM_E_MAC_CHECK_FAILED The message authentication code check failed.
WMDM_E_MOREDATA There is more data.
WMDM_E_NORIGHTS The caller does not have rights for this operation.
WMDM_E_NOTCERTIFIED The caller is not authenticated to make this call.
WMDM_E_NOTSUPPORTED This operation is not supported.
WMDM_E_PROCESSFAILED The process failed.
WMDM_E_REVOKED The license has been revoked.
WMDM_E_SDMI_NOMORECOPIES No more copies can be made per SDMI compliance.
WMDM_E_SDMI_TRIGGER SDMI validation failed.
WMDM_E_TOO_MANY_SESSIONS Too many sessions exist.
WMDM_E_USER_CANCELLED The 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
0x80042003 0x2003 Session Not Open Indicates that the session handle of the operation is not a currently open session. This indicates an internal error in the MTP stack.
0x80042004 0x2004 Invalid TransactionID Indicates that the TransactionID is zero or does not refer to a valid transaction. This indicates an internal error in the MTP stack.
0x80042005 0x2005 Operation Not Supported Indicates 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.
0x80042006 0x2006 Parameter Not Supported Indicates 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.
0x80042007 0x2007 Incomplete Transfer Indicates that the transfer did not complete, and any data transferred should be discarded. This response does not correspond to a cancelled transaction.
0x80042008 0x2008 Invalid StorageID Indicates 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.
0x80042009 0x2009 Invalid ObjectHandle Indicates that an object handle does not refer to an actual object that is present on the device. The application should enumerate the storages again.
0x8004200A 0x200A DeviceProp Not Supported Indicates 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.
0x8004200B 0x200B Invalid ObjectFormatCode Indicates that the device does not support the particular object format code supplied in the given context.
0x80042012 0x2012 Partial Deletion Indicates 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.
0x80042013 0x2013 Store Not Available Indicates 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.
0x80042014 0x2014 Specification By Format Unsupported Indicates 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.
0x80042015 0x2015 No Valid ObjectInfo Indicates that the host did not provide valid object info to device before transferring the object. This indicates an internal error in the MTP stack.
0x80042016 0x2016 Invalid Code Format Indicates that the data code does not have the correct format, and is therefore not valid. This indicates an internal error in the MTP stack.
0x80042017 0x2017 Unknown Vendor Code Device does not know how to handle the vendor extended code.
0x8004201A 0x201A Invalid ParentObject Indicates that the object is not a valid parent object. This indicates an internal error in the MTP stack.
0x8004201B 0x201B Invalid DeviceProp Format Indicates 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.
0x8004201C 0x201C Invalid DeviceProp Value Indicates 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.
0x8004201E 0x201E Session Already Open Indicates that the host tried to open session while a session is already open. This indicates an internal error in the MTP stack.
0x8004201F 0x201F Transaction Cancelled May be used to indicate that the operation was interrupted due to manual cancellation.
0x80042020 0x2020 Specification of Destination Unsupported Indicates that device does not support the specification of destination by the host. This indicates an internal error in the MTP stack.
0x8004A801 0xA801 Invalid_ObjectPropCode Indicates that the device does not support the sent Object Property Code in this context. This indicates an internal error in the MTP stack.
0x8004A802 0xA802 Invalid_ObjectProp_Format Indicates that an object property sent to the device is in an unsupported size or type. This indicates an internal error in the MTP stack.
0x8004A803 0xA803 Invalid_ObjectProp_Value Indicates 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.
0x8004A804 0xA804 Invalid_ObjectReference Indicates 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.
0x8004A806 0xA806 Invalid_Dataset Indicates that the dataset sent in the data phase of this operation is invalid. This indicates an internal error in the MTP stack.
0x8004A807 0xA807 Object_Too_Large Indicates 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_SUCCESS The operation completed successfully. 0x00000000L
DRM_S_FALSE The method succeeded and returned the Boolean value FALSE. 0x00000001L
DRM_E_FAIL An unspecified failure has occurred. 0x80004005L
DRM_E_INVALIDARG A parameter is not valid or is a NULL pointer. 0x80070057L
DRM_E_OUTOFMEMORY The method failed to allocate the necessary memory. 0x80000002L
DRM_E_FILENOTFOUND The system cannot find the file specified. 0x80030002L
DRM_E_BUFFERTOOSMALL A buffer is too small for the data. 0x8007007AL
DRM_E_NOTIMPL Not implemented. 0x80004001L
DRM_E_NOMORE The end of the enumeration, or no more data available. 0x80070103L
DRM_E_ARITHMETIC_OVERFLOW An arithmetic operation resulted in overflow (loss of important bits). 0x8007534L
DRM_E_ALGORITHMNOTSET The encryption algorithm required for this operation is not supported. 0x8004c017
DRM_E_APPCERT_REVOKED The application certificate given to DRM is revoked. 0X8004C053
DRM_E_BACKUP_EXISTS The backup file already exists. 0x8004c032
DRM_E_CH_ATTR_MISSING A content header attribute is missing. 0x80041107L
DRM_E_CH_BAD_KEY A key is not valid. 0x8004110EL
DRM_E_CH_CHECKSUM_MISSING The content header checksum is missing. 0x80041106L
DRM_E_CH_INVALID_HEADER The content header is not valid. 0x80041108L
DRM_E_CH_KID_MISSING The KID attribute is missing from the content header. 0x80041104L
DRM_E_CH_LAINFO_MISSING The LAINFO attribute is mising from the content header. 0x80041105L
DRM_E_CH_NOT_SIGNED The header was not signed. 0x80041113L
DRM_E_CH_UNABLE_TO_VERIFY The signature of the content header cannot be verified. 0x8004110AL
DRM_E_CH_UNKNOWN_ERROR An unknown error occurred. 0x80041116L
DRM_E_CH_UNSUPPORTED_HASH_ALGORITHM The hash algorithm is not supported. 0x8004110CL
DRM_E_CH_UNSUPPORTED_SIGN_ALGORITHM The signature algorithm is not supported. 0x8004110DL
DRM_E_CH_UNSUPPORTED_VERSION The content header version is not supported. 0x8004110BL
DRM_E_CH_VERSION_MISSING The content header version is missing. 0x80041103L
DRM_E_CIPHER_NOTINITIALIZED The DRM Cipher routines were not correctly initialized before calling the encryption/decryption routines. 0x800480D2L
DRM_E_CLIENTTIMEINVALID The time/clock on the device is not synchronized with the license server within tolerance. 0x8004c01c
DRM_E_CLK_INVALID_DATE The secure clock response is not valid. 0x8004c040
DRM_E_CLK_INVALID_RESPONSE The secure clock response is not valid. 0x8004c03f
DRM_E_CLK_NOT_SET A license may exist but cannot be used because the secure clock is not set. 0x8004C05B
DRM_E_CLK_NOT_SUPPORTED The secure clock is not supported. 0x8004c04a
DRM_E_CLK_RESETSTATEREADERROR The secure clock Reset State cannot be read. 0x8004c04d
DRM_E_CLK_RESETSTATEWRITEERROR The secure clock Reset State cannot be written. 0x8004c04e
DRM_E_CLK_UNSUPPORTED_VALUE The secure clock response contains an unsupported value. 0x8004c041
DRM_E_CONDITIONFAIL A condition in the license failed to pass. 0x8004c007
DRM_E_CONDITIONNOTSUPPORTED A condition in the license is not supported by this version of DRM. 0x8004c008
DRM_E_CRYPTO_FAILED A cryptographic operation failed. 0X8004C054
DRM_E_DECRYPT_NOTINITIALIZED The DRM decryption routines were not correctly initialized before trying to decrypt data. 0x800480D3L
DRM_E_DEVCERTEXCEEDSSIZELIMIT The device certificate exceeds the maximum size. 0x8004c043
DRM_E_DEVCERTINDIV_NOT_SUPPORTED Device certificate individualization is not supported. 0x8004c04b
DRM_E_DEVCERTREADERROR The device certificate cannot be read. 0x8004c045
DRM_E_DEVCERTTEMPLATEEXCEEDSSIZELIMIT The device certificate template exceeds the maximum size. 0x8004c044
DRM_E_DEVCERTTEMPLATEREADERROR The device certificate template cannot be read. 0x8004c049
DRM_E_DEVCERTWRITEERROR The device certificate cannot be stored. 0x8004c046
DRM_E_DEVICENOTINIT This device has not been initialized against a DRM initialization service. 0x8004c001
DRM_E_DRMNOTINIT The application did not call DRM_MGR_Initialize properly. 0x8004c002
DRM_E_DUPLICATEDHEADERATTRIBUTE The header contains a duplicate attribute. 0x8004c02d
DRM_E_FILEREADERROR There was an error reading a file. 0x8004c01a
DRM_E_FILESEEKERROR There was an error seeking in a file. 0x8004c037
DRM_E_FILEWRITEERROR There was an error writing a file. 0x8004c01b
DRM_E_HASHMISMATCH A keyed hash check failed. 0x8004c010
DRM_E_HDSBLOCKMISMATCH The Checksum attribute is missing from the header. 0x8004c031
DRM_E_HDSEXCLUSIVELOCKONLY Only exclusive lock is accepted. 0x8004c039
DRM_E_HDSFILECORRUPTED The HDS file is corrupted. 0x8004c026
DRM_E_HDSFILEEXISTS The HDS file already exists. 0x8004c034
DRM_E_HDSLOCKFAILED Locking a segment of the HDS file failed. 0x8004c036
DRM_E_HDSNAMESPACEFULL The HDS namespace is full. 0x8004c022
DRM_E_HDSNAMESPACEINUSE No HDS namespace in is in use. 0x8004c028
DRM_E_HDSNAMESPACENOTFOUND No HDS namespace can be found. 0x8004c023
DRM_E_HDSNOTLOCKEDEXCLUSIVE The existing lock is not exclusive. 0x8004c038
DRM_E_HDSRESERVEDKEYDETECTED An HDS reserved key value was detected in UniqueKey. 0x8004c03A
DRM_E_HDSSEEKERROR There was an error attempting to seek in the HDS file. 0x8004c027
DRM_E_HDSSLOTEXIST No HDS dataslot exists. 0x8004c025
DRM_E_HDSSLOTNOTFOUND The HDS dataslot cannot be found. 0x8004c024
DRM_E_HDSSTOREFULL The HDS data file is full. 0x8004c01d
DRM_E_HEADER_NOT_SET A V2 content header is not set 0x8004c03C
DRM_E_INCOMPATABLELICENSESIZE The size of the license is incompatible. DRM does not understand this license. 0x8004c004
DRM_E_INVALID_SECURESTORE_PASSWORD The password used to open the secure store key was not able to validate the secure store hash. 0x8004c029
DRM_E_INVALID_SIGNATURE The license signature is not valid. 0x800480CFL
DRM_E_INVALIDBINDID The bind ID is not valid. 0x8004c015
DRM_E_INVALIDDEVICECERTIFICATE The device certificate is not valid. 0x8004c035
DRM_E_INVALIDDEVICECERTIFICATETEMPLATE The device certificate is not valid. 0x8004c042
DRM_E_INVALIDLICENSE The license is not valid. 0x8004c006
DRM_E_INVALIDLICENSEFLAGS The flags in the license are not valid. DRM does not understand them or they are conflicting. 0x8004c005
DRM_E_INVALIDLICENSESTORE The license store version number is incorrect, or in some other way the store is not valid. 0x8004c019
DRM_E_INVALIDRIGHT A right in the license in not valid. 0x8004c003
DRM_E_INVALIDTIME A time structure is not valid. 0x8004c011
DRM_E_INVALIDXMLTAG An XML tag is not valid. 0x8004c020
DRM_E_KEY_MISMATCH A public-private key pair is mismatched. 0x80048013L
DRM_E_LIC_KEY_AND_CERT_MISMATCH A key and a certificate are mismatched. 0x80048013L
DRM_E_LIC_KEY_DECODE_FAILURE A key cannot be decoded. 0x80048007L
DRM_E_LIC_SIGNATURE_FAILURE The license signature is not valid. 0x80048008L
DRM_E_LICENSE_TOOLONG The license size is too long. 0x8004c032
DRM_E_LICENSEEXPIRED The license has expired either by depleting a play count or reaching an end date. 0x8004c009
DRM_E_LICENSEMISMATCH The license content ID or SDK ID does not match that requested by the application. 0x8004c00c
DRM_E_LICENSENOTBOUND A license has not been bound to. Decryption cannot happen without a successful bind call. 0x8004c00f
DRM_E_LICENSENOTFOUND A license was not found in the external license store. 0x8004c013
DRM_E_LICENSENOTYETVALID The current time is prior to the license start time, so the license is not yet valid. 0x8004c00a
DRM_E_LICENSESERVERNEEDSKEY The license server needs a version of the device bind key from the initialization service. 0x8004c018
DRM_E_LICENSESTORENOTFOUND The external license store was not found. 0x8004c012
DRM_E_LICENSEVERSIONNOTSUPPORTED The DRM license version is not supported by the DRM version on the device. 0x8004c014
DRM_E_LOGICERR The DRM code has a logic error in it. This result should never be returned. There is an unhandled code path if it is returned 0x8004c3e8
DRM_E_LRB_INVALIDLICENSEDATA The license revocation response is signed with a public key different from the license server's public key. 0x8004c073
DRM_E_LRB_INVALIDSIGNATURE The signature in the license revocation response is not valid. 0x8004c071
DRM_E_LRB_LGPUBKEY_MISMATCH The license revocation response is signed with a public key different from the license server's public key. 0x8004c072
DRM_E_LRB_NOLGPUBKEY The license revocation response does not contain a valid license server public key. 0x8004c070
DRM_E_MACHINEIDMISMATCH The device has a machine ID different from that in the device certificate. 0x8004c03e
DRM_E_METERING_INVALID_COMMAND An invalid command was sent when processing the metering response. 0X8004C051
DRM_E_METERING_MID_MISMATCH The metering ID is not the same in the metering certificate and the metering response data. 0X8004C05F
DRM_E_METERING_NOT_SUPPORTED Metering is not supported. 0x8004c04c
DRM_E_METERING_RESPONSE_DECRYPT_FAILED The encrypted section of the metering response cannot be decrypted 0X8004C060
DRM_E_METERING_STORE_CORRUPT The metering store is corrupted. 0X8004C052
DRM_E_METERING_WRONG_TID The metering response contains the wrong transaction ID. 0X8004C050
DRM_E_NEEDDEVCERTINDIV The device certificate is a template. It needs to be individualized. 0x8004c03d
DRM_E_NO_CLK_SUPPORTED This device does not support any clock. So time-bound licenses cannot be played. 0x8004C05C
DRM_E_NO_URL The URL information cannot be found. 0x8004C05D
DRM_E_NOACTIONINLICENSEREQUEST The license request does not contain any actions. 0x8004c02c
DRM_E_NOCHECKSUMINHEADER The checksum attribute is missing from the header. 0x8004c030
DRM_E_NOKIDINHEADER The key ID attribute is missing from the header. 0x8004c02e
DRM_E_NOLAINFOINHEADER The LAINFO attribute is missing from the header. 0x8004c02f
DRM_E_NORIGHTSREQUESTED The application did not request any rights before trying to bind. 0x8004c00e
DRM_E_NOXMLCDATA No XML CDATA can be found. 0x8004c021
DRM_E_NOXMLCLOSETAG An XML close tag cannot be found. 0x8004c01f
DRM_E_NOXMLOPENTAG An XML open tag cannot be found. 0x8004c01e
DRM_E_PKCRYPTO_FAILURE An error occurred in an asymmetric cryptographic operation. 0x800480D5L
DRM_E_POLICY_METERING_DISABLED Metering code was called but metering is disabled by group or user policy. 0x8004C059
DRM_E_POLICY_ONLINE_DISABLED Online communication is disabled by group policy. 0x8004C05A
DRM_E_PRIVKEYREADERROR The private key for the device cannot be read. 0x8004c047
DRM_E_PRIVKEYWRITEERROR The private key for the device cannot be stored. 0x8004c048
DRM_E_RIGHTSNOTAVAILABLE The rights requested by the application are not available in the license. 0x8004c00b
DRM_E_SECURESTORE_CORRUPT The secure store is corrupted. 0x8004c02a
DRM_E_SECURESTORE_FULL The current secure store key is full. No more data can be added. 0x8004c02b
DRM_E_SECURESTORE_LOCKNOTOBTAINED Before 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_CORRUPT The stack allocator context is corrupted. This is usually caused by a buffer overrun. 0X8004C055
DRM_E_STACKTOOSMALL The stack supplied to the DRM API was too small. 0x800480D1L
DRM_E_SYNC_ENTRYNOTFOUND The entry cannot be found in the synchronization store. 0x800480D0L
DRM_E_UNKNOWN_BINDING_KEY A matching binding key cannot be found for the license. 0x8004C056
DRM_E_UNKNOWN_PROPERTY A device property is unknown. 0x8004C05E
DRM_E_UNSUPPORTEDALGORITHM The encryption algorithm required for this operation is not supported. 0x8004c016
DRM_E_V1_LICENSE_CHAIN_NOT_SUPPORTED License chaining with V1 content is not supported. 0x8004C057
DRM_E_V1_NOT_SUPPORTED V1 license acquisition is not supported. 0x8004c03B
DRM_E_WRONG_TOKEN_TYPE The wrong type of token was used. 0x8004C058
DRM_E_WRONGTOKENTYPE The token parameter is of an incompatible type. 0x8004c00d
DRM_E_XMLNOTFOUND A required XML tag cannot be found. 0X8004C04F
NS_E_DRM_DEBUGGING_NOT_ALLOWED A command cannot be run with a debugger attached. 0xC00D2767
The DRM security elements must be updated. The user can visit DRM individualization to update their computer. 0x800480CF
The DRM security elements must be updated. The user can visit DRM individualization 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 can be found at Error Codes and Messages. However, the following Windows Media Rights Manager SDK errors were not documented.

Return code Description Hexadecimal value
NS_E_DRM_DEBUGGING_NOT_ALLOWED You cannot debug when accessing DRM-protected content. 0xC00D2767
NS_E_NOT_LICENSED The content is not licensed. 0xC00D00CD
NS_E_DRM_LICENSE_UNUSABLE The license is unusable for an unspecified reason. 0xC00D2748

 

Programming Reference