You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > TWAIN Features > TwainCloseSource Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TwainCloseSource Method

Closes the open Data Source, if any. 

If the source is enabled, disables it first.

C#
public Boolean TwainCloseSource();
Visual Basic
Public Function TwainCloseSource() As Boolean
Returns

True if success, else False. If there is not an open source, does nothing and returns TRUE.

This function should be called only if the TWAIN state is 4 (TWAIN_SOURCE_OPEN) or 5 (TWAIN_SOURCE_ENABLED). 

If success, the TWAIN state must be <= 3 (TWAIN_SM_OPEN). 

To get the TWAIN state, use the TwainGetState() function.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.