DTwainInterface::InitInterface

Top  Previous  Next

Intializes the DTWAIN interface (starts DTWAIN, and the TWAIN system)

 

 

 

 

Syntax

 

 

bool DTwainInterface::InitInterface( );

bool DTwainInterface::InitInterface( const DTwainAppInfo& AppInfo );

bool DTwainInterface::InitInterface( HWND hWnd, const std::string& TwainDLL="" );

bool DTwainInterface::InitInterface( const DTwainAppInfo& AppInfo, HWND hWnd, const std::string& TwainDLL="" );

 

Parameters

AppInfo

 

Reference to a DTwainAppInfo object that contains the initial TWAIN application information when the TWAIN Session is started.

 

hWnd

 

HANDLE to a window that will receive DTWAIN notifications when an acquisition is being executed, or NULL if there is no window associated with notification processing.  A Twain session is started using this value

 

TwainDLL

 

Name of the Twain DLL source manager.  If this is empty, the name that will be used is "TWAIN_32.DLL".  A Twain session is started using this value.

 

 

Return Value

If DTWAIN is successfully initialized, true is returned, else false is returned.

 

 

 

Comments

An application must call DTwainInterface::InitInterface if the application has created a DTwainInterface object with a false argument in the DTwainInterface constructor.  Otherwise, the definition for each of the InitInterface calls are exactly the same as for the DTwainInterface constructor.

 

If InitInterface is called with no arguments, then the default DTWAIN/TWAIN setup is used.  The default is that the TWAIN DLL used will be TWAIN_32.DLL, no window handle is associated with DTWAIN notifications, and the Application Informatino (DTwainAppInfo) is initialized with "<?>" as the information.