TWAIN Data Source Issues

Top  Previous  Next

Normally DTWAIN automatically opens a selected Source.  However, your application will need to open the Source explicitly if you wish to do the following:

 

If the DTWAIN_OpenSourcesOnSelect was called with a FALSE argument.
If the Source was closed with DTWAIN_CloseSource.

 

To open a Source, the DTWAIN_OpenSource function is used:

 

Closing a Source:

Normally DTWAIN closes the Source if the Source was automatically opened by DTWAIN (neat!).  However, if the application explicitly opened the Source, the Source will remain opened until the application explicitly closes the Source.  There are a few ways that an open Source can be closed (transition down from TWAIN State 4 or State 5 to State 3).  The list of ways that a Source can be closed is as follows:

 

DTWAIN_CloseSource

DTWAIN_EndTwainSession

DTWAIN_SysDestroy