DTWAIN_CloseSource

Top  Previous  Next

The DTWAIN_CloseSource function closes a previously opened TWAIN Source.

 

DTWAIN_BOOL DTWAIN_CloseSource ( DTWAIN_SOURCE Source );

 

Parameters

Source

Specifies an open TWAIN Source.

 

Return Values

TRUE if successful, FALSE otherwise.  If the function returns FALSE, call DTWAIN_GetLastError() to get extended information..

 

Comments

The DTWAIN_CloseSource function closes the DTWAIN_SOURCE Source.  This function should only be called if the application called DTWAIN_OpenSource using Source as the Source to open.

 

The DTWAIN_CloseSource function will return FALSE if the Source is currently acquiring images.  Only when either the acquisitions have completed, or the user-interface is closed is it valid to close a TWAIN Source.


TWAIN State Transitions

State 5 to State 4

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN Source Selection Function

DTWAIN_OpenSource

 

See Also

Opening / Closing a Source