#include "lttwn.h"
L_LTTWN_API L_INT L_TwainLockContainer(pCapability, ppContainer)
Gets the container information for the specified capability.
Pointer to a TW_CAPABILITY structure from which to get the container.
Pointer to be updated with a pointer to the container.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| ! = SUCCESS | An error occurred. Refer to Return Codes. |
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
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 processingnRet = L_TwainUnlockContainer (&twCap);if(nRet != SUCCESS)return nRet;}}return SUCCESS;}