LWia::AcquireFileCallBack

#include "ltwrappr.h"

virtual L_INT LWia::AcquireFileCallBack(pszFilename, uPercent, uFlags)

[LWia:AcquireFileCallBack is called after calling LWia::AcquireToFile. Be sure to first enable the callback functions by calling LBase::EnableCallBack (TRUE).

Parameters

L_TCHAR * pszFilename

Character string containing the name of the file to which to save the scanned image(s).

L_UINT32 uPercent

The percent completion of the page being scanned.

L_UINT32 uFlags

Flag that indicates the starting or ending point of the scanned page. Possible values are:

Value Meaning
0 Default value, used when this is neither the first nor the last transferred chunk.
L_WIA_ACQUIRE_START_OF_PAGE [0x00000001] Indicates the start of the page being scanned.
L_WIA_ACQUIRE_END_OF_PAGE [0x00000002] Indicates the end of the page being scanned. Use this value to reset the progress bar.

Returns

Value Meaning
SUCCESS The function was successful.
ERROR_USER_ABORT The callback wants to abort the scanning operation.
< 1 An error occurred. Refer to Return Codes.

Comments

LWia:AcquireFileCallBack is available in LEADTOOLS [version 16 or higher. It is called many times to provide status updates of the acquire progress, in percent. It is also called when the page ends in order to pass the L_WIA_ACQUIRE_END_OF_PAGE flag in the uFlags parameter.

Note: If WIA 2.0 is being used and the L_WIA_SHOW_USER_INTERFACE is set, there is no need to provide a callback pointer. (Microsoft's WIA 2.0 Acquire dialog does not provide a callback: instead, it performs all processing and returns the saved file count and paths).

Required DLLs and Libraries

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.