Partager via


IWMDMDevice3::GetFormatCapability

banner art

The GetFormatCapability method retrieves device capabilities for items of a specified format. The capabilities are expressed as supported properties and their allowed values.

Syntax

HRESULT GetFormatCapability(
  WMDM_FORMATCODE  format,
  WMDM_FORMAT_CAPABILITY*  pFormatSupport
);

Parameters

format

[in]  Value from the WMDM_FORMATCODE enumeration representing the queried format.

pFormatSupport

[out]  Pointer to the returned WMDM_FORMAT_CAPABILITY structure containing supported properties and their allowed values.

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 The pFormatSupport parameter is NULL or the format is invalid.
WMDM_E_NOTSUPPORTED The device does not support this method or the format specified.

Remarks

The client can obtain the list of supported formats by using the IWMDMDevice3::GetProperty method to query the g_wszWMDMFormatsSupported device property.

For a particular format, a client can call this function to obtain the supported properties and get information about configurations of supported properties (for example, combinations of bit rate and sample rate). This information is expressed as a format capability.

Requirements

Header: Defined in wmdm.idl.

Library: mssachlp.lib

See Also