Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS TWAIN C DLL Help

L_TwainCancelAcquire

Show in webframe

#include "lttwn.h"

L_LTTWN_API L_INT 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:

L_TwainAcquire, L_TwainAcquireMulti, L_TwainFastAcquire

Topics:

How to Acquire from the TWAIN Source

 

TWAIN Functionality: Property Functions

Example

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

   L_TwainCancelAcquire(hSession);
   return SUCCESS;
}

 L_INT TwainCancelAcquireExample(pBITMAPHANDLE pBitmap,HTWAINSESSION g_hSession) 
{
   L_INT nRet;
   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);
      return nRet;
   }
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.