Hi there,
I'm using IE 8.7.6 and want to acquire images via TWAIN.
Here is what I'm doing:
TImageEnMIO *imgIO (member object);
imgIO->TwainParams->VisibleDialog = true;
imgIO->TwainParams->ProgressIndicators = false;
if(!imgIO->SetAcquireSource(this->pTWAINInfo->SelectedAPI, this->pTWAINInfo->DriverName))
{
this->SetUIState(ERROR_STATE, "error.....");
return;
}
this->SetUIState(READY_STATE, "ready...");
if(!imgIO->Acquire())
{
this->SetUIState(ERROR_STATE, "error...");
return;
}
//success
Close();
Bitmap event:
void __fastcall TfmMainTWAIN::imgIOAcquireBitmap(TObject *Sender, TIEBitmap *ABitmap,
int DpiX, int DpiY, bool &Handled)
{
/*
here is the code to save the bitmap to file
*/
this->iPicCount++;
Handled = true;
}
When I run the program, everything is fine, I get the bitmap, I save it to file, but
imgIO->Acquire()
always return false.
Can anyone tell me what I'm doing wrong? Should imgIO->Acquire() not return true?
Confused :)
Best regards
Alex