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

Closes the Data Source Manager, if it is open. 

If a source is open, disables and closes it as needed.

C#
public Boolean TwainCloseSourceManager(
    IntPtr HANDLE
);
Visual Basic
Public Function TwainCloseSourceManager(
    ByVal HANDLE As IntPtr
) As Boolean
Parameters
Parameters 
Description 
HANDLE 
A Window Handle IE: Me.Handle. In most applications you can use nothing but on Citrix and WTS, this must be a top-level window or a child of a top level window.  
Returns

True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error. 

If the Source Manager is not open, does nothing and returns TRUE.

If success, the twain state must be <= 2 (TWAIN_SM_LOADED). 

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.