Share via


IPortableDeviceCapabilities::GetFunctionalObjects

banner art

Previous Next

IPortableDeviceCapabilities::GetFunctionalObjects

The GetFunctionalObjects method retrieves all functional objects that match a specified category on the device.

Syntax

  HRESULT GetFunctionalObjects(
  REFGUID  Category,
  IPortableDevicePropVariantCollection**  ppObjectIDs
);

Parameters

Category

[in]  A REFGUID that specifies the category to search for. This can be WPD_FUNCTIONAL_CATEGORY_ALL to return all functional objects.

ppObjectIDs

[out]  Address of a variable that receives a pointer to an IPortableDevicePropVariantCollection interface that contains the object IDs of the functional objects as strings (type VT_LPWSTR in the retrieved PROPVARIANT items). If no objects of the requested type are found, this will be an empty collection (not NULL). The caller must release this interface when it is done with it.

Return Values

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.

Remarks

This operation is usually fast, because the driver does not need to perform a full content enumeration, and the number of retrieved functional objects is typically less than 10. If no objects of the requested type are found, this method will not return an error, but simply return an empty collection for ppObjectIDs.

Requirements

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next