This function enables an application to verify that an object has the required rights before it uses FDRM-protected content.
HRESULT FileDrmVerifyRights ( HWND hwndParent, LPCTSTR pszFileName, DWORD dwRight, DWORD dwFlags, PDWORD pdwRightsStatus );
[in] Handle to the window that owns any UI elements such as windows, dialog boxes, or message boxes displayed by this function.
[in] Path to the file that contains the FDRM-protected content.
[in] The FDRM right to be used when opening the FDRM-protected content. This is the right specified by the application. Use the bitmask to specify only one right at a time. The following table shows the possible values for dwRight.
Flag Bitmask Description
Play audio/video content.
Content can be forwarded.
[in] Flags to control the behavior of FDRM_VerifyRights. This is a bitmask of FDRVF_* flag values. The following table shows the possible values for dwFlags.
Flag Bit mask Description
Do not display any UI.
This enables the calling application to ensure that this call will not block waiting for user input.
No rights renewal.
Does not attempt to update the rights associated with a piece of content, either through user interaction or automatically.
Verify the continued use of the content.
Specified when FileDrmCommitRights has been called and returned success for a piece of content and the consuming application of the content is still consuming the same instance of the content but needs to re-verify rights. For example, a media player might begin playing a song but be interrupted by a phone call. Once the phone call is completed the media player will call FileDrmVerifyRights to verify that it still has rights to continue playing that content. This flag may allow content to continue being used even if there are no longer valid rights. For example, if the content has restrictions on the number of times it can be used, and that usage count went to zero in the last call to FileDrmCommitRights, then the user should still be allowed to use that content until is has been completely consumed.
[out] Status of rights. The following table shows the possible values for dwRight.
Flag Bitmask Description
Rights are invalid but the user can update them.
A rights update is pending.
This function can return any HRESULT and the application should use the SUCCEEDED and FAILED macros to check the results. The following table shows additional HRESULT values that may be returned.
Success, but no FDRM provider found.
Success, but the target is not a FDRM object.
Unable to verify rights. The file is deleted.
Unable to verify rights. The operation is cancelled.
Unable to verify rights. The license is pending.
Unable to verify rights. The operation not allowed.
Before an application can use FDRM-protected content it must call this function to ensure that the object can be used as intended. This function verifies that the object has the appropriate rights and, if necessary, prompts the user to verify that they want to consume rights or renew expired rights.
When you use the FDRM API in a DSHOW filter you must have the FDRVF_NOUI flag specified when you call the FileDrmVerifyRights function.
|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|