IWMDRMDeviceApp::ProcessMeterResponse method

The ProcessMeterResponse method resets some or all of the metering counts on a device, after data from the device has been sent to and processed by the server.

Syntax

HRESULT ProcessMeterResponse(
  [in]  IWMDMDevice *pDevice,
  [in]  BYTE        *pbResponse,
  [in]  DWORD       cbResponse,
  [out] DWORD       *pdwFlags
);

Parameters

pDevice [in]

Pointer to an IWMDMDevice object.

pbResponse [in]

Response received from a metering server, after sending data generated using GenerateMeterChallenge.

cbResponse [in]

Size of pbResponse, in bytes.

pdwFlags [out]

A DWORD from the following table indicating whether there is more metering data on the device that needs to be processed.

Flag Description
WMDRM_METER_RESPONSE_ALL All metering data has been processed.
WMDRM_METER_RESPONSE_PARTIAL Additional metering data needs to be processed.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
DRM_E_INVALIDARG
One or more arguments are not valid.
Errors from the device
Any of a number of device errors.
Errors from the DRM Client
Any of a number of internal DRM client errors.
NS_E_DEVICE_NOT_WMDRM_DEVICE
The specified device is not a Windows Media DRM compatible device.

Remarks

More information on metering, including code examples, can be found in the whitepaper Metering the Use of Digital Media Content with Windows Media DRM 10.

Requirements

Requirement Value
Header
WMDRMDeviceApp.h (also requires Wmdrmdeviceapp_i.c, built from WMDRMDeviceApp.idl)
Library
Mssachlp.lib

See also

Handling Protected Content in the Application

IWMDMDevice Interface

IWMDRMDeviceApp Interface