L_TwainStopFeeder

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainStopFeeder (hSession);

Stops acquiring images only from the feeder of the TWAIN source.

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.
< 1 An error occurred. Refer to Return Codes.

Comments

This function stops the process of acquiring images using one of the following functions:

L_TwainAcquire

L_TwainAcquireMulti

In order to stop acquiring images with the L_TwainAcquire function, call the L_TwainStopFeeder in the LTWAINBITMAPCALLBACK callback function when it is fired.

In order to stop acquire images by calling the L_TwainAcquireMulti function, call the L_TwainStopFeeder in the LTWAINACQUIRECALLBACK callback function when it is fired.

If the TWAIN source has no feeder, then this function will fail and return an error code.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT EXT_CALLBACK BmpCB (HTWAINSESSION hSession, pBITMAPHANDLE pBitmap, L_VOID * pUserData) 
{ 
   UNREFERENCED_PARAMETER(pUserData); 
   UNREFERENCED_PARAMETER(pBitmap); 
 
   L_TwainStopFeeder(hSession); 
   return SUCCESS; 
} 
 
L_INT TwainStopFeederExample(pBITMAPHANDLE pBitmap,HTWAINSESSION g_hSession)  
{ 
   // Show the Twain Select Source UI 
   L_INT nRet = L_TwainSelectSource(g_hSession, NULL); 
   if (nRet != SUCCESS) 
   { 
      MessageBox (NULL, TEXT("Error occurred while selecting the source."),TEXT( "ERROR"), MB_OK);  
      return nRet; 
   } 
 
   nRet =L_TwainAcquire(g_hSession, pBitmap, sizeof(BITMAPHANDLE), BmpCB, LTWAIN_SHOW_USER_INTERFACE, NULL, NULL); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C API Help