IWMDMMetaData::QueryByName method (mswmdm.h)

The QueryByName method retrieves the value of a property specified by name.

Syntax

HRESULT QueryByName(
  [in]  LPCWSTR           pwszTagName,
  [out] WMDM_TAG_DATATYPE *pType,
  [out] BYTE              **pValue,
  [out] UINT              *pcbLength
);

Parameters

[in] pwszTagName

Pointer to a wide-character null-terminated string specifying the property name. A list of standard property name constants is given in Metadata Constants.

[out] pType

An WMDM_TAG_DATATYPE enumerated value describing the type of data retrieved by pValue.

[out] pValue

Pointer to a pointer to a byte array that receives the content of the value if the method succeeds. Windows Media Device Manager allocates this memory and the caller must free it using CoTaskMemFree.

[out] pcbLength

Pointer to the size, in bytes, of the byte array ppValue. If the value is a string, this includes the termination character.

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.

Requirements

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

See also

IWMDMMetaData Interface

Metadata Constants

QueryByIndex

Setting Metadata on a File