TWAIN ActiveX/Plug-in Windows/Mac HTTP Control/SDK

TWAIN State Transition

Topics included in this article about TWAIN state are:

TWAIN State Transition

The application, Source Manager, and Source must communicate to manage the acquisition of data. It is logical that this process must occur in a particular sequence. For example, the application cannot successfully request the transfer of data from a Source before the Source Manager is loaded and prepared to carry out the request.

To ensure the sequence is executed correctly, the TWAIN protocol defines seven states that exist in TWAIN sessions:

TWAIN State Transition

TWAIN State in Dynamic Web TWAIN

Dynamic Web TWAIN greatly reduces the complexity of the standard TWAIN states.

State 2 is removed.

Calling OpenSourceManager() switches the state to State 3.

Calling OpenSource() switches the state to State 4.

Calling EnableSource() or AcquireImage() switches the state to State 5.

State 6 and State 7 are hidden, just OnPreAllTransfers, OnPreTransfer, OnPostTransfer, OnPostAllTransfers, OnTransferError or OnTransferCancelled event will be fired.

Furthermore, Dynamic Web TWAIN has built-in Wizard Mode. With this mode, the state transition is managed intelligently. You can simply forget the existence of the STATE. For example, if you call EnableSource() directly without calling OpenSource() , Dynamic Web TWAIN will call all the necessary functions to switch the TWAIN state to State 5.




TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2012 Dynamsoft Corporation. All Rights Reserved.