IWMDMStorage4::GetRightsWithProgress
The GetRightsWithProgress method retrieves the rights information for the storage object, providing a callback mechanism for monitoring progress.
Syntax
HRESULT GetRightsWithProgress(
IWMDMProgress3* pIProgressCallback,
PWMDMRIGHTS* ppRights,
UINT* pnRightsCount
);
Parameters
pIProgressCallback
[in] Pointer to an IWMDMProgress3 interface to be used by Windows Media Device Manager to report progress back to the application. This parameter can be NULL.
ppRights
[out] 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.
pnRightsCount
[out] Pointer to the number of WMDMRIGHTS structures in the ppRights array.
Return Values
The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider 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 a complete list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The method succeeded. |
E_INVALIDARG | Either ppRights or pnRightsCount is NULL. |
WMDM_E_NOTSUPPORTED | Rights are not supported for this object. |
WMDM_E_NOTCERTIFIED | The caller is not certified. |
WMDM_E_MAC_CHECK_FAILED | The message authentication check failed. |
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.
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 defined in mswmdm.h.
Requirements
Header: Defined in wmdm.idl.
Library: mssachlp.lib
See Also