Handles each capability enumerated by the LTwain::EnumCapabilities function.
#include "ltwrappr.h"
virtual L_INT LTwain::CapabilityCallBack (uCap, pCapability)
The capability being enumerated. For more information on capability values, refer to the TWAIN specification.
Pointer to the TW_CAPABILITY structure that references the capability data being enumerated. For more information about TW_CAPABILITY, refer to the TWAIN specification.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This callback function will be enabled only if you enabled the callback functions by calling LBase::EnableCallBack(TRUE).
To prevent memory leaks, free the pointer to the TW_CAPABILITY structure within the callback function.
This structure can be freed by a call to LTwain::FreeContainer then you can free the pointer using GlobalFreePtr macro defined in Windows.h.
For an example, refer to LTwain::AddCapabilityToFile.