https://github.com/ebyte23/twainforcsharp
git svn clone of twainforcsharp from sourceforge
https://github.com/ebyte23/twainforcsharp
Last synced: about 1 year ago
JSON representation
git svn clone of twainforcsharp from sourceforge
- Host: GitHub
- URL: https://github.com/ebyte23/twainforcsharp
- Owner: eByte23
- Created: 2016-03-24T11:25:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-05T06:43:32.000Z (about 10 years ago)
- Last Synced: 2025-02-13T13:42:45.410Z (over 1 year ago)
- Language: C#
- Size: 397 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
#TwainForC#
###About TwainForC#
This is the base TWAIN class. It's versioned so that developers can
safely make a reference to it, if they don't want to actually include
the TWAIN modules in their project.
###Our Goals
- Make the interface better than raw TWAIN (like with C/C++), but don't
go as far as making a toolkit. Expose as much of TWAIN as possible.
Part of this involves making a CSV interface to abstract away some of
the pain of the C/C++ structures, especially TW_CAPABILITY.
- Use type checking wherever possible. This is why the TWAIN contants
tend to be enumerations and why there are multiple entry points into
the DSM_Entry function.
- Avoid unsafe code. We use marshalling, and we're forced to use some
unmanaged memory, but that's it.
- Run thread safe. Force as many TWAIN calls into a single thread as
possible. The main exceptions are MSG_PROCESSEVENT and any of the
calls that unwind the state machine (ex: MSG_DISABLEDS). Otherwise
all of the calls are serialized through a single thread.
- Avoid use of System.Windows content, so that the TWAIN assembly can be
used as broadly as possible (specifically with Mono).
- Support all platforms. The code currently works on 32-bit and 64-bit
Windows. It's been tested on 32-bit Linux and Mac OS X (using Mono).
It should work as 64-bit on those platforms. We're also supporting
both TWAIN_32.DLL and TWAINDSM.DLL on Windows, and we'll support both
TWAIN.framework and a TWAINDSM.framework (whenever it gets created).
- Virtualiaze all public functions so that developers can extended the
class with a minimum of fuss.