IPortableDeviceContent::EnumObjects method (portabledeviceapi.h)

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

[in] dwFlags

Currently ignored; specify zero.

[in] pszParentObjectID

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.

[in] pFilter

This parameter is ignored and should be set to NULL.

[out] ppEnum

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
S_OK
The method succeeded.
E_POINTER
At least one of the required arguments was a NULL pointer.

Requirements

Requirement Value
Target Platform Windows
Header portabledeviceapi.h
Library PortableDeviceGUIDs.lib

See also

Enumerating Content

Enumerating Service Content

IPortableDeviceContent

IPortableDeviceContent Interface