mirror of
https://github.com/soukoku/ntwain.git
synced 2026-01-01 07:48:07 +08:00
Fixed issue #12 for ImageMemFileXfer state exception.
This commit is contained in:
@@ -14,6 +14,6 @@ namespace NTwain
|
|||||||
// keep this same in majors releases
|
// keep this same in majors releases
|
||||||
public const string Release = "2.0.0.0";
|
public const string Release = "2.0.0.0";
|
||||||
// change this for each nuget release
|
// change this for each nuget release
|
||||||
public const string Build = "2.0.2";
|
public const string Build = "2.0.3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace NTwain.Triplets
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ReturnCode Get(TWImageMemXfer xfer)
|
public ReturnCode Get(TWImageMemXfer xfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageMemFileXfer, Message.Get);
|
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageMemFileXfer, Message.Get);
|
||||||
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, xfer);
|
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, xfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,8 @@ namespace Tester.Winform
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void CleanupTwain()
|
private void CleanupTwain()
|
||||||
|
{
|
||||||
|
if (_twain != null)
|
||||||
{
|
{
|
||||||
if (_twain.State == 4)
|
if (_twain.State == 4)
|
||||||
{
|
{
|
||||||
@@ -120,6 +122,7 @@ namespace Tester.Winform
|
|||||||
_twain.ForceStepDown(2);
|
_twain.ForceStepDown(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user