Error Codes
All the interface methods in Windows Media Device Manager and service provider can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
Windows Media Device Manager error codes are as follows:
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. |
WMDM_E_CANTOPEN_PMSN_SERVICE_PIPE | PMSN service pipe can not 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.
Requirements
Header: Defined in wmdm.idl.
Library: mssachlp.lib
See Also