FileDrmHandleError
4/8/2010
This function displays an error dialog to the user when an error occurs while they are trying to use FDRM content.
Syntax
HRESULT FileDrmHandleError(
HWND hwndParent,
HRESULT hrError,
LPCTSTR pszFileName,
DWORD dwFlags,
PDWORD pdwStatus
);
Parameters
- hwndParent
[in] Handle to the window that owns any UI elements such as windows, dialog boxes, or message boxes displayed by this function.
- hrError
[in] The HRESULT error to display or handle.
- pszFileName
[in] The file associated with the error.
dwFlags
[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 FDRHF_NOCORRECT
0x00000001
Do not try to correct the error. Set by the calling application.
pdwStatus
[out] Status returned by FileFDRMHandleError. A bitmask comprised of FDRHF_* flags. The following table shows the possible values for dwStatus.Flag Bit mask Description FDRHF_RETRY
0x00010000
The calling application should retry the operation.
FDRHF_RIGHTSPENDING
0x00020000
Rights update pending.
Return Value
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 |
---|---|
S_OK |
Success. Check the FDRHF_RETRY and FDRHF_RIGHTSPENDING bits in *pdwFlags to control additional handling of the error. |
E_FFDRM_ERRORNOTHANDLED |
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. |
Remarks
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.
Requirements
Header | fdrm.h |
Library | aygshell.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |