Click or drag to resize

TwainController Methods

The TwainController type exposes the following members.

Methods
  NameDescription
Public methodCloseSource
Use this method to close the connection to the device.
Public methodCode exampleCloseSourceManager
Use to close the source manager and release Twain.
Public methodCreateTwainMemory
Returns a new TwainMemory class for the specified pointer.
Public methodDispose
Closes any TWAIN connections and releases resources back to the system.
Protected methodDispose(Boolean)
Closes any TWAIN connections and releases resources back to the system.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allow the TwainController to chance to clean up any resources before being collected by the garbage collector.
(Overrides ObjectFinalize.)
Public methodFreeTwainMemory
Release memory allocated for TWAIN.
Public methodCode exampleGetCapabilityArray
Retrieves an array of values to the specified capability.
Public methodGetCapabilityTwainType
Returns the TWAIN type for the specified capability.
Public methodGetCapabilityType
Use this method to determine the .NET Type DotTwain expects for a specific capability.
Public methodCode exampleGetCapabilityValue(DeviceCapability, Boolean)
Reads a Boolean capability value.
Public methodCode exampleGetCapabilityValue(DeviceCapability, RectangleF)
Reads a RectangleF capability value.
Public methodCode exampleGetCapabilityValue(DeviceCapability, Int32)
Reads an Int32 capability value.
Public methodCode exampleGetCapabilityValue(DeviceCapability, Single)
Reads a Single capability value.
Public methodCode exampleGetCapabilityValue(DeviceCapability, String)
Reads a String capability value.
Public methodGetConditionCode
Returns the condition code from the source manager.
Public methodGetConditionCode(TwainIdentity)
Returns the condition code from the source device.
Public methodGetDefaultDevice
Returns the identity of the default system device.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPendingTransferCount
Use this method to get the number of pages waiting to be acquired, reset the pending count or to end the current page.
Public methodCode exampleGetTwainDevices
Returns an array of TwainIdentity classes; one for each Twain compatible device found on the system.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitiateDataTransfer
Use this method to have DotTwain handle the data acquisition details.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpenSource
Opens a connection to the CurrentDevice.
Public methodOpenSource(TwainIdentity)
Opens a connection to the device passed in.
Public methodCode exampleOpenSourceManager
Opens a connection to the TWAIN Source Manager.
Public methodProcessEvent
This method will process the Message object retrieved from PreFilterMessage to determine if the message should be handled by the device or passed along the message loop.
Public methodReadTwainContainerData(TwainContainer, TwainMemory)
Returns the value of a memory pointer retrieved from a device.
Public methodReadTwainContainerData(TwainContainer, IntPtr)
Returns the value of a memory pointer retrieved from a device.
Public methodRegisterTwainCallback

Sets up a callback for TWAIN device messages instead of using the traditional message loop. This should only be called when using the TwainController directly; the Device object automatically handles the callback.

The callback feature is only supported when using the TWAIN 2.0 Data Source Manager

Public methodResetAllCapabilities

Call this method to reset all capabilities supported by the device.

Public methodResetCapability
Resets a single capability to its startup value.
Public methodSendCommand(TwainTriplet, TwainIdentity, ITwainDataStructure)
Send a command to the TWAIN API
Public methodSendCommand(Int32, Int32, Int32, TwainIdentity, ITwainDataStructure)
Sends a command triplet that may not be contained in the TwainTriplet enumeration.
Public methodSetCapabilityArray
Sets an array of values for a specific capability to the device.
Public methodSetCapabilityValue(DeviceCapability, Boolean)
Sets a capability to a Boolean value.
Public methodSetCapabilityValue(DeviceCapability, RectangleF)
Set a capability to a RectangleF value.
Public methodSetCapabilityValue(DeviceCapability, Int32)
Sets a capability to an Int32 value.
Public methodSetCapabilityValue(DeviceCapability, Single)
Sets a capability to a Single value.
Public methodSetCapabilityValue(DeviceCapability, String)
Sets a capability to a String value.
Public methodSetExtendedImageInfoOptions
Sets the extended image information id values that will be retrieved when acquiring data.
Public methodSetThreadUIControl
Sets the parent control used to invoke events from the TwainController. This method is automatically called by the Device object when acquiring images.
Public methodCode exampleShowSelectSource
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also