L_TwainLockContainer

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainLockContainer(pCapability, ppContainer)

TW_CAPABILITY * pCapability;

pointer to a structure

void ** ppContainer;

pointer to a pointer to a structure

Gets the container information for the specified capability.

Parameter

Description

pCapability

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

ppContainer

Pointer to be updated with a pointer to the container.

Returns

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 he or she 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

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_TwainUnlockContainer.

Topics:

How to Work with the Containers

 

TWAIN Functionality: Container Functions.

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS TWAIN C API Help