Previous | Next |
The ExamineData method determines whether the SCP is responsible for the content by examining data that Windows Media Device Manager passes to this method.
Syntax
HRESULT ExamineData(
UINT fuFlags,
LPWSTR pwszExtension,
BYTE* pData,
DWORD dwSize,
BYTE abMac[WMDM_MAC_LENGTH]
);
Parameters
[in] fuFlags
[in] Flags describing the data offered to the SCP to make decisions. The following flags can be present.
Flag | Description |
WMDM_SCP_EXAMINE_DATA | The pData parameter points to data to be examined. |
pwszExtension
[in] Pointer to the file name extension to be examined if the SCP asks for an extension in the GetDataDemand call.
pData
[in] Pointer to the data to be examined. This parameter must be included in the input message authentication code and must be encrypted.
dwSize
[in] Double word that contains the length, in bytes, of the data to be examined. This parameter must be included in the input 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 this method can determine that the SCP is responsible for this content, it returns S_OK. Otherwise, it returns an HRESULT error code.
Return code | Description |
WMDM_E_CALL_OUT_OF_SEQUENCE | This method was called out of sequence. GetDataDemands must be called first. |
WMDM_E_MAC_CHECK_FAILED | The message authentication code is not valid. |
WMDM_E_MOREDATA | Windows Media Device Manager must call this method again with another packet of data. The size of the packet is determined by the pdwMinExamineData parameter in the ISCPSecureQuery::GetDataDemands method. |
S_FALSE | The SCP is not responsible for this content. Terminate interaction with SCP. |
E_INVALIDARG | A parameter is invalid or is a NULL pointer. |
E_FAIL | An unspecified error occurred. |
Remarks
This method is called after the ISCPSecureQuery::GetDataDemands method. The SCP uses the information passed in this method to determine whether it is responsible for the content. The fuFlags parameter is consulted to determine which data has been presented for examination.
If the WMDM_SCP_EXAMINE_DATA flag is set, then the pDataBuffer parameter contains dwDataLength of bytes for the SCP to examine.
If this method does not return S_OK or WMDM_E_MOREDATA, then Windows Media Device Manager does not make any further calls to this SCP.
See Also
Previous | Next |