IPhotoAcquireSource::InitializeItemList method (photoacquire.h)
The InitializeItemList
method enumerates transferable items on the device and passes each item to the optional progress callback, if it is supplied.
Syntax
HRESULT InitializeItemList(
[in] BOOL fForceEnumeration,
[in] IPhotoAcquireProgressCB *pPhotoAcquireProgressCB,
[out] UINT *pnItemCount
);
Parameters
[in] fForceEnumeration
Flag that, if set to TRUE, indicates that enumeration will be repeated even if the item list has already been initialized. If set to FALSE, this flag indicates that repeated calls to InitializeItemList
after the item list has already been initialized will not enumerate items again.
[in] pPhotoAcquireProgressCB
Optional. Pointer to an IPhotoAcquireProgressCB object.
[out] pnItemCount
Returns the number of items found.
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. |
|
Non-NULL pointer was expected. |
Remarks
If IPhotoAcquire::Acquire is called without first calling InitializeItemList
, initialization of the item list is done implicitly.
The first time the item list is initialized—either implicitly through IPhotoAcquire::Acquire or explicitly by calling InitializeItemList
—each item is enumerated. During enumeration, if an IPhotoAcquireProgressCB object is passed to InitializeItemList
, its implementation of StartEnumeration, FoundItem, and EndEnumeration may be used to apply further filtering or control to the list of items to be transferred.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | photoacquire.h |
Library | PhotoAcquireUID.lib |