IMDSPStorage4::GetSpecifiedMetadata (deprecated)

banner art

This is preliminary documentation and subject to change.

This topic documents a feature of the Windows Media Device Manager SDK. We recommend that you migrate your application to use the Windows Portable Devices API. For more information, see the Windows Portable Devices SDK.

The GetSpecifiedMetadata method retrieves only the specified metadata object for a storage.

Syntax

HRESULT GetSpecifiedMetadata(
  DWORD  cProperties,
  LPCWSTR*  ppwszPropNames,
  IWMDMMetaData**  ppMetadata
);

Parameters

cProperties

[in]  Count of properties to be retrieved.

ppwszPropNames

[in]  Array that contains the property names to be retrieved. The size of this array should be equal to cProperties.

ppMetadata

[out]  Pointer to the returned IWMDMMetaData interface pointer.

Return Values

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 extenstive list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table. If the method fails with an error, it returns a standard error code.

Return code Description
S_OK The method succeeded.
E_INVALIDARG This value is returned if any of the following is true:

One of cProperties and ppwszPropNames is zero while the other is non-zero.

None of the property names passed-in is valid for the storage.

WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED The method succeeded, but only some of the requested properties were retuned.
WMDM_E_NOTSUPPORTED None of the properties was returned by the device. It is possible that one or more properties are supported by the device, but could not be returned at this time.

Remarks

This method gives the client control over which properties are retrieved. The client can specify the property names for the properties that the client needs to retrieve.

In contrast, the GetMetadata method retrieves all the storage metadata (properties).

If none of the specified properties can be returned, the service provider should return WMDM_E_NOTSUPPORTED or any suitable error code.

If at least one property can be retrieved, the service provider should return that property and set the return code to a success code of WMDM_S_NOT_ALL_PROPERTIES_RETRIEVED.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also