L_TwainCancelAcquire
#include "lttw2.h"
L_INT EXT_FUNCTION L_TwainCancelAcquire(hSession);
HTWAINSESSION hSession; |
/* handle to an existing TWAIN session */ |
Cancels the current acquire operation.
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. |
! = SUCCESS |
An error occurred. Refer to Return Codes. |
Comments
Cancels the current acquire operation.
To cancel the acquire operation call this function inside the LTWAINACQUIRECALLBACK which is called by the L_TwainAcquireMulti function, or call this function inside the LTWAINBITMAPCALLBACK which is called by the L_TwainAcquire function.
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: |
|
Topics: |
|
|
Example
HTWAINSESSION g_hSession;
L_INT EXT_CALLBACK BmpCB (HTWAINSESSION hSession, pBITMAPHANDLE pBitmap,
L_VOID * pUserData)
{
L_TwainCancelAcquire(hSession);
return SUCCESS;
}
void TwainAcquire (pBITMAPHANDLE pBitmap)
{
L_INT nRet = L_TwainAcquire(g_hSession,
pBitmap, sizeof(BITMAPHANDLE), BmpCB, LTWAIN_SHOW_USER_INTERFACE, NULL,
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);
}