Share via


ISCPSecureQuery::GetRights (deprecated)

banner art

This is preliminary documentation and subject to change.

This topic documents a feature of the Windows Media Device Manager SDK. We recommend that you migrate your application to use the Windows Portable Devices API. For more information, see the Windows Portable Devices SDK.

The GetRights method retrieves rights information for the current piece of content. Rights are file-specific.

Syntax

HRESULT GetRights(
  BYTE*  pData,
  DWORD  dwSize,
  BYTE*  pbSPSessionKey,
  DWORD  dwSessionKeyLen,
  IMDSPStorageGlobals*  pStgGlobals,
  PWMDMRIGHTS*  ppRights,
  UINT*  pnRightsCount,
  BYTE  abMac[WMDM_MAC_LENGTH]
);

Parameters

pData

[in]  Pointer to data requested by GetDataDemands. This parameter must be included in the input message authentication code and must be encrypted.

dwSize

[in]  Number of bytes of data in the pData buffer. This parameter must be included in the input message authentication code.

pbSPSessionKey

[in]  Pointer to an array of bytes containing the session key for securing communication with the service provider to which pStgGlobals points. This parameter must be included in the input message authentication code and must be encrypted.

dwSessionKeyLen

[in]  Length of the byte array to which pbSPSessionKey points. This parameter must be included in the input message authentication code.

pStgGlobals

[in]  Pointer to an IWMDMStorageGlobals interface on the root storage of the media or device to or from which the file is being transferred.

ppRights

[out]  Pointer to an array of WMDMRIGHTS structures containing the rights information for this object. The array is allocated by this method and must be freed using CoTaskMemFree. This parameter is included in the output message authentication code.

pnRightsCount

[out]  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
WMDM_E_CALL_OUT_OF_SEQUENCE This method was called out of sequence. GetDataDemands and then ExamineData must be called first, in that order.
WMDM_E_MAC_CHECK_FAILED The message authentication code is not valid.
WMDM_E_NORIGHTS The caller does not have the rights required to perform the requested operation.
E_INVALIDARG A parameter is invalid or is a NULL pointer.
E_FAIL An unspecified error occurred.

Remarks

This method must not be called until GetDataDemands and then ExamineData have been called, in that order.

Requirements

Header: Defined in WMSCP.idl.

Library: mssachlp.lib

See Also