DTWAIN_IsTwainAvailableEx

DTWAIN_IsTwainAvailableExA

DTWAIN_IsTwainAvailableExW

Top  Previous  Next

The DTWAIN_IsTwainAvailableEx function function determines whether TWAIN is installed, and determines where the TWAIN Data Source Manager is installed.

 

LONG DTWAIN_IsTwainAvailableEx (

LPTSTR

lpszBuffer

LONG

MaxLen );,


Parameters


lpszBuffer

Specifies the address of the character buffer to store the information.  To ignore this value, this should be NULL

 

MaxLen

Specifies the maximum number of characters to copy to szBuffer.


Return Values

The number of characters copied to lpszBuffer, or if lpszBuffer is NULL / empty, the number of characters needed to store the entire string (including NULL terminator).

 

Character specific version

ANSI version:

DTWAIN_IsTwainAvailableExA

Unicode version:

DTWAIN_IsTwainAvailableExW


Comments

The DTWAIN_IsTwainAvailableEx is similar to DTWAIN_GetTwainAvailabilityEx function, however with the following difference that DTWAIN_IsTwainAvailableEx() can be called before DTWAIN_SysInitialize() or DTWAIN_SysInitializeNoBlocking().  


If called before DTWAIN_SysInitialize() or DTWAIN_SysInitializeNoBlocking(), the TWAIN availabilty check is done in the following order of directories:

Current working directory

Windows directory

Windows System directory

System PATH


or the search order specified by DTWAIN_GetDSMSearchOrderEx().

 

The lpszBuffer and MaxLen parameters have the same functionality as DTWAIN_GetTwainAvailabilityEx.


TWAIN State Transitions

None

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

DTWAIN_IsTwainAvailable

DTWAIN_SetTwainDSM