IWMDMStorage4::GetRightsWithProgress method (mswmdm.h)

The GetRightsWithProgress method retrieves the rights information for the storage object, providing a callback mechanism for monitoring progress.

Syntax

HRESULT GetRightsWithProgress(
  [in]  IWMDMProgress3 *pIProgressCallback,
  [out] PWMDMRIGHTS    *ppRights,
  [out] UINT           *pnRightsCount
);

Parameters

[in] pIProgressCallback

Optional pointer to an IWMDMProgress3 interface to be used by Windows Media Device Manager to report progress back to the application.

[out] ppRights

Pointer to an array of WMDMRIGHTS structures that contain the storage object rights information. Memory for this array is allocated by Windows Media Device Manager. When the calling application has finished accessing this array, the memory must be freed by using CoTaskMemFree.

[out] pnRightsCount

Pointer to the number of WMDMRIGHTS structures in the ppRights array.

Return value

The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes
For an extensive list of possible error codes, see Error Codes.

Remarks

Object rights describe the usage permissions for digital media content. For example, the WMDMRIGHTS structure can contain information concerning how many times a file can be played and who can play it.

Retrieving rights from a licensed file can sometimes be a lengthy request; this function allows a rights request to be performed asynchronously.

The secure content provider can generate event notifications on the callback pIProgressCallback in addition to the progress notifications. Examples of such events include acquiring a secure clock, initializing DRM, and so on. These events are described in IWMDMProgress3::Progress3.

This method is identical to IWMDMStorage::GetRights, except it returns progress, and does not provide a MAC for parameter verification.

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

IWMDMStorage4 Interface