Fixed wrong location for old twain_32.dll.

This commit is contained in:
soukoku
2014-11-29 22:16:19 -05:00
parent f29443a8a4
commit 313b3c129b
4 changed files with 23 additions and 19 deletions

View File

@@ -18,7 +18,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\NTwain\bin\Debug\Net35\</OutputPath> <OutputPath>..\NTwain\bin\Debug\Net35\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
@@ -26,7 +26,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>..\NTwain\bin\Release\Net35\</OutputPath> <OutputPath>..\NTwain\bin\Release\Net35\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>..\NTwain\bin\Release\Net35\NTwain.XML</DocumentationFile> <DocumentationFile>..\NTwain\bin\Release\Net35\NTwain.XML</DocumentationFile>

View File

@@ -8,36 +8,36 @@ namespace NTwain.Internals
class WrappedManualResetEvent : IDisposable class WrappedManualResetEvent : IDisposable
{ {
#if NET4 #if NET35
ManualResetEventSlim _slim;
#else
ManualResetEvent _mre; ManualResetEvent _mre;
#else
ManualResetEventSlim _slim;
#endif #endif
public WrappedManualResetEvent() public WrappedManualResetEvent()
{ {
#if NET4 #if NET35
_slim = new ManualResetEventSlim();
#else
_mre = new ManualResetEvent(false); _mre = new ManualResetEvent(false);
#else
_slim = new ManualResetEventSlim();
#endif #endif
} }
public void Wait() public void Wait()
{ {
#if NET4 #if NET35
_slim.Wait();
#else
_mre.WaitOne(); _mre.WaitOne();
#else
_slim.Wait();
#endif #endif
} }
public void Set() public void Set()
{ {
#if NET4 #if NET35
_slim.Set();
#else
_mre.Set(); _mre.Set();
#else
_slim.Set();
#endif #endif
} }
@@ -45,10 +45,10 @@ namespace NTwain.Internals
public void Dispose() public void Dispose()
{ {
#if NET4 #if NET35
_slim.Dispose();
#else
_mre.Close(); _mre.Close();
#else
_slim.Dispose();
#endif #endif
} }

View File

@@ -34,7 +34,11 @@ namespace NTwain
if (IsWindows) if (IsWindows)
{ {
var newDsmPath = Path.Combine(Environment.SystemDirectory, Dsm.WIN_NEW_DSM_NAME); 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) if (IsApp64Bit)
{ {

View File

@@ -23,7 +23,7 @@ namespace NTwain
/// <summary> /// <summary>
/// The build release version number. /// The build release version number.
/// </summary> /// </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
} }