Share via


IWMDRMDeviceApp::AcquireDeviceData

banner art

The AcquireDeviceData method acquires metering data from the device.

Syntax

HRESULT AcquireDeviceData(
  IWMDMDevice*  pDevice,
  IWMDMProgress3*  pProgressCallback,
  DWORD  dwFlags,
  DWORD*  pdwStatus
);

Parameters

pDevice

[in]  Pointer to an IWMDMDevice object.

pProgressCallback

[in]  Progress callback through which the application can report the progress of any steps that it might need to carry out. The step is identified by the EventId parameter of IWMDMProgress3 methods.

dwFlags

[in]  Metering response flags. This value must be one of the following flags.

Flag Description
WMDRM_METER_RESPONSE_ALL The metering response is complete.
WMDRM_METER_RESPONSE_PARTIAL A partial metering response is valid; it means that some portion of the data was retrieved, but there is still more remaining. It is recommended that the application call to get metering data until all data is retrieved, but an application could choose to simply make one call every week (or whatever the period is) irrespective of whether all the data could be retrieved.

pdwStatus

[out]   DWORD containing the status returned by the device.

Return Values

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.
NS_E_DEVICE_NOT_WMDRM_DEVICE The specified device is not a Windows Media DRM–compatible device.
NS_E_DRM_UNABLE_TO_GET_SECURE_CLOCK Failed to retrieve secure clock challenge from the device or unable to retrieve the secure clock URL from the challenge.
NS_E_DRM_UNABLE_TO_GET_SECURE_CLOCK_FROM_SERVER Failed to retrieve the secure clock response from the secure clock server.
NS_E_DRM_UNABLE_TO_SET_SECURE_CLOCK Failed to send the secure clock challenge to the device, or the device failed to set the clock.

Requirements

Header: Defined in WMDRMDeviceApp.idl.

Library: mssachlp.lib

See Also