Share via


IPortableDeviceContent::EnumObjects

banner art

Previous Next

IPortableDeviceContent::EnumObjects

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(
  const DWORD  dwFlags,
  LPCWSTR  pszParentObjectID,
  IPortableDeviceValues*  pFilter,
  IEnumPortableDeviceObjectIDs**  ppEnum
);

Parameters

dwFlags

[in]  Currently ignored; specify 0.

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

Requirements

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next