LTwain::StopFeeder

#include "ltwrappr.h"

L_INT LTwain::StopFeeder ();

Stop acquire images only from the feeder of the TWAIN source.

Returns

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:

LTwain::Acquire

LTwain::AcquireMulti

LTwain::FastAcquire

In order to stop acquire images by calling the LTwain::Acquire function, call the LTwain::StopFeeder within the LTwain::BitmapCallBack function when its fired.

In order to stop acquire images by calling the LTwain::AcquireMulti or LTwain::FastAcquire, call the LTwain::StopFeeder within the LTwain::AcquireCallBack function when its fired.

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

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LTwain::Acquire, LTwain::AcquireList; LTwain::AcquireCallBack; LTwain::BitmapCallBack

Topics:

How to Acquire from the TWAIN Source

 

TWAIN Functionality: Property Functions

Example

class CMyTwain : public LTwain
{
public: 
   L_INT BitmapCallBack(pBITMAPHANDLE pBitmap); 

   HTWAINTEMPLATEFILE m_hFile; 
};

L_INT CMyTwain::BitmapCallBack (pBITMAPHANDLE pBitmap) 
{
   StopFeeder();
   return SUCCESS; 
}

// initialize session and call this function 
void TwainAcquire (pBITMAPHANDLE pBitmap, HWND hWnd) 
{
   L_INT nRet; 
   CMyTwain 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); 
}