L_TwainCancelAcquire

Summary

Cancels the current acquire operation.

Syntax

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainCancelAcquire(hSession);

Parameters

HTWAINSESSION hSession

Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function.

Returns

Value Meaning
SUCCESS The function was successful.
! = SUCCESS An error occurred.  Refer to Return Codes.

Comments

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

See Also

Functions

Topics

Example

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; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.