IPortableDeviceKeyCollection::Add method

The Add method adds a property key to the collection.

Syntax

HRESULT Add(
  [in] REFPROPERTYKEY Key
);

Parameters

Key [in]

A REFPROPERTYKEY to add to the collection. This method copies the key to the collection, so you can release the local variable after calling this method.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_OUTOFMEMORY
There is not enough memory available to add the key to the collection.

Examples

For an example of how to use this method, see Retrieving Properties for a Single Object.

Requirements

Requirement Value
Header
PortableDeviceTypes.h
Library
PortableDeviceGUIDs.lib

See also

IPortableDeviceKeyCollection Interface

Retrieving Content-Object Properties

Retrieving Properties for a Single Object

Retrieving the Rendering Capabilities Supported by a Device