DTWAIN_GetTwainAvailability

Top  Previous  Next

The DTWAIN_GetTwainAvailability function tests to see which TWAIN Data Source Managers are available to the application.

 

LONG DTWAIN_GetTwainAvailability ( );

 

Return Values

A LONG denoting the TWAIN Data Source Managers that are available to the application.

 

Comments

The DTWAIN_GetTwainAvailability function tests to see which TWAIN Data Source Managers are available for use by DTWAIN.  The return value is a boolean OR of the available values.  The values can be a combination of the following values:

 

Constant

Definition

DTWAIN_TWAINDSM_LEGACY

Legacy verson of the TWAIN DSM (TWAIN_32.DLL)

DTWAIN_TWAINDSM_VERSION2

New, open source version of the TWAIN DSM (TWAINDSM.DLL)

 

 

C/C++ Example:

 

#include "dtwain.h"

 

void foo( )

{

    LONG availDSM;

  DTWAIN_SysInitialize( );

   availDSM = DTWAIN_GetTwainAvailability( );

   if ( availDSM & DTWAIN_TWAINDSM_VERSION2 )  // test if the DTWAIN_TWAINDSM_VERSION2 flag is on

        // lets use this DSM in our apps.

      DTWAIN_SetTwainDSM( DTWAIN_TWAINDSM_VERSION2 );

  //...

}

 

 

TWAIN State Transitions

None

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

DTWAIN_IsTwainAvailable

DTWAIN_SetTwainDSM