L_TwainStopFeeder
#include "lttwn.h"
L_LTTWN_API L_INT 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:
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, L_TwainFastAcquire |
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; }