NTwain Exposes capabilities of a data source as properties. Initializes a new instance of the class. The source. Gets the actual supported operations for a capability. This is not supported by all sources. The capability id. Gets the current value for a capability. The capability id. Gets the default value for a capability. The capability id. A general method that tries to get capability values from current . The capability id. Gets all the possible values of this capability without expanding. This may be required to work with large range values that cannot be safely enumerated with . The capability id. Resets all values and constraint to power-on defaults. Resets the current value to power-on default. The capability id. Gets the property to work with audio for the current source. The audio xfer mech. Gets the property to work with image for the current source. The image compression. Gets the property to work with image for the current source. The image pixel type. Gets the property to work with image for the current source. The image unit of measure. Gets the property to work with image for the current source. The image xfer mech. Gets the property to work with image auto brightness flag for the current source. The image auto brightness flag. Gets the property to work with image brightness for the current source. The image brightness. Gets the property to work with image contrast for the current source. The image contrast. Gets the property to work with image square-cell halftone for the current source. The image square-cell halftone. Gets the property to work with image exposure time (in seconds) for the current source. The image exposure time. Gets the property to work with image color filter for the current source. The image color filter type. Gets the property to work with image gamma value for the current source. The image gamma. Gets the property to work with image halftone patterns for the current source. The image halftone patterns. Gets the property to work with image highlight value for the current source. The image highlight. Gets the property to work with image for the current source. The image file format. Gets the property to work with image lamp state flag for the current source. The image lamp state flag. Gets the property to work with image light source for the current source. The image light source. Gets the property to work with image orientation for the current source. The image orientation. Gets the property to work with image physical width for the current source. The image physical width. Gets the property to work with image physical height for the current source. The image physical height. Gets the property to work with image shadow value for the current source. The image shadow. Gets the property to work with the list of frames the source will acquire on each page. The capture frames. Gets the property to work with image's native x-axis resolution for the current source. The image's native x-axis resolution. Gets the property to work with image's native y-axis resolution for the current source. The image's native y-axis resolution. Gets the property to work with image x-axis resolution for the current source. The image x-axis resolution. Gets the property to work with image y-axis resolution for the current source. The image y-axis resolution. Gets the property to work with image max frames for the current source. The image max frames. Gets the property to work with image tiles flag for the current source. The image tiles flag. Gets the property to work with image for the current source. The image bit order. Gets the property to work with image CCITT K factor for the current source. The image CCITT K factor. Gets the property to work with image light path for the current source. The image light path. Gets the property to work with image pixel flavor for the current source. The image pixel flavor. Gets the property to work with image color format for the current source. The image color format. Gets the property to work with image rotation for the current source. The image rotation. Gets the property to work with image for the current source. The image supported size. Gets the property to work with image threshold for the current source. The image threshold. Gets the property to work with image x-axis scaling for the current source. The image x-axis scaling. Gets the property to work with image y-axis scaling for the current source. The image y-axis scaling. Gets the property to work with image CCITT compression for the current source. The image bit order for CCITT compression. Gets the property to work with image CCITT compression for the current source. The image pixel flavor for CCITT compression. Gets the property to work with image jpeg compression for the current source. The image pixel type for jpeg compression. Gets the property to work with image CCITT time fill for the current source. The image CCITT time fill. Gets the property to work with image bit depth for the current source. The image bit depth. Gets the property to work with image bit depth reduction method for the current source. The image bit depth reduction method. Gets the property to work with image undefined size flag for the current source. The image undefined size flag. Gets or sets the image indices that will be delivered during the standard image transfer done in States 6 and 7. The image indicies. Gets the property to work with ext image info flag for the current source. The ext image info flag. Gets the property to work with image minimum height for the current source. The image minimumm height. Gets the property to work with image minimum width for the current source. The image minimumm width. Gets the property to work with image blank page behavior for the current source. The image blank page behavior. Gets the property to work with image flip-rotation behavior for the current source. The image flip-rotation behavior. Gets the property to work with image barcode detection flag for the current source. The image barcode detection flag. Gets the property to work with image barcode types for the current source. The image barcode types. Gets the property to work with image barcode max search priorities for the current source. The image barcode max search priorities. Gets the property to work with image barcode search priority for the current source. The image barcode search priority. Gets the property to work with image barcode search direction for the current source. The image barcode search direction. Gets the property to work with image barcode max search retries for the current source. The image barcode max search retries. Gets the property to work with image barcode max search timeout for the current source. The image barcode max search timeout. Gets the property to work with image zoom factor for the current source. The image zoom factor. Gets the property to work with image patch code detection flag for the current source. The image patch code detection flag. Gets the property to work with image patch code types for the current source. The image patch code types. Gets the property to work with image patch code max search priorities for the current source. The image patch code max search priorities. Gets the property to work with image patch code search priority for the current source. The image patch code search priority. Gets the property to work with image patch code search direction for the current source. The image patch code search direction. Gets the property to work with image patch code max search retries for the current source. The image patch code max search retries. Gets the property to work with image patch code max search timeout for the current source. The image patch code max search timeout. Gets the property to work with flash option for the current source. The flash option. Gets the property to work with image enhancement filter for the current source. The image enhancement filter. Gets the property to work with image noise filter for the current source. The image noise filter. Gets the property to work with image overscan option for the current source. The image overscan option. Gets the property to work with auto border detection flag for the current source. The auto border detection flag. Gets the property to work with image auto deskew flag for the current source. The image auto deskew flag. Gets the property to work with image auto rotate flag for the current source. The image auto rotate flag. Gets the property to work with image jpeg quality for the current source. The image jpeg quality. Gets the property to work with feeder type for the current source. The feeder type. Gets the property to work with image icc profile for the current source. The image icc profile. Gets the property to work with image auto size option for the current source. The image auto size option. Gets the property to work with image auto crop flag for the current source. The image auto crop flag. Gets the property to work with image auto length detection flag for the current source. The image auto length detection flag. Gets the property to work with image auto color detection flag for the current source. The image auto color detection flag. Gets the property to work with image auto non-color pixel type for the current source. The image auto non-color pixel type. Gets the property to work with image color management flag for the current source. The image color management flag. Gets the property to work with image merge option for the current source. The image merge option. Gets the property to work with image merge height threshold for the current source. The image merge height threshold. Gets the property to get supported ext image info for the current source. The supported ext image info. Gets the property to work with image film type for the current source. The image film type. Gets the property to work with image mirror option for the current source. The image mirror option. Gets the property to work with image jpeg sub sampling for the current source. The image jpeg sub sampling. Gets the property to work with xfer count for the current source. The xfer count. Gets the property to work with the name or other identifying information about the Author of the image. It may include a copyright string. The author string. Gets the property to work with the general note about the acquired image. The general note string. Gets the property to work with feeder enabled flag for the current source. The feeder enabled flag. Gets the property to work with feeder loaded flag for the current source. The feeder loaded flag. Gets the property to get the image acquired time and date. The time and date string. Gets the supported caps for the current source. This is not supported by all sources. The supported caps. Gets the extended caps for the current source. The extended caps. Gets the property to work with auto feed page flag for the current source. The auto feed flag. Gets the property to work with clear page flag for the current source. The clear page flag. Gets the property to work with feed page flag for the current source. The feed page flag. Gets the property to work with rewind page flag for the current source. The rewind page flag. Gets the property to work with indicators flag for the current source. The indicators flag. Gets the property to work with paper sensor flag for the current source. The paper sensor flag. Gets the property to work with UI controllable flag for the current source. The UI controllable flag. Gets the property to work with devince online flag for the current source. The devince online flag. Gets the property to work with auto scan page flag for the current source. The auto scan flag. Gets the property to work with thumbnails enabled flag for the current source. The thumbnails enabled flag. Gets the property to see what's the duplex mode for the current source. The duplex mode. Gets the property to work with duplex enabled flag for the current source. The duplex enabled flag. Gets the property to see whether device supports UI only flag (no transfer). The UI only flag. Gets the property to see whether device supports custom data triplets. The custom data flag. Gets the property to work with endorser for the current source. The endorser option. Gets the property to work with job control option for the current source. The job control option. Gets the property to work with alarms for the current source. The alarms. Gets the property to work with alarm volume for the current source. The alarm volume. Gets the property to work with auto capture count for the current source. The auto capture count. Gets the property to work with the time before first capture (milliseconds) for the current source. The time before first capture. Gets the property to work with the time between captures (milliseconds) for the current source. The time between captures. Gets the property to work with the clear buffers option for the current source. The clear buffers option. Gets the property to work with the max buffered pages for the current source. The max batch buffered pages. Gets the property to work with the device's time and date. The device time and date. Gets the property to see current device's power supply. The power supply indicator. Gets the property to see whether device supports camera preview UI flag. The camera preview UI flag. Gets the property to work with the reported device events for the current source. The reported device events. Gets the property for device serial number. The device serial number. Gets the property to work with printer list for the current source. The printer list. Gets the property to work with printer enabled flag. The printer enabled flag. Gets the property to work with the starting printer index for the current source. The printer index. Gets the property to work with printer mode for the current source. The printer mode. Specifies the string(s) that are to be used in the string component when the current device is enabled. The printer string. Specifies the string that shall be used as the current device’s suffix. The printer suffix string. Gets the property to work with string data language for the current source. The language. Gets the property to work with feeder alignment for the current source. The feeder alignment. Gets the property to work with feeder order for the current source. The feeder order. Gets the property to see whether device supports reacquire flag. The reacquire flag. Gets the property to see the remaining battery power for the device. The battery minutes. Gets the property to see the remaining battery percentage for the device. The battery percentage. Gets the property to work with camera side for the current source. The camera side. Gets the property to work with segmentation setting for the current source. The segmentation setting. Gets the property to work with camera enabled flag. The camera enabled flag. Gets the property to work with camera order for the current source. The camera order setting. Gets the property to work with check scanning support flag. The check scanning support flag. Gets the property to work with feeder prep flag. The feeder prep flag. Gets the property to work with feeder pocket for the current source. The feeder pocket setting. Gets the property to work with auto-sense medium (paper source) flag. The auto-sense medium flag. Gets the property for device interface guid. The device interface guid. Gets the supported caps for unique segments for the current source. The supported caps for unique segments. Gets the supported caps for supported DATs. The supported DATs. Gets the property to work with double feed detection option for the current source. The double feed detection option. Gets the property to work with double feed detection length for the current source. The double feed detection length. Gets the property to work with double feed detection sensitivity for the current source. The double feed detection sensitivity. Gets the property to work with double feed detection response for the current source. The double feed detection response. Gets the property to work with paper handling option for the current source. The paper handling option. Gets the property to work with diplayed indicators for the current source. The diplayed indicators. Gets the property to work with printer y-offset for the current source. The printer y-offset. Gets the property to work with camera power down time (seconds) for the current source. The camera power down time. Gets the property to work with printer character rotation for the current source. The printer character rotation. Gets the property to work with printer font style for the current source. The printer font style. Set the character to be used for filling the leading digits before the counter value if the counter digits are fewer than . The printer leading string. Gets the property to work with printer index max value for the current source. The printer index max value. Gets the property to work with printer number digits value for the current source. The printer number digits value. Gets the property to work with printer index step value for the current source. The printer index step value. Gets the property to work with printer index trigger for the current source. The printer index trigger. Gets the next print values. The next print values. The one-stop class for reading raw TWAIN cap values from the cap container. This contains all the properties for the 4 container types. Reads the value from a that was returned from a TWAIN source. The capability. capability Capability contains no data.;capability or capability Reads the value from a that was returned from a TWAIN source. The capability. The memory manager. capability or memoryManager capability Initializes a new instance of the class. Gets the underlying container type. The container. Gets the type of the TWAIN value. The type of the value. Gets the one value if container is . The one value. Gets the collection values if container is or . The collection values. Gets the current value index if container is . Gets the default value index if container is . Gets the current value if container is . The range current value. Gets the default value if container is . The range default value. The least positive/most negative value of the range. The range minimum value. The most positive/least negative value of the range. The range maximum value. The delta between two adjacent values of the range. e.g. Item2 - Item1 = StepSize; The size of the range step. Gets the number of range values if range is expanded. You should check for this before expanding range type containers to prevent possible . The range count. Don't care what container it is, just enumerate the capability values. Wrapped class for reading/writing a TWAIN capability associated with a . The TWAIN type of the value. Initializes a new instance of the class. The source. The capability. The value conversion routine in Get methods. if set to true then make this cap read-only. source or getConversionRoutine source or getConversionRoutine Initializes a new instance of the class. The source. The capability. The value conversion routine in Get methods. Callback to provide the capability object for set method. source or getConversionRoutine or setValueProvider Initializes a new instance of the class. The source. The capability. The value conversion routine in Get methods. Callback to perform set value. source or getConversionRoutine or setValueRoutine Gets the capability. The capability. Gets the supported actions. The supported actions. Gets a value indicating whether this capability is supported. true if this capability is supported; otherwise, false. Gets a value indicating whether this instance is read only. true if this instance is read only; otherwise, false. Gets a value indicating whether is supported. true if this capability can get values; otherwise, false. Gets a value indicating whether is supported. true if this capability can get default value; otherwise, false. Gets a value indicating whether is supported. true if this capability can get current value; otherwise, false. Gets a value indicating whether is supported. true if this capability can get label; otherwise, false. Gets a value indicating whether is supported. true if this capability can get help; otherwise, false. Gets a value indicating whether is supported. true if this capability can get label enum; otherwise, false. Gets a value indicating whether is supported. true if this capability can reset; otherwise, false. Gets a value indicating whether is supported. true if this capability can set; otherwise, false. Gets a value indicating whether is supported. true if this capability can set constraint; otherwise, false. Gets the default value of this capability. Gets the current value of this capability. Gets all the possible values of this capability without expanding. This may be required to work with large range values that cannot be safely enumerated with . Converts the object values into typed values using the conversion routine for this capability. The values. Gets all the possible values of this capability. [Experimental] Gets the label value of this capability. [Experimental] Gets the help value of this capability. [Experimental] Gets the display names for possible values of this capability. Resets the current value to power-on default. Simplified version that sets the current value of this capability. The value. Simple Set() is not defined for this capability. A version of Set that uses an array. The value. A version of Set that uses an enumeration. The value. Sets the constraint value of this capability. The value. Sets the constraint value of this capability. The value. Sets the constraint value of this capability. The value. Represents a TWAIN data source. Opens the source for capability negotiation. Closes the source. Enables the source to start transferring. The mode. if set to true any driver UI will display as modal. The window handle if modal. Gets the source status. Only call this at state 4 or higher. Gets the source status string. Only call this at state 4 or higher. Status from previous calls. Gets the id of the source. The identifier. Gets the source's product name. The name. Gets the source's manufacturer name. The manufacturer. Gets the source's product family. The product family. Gets the source's version information. The version. Gets the supported data group. The data group. Gets the supported TWAIN protocol version. The protocol version. Gets a value indicating whether this data source has been opened. true if this data source is open; otherwise, false. Gets or sets the current settings (CustomDSData) of this source if supported. The source settings. Gets the capabilities for this data source. The capabilities. Gets the triplet operations defined for control data group. Gets the triplet operations defined for image data group. Gets the direct triplet operation entry for custom values. [Experimental] Gets the cameras supported by the source. [Experimental] Sets the target camera for cap negotiation that can be set per camera. Contains event data after whatever data from the source has been transferred. Initializes a new instance of the class. The source. The native data. Initializes a new instance of the class. The source. The file data path. The image file format. Initializes a new instance of the class. The source. The memory information. The memory data. Gets the type of the transfer mode. The type of the transfer. Gets the raw pointer to the complete data if is . The data will be freed once the event handler ends so consumers must complete whatever processing before then. For image type this data is DIB (Windows) or TIFF (Linux). This pointer is already locked for the duration of this event. The data pointer. Gets the file path to the complete data if the transfer was file or memory-file. This is only available if is . The file path. Gets the file format if applicable. This is only available if is . The file format. Gets the info object if the transfer was memory. This is only available if is . The memory information. Gets the raw memory data if the transfer was memory. Consumer application will need to do the parsing based on the values from . The memory data. Gets the final image information if applicable. The final image information. Gets the data source. The data source. Gets the extended image information if applicable. The information ids. Gets the image stream from the if it's an image. Stores a fixed point number. This can be implicitly converted to a float in dotnet. The Whole part of the floating point number. This number is signed. The Fractional part of the floating point number. This number is unsigned. Returns a that represents this instance. A that represents this instance. Converts this to for capability set methods. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Performs an implicit conversion from to . The value. The result of the conversion. Performs an implicit conversion from to . The value. The result of the conversion. Performs an implicit conversion from to . The value. The result of the conversion. Performs an implicit conversion from to . The value. The result of the conversion. Implements the operator ==. The value1. The value2. The result of the operator. Implements the operator !=. The value1. The value2. The result of the operator. Embedded in the structure. Defines a frame rectangle in ICapUnits coordinates. Value of the left-most edge of the rectangle. Value of the top-most edge of the rectangle. Value of the right-most edge of the rectangle. Value of the bottom-most edge of the rectangle. Returns a that represents this instance. A that represents this instance. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Implements the operator ==. The value1. The value2. The result of the operator. Implements the operator !=. The value1. The value2. The result of the operator. Embedded in the structure that is embedded in the structure. Defines the parameters used for channel-specific transformation. The transform can be described either as an extended form of the gamma function or as a table look-up with linear interpolation. Starting input value of the extended gamma function. Defines the minimum input value of channel data. Ending input value of the extended gamma function. Defines the maximum input value of channel data. The input value at which the transform switches from linear transformation/interpolation to gamma transformation. Starting output value of the extended gamma function. Defines the minimum output value of channel data. Ending output value of the extended gamma function. Defines the maximum output value of channel data. The output value at which the transform switches from linear transformation/interpolation to gamma transformation. Constant value. The exponential used in the gamma function. The number of samples in the look-up table. Includes the values of StartIn and EndIn. Zero-based index (actually, number of samples - 1). If zero, use extended gamma, otherwise use table look-up. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Implements the operator ==. The value1. The value2. The result of the operator. Implements the operator !=. The value1. The value2. The result of the operator. Specifies the parametrics used for either the ABC or LMN transform stages. Channel-specific transform parameters. Flattened 3x3 matrix that specifies how channels are mixed in. Gets the value as matrix. Stores a group of associated individual values for a capability. The values need have no relationship to one another aside from being used to describe the same "value" of the capability The type of items in the array. All items in the array have the same size. Array of ItemType values starts here. Used to get audio info. Name of audio data. Used in Callback mechanism for sending messages from the Source to the Application. Applications version 2.2 or higher must use . Initializes a new instance of the class. The callback function’s entry point. Used in the Callback mechanism for sending messages from the Source to the Application. Initializes a new instance of the class. The callback function’s entry point. Used by an application either to get information about, or control the setting of a capability. Initializes a new instance of the class. The capability. Initializes a new instance of the class. The capability. The value. Initializes a new instance of the class. The capability. The value. The type. Initializes a new instance of the class. The capability. The value. Initializes a new instance of the class. The capability. The value. Initializes a new instance of the class. The capability. The value. Initializes a new instance of the class. The capability. The value. Id of capability to set or get. The type of the container structure referenced by the pointer internally. The container will be one of four types: , , , or . Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Finalizes an instance of the class. Embedded in the structure; defines a CIE XYZ space tri-stimulus value. First tri-stimulus value of the CIE space representation. Second tri-stimulus value of the CIE space representation. Third tri-stimulus value of the CIE space representation. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Implements the operator ==. The value1. The value2. The result of the operator. Implements the operator !=. The value1. The value2. The result of the operator. Defines the mapping from an RGB color space device into CIE 1931 (XYZ) color space. Defines the original color space that was transformed into CIE XYZ. This value is not set-able by the application. Used to indicate which data byte is taken first. If zero, then high byte is first. If non-zero, then low byte is first. If non-zero then color data is device-dependent and only ColorSpace is valid in this structure. Version of the color space descriptor specification used to define the transform data. The current version is zero. Describes parametrics for the first stage transformation of the Postscript Level 2 CIE color space transform process. Describes parametrics for the first stage transformation of the Postscript Level 2 CIE color space transform process. Values that specify the CIE 1931 (XYZ space) tri-stimulus value of the diffused white point. Values that specify the CIE 1931 (XYZ space) tri-stimulus value of the diffused black point. Values that specify the CIE 1931 (XYZ space) tri-stimulus value of inkless "paper" from which the image was acquired. Values that specify the CIE 1931 (XYZ space) tri-stimulus value of solid black ink on the "paper" from which the image was acquired. Optional table look-up values used by the decode function. Samples are ordered sequentially and end-to-end as A, B, C, L, M, and N. Allows for a data source and application to pass custom data to each other. Length, in bytes, of data. Handle to memory containing InfoLength bytes of data. Provides information about the Event that was raised by the Source. The Source should only fill in those fields applicable to the Event. The Application must only read those fields applicable to the Event. Defines event that has taken place. The name of the device that generated the event. Battery minutes remaining. Valid for BatteryCheck event only. Battery percentage remaining. Valid for BatteryCheck event only. Current power supply in use. Valid for PowerSupply event only. Current X Resolution. Valid for Resolution event only. Current Y Resolution. Valid for Resolution event only. Current flash setting. Valid for BatteryCheck event only. Number of images camera will capture. Valid for AutomaticCapture event only. Number of seconds before first capture. Valid for AutomaticCapture event only. Hundredths of a second between captures. Valid for AutomaticCapture event only. Embedded in the , , and structures. This structure holds the tri-stimulus color palette information for structures. The order of the channels shall match their alphabetic representation. That is, for RGB data, R shall be channel 1. For CMY data, C shall be channel 1. This allows the application and Source to maintain consistency. Grayscale data will have the same values entered in all three channels. Value used to index into the color table. First tri-stimulus value (e.g. Red). Second tri-stimulus value (e.g Green). Third tri-stimulus value (e.g Blue). Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Check for value equality. The v1. The v2. Check for value inequality. The v1. The v2. An enumeration stores a list of individual values, with one of the items designated as the current value. There is no required order to the values in the list. The type of items in the enumerated list. All items in the array have the same size. The item number, or index (zero-based) into , of the "current" value for the capability. The item number, or index (zero-based) into , of the "power-on" value for the capability. The enumerated list: one value resides within each array element. Gets the byte offset of the item list from a Ptr to the first item. Used on Windows and Macintosh pre OS X to pass application events/messages from the application to the Source. A pointer to the event/message to be examined by the Source. Under Microsoft Windows, pEvent is a pMSG (pointer to a Microsoft Windows MSG struct). That is, the message the application received from GetMessage(). On the Macintosh, pEvent is a pointer to an EventRecord. Any message the Source needs to send to the application in response to processing the event/message. The messages currently defined for this purpose are , and . This structure is used to pass specific information between the data source and the application through . Tag identifying an information. Item data type. Number of items. This is the return code of availability of data for extended image attribute requested. The return code. Contains either data or a handle to data. The field contains data if the total amount of data is less than or equal to four bytes. The field contains a handle if the total amount of data is more than four bytes. The amount of data is determined by multiplying NumItems times the byte size of the data type specified by ItemType. If the Item field contains a handle to data, then the Application is responsible for freeing that memory. Try to reads the values from the property. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. This structure is used to pass extended image information from the data source to application at the end of State 7. The application creates this structure at the end of State 7, when it receives XFERDONE. Application fills NumInfos for Number information it needs, and array of extended information attributes in Info[ ] array. Application, then, sends it down to the source using the above operation triplet. The data source then examines each Info, and fills the rest of data with information allocating memory when necessary. Initializes a new instance of the class. Number of information that application is requesting. This is filled by the application. If positive, then the application is requesting specific extended image information. The application should allocate memory and fill in the attribute tag for image information. Array of information. Provides information about the currently selected device. The name of the input or source file. The result of an operation or the name of a destination file. A pointer to Source specific data used to remember state information, such as the current directory. When set to TRUE recursively apply the operation. (ex: deletes all subdirectories in the directory being deleted; or copies all sub-directories in the directory being copied. Gets the type of the file. The type of the file. If , total size of media in bytes. If , size of image in bytes. The size. The create date of the file, in the form "YYYY/MM/DD HH:mm:SS:sss" where YYYY is the year, MM is the numerical month, DD is the numerical day, HH is the hour, mm is the minute, SS is the second, and sss is the millisecond. Last date the file was modified. Same format as . The bytes of free space left on the current device. An estimate of the amount of space a new image would take up, based on image layout, resolution and compression. Dividing this value into the FreeSpace will yield the approximate number of images that the Device has room for. If applicable, return the number of files on the file system including those in all sub-directories. The number of files. The number of audio snippets associated with a file of type . The number of snippets. Used to group cameras (ex: front/rear bitonal, front/rear grayscale...). This structure is used by the application to specify a set of mapping values to be applied to grayscale data. Transfer curve descriptors. All three channels (Channel1, Channel2 and Channel3) must contain the same value for every entry. A general way to describe the version of software that is running. This refers to your application or Source’s major revision number. e.g. The "2" in "version 2.1". The incremental revision number of your application or Source. e.g. The "1" in "version 2.1". The primary language for your Source or application. The primary country where your Source or application is intended to be distributed. e.g. Germany. General information string - fill in as needed. e.g. "1.0b3 Beta release". Returns a that represents this instance. A that represents this instance. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Check for value equality. The v1. The v2. Check for value inequality. The v1. The v2. Provides identification information about a TWAIN entity. Used to maintain consistent communication between entities. A unique, internal identifier for the TWAIN entity. This field is only filled by the Source Manager. Neither an application nor a Source should fill this field. The Source uses the contents of this field to "identify" which application is invoking the operation sent to the Source. Gets the supported data group. The application will normally set this field to specify which Data Group(s) it wants the Source Manager to sort Sources by when presenting the Select Source dialog, or returning a list of available Sources. The data group. Major number of latest TWAIN version that this element supports. Minor number of latest TWAIN version that this element supports. A structure identifying the TWAIN entity. Gets the data functionalities for TWAIN 2 detection. The data functionalities. String identifying the manufacturer of the application or Source. e.g. "Aldus". Tells an application that performs device-specific operations which product family the Source supports. This is useful when a new Source has been released and the application doesn't know about the particular Source but still wants to perform Custom operations with it. e.g. "ScanMan". A string uniquely identifying the Source. This is the string that will be displayed to the user at Source select-time. This string must uniquely identify your Source for the user, and should identify the application unambiguously for Sources that care. e.g. "ScanJet IIc". Creates a from assembly values. The supported groups. The assembly. assembly Creates a from specified values. The supported groups. The version. The manufacturer. The product family. Name of the product. The product description. assembly Describes the "real" image data, that is, the complete image being transferred between the Source and application. The Source may transfer the data in a different format--the information may be transferred in "strips" or "tiles" in either compressed or uncompressed form. The number of pixels per ICapUnits in the horizontal direction. The current unit is assumed to be "inches" unless it has been otherwise negotiated between the application and Source. The number of pixels per ICapUnits in the vertical direction. How wide, in pixels, the entire image to be transferred is. If the Source doesn’t know, set this field to -1 (hand scanners may do this). How tall/long, in pixels, the image to be transferred is. If the Source doesn’t know, set this field to -1 (hand scanners may do this). The number of samples being returned. For R-G-B, this field would be set to 3. For C-M-Y-K, 4. For Grayscale or Black and White, 1. For each sample, the number of bits of information. 24-bit R-G-B will typically have 8 bits of information in each sample (8+8+8). Some 8-bit color is sampled at 3 bits Red, 3 bits Green, and 2 bits Blue. Such a scheme would put 3, 3, and 2 into the first 3 elements of this array. The supplied array allows up to 8 samples. Samples are not limited to 8 bits. However, both the application and Source must simultaneously support sample sizes greater than 8 bits per color. The number of bits in each image pixel (or bit depth). This value is invariant across the image. 24-bit R-G-B has BitsPerPixel = 24. 40-bit CMYK has BitsPerPixel=40. 8-bit Grayscale has BitsPerPixel = 8. Black and White has BitsPerPixel = 1. If SamplesPerPixel > 1, indicates whether the samples follow one another on a pixel-by-pixel basis (R-G-B-R-G-B-R-G-B...) as is common with a one-pass scanner or all the pixels for each sample are grouped together (complete group of R, complete group of G, complete group of B) as is common with a three-pass scanner. If the pixel-by-pixel method (also known as "chunky") is used, the Source should set Planar = FALSE. If the grouped method (also called "planar") is used, the Source should set Planar = TRUE. This is the highest categorization for how the data being transferred should be interpreted by the application. This is how the application can tell if the data is Black and White, Grayscale, or Color. Currently, the only color type defined is "tri-stimulus", or color described by three characteristics. Most popular color description methods use tristimulus descriptors. For simplicity, the constant used to identify tristimulus color is called Rgb, for R-G-B color. There is no default for this value. The compression method used to process the data being transferred. Default is no compression. Involves information about the original size of the acquired image and its position on the original "page" relative to the "page’s" upper-left corner. Default measurements are in inches (units of measure can be changed by negotiating the ICapUnits capability). This information may be used by the application to relate the acquired (and perhaps processed image) to the original. Further, the application can, using this structure, set the size of the image it wants acquired. Another attribute of this structure is the included frame, page, and document indexing information. Most Sources and applications, at least at first, will likely set all these fields to one. For Sources that can acquire more than one frame from a page in a single acquisition, the FrameNumber field will be handy. Sources that can acquire more than one page from a document feeder will use PageNumber and DocumentNumber. These fields will be especially useful for forms-processing applications and other applications with similar document tracking requirements. Frame coords within larger document. The document number, assigned by the Source, that the acquired data originated on. Useful for grouping pages together. Initial value is 1. Increment when a new document is placed into the document feeder (usually tell this has happened when the feeder empties). Reset when no longer acquiring from the feeder. The page which the acquired data was captured from. Useful for grouping Frames together that are in some way related. Initial value is 1. Increment for each page fed from a page feeder. Reset when a new document is placed into the feeder. Usually a chronological index of the acquired frame. These frames are related to one another in some way; usually they were acquired from the same page. The Source assigns these values. Initial value is 1. Reset when a new page is acquired from. Provides information for managing memory buffers. Memory for transfer buffers is allocated by the application--the Source is asked to fill these buffers. This structure keeps straight which entity is responsible for deallocation. Encodes which entity releases the buffer and how the buffer is referenced. The size of the buffer in bytes. Should always be an even number and wordaligned. Reference to the buffer. May be a Pointer or a Handle (see Flags field to make this determination). Describes the form of the acquired data being passed from the Source to the application in memory transfer mode. The compression method used to process the data being transferred. The number of uncompressed bytes in each row of the piece of the image being described in this buffer. The number of uncompressed columns (in pixels) in this buffer. The number or uncompressed rows (in pixels) in this buffer. How far, in pixels, the left edge of the piece of the image being described by this structure is inset from the "left" side of the original image. If the Source is transferring in "strips", this value will equal zero. If the Source is transferring in "tiles", this value will often be non-zero. Same idea as XOffset, but the measure is in pixels from the "top" of the original image to the upper edge of this piece. The number of bytes written into the transfer buffer. This field must always be filled in correctly, whether compressed or uncompressed data is being transferred. A structure of type describing who must dispose of the buffer, the actual size of the buffer, in bytes, and where the buffer is located in memory. Describes the information necessary to transfer a JPEG-compressed image during a buffered transfer. Images compressed in this fashion will be compatible with the JPEG File Interchange Format, version 1.1. Defines the color space in which the compressed components are stored. Encodes the horizontal and vertical subsampling in the form ABCDEFGH, where ABCD are the high-order four nibbles which represent the horizontal subsampling and EFGH are the low-order four nibbles which represent the vertical subsampling. Each nibble may have a value of 0, 1, 2, 3, or 4. However, max(A,B,C,D) * max(E,F,G,H) must be less than or equal to 10. Subsampling is irrelevant for single component images. Therefore, the corresponding nibbles should be set to 1. e.g. To indicate subsampling two Y for each U and V in a YUV space image, where the same subsampling occurs in both horizontal and vertical axes, this field would hold 0x21102110. For a grayscale image, this field would hold 0x10001000. A CMYK image could hold 0x11111111. Number of color components in the image to be compressed. Number of MDUs (Minimum Data Units) between restart markers. Default is 0, indicating that no restart markers are used. An MDU is defined for interleaved data (i.e. R-G-B, Y-U-V, etc.) as a minimum complete set of 8x8 component blocks. Mapping of components to Quantization tables. Quantization tables. Mapping of components to Huffman tables. Null entries signify selection of the default tables. DC Huffman tables. Null entries signify selection of the default tables. AC Huffman tables. Null entries signify selection of the default tables. Container for one value. The type of the item. The value. This structure holds the color palette information for buffered memory transfers of type ICapPixelType = Palette. Number of colors in the color table; maximum index into the color table should be one less than this (since color table indexes are zero-based). Specifies type of palette. Array of palette values. Used to bypass the TWAIN protocol when communicating with a device. All memory must be allocated and freed by the Application. Pointer to Command buffer. Number of bytes in Command buffer. Defines the direction of data flow. Pointer to Data buffer. Number of bytes in Data buffer. Number of bytes successfully transferred. This structure tells the application how many more complete transfers the Source currently has available. Initializes a new instance of the class. The number of complete transfers a Source has available for the application it is connected to. If no more transfers are available, set to zero. If an unknown and non-zero number of transfers are available, set to -1. The application should check this field if the CapJobControl is set to other than None. If this is not 0, the application should expect more data from the driver according to CapJobControl settings. Container for a range of values. The type of items in the list. The least positive/most negative value of the range. The most positive/least negative value of the range. The delta between two adjacent values of the range. e.g. Item2 - Item1 = StepSize; The device’s "power-on" value for the capability. If the application is performing a MSG_SET operation and isn’t sure what the default value is, set this field to . The value to which the device (or its user interface) is currently set to for the capability. This structure is used by the application to specify a set of mapping values to be applied to RGB color data. Use this structure for RGB data whose bit depth is up to, and including, 8-bits. The number of elements in the array is determined by —the number of elements is 2 raised to the power of . Transfer curve descriptors. To minimize color shift problems, writing the same values into each channel is desirable. Describes the file format and file specification information for a transfer through a disk file. A complete file specifier to the target file. On Windows, be sure to include the complete pathname. The format of the file the Source is to fill. The volume reference number for the file. This applies to Macintosh only. On Windows, fill the field with -1. Provides the application information about the Source’s requirements and preferences regarding allocation of transfer buffer(s). The size of the smallest transfer buffer, in bytes, that a Source can be successful with. This will typically be the number of bytes in an uncompressed row in the block to be transferred. An application should never allocate a buffer smaller than this. The size of the largest transfer buffer, in bytes, that a Source can fill. If a Source can fill an arbitrarily large buffer, it might set this field to negative 1 to indicate this (a hand-held scanner might do this, depending on how long its cord is). Other Sources, such as frame grabbers, cannot fill a buffer larger than a certain size. Allocation of a transfer buffer larger than this value is wasteful. The size of the optimum transfer buffer, in bytes. A smart application will allocate transfer buffers of this size, if possible. Buffers of this size will optimize the Source’s performance. Sources should be careful to put reasonable values in this field. Buffers that are 10’s of kbytes will be easier for applications to allocate than buffers that are 100’s or 1000’s of kbytes. Describes the status of a source. Condition Code describing the status. Valid for TWAIN 2.1 and later. This field contains additional scanner-specific data. If there is no data, then this value must be zero. Translates the contents of Status into a localized UTF8string, with the total number of bytes in the string. data received from a previous call. Total number of bytes in the UTF8string, plus the terminating NULL byte. This is not the same as the total number of characters in the string. TW_HANDLE to a UTF-8 encoded localized string (based on TwIdentity.Language or CapLanguage). The Source allocates it, the Application frees it. Gets the actual string from the pointer. This may be incorrect. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Finalizes an instance of the class. This structure is used to handle the user interface coordination between an application and a Source. Set to TRUE by the application if the Source should activate its built-in user interface. Otherwise, set to FALSE. Note that not all sources support ShowUI = FALSE. If ShowUI is TRUE, then an application setting this to TRUE requests the Source to run Modal. Microsoft Windows only: Application’s window handle. The Source designates the hWnd as its parent when creating the Source dialog. Provides entry points required by TWAIN 2.0 Applications and Sources. Initializes a new instance of the class. The range of colors specified by this structure is replaced with Replacement grayscale value in the binary image. The color is specified in HSV color space. Initializes a new instance of the struct. Size of this structure in bytes. The size. Hue starting number. Valid values 0 to 3600 (0° to 360°). Hue ending number. Valid values 0 to 3600 (0° to 360°). Saturation starting number. Valid values 0 to 1000 (0% to 100%). Saturation ending number. Valid values 0 to 1000 (0% to 100%). Luminosity starting number. Valid values 0 to 1000 (0% to 100%). Luminosity ending number. Valid values 0 to 1000 (0% to 100%). Replacement grayscale value. Valid values 0 to (2^32)–1 (Maximum value depends on grayscale bit depth). Specifies the filter to be applied during image acquisition. More than one descriptor can be specified. All descriptors are applied with an OR statement. Initializes a new instance of the class. Number of descriptors in hDescriptors array. The descriptor count. Maximum possible descriptors. Valid only for GET and GETDEFAULT operations. The maximum descriptor count. If the value is 0 filter will check if current pixel color is inside the area specified by the descriptor. If the value is 1 it will check if it is outside of this area. The condition. Handle to array of . The descriptors. Indicates the type of container used in capability. Corresponds to TWON_* values. The default value for this enum. The container is . The container is . The container is . The container is . The don't care value. Flags used in . Corresponds to TWMF_* values. The data types of item in TWAIN, used in the capability containers. Corresponds to TWTY_* values. Means Item is a an 8 bit value. Means Item is a 16 bit value. Means Item is a 32 bit value. Means Item is an unsigned 8 bit value. Means Item is an unsigned 16 bit value. Means Item is an unsigned 32 bit value. Means Item is an unsigned 16 bit value (supposedly, YMMV). Means Item is a . Means Item is a . Means Item is a 32 char string (max). Means Item is a 64 char string (max). Means Item is a 128 char string (max). Means Item is a char string shorter than 255. Means Item is a handle (pointer). CapAlarms values. Corresponds to TWAL_* values. ICapAutoSize values. Corresponds to TWAS_* values. The bar code’s orientation on the scanned image is described in reference to a Western-style interpretation of the image. Corresponds to TWBCOR_* values. Normal reading orientation. Rotated 90 degrees clockwise. Rotated 180 degrees clockwise. Rotated 270 degrees clockwise. The orientation is not known. ICapBarcodeSearchMode values, ICapPatchCodeSearchMode values. Corresponds to TWBD_* values. ICapBitOrder/ICapBitOrderCodes values. Corresponds to TWBO_* values. ICapAutoDiscardBlankPages values. Corresponds to TWBP_* values. Values for ICapBitDepthReduction. Corresponds to TWBR_* values. ICapBarcodeSearchPriorities values, ICapSupportedBarcodeTypes values. Corresponds to TWBT_* values. ICapCompression values. Allows the application and Source to identify which compression schemes they have in common for Buffered Memory and File transfers. Since only certain file formats support compression, this capability must be negotiated after setting the desired file format with ICAP_IMAGEFILEFORMAT. Corresponds to TWCP_* values. All Sources must support this. Can be used with TIFF or PICT From the CCITT specification (now ITU), intended for document images (can be used with TIFF). From the CCITT specification (now ITU), intended for document images (can be used with TIFF). From the CCITT specification (now ITU), intended for document images (can be used with TIFF). From the CCITT specification (now ITU), intended for document images (can be used with TIFF). Intended for the compression of color photographs (can be used with TIFF, JFIF or SPIFF). A compression licensed by UNISYS (can be used with TIFF). Intended for bitonal and grayscale document images (can be used with TIFF or SPIFF). This compression can only be used if ICAP_IMAGEFILEFORMAT is set to TWFF_PNG. Can only be used if ICAP_IMAGEFILEFORMAT is set to TWFF_BMP. Can only be used if ICAP_IMAGEFILEFORMAT is set to TWFF_BMP. Can only be used if ICAP_IMAGEFILEFORMAT is set to TWFF_BMP. Per RFC 1951 (AKA 'Flate' and 'Deflate') Per ISO/IEC 15444 CapCameraSide/TWEI_PAGESIDE values. Corresponds to TWCS_* values. CapClearBuffers values. Corresponds to TWCB_* values. Indicates the type of event from the source. Also CapDeviceEvent values. If used as a cap value it's ushort. Corresponds to TWDE_* values. values. Corresponds to TWDR_* values. TWEI_DESKEWSTATUS values. Corresponds to TWDSK_* values. CapDuplex values. Corresponds to TWDX_* values. CapFeederAlignment values. Corresponds to TWFA_* values. ICapFeederType values. Corresponds to TWFE_* values. ICapImageFileFormat values. Corresponds to TWFF_* values. Used for document imaging. Native Linux format. Native Macintosh format Native Microsoft format Used for document imaging Wrapper for JPEG images FlashPix, used with digital cameras Multi-page TIFF files An image format standard intended for use on the web, replaces GIF A standard from JPEG, intended to replace JFIF, also supports JBIG File format for use with digital cameras. A file format from Adobe A file format from the Joint Photographic Experts Group ISO/IEC 15444-1 A file format from the Joint Photographic Experts Group ISO/IEC 15444-2 A file format from LizardTech A file format from Adobe PDF/A, Version 1 A file format from Adobe PDF/A, Version 2 ICapFlashUsed2 values. Corresponds to TWFL_* values. CapFeederOrder values. Corresponds to TWFO_* values. CapFeederPocket values. Corresponds to TWFP_* values. ICapFlipRotation values. Corresponds to TWFR_* values. ICapFilter values. Corresponds to TWFT_* values. values. Corresponds to TWFY_* values. ICapIccProfile values. Corresponds to TWIC* values. ICapImageFilter values. Corresponds to TWIF_* values. ICapImageMerge values. Corresponds to TWIM_* values. CapJobControl values. Corresponds to TWJC_* values. No job control. Detect and include job separator and continue scanning. Detect and include job separator and stop scanning. Detect and exclude job separator and continue scanning. Detect and exclude job separator and stop scanning. ICapJpegQuality values. Corresponds to TWJQ_* values. ICapLightPath values. Corresponds to TWLP_* values. ICapLightSource values. Corresponds to TWLS_* values. TWEI_MAGTYPE values. Corresponds to TWMD_* values. ICapNoiseFilter values. Corresponds to TWNF_* values. ICapOrientation values. Corresponds to TWOR_* values. ICapOverscan values. Corresponds to TWOV_* values. values. Corresponds to TWPA_* values. ICapPlanarChunky values. Corresponds to TWPC_* values. ICapPatchCodeSearchPriorities, ICapSupportedPatchCodeTypes values. Corresponds to TWPCH_* values. ICapPixelFlavor, ICapPixelFlavorCodes values. Corresponds to TWPF_* values. CapPrinterMode values. Corresponds to TWPM_* values. CapPrinter values. Corresponds to TWPR_* values. CapPrinterFontStyle values. Corresponds to TWPF_* values. CapPrinterIndexTrigger values. Corresponds to TWCT_* values. CapPowerSupply values. Corresponds to TWPS_* values. Also ICapAutomaticColorNonColorPixelType (bw/gray), ICapJpegPixelType, ICapPixelType values. Corresponds to TWPT_* values. CapSegmented values. Corresponds to TWSG_* values. ICapFilmType values. Corresponds to TWFM_* values. CapDoubleFeedDetection values. Corresponds to TWDF_* values. CapDoubleFeedDetectionSensitivity values. Corresponds to TWUS_* values. CapDoubleFeedDetectionResponse values. Corresponds to TWDP_* values. ICapMirror values. Corresponds to TWMR* values. ICapJpegSubsampling values. Corresponds to TWJS_* values. CapPaperHandling values. Corresponds to TWPH_* values. CapIndicatorsMode values. Corresponds to TWCI_* values. ICapSupportedSizes values. Corresponds to TWSS_* values. ICapXferMech, ACapXferMech values. Corresponds to TWSX_* values. ICapUnits values. Corresponds to TWUN_* values. Corresponds to TWCY_* values. Corresponds to TWLG_* values. Corresponds to DG_*. Corresponds to DF_*. Corresponds to DAT_*. Corresponds to MSG_*. Indicates the type of capability. Extended Image Info Attributes. Corresponds to TWEI_*. EndXfer job control values. Corresponds to TWEJ_*. Corresponds to TWRC_*. Corresponds to TWCC_*. Bit mask for querying the operation that are supported by the data source on a capability. Corresponds to TWQC_*. Cap applies to entire session/machine. Cap applies to bitonal cameras. Cap applies to color cameras. TWAIN's boolean values. The false value (0). The true value (1). Contains direct magic values for some TWAIN stuff. Length of an array that holds TW_STR32. Length of an array that holds TW_STR64. Length of an array that holds TW_STR128. Length of an array that holds TW_STR255. Don't care value for 8 bit types. Don't care value for 16 bit types. Don't care value for 32 bit types. The major version number of TWAIN supported by this library. The minor version number of TWAIN supported by this library. Value for false where applicable. Value for true where applicable. Contains extensions for reading/writing TWAIN types from/to pointer. Gets the byte size of the item type. Reads a TWAIN value. The base address. The offset. The TWAIN type. Writes a TWAIN value. The base addr. The offset. The TWAIN type. The value. Writes string value. THIS MAY BE WRONG. Contains extension methods for converting (possibly bad) integer values to enum values. Casts a list of objects to a list of specified enum. The type of the enum. The list. Casts a list of objects to a list of specified enum. The type of the enum. The list. set to true for working with bad values. Casts an objects to the specified enum. The type of the enum. The value. Casts an objects to the specified enum. The type of the enum. The value. if set to true [try upper word]. Tries to convert a value to if possible. The value. Tries to cast a value to if possible. The value. Converts object to string. The value. Contains event data for a TWAIN source hardware event. Initializes a new instance of the class. The device event. Gets the detailed device event. The device event. Exposes capabilities of a data source as properties. Gets the property to work with audio for the current source. The audio xfer mech. Gets the property to work with alarms for the current source. The alarms. Gets the property to work with alarm volume for the current source. The alarm volume. Gets the property to work with the name or other identifying information about the Author of the image. It may include a copyright string. The author string. Gets the property to work with auto feed page flag for the current source. The auto feed flag. Gets the property to work with auto capture count for the current source. The auto capture count. Gets the property to work with auto-sense medium (paper source) flag. The auto-sense medium flag. Gets the property to work with auto scan page flag for the current source. The auto scan flag. Gets the property to see the remaining battery power for the device. The battery minutes. Gets the property to see the remaining battery percentage for the device. The battery percentage. Gets the property to work with camera enabled flag. The camera enabled flag. Gets the property to work with camera order for the current source. The camera order setting. Gets the property to see whether device supports camera preview UI flag. The camera preview UI flag. Gets the property to work with camera side for the current source. The camera side. Gets the property to work with the general note about the acquired image. The general note string. Gets the property to work with the clear buffers option for the current source. The clear buffers option. Gets the property to work with clear page flag for the current source. The clear page flag. Gets the property to see whether device supports custom data triplets. The custom data flag. Gets the property for device interface guid. The device interface guid. Gets the property to work with the reported device events for the current source. The reported device events. Gets the property to work with devince online flag for the current source. The devince online flag. Gets the property to work with the device's time and date. The device time and date. Gets the property to work with double feed detection option for the current source. The double feed detection option. Gets the property to work with double feed detection length for the current source. The double feed detection length. Gets the property to work with double feed detection response for the current source. The double feed detection response. Gets the property to work with double feed detection sensitivity for the current source. The double feed detection sensitivity. Gets the property to see what's the duplex mode for the current source. The duplex mode. Gets the property to work with duplex enabled flag for the current source. The duplex enabled flag. Gets the property to see whether device supports UI only flag (no transfer). The UI only flag. Gets the property to work with endorser for the current source. The endorser option. Gets the extended caps for the current source. The extended caps. Gets the property to work with feeder alignment for the current source. The feeder alignment. Gets the property to work with feeder enabled flag for the current source. The feeder enabled flag. Gets the property to work with feeder loaded flag for the current source. The feeder loaded flag. Gets the property to work with feeder order for the current source. The feeder order. Gets the property to work with feeder pocket for the current source. The feeder pocket setting. Gets the property to work with feeder prep flag. The feeder prep flag. Gets the property to work with feed page flag for the current source. The feed page flag. Gets the property to work with indicators flag for the current source. The indicators flag. Gets the property to work with diplayed indicators for the current source. The diplayed indicators. Gets the property to work with job control option for the current source. The job control option. Gets the property to work with string data language for the current source. The language. Gets the property to work with the max buffered pages for the current source. The max batch buffered pages. Gets the property to work with check scanning support flag. The check scanning support flag. Gets the property to work with paper sensor flag for the current source. The paper sensor flag. Gets the property to work with paper handling option for the current source. The paper handling option. Gets the property to work with camera power down time (seconds) for the current source. The camera power down time. Gets the property to see current device's power supply. The power supply indicator. Gets the property to work with printer list for the current source. The printer list. Gets the property to work with printer character rotation for the current source. The printer character rotation. Gets the property to work with printer enabled flag. The printer enabled flag. Gets the property to work with printer font style for the current source. The printer font style. Gets the property to work with the starting printer index for the current source. The printer index. Set the character to be used for filling the leading digits before the counter value if the counter digits are fewer than . The printer leading string. Gets the property to work with printer index max value for the current source. The printer index max value. Gets the property to work with printer number digits value for the current source. The printer number digits value. Gets the property to work with printer index step value for the current source. The printer index step value. Gets the property to work with printer index trigger for the current source. The printer index trigger. Gets the property to work with printer mode for the current source. The printer mode. Specifies the string(s) that are to be used in the string component when the current device is enabled. The printer string. Gets the next print values. The next print values. Specifies the string that shall be used as the current device’s suffix. The printer suffix string. Gets the property to work with printer y-offset for the current source. The printer y-offset. Gets the property to see whether device supports reacquire flag. The reacquire flag. Gets the property to work with rewind page flag for the current source. The rewind page flag. Gets the property to work with segmentation setting for the current source. The segmentation setting. Gets the property for device serial number. The device serial number. Gets the supported caps for the current source. This is not supported by all sources. The supported caps. Gets the supported caps for unique segments for the current source. The supported caps for unique segments. Gets the supported caps for supported DATs. The supported DATs. Gets the property to work with thumbnails enabled flag for the current source. The thumbnails enabled flag. Gets the property to work with the time before first capture (milliseconds) for the current source. The time before first capture. Gets the property to work with the time between captures (milliseconds) for the current source. The time between captures. Gets the property to get the image acquired time and date. The time and date string. Gets the property to work with UI controllable flag for the current source. The UI controllable flag. Gets the property to work with xfer count for the current source. The xfer count. Gets the property to work with image auto brightness flag for the current source. The image auto brightness flag. Gets the property to work with image blank page behavior for the current source. The image blank page behavior. Gets the property to work with auto border detection flag for the current source. The auto border detection flag. Gets the property to work with image auto color detection flag for the current source. The image auto color detection flag. Gets the property to work with image auto non-color pixel type for the current source. The image auto non-color pixel type. Gets the property to work with image auto crop flag for the current source. The image auto crop flag. Gets the property to work with image auto deskew flag for the current source. The image auto deskew flag. Gets the property to work with image auto length detection flag for the current source. The image auto length detection flag. Gets the property to work with image auto rotate flag for the current source. The image auto rotate flag. Gets the property to work with image auto size option for the current source. The image auto size option. Gets the property to work with image barcode detection flag for the current source. The image barcode detection flag. Gets the property to work with image barcode max search retries for the current source. The image barcode max search retries. Gets the property to work with image barcode max search priorities for the current source. The image barcode max search priorities. Gets the property to work with image barcode search direction for the current source. The image barcode search direction. Gets the property to work with image barcode search priority for the current source. The image barcode search priority. Gets the property to work with image barcode max search timeout for the current source. The image barcode max search timeout. Gets the property to work with image bit depth for the current source. The image bit depth. Gets the property to work with image bit depth reduction method for the current source. The image bit depth reduction method. Gets the property to work with image for the current source. The image bit order. Gets the property to work with image CCITT compression for the current source. The image bit order for CCITT compression. Gets the property to work with image brightness for the current source. The image brightness. Gets the property to work with image CCITT K factor for the current source. The image CCITT K factor. Gets the property to work with image color management flag for the current source. The image color management flag. Gets the property to work with image for the current source. The image compression. Gets the property to work with image contrast for the current source. The image contrast. Gets the property to work with image square-cell halftone for the current source. The image square-cell halftone. Gets the property to work with image exposure time (in seconds) for the current source. The image exposure time. Gets the property to work with ext image info flag for the current source. The ext image info flag. Gets the property to work with feeder type for the current source. The feeder type. Gets the property to work with image film type for the current source. The image film type. Gets the property to work with image color filter for the current source. The image color filter type. Gets the property to work with flash option for the current source. The flash option. Gets the property to work with image flip-rotation behavior for the current source. The image flip-rotation behavior. Gets the property to work with the list of frames the source will acquire on each page. The capture frames. Gets the property to work with image gamma value for the current source. The image gamma. Gets the property to work with image halftone patterns for the current source. The image halftone patterns. Gets the property to work with image highlight value for the current source. The image highlight. Gets the property to work with image icc profile for the current source. The image icc profile. Gets or sets the image indices that will be delivered during the standard image transfer done in States 6 and 7. The image indicies. Gets the property to work with image for the current source. The image file format. Gets the property to work with image enhancement filter for the current source. The image enhancement filter. Gets the property to work with image merge option for the current source. The image merge option. Gets the property to work with image merge height threshold for the current source. The image merge height threshold. Gets the property to work with image jpeg compression for the current source. The image pixel type for jpeg compression. Gets the property to work with image jpeg quality for the current source. The image jpeg quality. Gets the property to work with image jpeg sub sampling for the current source. The image jpeg sub sampling. Gets the property to work with image lamp state flag for the current source. The image lamp state flag. Gets the property to work with image light path for the current source. The image light path. Gets the property to work with image light source for the current source. The image light source. Gets the property to work with image max frames for the current source. The image max frames. Gets the property to work with image minimum height for the current source. The image minimumm height. Gets the property to work with image minimum width for the current source. The image minimumm width. Gets the property to work with image mirror option for the current source. The image mirror option. Gets the property to work with image noise filter for the current source. The image noise filter. Gets the property to work with image orientation for the current source. The image orientation. Gets the property to work with image overscan option for the current source. The image overscan option. Gets the property to work with image patch code detection flag for the current source. The image patch code detection flag. Gets the property to work with image patch code max search retries for the current source. The image patch code max search retries. Gets the property to work with image patch code max search priorities for the current source. The image patch code max search priorities. Gets the property to work with image patch code search direction for the current source. The image patch code search direction. Gets the property to work with image patch code search priority for the current source. The image patch code search priority. Gets the property to work with image patch code max search timeout for the current source. The image patch code max search timeout. Gets the property to work with image physical height for the current source. The image physical height. Gets the property to work with image physical width for the current source. The image physical width. Gets the property to work with image pixel flavor for the current source. The image pixel flavor. Gets the property to work with image CCITT compression for the current source. The image pixel flavor for CCITT compression. Gets the property to work with image for the current source. The image pixel type. Gets the property to work with image color format for the current source. The image color format. Gets the property to work with image rotation for the current source. The image rotation. Gets the property to work with image shadow value for the current source. The image shadow. Gets the property to work with image barcode types for the current source. The image barcode types. Gets the property to get supported ext image info for the current source. The supported ext image info. Gets the property to work with image patch code types for the current source. The image patch code types. Gets the property to work with image for the current source. The image supported size. Gets the property to work with image threshold for the current source. The image threshold. Gets the property to work with image tiles flag for the current source. The image tiles flag. Gets the property to work with image CCITT time fill for the current source. The image CCITT time fill. Gets the property to work with image undefined size flag for the current source. The image undefined size flag. Gets the property to work with image for the current source. The image unit of measure. Gets the property to work with image for the current source. The image xfer mech. Gets the property to work with image's native x-axis resolution for the current source. The image's native x-axis resolution. Gets the property to work with image x-axis resolution for the current source. The image x-axis resolution. Gets the property to work with image x-axis scaling for the current source. The image x-axis scaling. Gets the property to work with image's native y-axis resolution for the current source. The image's native y-axis resolution. Gets the property to work with image y-axis resolution for the current source. The image y-axis resolution. Gets the property to work with image y-axis scaling for the current source. The image y-axis scaling. Gets the property to work with image zoom factor for the current source. The image zoom factor. Gets the current value for a capability. The capability id. Gets the default value for a capability. The capability id. A general method that tries to get capability values from current . The capability id. Gets all the possible values of this capability without expanding. This may be required to work with large range values that cannot be safely enumerated with . The capability id. Gets the actual supported operations for a capability. This is not supported by all sources. The capability id. Resets the current value to power-on default. The capability id. Resets all values and constraint to power-on defaults. Interface for reading a TWAIN capability associated with a . The TWAIN type of the value. Gets a value indicating whether is supported. true if this capability can get values; otherwise, false. Gets a value indicating whether is supported. true if this capability can get default value; otherwise, false. Gets a value indicating whether is supported. true if this capability can get current value; otherwise, false. Gets a value indicating whether is supported. true if this capability can get help; otherwise, false. Gets a value indicating whether is supported. true if this capability can get label; otherwise, false. Gets a value indicating whether is supported. true if this capability can get label enum; otherwise, false. Gets a value indicating whether is supported. true if this capability can reset; otherwise, false. Gets a value indicating whether is supported. true if this capability can set; otherwise, false. Gets a value indicating whether is supported. true if this capability can set constraint; otherwise, false. Gets the capability. The capability. Gets all the possible values of this capability without expanding. This may be required to work with large range values that cannot be safely enumerated with . Converts the object values into typed values using the conversion routine for this capability. The values. Gets all the possible values of this capability. Gets the current value of this capability. Gets the default value of this capability. [Experimental] Gets the help value of this capability. [Experimental] Gets the label value of this capability. [Experimental] Gets the display names for possible values of this capability. Gets a value indicating whether this capability is at all supported. true if this capability is supported; otherwise, false. Gets a value indicating whether this instance is read only. true if this instance is read only; otherwise, false. Interface for reading/writing a TWAIN capability associated with a . The TWAIN type of the value. Resets the current value to power-on default. Simplified version that sets the current value of this capability. The value. A version of Set that uses an array. The value. A version of Set that uses an enumeration. The value. Sets the constraint value of this capability. The value. Sets the constraint value of this capability. The value. Sets the constraint value of this capability. The value. Represents a TWAIN data source. Gets the id of the source. The identifier. Gets the source's product name. The name. Gets the supported data group. The data group. Gets the source's manufacturer name. The manufacturer. Gets the source's product family. The product family. Gets the supported TWAIN protocol version. The protocol version. Gets the source's version information. The version. Gets a value indicating whether this data source has been opened. true if this data source is open; otherwise, false. Gets the capabilities for this data source. The capabilities. Gets or sets the current settings (CustomDSData) of this source if supported. The source settings. Opens the source for capability negotiation. Closes the source. Enables the source to start transferring. The mode. if set to true any driver UI will display as modal. The window handle if modal. Gets the source status. Only call this at state 4 or higher. Gets the source status string. Only call this at state 4 or higher. Status from previous calls. Simple log interface used by NTwain. Gets or sets a value indicating whether info messages will be logged. true to enable info logging. Gets or sets a value indicating whether debug messages will be logged. true to enable debug logging. Gets or sets a value indicating whether error messages will be logged. true to enable error logging. Logs info type message. The message. Logs info type message. The message format. The arguments. Logs debug type message. The message. Logs debug type message. The message format. The arguments. Logs error type message. The message. Logs error type message. The message. The exception. Logs error type message. The message format. The exception. The arguments. Interface that provides the correct methods for managing memory on data exchanged with TWAIN sources. Function to allocate memory. Calls to this must be coupled with later. The size in bytes. Handle to the allocated memory. Function to free memory. The handle from . Function to lock some memory. Calls to this must be coupled with later. The handle to allocated memory. Handle to the lock. Function to unlock a previously locked memory region. The same handle passed . Verifies the string length is under the maximum length and throws if violated. The value. The maximum length. Verifies the session is within the specified state range (inclusive). Throws if violated. The session. The allowed minimum. The allowed maximum. The triplet data group. The triplet data argument type. The triplet message. For something that is in a pending state until finalized with a Commit() call. The changes are rolled back if it is disposed without being committed. Commits the pending changes. This is the self-hosted message loop for TWAIN communication. It utilizes the wpf Dispatcher to do all the hard work. Extends with extra stuff for internal use. Gets the app id used for the session. Changes the state right away. The new state. if set to true to notify change. Gets the pending state changer and tentatively changes the session state to the specified value. Value will only stick if committed. The new state. Gets the triplet operations defined for audio data group. Interface for something that can check whether messages from WndProc is a TWAIN message and already handled. Checks and handle the message if it's a TWAIN message. The window handle. The message. The w parameter. The l parameter. true if handled internally. Contains the actual data transfer logic since TwainSession is getting too large. Performs the TWAIN transfer routine at state 6. Abstracts out wnd proc hook on Windows from InternalMessageLoopHook class. This allows things to not depend on PresentationCore.dll at runtime on mono. Provides methods for managing memory on data exchanged with twain sources using old win32 methods. Defines the dimensions and color information for a DIB. Structure that contains information about the dimensions of color format. This contains one of the following: 1. An array of RGBQUAD. The elements of the array that make up the color table. 2. An array of 16-bit unsigned integers that specifies indexes into the currently realized logical palette. This use of bmiColors is allowed for functions that use DIBs. The number of entries in the array depends on the values of the biBitCount and biClrUsed members of the BITMAPINFOHEADER structure. Structure that contains information about the dimensions and color format of a DIB. The number of bytes required by the structure. The width of the bitmap, in pixels. If Compression is JPEG or PNG, the Width member specifies the width of the decompressed JPEG or PNG image file, respectively. The height of the bitmap, in pixels. If Height is positive, the bitmap is a bottom-up DIB and its origin is the lower-left corner. If Height is negative, the bitmap is a top-down DIB and its origin is the upper-left corner. If Height is negative, indicating a top-down DIB, Compression must be either RGB or BITFIELDS. Top-down DIBs cannot be compressed. If Compression is JPEG or PNG, the Height member specifies the height of the decompressed JPEG or PNG image file, respectively. The number of planes for the target device. This value must be set to 1. The number of bits-per-pixel. The BitCount member determines the number of bits that define each pixel and the maximum number of colors in the bitmap. The type of compression for a compressed bottom-up bitmap (top-down DIBs cannot be compressed). The size, in bytes, of the image. This may be set to zero for RGB bitmaps. If Compression is JPEG or PNG, SizeImage indicates the size of the JPEG or PNG image buffer, respectively. The horizontal resolution, in pixels-per-meter, of the target device for the bitmap. An application can use this value to select a bitmap from a resource group that best matches the characteristics of the current device. The vertical resolution, in pixels-per-meter, of the target device for the bitmap. The number of color indexes in the color table that are actually used by the bitmap. If this value is zero, the bitmap uses the maximum number of colors corresponding to the value of the BitCount member for the compression mode specified by Compression. The number of color indexes that are required for displaying the bitmap. If this value is zero, all colors are required. Gets the horizontal dpi of the bitmap. Gets the vertical dpi of the bitmap. Gets the size of the structure. Checks to see if this structure contain valid data. It also fills in any missing pieces if possible. Gets the pointer to scan0 given the header pointer. The header PTR. Gets whether the bitmap is bottom-up or top-down format. true if this instance is bottom up image; otherwise, false. Gets the System.Drawing pixel format of current structure. Gets the color palette that's contained in the header. Note not all images will have palette, so check if the return value is null before using it. Gets the stride size of this bitmap. Returns a that represents this instance. A that represents this instance. Indicates the bitmap compression of . An uncompressed format. A run-length encoded (RLE) format for bitmaps with 8 bpp. The compression format is a 2-byte format consisting of a count byte followed by a byte containing a color index. For more information, see Bitmap Compression. An RLE, format for bitmaps with 4 bpp. The compression format is a 2-byte format consisting of a count byte followed by two word-length color indexes. For more information, see Bitmap Compression. Specifies that the bitmap is not compressed and that the color table consists of three DWORD color masks that specify the red, green, and blue components of each pixel. This is valid when used with 16- and 32-bpp bitmaps. Indicates that the image is a JPEG image. Indicates that the image is a PNG image. The MSG structure in Windows for TWAIN use. The TIFF file header. An individual TIFF Tag. Contains various platform requirements and conditions for TWAIN. Gets a value indicating whether the applicable TWAIN DSM library exists in the operating system. true if the TWAIN DSM; otherwise, false. Gets the expected TWAIN DSM dll path. The expected DSM path. Gets a value indicating whether the application is running in 64-bit. true if the application is 64-bit; otherwise, false. Gets a value indicating whether this library is supported on current OS. Check the other platform properties to determine the reason if this is false. true if this library is supported; otherwise, false. Gets a value indicating whether the lib is expecting to use new DSM. true if using the new DSM; otherwise, false. Gets or sets a value indicating whether to prefer using the new DSM on Windows over old twain_32 dsm if applicable. true to prefer new DSM; otherwise, false. Gets a value indicating whether the current runtime is mono. true if the current runtime is on mono; otherwise, false. Gets a value indicating whether the current OS is windows. true if the current OS is windows; otherwise, false. Gets a value indicating whether the current OS is linux. true if the current OS is linux; otherwise, false. Gets the for communicating with data sources. This should only be used when a is open. The memory manager. Gets or sets the log used by NTwain. The log. Interface for providing TWAIN triplet access. Gets the triplet operations defined for control data group. Gets the triplet operations defined for image data group. Gets the direct triplet operation entry for custom values. General interface for a TWAIN session. [Experimental] Gets or sets the optional synchronization context when not specifying a on . This allows events to be raised on the thread associated with the context. This is experimental is not recommended for use. The synchronization context. Gets or sets a value indicating whether calls to triplets will verify the current twain session state. true if state value is enforced; otherwise, false. Gets the currently open source. The current source. Gets or sets the default source for this application. While this can be get as long as the session is open, it can only be set at State 3. The default source. Gets the current state number as defined by the TWAIN spec. The state. Gets the named state value as defined by the TWAIN spec. The state. Quick flag to check if the DSM has been opened. Quick flag to check if a source has been opened. Quick flag to check if a source has been enabled. Quick flag to check if a source is in the transferring state. Whether to stop the transfer process when transfer error is encountered. May be required on some sources. true to stop on transfer error; otherwise, false. Gets the reason a source was disabled (dropped from state 5) if it's due to user action. Mostly only or . The dialog result. Try to show the built-in source selector dialog and return the selected source. This is not recommended and is only included for completeness. Opens the data source manager. This must be the first method used before using other TWAIN functions. Calls to this must be followed by when done with a TWAIN session. Opens the data source manager. This must be the first method used before using other TWAIN functions. Calls to this must be followed by when done with a TWAIN session. The message loop hook. Closes the data source manager. Forces the stepping down of an opened source when things gets out of control. Used when session state and source state become out of sync. State of the target. Gets list of sources available in the system. Quick shortcut to open a source. Name of the source. Quick shortcut to open a source. Id of the source. Gets the manager status. Only call this at state 2 or higher. Gets the manager status string. Only call this at state 3 or higher. Status from previous calls. Occurs when has changed. Occurs when has changed. Occurs when source has been disabled (back to state 4). Occurs when the source has generated an event. Occurs when a data transfer is ready. Occurs when data has been transferred. Occurs when an error has been encountered during transfer. An abstract class for TWAIN to hook into windows message loops. Asynchronously invokes the specified action on the message loop thread. The action. Synchronously invokes the specified action on the message loop thread. The action. Rethrows the specified excetion while keeping stack trace. The ex. A for use in winform applications. Initializes a new instance of the class. The handle to the app window. A valid window handle is required. A for use in WPF applications. Initializes a new instance of the class. The handle to the app window. A valid window handle is required. Contains various platform requirements and conditions for TWAIN. Gets the current platform info related to TWAIN. The current info. Gets a value indicating whether to prefer using the new DSM on Windows over old twain_32 dsm if applicable. true to prefer new DSM; otherwise, false. Gets a value indicating whether the lib is expecting to use new DSM. true if using the new DSM; otherwise, false. Gets a value indicating whether the current runtime is mono. true if the current runtime is on mono; otherwise, false. Gets a value indicating whether the current OS is windows. true if the current OS is windows; otherwise, false. Gets a value indicating whether the current OS is linux. true if the current OS is linux; otherwise, false. Gets a value indicating whether the application is running in 64-bit. true if the application is 64-bit; otherwise, false. Gets a value indicating whether the applicable TWAIN DSM library exists in the operating system. true if the TWAIN DSM; otherwise, false. Gets the expected TWAIN DSM dll path. The expected DSM path. Gets a value indicating whether this library is supported on current OS. Check the other platform properties to determine the reason if this is false. true if this library is supported; otherwise, false. Gets the for communicating with data sources. This should only be used when a is open. The memory manager. Gets or sets the log used by NTwain. The log. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Data group for application must contain either Image or Audio.. Looks up a localized string similar to Invalid value type for {0}.. Looks up a localized string similar to Capability {0} has invalid container type {1}.. Looks up a localized string similar to The string value has exceeded the maximum length allowed.. Looks up a localized string similar to Message loop has not started yet.. Looks up a localized string similar to Source name is required.. Contains the minimum TWAIN protocol version for various things. Gets the minimum TWAIN protocol version for a capability. The capability type. Indicates how the source should be enabled in a TWAIN session. Start acquiring without driver UI. Start acquiring with driver UI. Show driver UI for settings change but no acquisition. The logical state of a TWAIN session. Just a default value. The starting state, corresponds to state 1. The DSM library has been loaded, corresponds to state 2. The DSM has been opened, corresponds to state 3. A data source has been opened, corresponds to state 4. A data source has been enabled, corresponds to state 5. Data is ready for transfer from the source, corresponds to state 6. Data is being transferred, corresponds to state 7. Contains TWAIN codes and source status when an error is encountered during transfer. Initializes a new instance of the class. The error. Initializes a new instance of the class. The code. The status. Gets the return code from the transfer. The return code. Gets the source status. The source status. Gets the exception if the error is from some exception. The exception. Contains event data when a data transfer is ready to be processed. Initializes a new instance of the class. The source. The pending count. Gets the data source. The data source. Gets or sets a value indicating whether the current transfer should be canceled and continue next transfer if there are more data. true to cancel current transfer; otherwise, false. Gets or sets a value indicating whether all transfers should be canceled. true to cancel all transfers; otherwise, false. Gets a value indicating whether current transfer signifies an end of job in TWAIN world. true if transfer is end of job; otherwise, false. Gets the end of job flag value for this transfer (if job control is enabled). The end of job flag. Gets the known pending transfer count. This may not be appilicable for certain scanning modes. The pending count. Gets the tentative image information for the current transfer if applicable. This may differ from the final image depending on the transfer mode used (mostly when doing mem xfer). The image info. Gets the audio information for the current transfer if applicable. The audio information. Represents . This operation is used to initiate the transfer of audio from the Source to the application via the disk-file transfer mechanism. It causes the transfer to begin. Represents . Used to get the information of the current audio data ready to transfer. The info. Represents . Causes the transfer of an audio data from the Source to the application, via the Native transfer mechanism, to begin. The resulting data is stored in main memory in a single block. The data is stored in AIFF format on the Macintosh and as a WAV format under Microsoft Windows. The size of the audio snippet that can be transferred is limited to the size of the memory block that can be allocated by the Source. The handle. Represents . This triplet is sent to the DSM by the Application to register the application’s entry point with the DSM, so that the DSM can use callbacks to inform the application of events generated by the DS. The callback. This triplet is sent to the DSM by the Application to register the application’s entry point with the DSM, so that the DSM can use callbacks to inform the application of events generated by the DS. The callback. Represents . Returns the Source’s Current, Default and Available Values for a specified capability. The capability. Returns the Source’s Current Value for the specified capability. The capability. Returns the Source’s Default Value. This is the Source’s preferred default value. The capability. Returns help text suitable for use in a GUI; for instance: "Specify the amount of detail in an image. Higher values result in more detail." for ICapXRESOLUTION. The capability. Returns a label suitable for use in a GUI, for instance "Resolution:" for ICapXRESOLUTION. The capability. Return all of the labels for a capability of type or , for example "US Letter" for ICapSupportedSizes’ TWSS_USLETTER. The capability. Returns the Source’s support status of this capability. The capability. Change the Current Value of the specified capability back to its power-on value and return the new Current Value. The capability. This command resets all of the current values and constraints to their defaults for all of the negotiable capabilities supported by the driver. The capability. Changes the Current Value(s) and Available Values of the specified capability to those specified by the application. As of TWAIN 2.2 this only modifies the Current Value of the specified capability, constraints cannot be changed with this. Current Values are set when the container is a or . Available and Current Values are set when the container is a or . The capability. Changes the Current Value(s) and Available Value(s) of the specified capability to those specified by the application. Current Values are set when the container is a or . Available and Current Values are set when the container is a or . The capability. This is to support custom DAT value for custom capability defined by some manufacturers. Returns the Source’s Current, Default and Available Values for a specified capability. The custom DAT_* value from manufacturer. The capability. Returns the Source’s Current Value for the specified capability. The custom DAT_* value from manufacturer. The capability. Returns the Source’s Default Value. This is the Source’s preferred default value. The custom DAT_* value from manufacturer. The capability. Returns help text suitable for use in a GUI; for instance: "Specify the amount of detail in an image. Higher values result in more detail." for ICapXRESOLUTION. The custom DAT_* value from manufacturer. The capability. Returns a label suitable for use in a GUI, for instance "Resolution:" for ICapXRESOLUTION. The custom DAT_* value from manufacturer. The capability. Return all of the labels for a capability of type or , for example "US Letter" for ICapSupportedSizes’ TWSS_USLETTER. The custom DAT_* value from manufacturer. The capability. Returns the Source’s support status of this capability. The custom DAT_* value from manufacturer. The capability. Change the Current Value of the specified capability back to its power-on value and return the new Current Value. The custom DAT_* value from manufacturer. The capability. This command resets all of the current values and constraints to their defaults for all of the negotiable capabilities supported by the driver. The custom DAT_* value from manufacturer. The capability. Changes the Current Value(s) and Available Values of the specified capability to those specified by the application. As of TWAIN 2.2 this only modifies the Current Value of the specified capability, constraints cannot be changed with this. Current Values are set when the container is a or . Available and Current Values are set when the container is a or . The custom DAT_* value from manufacturer. The capability. Changes the Current Value(s) and Available Value(s) of the specified capability to those specified by the application. Current Values are set when the container is a or . Available and Current Values are set when the container is a or . The custom DAT_* value from manufacturer. The capability. Represents . Gets the operations defined for DAT_CAPABILITY. Gets the operations defined for a custom DAT_* value with capability data. Gets the operations defined for DAT_FILESYSTEM. Gets the operations defined for DAT_PASSTHRU. Gets the operations defined for DAT_SETUPFILEXFER. Gets the operations defined for DAT_SETUPMEMXFER. Gets the operations defined for DAT_XFERGROUP. Represents . This operation is used by the application to query the data source for its current settings, e.g. DPI, paper size, color format. The actual format of the data is data source dependent and not defined by TWAIN. The custom data. This operation is used by the application to set the current settings for a data source to a previous state as defined by the data contained in the customData data structure. The actual format of the data is data source dependent and not defined by TWAIN. The custom data. Represents . Represents . Gets the function entry points for twain 2.0 or higher. The entry point. This operation supports the distribution of events from the application to Sources so that the Source can maintain its user interface and return messages to the application. Once the application has enabled the Source, it must immediately begin sending to the Source all events that enter the application’s main event loop. This allows the Source to update its user interface in real-time and to return messages to the application which cause state transitions. Even if the application overrides the Source’s user interface, it must forward all events once the Source has been enabled. The Source will tell the application whether or not each event belongs to the Source. The event. Represents . This operation selects the destination directory within the Source (camera, storage, etc), where images captured using CapAutomaticCapture will be stored. This command only selects the destination directory (a file of type Directory). The directory must exist and be accessible to the Source. The creation of images within the directory is at the discretion of the Source, and may result in the creation of additional sub-directories. The file system. This operation selects the current device within the Source (camera, storage, etc). If the device is a , then this command enters a directory that can contain files. If the device is a , then this command enters a directory that can contain files. If the device is a , then this command enters a directory that can contain or files. The file system. This operation copies a file or directory. Absolute and relative pathnames are supported. A file may not be overwritten with this command. If an Application wishes to do this, it must first delete the unwanted file and then reissue the Copy command. The Application specifies the path and name of the entry to be copied in InputName. The Application specifies the new patch and name in OutputName. It is not permitted to copy files into the root directory. The file system. This operation creates a new directory within the current directory. Pathnames are not allowed, only the name of the new directory can be specified. The file system. This operation deletes a file or directory on the device. Pathnames are not allowed, only the name of the file or directory to be deleted can be specified. Recursive deletion can be specified by setting the Recursive to TRUE. The file system. This operation formats the specified storage. This operation destroys all images and subdirectories under the selected device. Use with caution. The file system. The operation frees the Context field in fileSystem. Every call to GetFirstFile must be matched by a call to GetClose to release the Context field. The file system. This operation gets the first filename in a directory, and returns information about that file (the same information that can be retrieved with GetInfo). The file system. This operation fills the information fields in fileSystem. InputName contains the absolute or relative path and filename of the requested file. OutputName returns the absolute path to the file. The file system. This operation gets the next filename in a directory, and returns information about that file (the same information that can be retrieved with GetInfo). The file system. This operation renames (and optionally moves) a file or directory. Absolute and relative path names are supported. A file may not be overwritten with this command. If an Application wishes to do this it must first delete the unwanted file, then issue the rename command. The Application specifies the path and name of the entry to be renamed in InputName. The Application specifies the new path and name in OutputName. Filenames in the root directory cannot be moved or renamed. The file system. Represents . When an application is finished with a Source, it must formally close the session between them using this operation. This is necessary in case the Source only supports connection with a single application (many desktop scanners will behave this way). A Source such as this cannot be accessed by other applications until its current session is terminated. Gets the identification information of the system default Source. The source. The application may obtain the first Source that are currently available on the system which match the application’s supported groups. The source. The application may obtain the next Source that are currently available on the system which match the application’s supported groups. The source. Loads the specified Source into main memory and causes its initialization. The source. It allows an application to set the default TWAIN driver, which is reported back by GetDefault. The source. This operation should be invoked when the user chooses Select Source... from the application’s File menu (or an equivalent user action). The Source selected becomes the system default Source. The source. Represents . When the application has closed all the Sources it had previously opened, and is finished with the Source Manager (the application plans to initiate no other TWAIN sessions), it must close the Source Manager. The handle. On Windows = points to the window handle (hWnd) that will act as the Source’s "parent". On Macintosh = should be a NULL value. Causes the Source Manager to initialize itself. This operation must be executed before any other operations will be accepted by the Source Manager. The handle. On Windows = points to the window handle (hWnd) that will act as the Source’s "parent". On Macintosh = should be a NULL value. Represents . PASSTHRU is intended for the use of Source writers writing diagnostic applications. It allows raw communication with the currently selected device in the Source. The source pass thru. Represents . This triplet is used to cancel or terminate a transfer. Issued in state 6, this triplet cancels the next pending transfer, discards the transfer data, and decrements the pending transfers count. In state 7, this triplet terminates the current transfer. If any data has not been transferred (this is only possible during a memory transfer) that data is discarded. The pending xfers. Returns the number of transfers the Source is ready to supply to the application, upon demand. If DAT_XFERGROUP is set to DG_Image, this is the number of images. If DAT_XFERGROUP is set to DG_AUDIO, this is the number of audio snippets for the current image. If there is no current image, this call must return Failure / SeqError. The pending xfers. Sets the number of pending transfers in the Source to zero. The pending xfers. If CapAutoScan is TRUE, this command will stop the operation of the scanner’s automatic feeder. No other action is taken. The pending xfers. Represents . Returns information about the file into which the Source has or will put the acquired image or audio data. The setup file xfer. Returns information for the default image or audio file. The setup file xfer. Resets the current file information to the image or audio default file information and returns that default information. The setup file xfer. Sets the file transfer information for the next file transfer. The application is responsible for verifying that the specified file name is valid and that the file either does not currently exist (in which case, the Source is to create the file), or that the existing file is available for opening and read/write operations. The application should also assure that the file format it is requesting can be provided by the Source The setup file xfer. Represents . Returns the Source’s preferred, minimum, and maximum allocation sizes for transfer memory buffers. The setup mem xfer. Represents . Returns the current Condition Code for the Source Manager. The status. Returns the current Condition Code for the specified Source. The status. Represents . Translate the contents of a TW_STATUS structure received from the manager into a localized UTF-8 encoded string. The status. Translate the contents of a TW_STATUS structure received from a Source into a localized UTF-8 encoded string. The status. Represents . This operation causes the Source’s user interface, if displayed during the EnableDS operation, to be lowered. The Source is returned to State 4, where capability negotiation can again occur. The application can invoke this operation either because it wants to shut down the current session, or in response to the Source "posting" a CloseDSReq event to it. Rarely, the application may need to close the Source because an error condition was detected. The user interface. Enables the DS. The user interface. This operation is used by applications that wish to display the source user interface to allow the user to manipulate the sources current settings for DPI, paper size, etc. but not acquire an image. The user interface. Represents . Returns the Data Group (the type of data) for the upcoming transfer. The Source is required to only supply one of the DGs specified in the SupportedGroups field of origin. The value. The transfer group determines the kind of data being passed from the Source to the Application. By default a TWAIN Source must default to DG_IMAGE. Currently the only other data group supported is DG_AUDIO, which is a feature supported by some digital cameras. The value. Provides direct access to the triplet call. Direct DSM_Entry call with full arguments for custom values. The group. The dat. The message. The data. Direct DSM_Entry call with full arguments for custom values. The group. The dat. The message. The data. Represents . This operation causes the Source to report the currently active parameters to be used in converting acquired color data into CIE XYZ. Color data. Represents . Gets the operations defined for DAT_CIECOLOR. Gets the operations defined for DAT_EXTIMAGEINFO. Gets the operations defined for DAT_FILTER. Gets the operations defined for DAT_GRAYRESPONSE. Gets the operations defined for DAT_ICCPROFILE. Gets the operations defined for DAT_IMAGELAYOUT. Gets the operations defined for DAT_JPEGCOMPRESSION. Gets the operations defined for DAT_PALETTE8. Gets the operations defined for DAT_RGBRESPONSE. Represents . This operation is used by the application to query the data source for extended image attributes. The application is responsible for creating and disiposing the info object. The information. Represents . Causes the Source to return the filter parameters that will be used during the next image acquisition. The filter. Causes the Source to return the power-on default values applied to the filter. The filter. Allows the Application to configure the filter parameters that will be used during the next image acquisition. The filter. Return the Source to using its power-on default values when it is applying the filter. The filter. Represents . The Reset operation causes the Source to use its "identity response curve." The identity curve causes no change in the values of the captured data when it is applied. The response. This operation causes the Source to transform any grayscale data according to the response curve specified. The response. Represents . This operation provides the application with the ICC profile associated with the image which is about to be transferred (state 6) or is being transferred (state 7). The profile. Represents . This operation is used to initiate the transfer of an image from the Source to the application via the disk-file transfer mechanism. It causes the transfer to begin. Represents . Represents . Gets both the size and placement of the image on the scanner. The coordinates on the scanner and the extents of the image are expressed in the unit of measure currently negotiated for ICAP_UNITS (default is inches). The layout. returns the default information on the layout of an image. This is the size and position of the image that will be acquired from the Source if the acquisition is started with the Source (and the device it is controlling) in its power-on state (for instance, most flatbed scanners will capture the entire bed). The layout. This operation sets the image layout information for the next transfer to its default settings. The layout. This operation sets the layout for the next image transfer. This allows the application to specify the physical area to be acquired during the next image transfer (for instance, a frame-based application would pass to the Source the size of the frame the user selected within the application—the helpful Source would present a selection region already sized to match the layout frame size). The layout. This operation is used to initiate the transfer of an image from the Source to the application via the Memory-File transfer mechanism. The xfer. This operation is used to initiate the transfer of an image from the Source to the application via the Buffered Memory transfer mechanism. The xfer. Causes the transfer of an image’s data from the Source to the application, via the Native transfer mechanism, to begin. The resulting data is stored in main memory in a single block. The data is stored in Picture (PICT) format on the Macintosh and as a device-independent bitmap (DIB) under Microsoft Windows. The size of the image that can be transferred is limited to the size of the memory block that can be allocated by the Source. The handle. Represents . Causes the Source to return the parameters that will be used during the compression of data using the JPEG algorithms. The compression. Causes the Source to return the power-on default values applied to JPEG-compressed data transfers. The compression. Return the Source to using its power-on default values for JPEG-compressed transfers. The compression. Allows the application to configure the compression parameters to be used on all future JPEGcompressed transfers during the current session. The application should have already established that the requested values are supported by the Source. The compression. Represents . This operation causes the Source to report its current palette information. The palette. This operation causes the Source to report its power-on default palette. The palette. This operation causes the Source to dispose of any current palette it has and to use its default palette for the next palette transfer. The palette. This operation requests that the Source adopt the specified palette for use with all subsequent palette transfers. The application should be careful to supply a palette that matches the bit depth of the Source. The Source is not required to adopt this palette. The application should be careful to check the return value from this operation. The palette. Represents . Causes the Source to use its "identity" response curves for future RGB transfers. The identity curve causes no change in the values of the captured data when it is applied. (Note that resetting the curves for RGB data does not reset any curves for other pixel types). The response. Causes the Source to transform any RGB data according to the response curves specified by the application. The response. Contains the full TWAIN entry signatures through pinvoke. These are called by all the defined triplets methods in this namespace. Base class for grouping triplet operations messages. Initializes a new instance of the class. The session. Gets the twain session. The session. Represents a general exception with TWAIN. Initializes a new instance of the class. Initializes a new instance of the class. The message that describes the error. Initializes a new instance of the class. The return code. The message. Initializes a new instance of the class. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Initializes a new instance of the class. The return code. The message. The inner exception. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference (Nothing in Visual Basic). Gets the return code from the TWAIN operation if applicable. The return code. Basic class for interfacing with TWAIN. You should only have one of this per application process. Initializes a new instance of the class. The supported groups. Initializes a new instance of the class. The app id that represents calling application. Gets or sets a value indicating whether calls to triplets will verify the current twain session state. true if state value is enforced; otherwise, false. [Experimental] Gets or sets the optional synchronization context when not specifying a on . This allows events to be raised on the thread associated with the context. This is experimental is not recommended for use. The synchronization context. Gets the currently open source. The current source. Gets or sets the default source for this application. While this can be get as long as the session is open, it can only be set at State 3. The default source. Try to show the built-in source selector dialog and return the selected source. This is not recommended and is only included for completeness. Gets the current state number as defined by the TWAIN spec. The state. Gets the named state value as defined by the TWAIN spec. The state. Quick flag to check if the DSM has been opened. Quick flag to check if a source has been opened. Quick flag to check if a source has been enabled. Quick flag to check if a source is in the transferring state. Whether to stop the transfer process when transfer error is encountered. May be required on some sources. true to stop on transfer error; otherwise, false. Gets the reason a source was disabled (dropped from state 5) if it's due to user action. Mostly only or . The dialog result. Opens the data source manager. This must be the first method used before using other TWAIN functions. Calls to this must be followed by when done with a TWAIN session. Opens the data source manager. This must be the first method used before using other TWAIN functions. Calls to this must be followed by when done with a TWAIN session. The message loop hook. messageLoopHook Closes the data source manager. Gets list of sources available in the system. Only call this at state 2 or higher. Quick shortcut to open a source. Name of the source. Quick shortcut to open a source. Id of the source. Gets the manager status. Only call this at state 2 or higher. Gets the manager status string. Only call this at state 3 or higher. Status from previous calls. Forces the stepping down of an opened source when things gets out of control. Used when session state and source state become out of sync. State of the target. Occurs when has changed. Occurs when has changed. Occurs when source has been disabled (back to state 4). Occurs when the source has generated an event. Occurs when a data transfer is ready. Occurs when data has been transferred. Occurs when an error has been encountered during transfer. Occurs when a property value changes. Raises the event. Name of the property. Gets the enumerator. Raises event and if applicable marshal it asynchronously to the thread without exceptions. The on event function. The handler. Raises event and if applicable marshal it synchronously to the thread without exceptions. The type of the event arguments. The on event function. The handler. The TEventArgs instance containing the event data. Called when changed. Called when changed. Called when source has been disabled (back to state 4). Called when the source has generated an event. The instance containing the event data. Called when a data transfer is ready. The instance containing the event data. Called when data has been transferred. The instance containing the event data. Called when an error has been encountered during transfer. The instance containing the event data. Gets the app id used for the session. The app id. Enables the source to start transferring. The mode. if set to true any driver UI will display as modal. The window handle if modal. Checks and handles the message if it's a TWAIN message. The window handle. The message. The w parameter. The l parameter. true if handled internally. Represents an exception from calling a TWAIN triplet operation in the wrong state. Initializes a new instance of the class. Initializes a new instance of the class. The actual state number. The minimum state allowed. The maximum state allowed. The data group used. The data argument type used. The twain message used. The message. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference (Nothing in Visual Basic). Gets the allowed minimum state. The minimum. Gets the allowed maximum state. The maximum. Gets the actual state number. The state. Gets the triplet data group. The data group. Gets the triplet data argument type. The type of the argument. Gets the triplet message. The twain message. Contains extension methods for wpf images. Loads a into WPF . The image created will be a copy so the stream can be disposed once this call returns. The image stream. Loads a into WPF . The image created will be a copy so the stream can be disposed once this call returns. The image stream. Max width of the decoded image. Pass 0 to use default. Max height of the decoded image. Pass 0 to use default.