mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-18 17:47:57 +08:00
Fixed wrong location for old twain_32.dll.
This commit is contained in:
@@ -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>
|
||||||
|
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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)
|
||||||
{
|
{
|
||||||
|
@@ -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
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user