Windows Mobile 6.5

This function displays an error dialog to the user when an error occurs while they are trying to use FDRM content.

HRESULT FileDrmHandleError(
  HWND hwndParent,
  HRESULT hrError,
  LPCTSTR pszFileName,
  DWORD dwFlags,
  PDWORD pdwStatus


[in] Handle to the window that owns any UI elements such as windows, dialog boxes, or message boxes displayed by this function.


[in] The HRESULT error to display or handle.


[in] The file associated with the error.


[in] Flags that control the API behavior. This parameter is a bitmask comprised of FDRHF_* flags. The following table shows the possible values for dwFlags.

Flag Bit mask Description



Do not try to correct the error. Set by the calling application.


[out] Status returned by FileFDRMHandleError. A bitmask comprised of FDRHF_* flags. The following table shows the possible values for dwStatus.

Flag Bit mask Description



The calling application should retry the operation.



Rights update pending.

This function only returns the following return codes. The application must use SUCCEEDED and FAILED macros to check the return. The following table shows the values that may be returned.

Value Description


Success. Check the FDRHF_RETRY and FDRHF_RIGHTSPENDING bits in *pdwFlags to control additional handling of the error.


Failure. The application must handle the error. Errors occurred either because the FFDRM provider could not handle the error or did not recognize the error.

If a rights renewal is requested by the user, a network connection may be established to send the renewal. Once the response is received a notification is sent to the registered applications.

When an error occurs while you are using one of the FDRM APIs this function can be called to display error information to the user and, optionally, attempt to correct the error. The error correction often is an offer for the user to acquire additional rights or extend existing rights. If the user requests new or updated rights the new or updated rights will arrive asynchronously. If the FDRHF_RETRY flag is set upon return from this function, the application may retry the operation that failed.

Windows Embedded CEWindows Embedded CE 6.0 and later
Windows MobilePocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later