|  | 
| Previous | Next | 
The GetRights method retrieves the rights information for an object.
Syntax
HRESULT GetRights(
  PWMDMRIGHTS*  ppRights,
  UINT*  pnRightsCount,
  BYTE  abMac[WMDM_MAC_LENGTH]
);
Parameters
ppRights
[out] Pointer to an array of WMDMRIGHTS structures that contain the storage object rights information. This parameter is included in the output message authentication code.
pnRightsCount
[out] Pointer to the number of WMDMRIGHTS structures in the ppRights array. This parameter is included in the output message authentication code.
abMac
[in, out] Array of eight bytes containing the message authentication code for the parameter data of this method. (WMDM_MAC_LENGTH is defined as 8.)
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
| Return code | Description | 
| E_INVALIDARG | The pRights parameter is an invalid or NULL pointer. | 
| WMDM_E_NOTSUPPORTED | Rights are not supported for this object. | 
| E_FAIL | An unspecified error occurred. | 
Remarks
Object rights describe the usage permissions for 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 ppRights array is allocated by this method, and must be freed by the application using CoTaskMemFree, a standard Win32 function.
See Also
| Previous | Next |