Initializing a TWAIN Session

Before initializing a TWAIN session, the user should set the values of the following optional, application specific properties:

ManName property

ProdFamily property

Version property

AppName property

To begin using the LEADTOOLS TWAIN toolkit, the user must initialize a TWAIN session. This is done by calling the InitSession method. Each call to the InitSession method will create an internal TWAIN session handle, which is a communication handle between LEADTOOLS TWAIN and a TWAIN driver installed on the system. The InitSession method must be called before calling other LEADTOOLS TWAIN properties, methods or events.

To make the toolkit generate system error events, in addition to error return codes, set the EnableMethodErrors property to TRUE.

After initializing the TWAIN session, the user can now select the TWAIN source he or she wants to use for acquiring images. For more information on this, refer to Managing the TWAIN Source.