Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceCapabilities::GetFunctionalObjects method

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

Syntax


HRESULT GetFunctionalObjects(
  [in]  REFGUID                              Category,
  [out] 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 value

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

Return codeDescription
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 returns an empty collection for ppObjectIDs.

Examples

For an example of how to use this method, see Retrieving the Functional Object Identifiers for a Device

Requirements

Header

PortableDeviceApi.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDeviceCapabilities Interface
Retrieving the Functional Object Identifiers for a Device
Retrieving the Rendering Capabilities Supported by a Device

 

 

Community Additions

Show:
© 2017 Microsoft