Ends a TWAIN session.
Syntax
Visual Basic (Declaration) | |
---|
Public Sub Shutdown() |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As TwainSession
instance.Shutdown() |
C# | |
---|
public void Shutdown() |
C++/CLI | |
---|
public:
void Shutdown(); |
Example
Visual Basic | Copy Code |
---|
Public Sub ShutdownExample(ByVal parent As IWin32Window)
Dim session As TwainSession = New TwainSession()
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Dim twCap As TwainCapability = New TwainCapability()
twCap.Information.Type = TwainCapabilityType.ImageTransferMechanism
twCap.Information.ContainerType = TwainContainerType.OneValue
twCap.OneValueCapability.ItemType = TwainItemType.Uint16
twCap.OneValueCapability.Value = TwainCapabilityValue.TransferMechanismNative
session.SetCapability(twCap, TwainSetCapabilityMode.Set)
session.Acquire(TwainUserInterfaceFlags.Show)
session.Shutdown()
End Sub |
C# | Copy Code |
---|
public void ShutdownExample(IWin32Window parent)
{
TwainSession session = new TwainSession();
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);
TwainCapability twCap = new TwainCapability();
twCap.Information.Type = TwainCapabilityType.ImageTransferMechanism;
twCap.Information.ContainerType = TwainContainerType.OneValue;
twCap.OneValueCapability.ItemType = TwainItemType.Uint16;
twCap.OneValueCapability.Value = TwainCapabilityValue.TransferMechanismNative;
session.SetCapability(twCap, TwainSetCapabilityMode.Set);
session.Acquire(TwainUserInterfaceFlags.Show);
session.Shutdown();
} |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7
See Also