Gets the extended image information related to the image acquired by the LTwain::Acquire function.
#include "ltwrappr.h"
virtual L_INT LTwain::GetExtendedImageInfo(ptwExtImgInfo)
Pointer to a TW_EXTIMAGEINFO structure that references extended image information to fill.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function can only be called during the LTwain::BitmapCallBack callback, when called by the LTwain::Acquire function, and only after a page has been acquired from a TWAIN source.
Extended image information can be Barcode text, Barcode data, etc. For more information on extended image information, refer to the TWAIN specification.
This function will be called if you call LTwain::Acquire function.
L_INT CMyTwain::BitmapCallBack(pBITMAPHANDLE pBitmap)
{
UNREFERENCED_PARAMETER(pBitmap);
L_INT nRet = SUCCESS;
TW_EXTIMAGEINFO * pExtImg = NULL;
pExtImg = (TW_EXTIMAGEINFO *)GlobalAllocPtr (GHND, sizeof (TW_EXTIMAGEINFO) + sizeof(TW_INFO));
if (pExtImg)
{
pExtImg->NumInfos = 2;
pExtImg->Info[1].InfoID = TWEI_BARCODECOUNT;
pExtImg->Info[1].ItemType = TWTY_UINT32;
pExtImg->Info[1].InfoID = TWEI_BARCODETYPE;
pExtImg->Info[1].ItemType = TWTY_UINT32;
if (GetExtendedImageInfo (pExtImg) == SUCCESS)
{
// Do processing to returned values
FreeExtendedImageInfoStructure(&pExtImg);
}
GlobalFreePtr (pExtImg);
}
return nRet;
}