Quick Start (COPY)

Top  Previous  Next

The typical layout of a C++ program using the DTWAIN C++ classes are as follows:

 

Initialize the DTWAIN interface.
Select a Source
Optionally set some Source capabilities.
Create an "Acquisition Object"
Attach the Source to the Acquisition object
Start the acquisition.

 

For the first item above, a DTwainInterface must be created before using the C++ classes.  Once an instace of the DTwainInterface has been created, you can safely call other DTWAIN functions.

 

For the second item, you select the TWAIN Source using one of the DTwainSource::Select functions, or DTwainSource::SelectDefault.

 

For the third item, you can set the capabilities by calling DTwainSource::SetCapValues.  Please note that if you plan on using the DTwainAcquirer object to start the acquisition (the fifth item below), capabilities such as enabling the feeder, duplex unit, setting the color type, etc. must be done with the DTwainAcquirer class, and not by calling DTwainSource::SetCapValues or similar function.

 

For the fourth item, your application must create a DTwainAcquirer object, and attach the TWAIN Source to it.

 

For the fifth item, you start the acquisition by calling DTwainAcquirer::Acquire.

 

Please view the examples of some simple programs that show these steps in action.