Send Feedback

This function enables an application to commit the rights to be used for protected content.

HRESULT FileDrmCommitRights (
  HANDLE hFile,
  DWORD dwRight,
  DWORD dwFlags


  • hFile
    [in] Handle to the file that contains the content to be used. The file must have been opened by using FileDrmCreateFile.

  • dwRight
    [in] The right that the application specifies to use. Only one right can be specified. The following table shows the possible values for dwRight.

    Flag Bitmask Description
    FDRRF_PLAY 0x00000001 Play audio/video content.
    FDRRF_DISPLAY 0x00000002 Display images.
    FDRRF_EXECUTE 0x00000004 Execute applications.
    FDRRF_PRINT 0x00000008 Print content.
    FDRRF_FORWARD 0x00000010 Content can be forwarded.
  • dwFlags
    [in] Flags to control the behavior of FileDrmCommitRights. This parameter is a bitmask of FDRVF_* flag values. The following table shows the possible values for dwFlags.

    Flag Bitmask Description
    FDRVF_NOUI 0x00000001 Do not display any UI.

    This bitmask enables the calling application to ensure that the call does not block waiting for user input.

    FDRVF_NORENEW 0x00000002 No rights renewal.

    Does not attempt to update the rights associated with a piece of content, either through user interaction or automatically.

    FDRVF_VERIFY_CONTINUE 0x00000004 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.

Return Values

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.

Value Description
S_FDRM_NOPROVIDER Success, but no FDRM provider found.
S_FDRM_NOTDRMOBJECT Success, but the target is not FDRM-protected content.
E_FDRM_NOTALLOWED Unable to verify rights. The operation not allowed.
E_FDRM_LICENSEPENDING Unable to verify rights. The license is pending.


Commits the rights associated with an object. The calling application must call FileDrmVerifyRights before this call. For protected content that can only be accessed a limited number of times, it is important to call FileDrmCommitRights only after the protected content has been successfully displayed or used.


Pocket PC: Windows Mobile Version 5.0 and later
Smartphone: Windows Mobile Version 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: FDRM.h.
Link Library: Aygshell.lib.

See Also

FDRM API Reference | FDRM Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.