DTWAIN_EndTwainSession
|
The DTWAIN_EndTwainSession function ends a TWAIN Session.
DTWAIN_BOOL DTWAIN_EndTwainSession( );
Parameters None.
Return Values TRUE if successful, FALSE otherwise. If the function returns FALSE, call DTWAIN_GetLastError() to get extended information.
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)
See Also DTWAIN_IsAcquiring, DTWAIN_IsSourceAcquiring, DTWAIN_StartTwainSession |