DTwainAcquirer

Top  Previous  Next

To acquire images from a Twain device, a DTwainAcquirer object is necessary.  This object is responsible for

 

Setting the acquisition transfer type (native, buffered, file, clipboard)
Responsible for setting single-page or multi-page acquisitions
Setting the Twain mode (modeless or modal operation while acquiring a file).
Setting whether the user interface will be shown during acquisition.
Responsible for sending TWAIN messages to another object (called a DTwainListener) that "listens" for these messages.

 

and other miscellaneous items.

 

The first thing that a DTwainAcquirer object needs is the Source to use, and that is the DTwainSource object that the application initialized previously.  Once a DTwainSource is "attached" to a DTwainAcquirer, the actual process of retrieving images from the Twain device can start.

 

Another important note with the DTwainAcquirer object is that when the DTwainAcquirer::Acquire( ) function is called, the settings stored in the DTwainAcquirer object are used to set the state of the scanner.  For example, you must use the DTwainAcquirer::SetPaperSize to set the paper size, not the DTWAIN_SetPaperSize function.