Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The AcquireDeviceData method initializes or resets a device secure clock.
Syntax
HRESULT AcquireDeviceData(
[in] IWMDMDevice *pDevice,
[in] IWMDMProgress3 *pProgressCallback,
[in] DWORD dwFlags,
[out] DWORD *pdwStatus
);
Parameters
-
pDevice [in]
-
Pointer to an IWMDMDevice interface for the device that will report metering data.
-
pProgressCallback [in]
-
Progress callback through which the application can track the progress of the event, or cancel the event. The progress is identified by the EventId parameter of IWMDMProgress3 methods.
-
dwFlags [in]
-
A logical OR of one or both of the following flags, specifying what action to perform. This value is retrieved from the pdwStatus parameter of IWMDRMDeviceApp::QueryDeviceStatus or IWMDRMDeviceApp2::QueryDeviceStatus2. You can use the pdwStatus flag directly.
Flag Description WMDRM_DEVICE_NEEDCLOCK Acquire a clock from a secure clock server. WMDRM_DEVICE_REFRESHCLOCK Refresh the clock from a secure clock server. -
pdwStatus [out]
-
One of the following DWORD values specifying the status returned by the device.
Status Description 0 The action is not supported. 1 The device secure clock could not be acquired from the service. 2 The device's secure clock could not be set. 3 The device's secure clock was set.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
One or more arguments are not valid. |
|
The specified device is not a Windows Media DRM compatible device. |
|
Failed to retrieve secure clock challenge from the device or unable to retrieve the secure clock URL from the challenge. |
|
Failed to retrieve the secure clock response from the secure clock server. |
|
Failed to send the secure clock challenge to the device, or the device failed to set the clock. |
Remarks
This is an asynchronous method; the device must await the IWMDMProgress::End callback for this operation before attempting to play any licensed content.
An application can learn if the device must have its clock reset or updated by calling IWMDRMDeviceApp::QueryDeviceStatus or IWMDRMDeviceApp2::QueryDeviceStatus2.
Your application must have an Internet connection to enable it to acquire or reset a secure clock.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|