Please, recommend a library for a quik start. The task is to create a new scanning module for existing MFC-application

1 Answer 1


You could try the LEADTOOLS Twain scanning module. (Disclosure: I work for its vendor). The following C++ code lets the user select a scanner and saves the scanned image to disk:

APPLICATIONDATA appData = { sizeof(APPLICATIONDATA), hWnd, TEXT("My Company"), TEXT("My Product"), TEXT("1.0"), TEXT("My App"), TWLG_ENGLISH_USA, TWCY_USA };
L_TwainInitSession(&twainSession, &appData);
L_TwainSelectSource(twainSession, NULL);
BITMAPHANDLE bmp = { 0 };
L_TwainAcquire(twainSession, &bmp, sizeof(bmp), NULL, LTWAIN_SHOW_USER_INTERFACE, NULL, NULL);
if (bmp.Flags.Allocated)
   L_SaveBitmap(TEXT("g:\\test\\scannedImage.tif"), &bmp, FILE_TIFLZW, bmp.BitsPerPixel, 0, NULL);

There’s a free evaluation for the SDK on this page. The evaluation contains advanced demos in case you need other Twain features (setting capabilities, scanning multiple images from a document feeder, etc.). There’s also free email and chat support during evaluation.

  • Great, thank you for the info! As I see, this SDK is included into multiple LEADTOOLS products... could you please give a hint which one to choose? TWAIN is the only thing I need at the moment.
    – Roman
    Jul 28, 2020 at 7:26
  • Most Twain features are included in all imaging (non-Multimedia) toolkits, starting with the Imaging Pro. The only feature that requires the more expensive Document Imaging is “Fast Twain”, but it’s mainly needed for optimizing high-volume document scanning. This page shows all features and toolkits in a clear table. Jul 28, 2020 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.