The LWia::AcquireFileCallBack is called after calling LWia::AcquireToFile. Be sure to first enable the callback functions by calling LBase::EnableCallBack (TRUE).
#include "ltwrappr.h"
virtual L_INT LWia::AcquireFileCallBack(pszFilename, uPercent, uFlags)
Character string containing the name of the file to which to save the scanned image(s).
The percent completion of the page being scanned.
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. |
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. |
This feature 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).
For an example, refer to LWia::AcquireToFile.