mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-18 09:44:24 +08:00
Fixed wrong location for old twain_32.dll.
This commit is contained in:
@@ -8,36 +8,36 @@ namespace NTwain.Internals
|
||||
|
||||
class WrappedManualResetEvent : IDisposable
|
||||
{
|
||||
#if NET4
|
||||
ManualResetEventSlim _slim;
|
||||
#else
|
||||
#if NET35
|
||||
ManualResetEvent _mre;
|
||||
#else
|
||||
ManualResetEventSlim _slim;
|
||||
#endif
|
||||
|
||||
public WrappedManualResetEvent()
|
||||
{
|
||||
#if NET4
|
||||
_slim = new ManualResetEventSlim();
|
||||
#else
|
||||
#if NET35
|
||||
_mre = new ManualResetEvent(false);
|
||||
#else
|
||||
_slim = new ManualResetEventSlim();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Wait()
|
||||
{
|
||||
#if NET4
|
||||
_slim.Wait();
|
||||
#else
|
||||
#if NET35
|
||||
_mre.WaitOne();
|
||||
#else
|
||||
_slim.Wait();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Set()
|
||||
{
|
||||
#if NET4
|
||||
_slim.Set();
|
||||
#else
|
||||
#if NET35
|
||||
_mre.Set();
|
||||
#else
|
||||
_slim.Set();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace NTwain.Internals
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
#if NET4
|
||||
_slim.Dispose();
|
||||
#else
|
||||
#if NET35
|
||||
_mre.Close();
|
||||
#else
|
||||
_slim.Dispose();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,11 @@ namespace NTwain
|
||||
if (IsWindows)
|
||||
{
|
||||
var newDsmPath = Path.Combine(Environment.SystemDirectory, Dsm.WIN_NEW_DSM_NAME);
|
||||
var oldDsmPath = Path.Combine(Environment.SystemDirectory, Dsm.WIN_OLD_DSM_NAME);
|
||||
#if NET35
|
||||
var oldDsmPath = Path.Combine(Environment.GetEnvironmentVariable("windir"), Dsm.WIN_OLD_DSM_NAME);
|
||||
#else
|
||||
var oldDsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), Dsm.WIN_OLD_DSM_NAME);
|
||||
#endif
|
||||
|
||||
if (IsApp64Bit)
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ namespace NTwain
|
||||
/// <summary>
|
||||
/// The build release version number.
|
||||
/// </summary>
|
||||
public const string Build = "3.2.1"; // change this for each nuget release
|
||||
public const string Build = "3.2.3"; // change this for each nuget release
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user