#include "lttwn.h"
L_LTTWN_API L_INT L_TwainCancelAcquire(hSession);
Cancels the current acquire operation.
Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| ! = SUCCESS | An error occurred. Refer to Return Codes. |
Cancels the current acquire operation.
To cancel the acquire operation call this function inside the LTWAINACQUIRECALLBACK or LTWAINBITMAPCALLBACK callback functions during an acquire operation.
Required DLLs and Libraries
static L_INT EXT_CALLBACK BmpCB(HTWAINSESSION hSession,pBITMAPHANDLE pBitmap,L_VOID * pUserData){UNREFERENCED_PARAMETER(pBitmap);UNREFERENCED_PARAMETER(pUserData);L_TwainCancelAcquire(hSession);return SUCCESS;}L_INT TwainCancelAcquireExample(pBITMAPHANDLE pBitmap,HTWAINSESSION g_hSession){L_INT nRet;nRet = L_TwainAcquire(g_hSession,pBitmap,sizeof(BITMAPHANDLE),BmpCB,LTWAIN_SHOW_USER_INTERFACE,NULL,NULL);if (nRet == SUCCESS)MessageBox(NULL, TEXT("The image acquisition process completed."), TEXT("Notice"), MB_OK);else{MessageBox(NULL, TEXT(" The image acquisition process failed!"), TEXT("Error"), MB_OK);return nRet;}return SUCCESS;}