mirror of
https://github.com/soukoku/ntwain.git
synced 2025-06-28 15:28:06 +08:00
commit
c6ec249e05
16
README.md
16
README.md
@ -1,18 +1,18 @@
|
|||||||
# TWAIN dotnet library
|
# TWAIN dotnet library
|
||||||
|
|
||||||
NOTE: THIS IS V4 DEV AND DOESN'T WORK YET.
|
NOTE: This is V4 DEV and doesn't fully work yet.
|
||||||
USE V3 BRANCH FOR WORKING VERSION.
|
Use V3 branch for working version.
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
This is a library created to make working with
|
This is a dotnet library created to make working with
|
||||||
[TWAIN](http://twain.org/) easier in dotnet.
|
[TWAIN](http://twain.org/) easier.
|
||||||
V4 of this lib has these goals:
|
V4 of this lib has these goals:
|
||||||
|
|
||||||
* Targets latest TWAIN version (2.4 as of this writing)
|
* Targets latest TWAIN version (2.4 as of this writing).
|
||||||
* Supports all the TWAIN functions in the spec (directly or through dotnet wrapper)
|
* Supports all the TWAIN functions in the spec (directly or through dotnet wrapper).
|
||||||
* Works with both 32 or 64 bit data sources, from 32 or 64 bit apps.
|
* Works with both 32 or 64 bit data sources, under 32 or 64 bit apps.
|
||||||
* Works on non-Windows platforms using dotnet core
|
* Supports dotnet 4+ and netcore 2+ apps.
|
||||||
|
|
||||||
## Using the lib
|
## Using the lib
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@ -18,9 +19,13 @@ namespace NTwain.Internals
|
|||||||
{
|
{
|
||||||
if (ex != null)
|
if (ex != null)
|
||||||
{
|
{
|
||||||
|
#if NET40
|
||||||
typeof(Exception).GetMethod("PrepForRemoting",
|
typeof(Exception).GetMethod("PrepForRemoting",
|
||||||
BindingFlags.NonPublic | BindingFlags.Instance)?.Invoke(ex, new object[0]);
|
BindingFlags.NonPublic | BindingFlags.Instance)?.Invoke(ex, new object[0]);
|
||||||
throw ex;
|
throw ex;
|
||||||
|
#else
|
||||||
|
ExceptionDispatchInfo.Capture(ex).Throw();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user