Accusoft.TwainPro9.Net
CloseSession Method




Disables and closes the current Data Source and Data Source Manager. For every OpenSession or OpenDataSourceManager method call you need to close the TwainPRO session with CloseSession. This method will also Cancel any pending image transfers if the Data Source was in the Image Transfer state.
Syntax
'Declaration
 
Public Sub CloseSession() 
'Usage
 
Dim instance As TwainDevice
 
instance.CloseSession()
public void CloseSession()
public: void CloseSession(); 
public:
void CloseSession(); 
Remarks

The StartSession() method calls CloseSession() internally before returning if the CloseSessionAfterAcquisition property is set to true (which is the default value). In this case, it is not necessary to call CloseSession() after StartSession(). If the CloseSessionAfterAcquisition property is set to false, then the session will remain open and return to the Capability Negotiation state after StartSession().

See Also

Reference

TwainDevice Class
TwainDevice Members

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback