Acquired Bitmap Example for C++ 5.0 and later

ILEADRasterTwain * pRasterTwain = NULL; 
ILEADRasterIO * pRasterIO = NULL; 
ILEADRaster * pRas = NULL; 

void TestAcquiredPage()
{
   pRasterTwain->EnableMethodErrors = FALSE; 
   pRasterTwain->PutSaveAcquiredBitmap(TRUE); 
   pRasterTwain->Acquire(L_LTWAIN_SHOW_USER_INTERFACE | L_LTWAIN_MODAL_USER_INTERFACE); 

   pRas->BitmapList = pRasterTwain->AcquiredBitmapList; 
   CString csMsg; 
   csMsg.Format(TEXT("Acquired bitmap list count = %d"), pRas->BitmapListCount); 
   AfxMessageBox(csMsg); 

   // save last acquired bitmap to file
   pRas->Bitmap = pRasterTwain->AcquiredBitmap; 
   pRasterIO->Save(pRas, TEXT("c:\test.bmp"), FILE_TIF, 1, (QFactorConstants)0, 0); 
}