IWMDMMetaData::QueryByIndex method (mswmdm.h)
The QueryByIndex method retrieves the value of a property specified by index.
Syntax
HRESULT QueryByIndex(
[in] UINT iIndex,
[out] WCHAR **ppwszName,
[out] WMDM_TAG_DATATYPE *pType,
[out] BYTE **ppValue,
[out] UINT *pcbLength
);
Parameters
[in] iIndex
Integer specifying the zero-based index of the property. The number of items is obtained through the GetItemCount call.
[out] ppwszName
Name of the property. Windows Media Device Manager allocates this memory, and the caller must free it using CoTaskMemFree.
[out] pType
An WMDM_TAG_DATATYPE enumerated value describing the type of data returned in ppValue.
[out] ppValue
Pointer to a pointer to a byte array that receives the content of the value if the method succeeds. This memory is allocated by Windows Media Device Manager, 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
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mswmdm.h |
Library | Mssachlp.lib |