IWMDRMDeviceApp2::QueryDeviceStatus2 method
The QueryDeviceStatus2 method queries a device for a specific DRM status or capability.
Syntax
HRESULT QueryDeviceStatus2(
[in] IWMDMDevice *pDevice,
[in] DWORD dwFlags,
[out] DWORD *pdwStatus
);
Parameters
-
pDevice [in]
-
Pointer to an IWMDMDevice object.
-
dwFlags [in]
-
One or more of the following DWORD values specifying which capabilities to request, combined with a bitwise OR.
Flag Description WMDRM_QUERY_CLIENT_INDIVSTATUS Query whether the computer's DRM components need to be individualized. WMDRM_QUERY_DEVICE_CLOCKSTATUS Query whether the device's secure clock needs to be added or updated. WMDRM_QUERY_DEVICE_ISREVOKED Query whether the device is revoked. WMDRM_QUERY_DEVICE_ISWMDRM Query whether the device supports Windows Media DRM 10 for Portable Devices. -
pdwStatus [out]
-
Zero or more of the following DWORD values specifying the requested device status, combined with a bitwise OR.
Status Description WMDRM_DEVICE_ISWMDRM The device supports Windows Media DRM. WMDRM_DEVICE_NEEDCLOCK The device does not have a secure clock. WMDRM_DEVICE_REVOKED The device has been revoked. WMDRM_CLIENT_NEEDINDIV The computer's DRM components need to be individualized. WMDRM_DEVICE_REFRESHCLOCK The clock needs to be refreshed.
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 device certificate retrieved from the device is not valid. |
|
Failed to retrieve the device certificate from the device. |
Remarks
This method should be called before performing any restricted actions on DRM content, such as transferring DRM content to the device, or acquiring metering information. If the values retrieved by pdwStatus indicate that some action needs to be performed (such as individualization for the desktop or acquiring a clock for the device), the application should call IWMDRMDeviceApp::AcquireDeviceData and pass in the retrieved pdwStatus value from this function to the dwFlags parameter in AcquireDeviceData. If zero is returned, the device does not support Windows Media DRM 10 for Portable Devices, and no actions need be taken. See Handling Protected Content in the Application for more information.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|