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.

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 codeDescription
S_OK

The method succeeded.

E_POINTER

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

PortableDeviceApi.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDeviceContent
Enumerating Content
Enumerating Service Content
IPortableDeviceContent Interface

 

 

Community Additions

Show:
© 2017 Microsoft