#include "ltwrappr.h"
L_INT LTwain::StopFeeder ();
Stops image acquisition from the feeder (only) of the TWAIN source.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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
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 functionvoid TwainAcquire(pBITMAPHANDLE pBitmap, HWND /*hWnd*/){L_INT nRet;CMyTwainFeeder MyClass;// Show the Twain Select Source UInRet = 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);elseMessageBox(NULL, TEXT(" The image acquisition process failed!"), TEXT("Error"), MB_OK);}