Gets the
TwainCapability value at the specified index from the array of capabilities
supported by the selected TWAIN source.
Syntax
Parameters
- type
- The capability to get.
- mode
- The capability values to get.
Return Value
A TwainCapability object that represents the specified capability value(s).
Example
Visual Basic | Copy Code |
---|
Public Sub GetCapabilityExample(ByVal parent As IWin32Window)
Dim session As TwainSession = New TwainSession()
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Dim twCap As TwainCapability
twCap = session.GetCapability(TwainCapabilityType.ImageUnits, TwainGetCapabilityMode.GetCurrent)
If twCap Is Nothing Then
MessageBox.Show("Error Getting Capability")
End If
session.Shutdown()
End Sub |
C# | Copy Code |
---|
public void GetCapabilityExample(IWin32Window parent) { TwainSession session = new TwainSession(); session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); TwainCapability twCap; twCap = session.GetCapability(TwainCapabilityType.ImageUnits, TwainGetCapabilityMode.GetCurrent); if (twCap == null) MessageBox.Show("Error Getting Capability"); session.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also