L_TwainLockContainer

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainLockContainer(pCapability, ppContainer)

Gets the container information for the specified capability.

Parameters

TW_CAPABILITY * pCapability

Pointer to a TW_CAPABILITY structure from which to get the container.

void ** ppContainer

Pointer to be updated with a pointer to the container.

Returns

Value Meaning
SUCCESS The function was successful.
! = SUCCESS An error occurred. Refer to Return Codes.

Comments

This function is used to lock the container present in the TW_CAPABILITY structure.

Once the user has the pointer to the container, the container may be changed. When the user has finished changing the container the user must call L_TwainUnlockContainer to unlock the container. Note that this can also be accomplished using the C API GlobalLock and GlobalUnlock functions.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT TwainLockContainerExample(TW_CAPABILITY twCap) 
{ 
   L_INT nRet; 
   TW_ONEVALUE* ptwOneVal = NULL; 
 
   if (twCap.ConType == TWON_ONEVALUE) 
   { 
      nRet = L_TwainLockContainer (&twCap, (L_VOID **)&ptwOneVal); 
      if(nRet != SUCCESS) 
         return nRet; 
      if (ptwOneVal)  
      { 
         // Do processing 
         nRet = L_TwainUnlockContainer (&twCap); 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
   } 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.