IPortableDeviceCapabilities::GetFunctionalObjects method (portabledeviceapi.h)
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
[in] Category
A REFGUID that specifies the category to search for. This can be WPD_FUNCTIONAL_CATEGORY_ALL to return all functional objects.
[out] ppObjectIDs
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 code | Description |
---|---|
|
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
Requirement | Value |
---|---|
Target Platform | Windows |
Header | portabledeviceapi.h |
Library | PortableDeviceGUIDs.lib |
See also
IPortableDeviceCapabilities Interface