Previous | Next |
The GetDataDemands method reports which data the SCP needs to determine whether it is responsible for a specified piece of content.
Syntax
HRESULT GetDataDemands(
UINT* pfuFlags,
DWORD* pdwMinRightsData,
DWORD* pdwMinExamineData,
DWORD* pdwMinDecideData,
BYTE abMac[WMDM_MAC_LENGTH]
);
Parameters
pfuFlags
[out] Flags describing the data required by the SCP to make decisions. This parameter is included in the output message authentication code. At least one of the following flags must be used.
Flag | Description |
WMDM_SCP_RIGHTS_DATA | The SCP needs data to determine rights for the content. |
WMDM_SCP_EXAMINE_DATA | The SCP needs data to determine whether it is responsible for the content. |
WMDM_SCP_DECIDE_DATA | The SCP needs data to determine whether to allow the content to be downloaded. |
WMDM_SCP_EXAMINE_EXTENSION | The SCP needs to examine the file name extension to determine whether to allow the content to be downloaded. |
pdwMinRightsData
[out] Pointer to a double word specifying the minimum amount of data needed to determine rights for this content. This parameter is included in the output message authentication code.
pdwMinExamineData
[out] Pointer to a double word containing the minimum number of bytes of data that the SCP needs to determine whether it is responsible for the content. This parameter is included in the output message authentication code.
pdwMinDecideData
[out] Pointer to a double word containing the minimum number of bytes of data that the SCP needs to determine whether to allow the content to be downloaded. 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_MAC_CHECK_FAILED | The message authentication code is not valid. |
E_INVALIDARG | A parameter is an invalid or NULL pointer. |
E_FAIL | An unspecified error occurred. |
Remarks
This method must be called before any of the other methods of ISCPSecureQuery are called.
This method is called after any certificate exchanges have been successfully completed. The SCP fills in the parameters with the flags and data that describe its requirements for making decisions about the content.
If the SCP sets the WMDM_SCP_RIGHTS_DATA flag, then Windows Media Device Manager sends the amount of data specified in pdwMinRightsData by using the ISCPSecureQuery::GetRights call.
If the SCP sets the WMDM_SCP_EXAMINE_DATA flag, then Windows Media Device Manager sends the amount of data specified in pdwMinExamineData by using the ISCPSecureQuery::ExamineData call.
If the SCP sets the WMDM_SCP_DECIDE_DATA flag, then Windows Media Device Manager sends the amount of data specified in pdwMinDecideData by using the ISCPSecureQuery::MakeDecision call.
If no examine flags are set, Windows Media Device Manager does not make any more calls. If no decide flags are set, Windows Media Device Manager still makes the ISCPSecureQuery::ExamineData call.
If this method does not return S_OK, then Windows Media Device Manager does not make any further calls to this SCP.
See Also
Previous | Next |