LTwain::StopFeeder

Summary

Stops image acquisition from the feeder (only) of the TWAIN source.

Syntax

#include "ltwrappr.h"

L_INT LTwain::StopFeeder ();

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 only from the feeder which was begun using one of the following functions:

In order to stop acquiring images from the feeder begun by calling the LTwain::Acquire function, call LTwain::StopFeeder within the LTwain::BitmapCallBack function when it is fired.

In order to stop acquiring images from the feeder begun by calling the LTwain::AcquireMulti or LTwain::FastAcquire, call LTwain::StopFeeder within the LTwain::AcquireCallBack function when it is fired.

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

Required DLLs and Libraries

See Also

Functions

Topics

Example

class CMyTwainFeeder : public LTwain 
{ 
public: 
   L_INT BitmapCallBack(pBITMAPHANDLE pBitmap); 
   HTWAINTEMPLATEFILE m_hFile; 
}; 
 
L_INT CMyTwainFeeder::BitmapCallBack(pBITMAPHANDLE /*pBitmap*/) 
{ 
   StopFeeder(); 
   return SUCCESS; 
} 
 
 
// initialize session and call this function 
void TwainAcquire(pBITMAPHANDLE pBitmap, HWND /*hWnd*/) 
{ 
   L_INT nRet; 
   CMyTwainFeeder MyClass; 
 
   // Show the Twain Select Source UI 
   nRet = MyClass.SelectSource (NULL); 
   if (nRet != SUCCESS) 
      MessageBox (NULL, TEXT("Error occurred while selecting the source."), TEXT("ERROR"), MB_OK); 
 
   MyClass.EnableCallBack(TRUE); 
 
   nRet = MyClass.Acquire ( pBitmap,sizeof(BITMAPHANDLE), LTWAIN_SHOW_USER_INTERFACE, 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); 
} 
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++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.