IWMDRMDeviceApp::GenerateMeterChallenge
The GenerateMeterChallenge method aggregates device metering data for a metering certificate.
Syntax
HRESULT GenerateMeterChallenge(
IWMDMDevice* pDevice,
BSTR bstrMeterCert,
BSTR* pbstrMeterURL,
BSTR* pbstrMeterData
);
Parameters
pDevice
[in] Pointer to an IWMDMDevice object.
bstrMeterCert
[in] BSTR containing the metering certificate.
pbstrMeterURL
[out] The URL for the metering certificate. See Remarks.
pbstrMeterData
[out] Metering data.
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. |
DRM_E_INVALIDXMLTAG | XML is improperly formed. |
DRM_E_NOXMLCLOSETAG | XML is improperly formed. |
DRM_E_NOXMLOPENTAG | XML is improperly formed. |
DRM_E_XMLNOTFOUND | Failed to find a required XML tag. |
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
The metering application will post the data pointed to by pbstrMeterData to the URL pointed to by pbstrMeterURL.
When the device parameter pDevice is NULL, the secured content provider gets the metering challenge from the metering information stored on the computer instead of from a particular device connected to that computer.
For detailed information on using this method, see Best Practices for Using Metering APIs.
Requirements
Header: Defined in WMDRMDeviceApp.idl.
Library: mssachlp.lib
See Also