L_TwainStopFeeder

#include "lttw2.h"

L_INT EXT_FUNCTION L_TwainStopFeeder (hSession);

HTWAINSESSION hSession;

/* handle to an existing TWAIN session */

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

Parameter

Description

hSession

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

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:

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

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:

L_TwainAcquire, L_TwainAcquireMulti, L_TwainInitSession

Topics:

How to Acquire from the TWAIN Source

 

TWAIN Functionality: Property Functions

Example

HTWAINSESSION g_hSession;

L_INT EXT_CALLBACK BmpCB (HTWAINSESSION hSession, pBITMAPHANDLE pBitmap, L_VOID * pUserData)
{
   L_TwainStopFeeder(hSession);

   return SUCCESS;
}

void TwainAcquire (pBITMAPHANDLE pBitmap) 
{
   // 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); 

   L_TwainAcquire(g_hSession, pBitmap, sizeof(BITMAPHANDLE), BmpCB, LTWAIN_SHOW_USER_INTERFACE, NULL, NULL); 
}