Partager via


IWMDRMDeviceApp2::QueryDeviceStatus2

banner art

The QueryDeviceStatus2 method queries a specific device status.

Syntax

HRESULT QueryDeviceStatus2(
  IWMDMDevice*  pDevice,
  DWORD  dwFlags,
  DWORD*  pdwStatus
);

Parameters

pDevice

[in]  Pointer to an IWMDMDevice object.

dwFlags

[in]  DWORD specifying which device status to query. This value must be one of the following flags.

Flag Description
WMDRM_QUERY_CLIENT_INDIVSTATUS Query client individualization status.
WMDRM_QUERY_DEVICE_CLOCKSTATUS Query the clock status of the device.
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]  DWORD containing the requested device status.

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_DRM_INVALID_CERTIFICATE The device certificate retrieved from the device is not valid.
NS_E_DRM_UNABLE_TO_GET_DEVICE_CERT Failed to retrieve the device certificate from the device.

Remarks

The IWMDRMDeviceApp::QueryDeviceStatus method always queries all of the statuses.

Requirements

Header: Defined in WMDRMDeviceApp.idl.

Library: mssachlp.lib

See Also