DSHOW FDRM Error Handling
4/8/2010
DSHOW filters cannot parent UI and are therefore unable to display error messages directly, as an application normally does. The caller must parent all FDRM-related error UI.
DSHOW filters must have an entry point to display FDRM UI to the end user when there are errors such as invalid FDRM rights. If errors do occur during processing, the error is returned to the caller.
It is up to the DSHOW filter fail gracefully and return an error result if the content cannot be played or if it receives FDRM content and it is not FDRM enabled. For ring tones, IEventSound will call into the DSHOW filter, if the DSHOW filter cannot play a ring tone for any reason, such as when no rights remain on the content, and returns an error, IEventSound automatically defaults to the default ring tone so the phone will ring. The user is not notified that the rights had expired until they navigate to the ring tone picker to reselect the ring tone. At that time they receive a notice that the rights for that ring tone are expired.
The following list shows the general steps of error handling for FDRM:
The FDRM related error is returned to the caller.
The caller performs a query interface operation on the filter object for an IFileDrmHandler interface.
The caller calls FileDrmHandleError on the media file with the received HRESULT error as a parameter.
Note
The FileDrmHandleError function must not be called during normal processing of a FDRM-protected file.
The necessary FDRM engine provided error UI is displayed. For example, the "Content cannot be used" or "Would you like to renew rights" dialog boxes might be displayed.
The DSHOW Filter and IFileDrmHandler interface implementation must be provided by the DSHOW Filter provider.
See Also
Concepts
Using FDRM APIs in DSHOW Filters
File-Based Digital Rights Management