mirror of
https://github.com/soukoku/ntwain.git
synced 2025-04-05 17:22:26 +08:00
Fixed wrong location for old twain_32.dll.
This commit is contained in:
parent
f29443a8a4
commit
313b3c129b
@ -18,7 +18,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\NTwain\bin\Debug\Net35\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@ -26,7 +26,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\NTwain\bin\Release\Net35\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;NET35</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\NTwain\bin\Release\Net35\NTwain.XML</DocumentationFile>
|
||||
|
@ -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
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user