IPhotoAcquire::Acquire method (photoacquire.h)

The Acquire method acquires photos from a device.

Syntax

HRESULT Acquire(
  [in] IPhotoAcquireSource     *pPhotoAcquireSource,
  [in] BOOL                    fShowProgress,
  [in] HWND                    hWndParent,
  [in] LPCWSTR                 pszApplicationName,
  [in] IPhotoAcquireProgressCB *pPhotoAcquireProgressCB
);

Parameters

[in] pPhotoAcquireSource

Pointer to an IPhotoAcquireSource object representing the device from which to acquire photos. Initialize this object by calling CreatePhotoSource.

[in] fShowProgress

Flag that, when set to TRUE, indicates that a progress dialog will be shown.

[in] hWndParent

Handle to a parent window.

[in] pszApplicationName

Pointer to a null-terminated string containing the application name.

[in] pPhotoAcquireProgressCB

Pointer to an optional IPhotoAcquireProgressCB object.

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
Non-NULL pointer was expected.

Remarks

To initialize the pPhotoAcquireSource parameter passed to Acquire, CreatePhotoSource should be called prior to calling Acquire.

pPhotoAcquireProgressCB provides callback methods that allow you to apply further filtering or control as items are acquired.

To verify that there are items in the device before acquisition, or to selectively acquire items from the device, call IPhotoAcquireSource::InitializeItemList to enumerate the items before calling Acquire.

Requirements

Requirement Value
Target Platform Windows
Header photoacquire.h
Library PhotoAcquireUID.lib

See also

IPhotoAcquire Interface

IPhotoAcquireProgressCB Interface

IPhotoAcquireSource Interface