| Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. | 
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 DLL 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: | |
| 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;
}