IMDSPDevice3::GetProperty method (mswmdm.h)

The GetProperty method retrieves a specific device property.

Syntax

HRESULT GetProperty(
  [in]  LPCWSTR     pwszPropName,
  [out] PROPVARIANT *pValue
);

Parameters

[in] pwszPropName

Name of property being retrieved from the device.

[out] pValue

Returned value for the property.

Return value

The method returns an HRESULT. All the interface methods in Windows Media Device Manager 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 an extensive list of possible error codes, see Error Codes.

Remarks

The variant that pValue points to is set to an empty PROPVARIANT, that is, its VT is set to VT_EMPTY.

Service provider should set this variant to the appropriate property value for the property pwszPropName.

If pwszPropName is g_wszWMDMSupportedDeviceProperties, service provider should return an array of the supported device properties. In such case, the VT of variant should be VT_BSTR | VT_ARRAY.

For a list of standard device property names, see Metadata Constants.

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

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

IMDSPDevice3 Interface

IMDSPDevice3::SetProperty

IMDSPStorage3::GetMetadata

IMDSPStorage4::GetSpecifiedMetadata

Metadata Constants