Share via


IWMDMDevice3::GetProperty

banner art

The GetProperty method retrieves a specific device property.

Syntax

HRESULT GetProperty(
  LPCWSTR  pwszPropName,
  PROPVARIANT*  pValue
);

Parameters

pwszPropName

[in]  Name of property being retrieved from the device.

pValue

[out]  Returned value for the property.

Return Values

The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes

For a complete list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_INVALIDARG One or both parameters are NULL.
WMDM_E_NOTSUPPORTED The property is not supported by the device or the device returned an error.

Remarks

To obtain the list of supported device properties, the client should query the g_wszWMDMSupportedDeviceProperties property by calling IWMDMDevice3::GetProperty with g_wszWMDMSupportedDeviceProperties as the pwszPropName parameter.

For the list of standard device property names, see Device Properties.

The client should pass in a pointer to an empty PROPVARIANT in the pValue parameter.On return, pValue will contain the value of the property.

This method is similar to the GetMetadata and GetSpecifiedMetadata methods for storages, but this method can get only one property at a time.

Requirements

Header: Defined in wmdm.idl.

Library: mssachlp.lib

See Also