DTWAIN_EndTwainSession

Top  Previous  Next

The DTWAIN_EndTwainSession function ends a TWAIN Session.

 

DTWAIN_BOOL DTWAIN_EndTwainSession( );

 

Parameters

None.

 

Return Values

If the function succeeds, TRUE is returned.  If the function fails FALSE is returned.

 

Comments

The DTWAIN_EndTwainSession function ends a TWAIN session started with DTWAIN_StartTwainSession.  The DTWAIN_EndTwainSession function also closes all Sourcesthat were opened during the lifetime of the TWAIN Session.  The closing of the Sources during this function call minimizes the chance of corrupting the TWAIN Source state management and TWAIN system.

 

Note:

A TWAIN session must not be terminated if a Source is currently acquiring an image.  To ensure that this scenario does not happen, use the DTWAIN Source Status functions to check the acquisition status of the Source.

 

 

TWAIN State Transitions

States 2,3, 4, 5, or 6, to State 1

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN_StartTwainSession

 

See Also

DTWAIN_IsAcquiring, DTWAIN_IsSourceAcquiring, DTWAIN_StartTwainSession