IWMDMStorage4::GetSpecifiedMetadata method (mswmdm.h)
The GetSpecifiedMetadata method retrieves one or more specific metadata properties from the storage.
HRESULT GetSpecifiedMetadata( DWORD cProperties, LPCWSTR *ppwszPropNames, IWMDMMetaData **ppMetadata );
Count of properties to retrieve.
Array of property names to retrieve. The length of this array should be equal to cProperties. The application should free this memory using CoTaskMemFree.
Pointer to the returned IWMDMMetaData interface pointer, containing the retrieved values. The caller must release this interface when finished with it.
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
This method gives the client control over which properties are retrieved. This can be more efficient than IWMDMStorage3::GetMetadata, and is recommended when the client needs only a subset of properties supported by the storage.
If this method is used to retrieve data from a Windows Portable Devices (WPD) device, the data is returned in binary form in an IPortableDeviceValues object. The application should de-serialize this data in order to obtain the actual property values.
The method succeeds and returns WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED even if some of the specified properties could not be retrieved (but at least one property was retrieved). The method fails and returns WMDM_E_NOTSUPPORTED if none of the specified properties could be retrieved.
Requesting a single property is a special case of this method. If the client requests a single property, the possible return codes are S_OK, E_INVALIDARG, and WMDM_E_NOTSUPPORTED. Thus, in the case of a single property, the method succeeds only if the property is successfully retrieved.