IPortableDeviceContent::EnumObjects method
The EnumObjects method retrieves an interface that is used to enumerate the immediate child objects of an object. It has an optional filter that can enumerate objects with specific properties.
Syntax
HRESULT EnumObjects( [in] const DWORD dwFlags, [in] LPCWSTR pszParentObjectID, [in] IPortableDeviceValues *pFilter, [out] IEnumPortableDeviceObjectIDs **ppEnum );
Parameters
- dwFlags [in]
-
Currently ignored; specify zero.
- pszParentObjectID [in]
-
Pointer to a null-terminated string that specifies the ID of the parent. This can be an empty string (but not a NULL pointer) or the defined constant WPD_DEVICE_OBJECT_ID to indicate the device root.
- pFilter [in]
-
This parameter is ignored and should be set to NULL.
- ppEnum [out]
-
Address of a variable that receives a pointer to an IEnumPortableDeviceObjectIDs interface that is used to enumerate the objects that are found. 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. |
|
At least one of the required arguments was a NULL pointer. |
Examples
For an example of how to use this method to enumerate device content, see Enumerating Content. For an example of how to use this method to enumerate Service content, see Enumerating Service Content.
Requirements
|
Header |
|
|---|---|
|
Library |
|
See also
- IPortableDeviceContent
- Enumerating Content
- Enumerating Service Content
- IPortableDeviceContent Interface