mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
May fix issue #10
This commit is contained in:
@@ -70,7 +70,15 @@ namespace NTwain.Internals
|
|||||||
if (xferGroup == DataGroups.None ||
|
if (xferGroup == DataGroups.None ||
|
||||||
(xferGroup & DataGroups.Image) == DataGroups.Image)
|
(xferGroup & DataGroups.Image) == DataGroups.Image)
|
||||||
{
|
{
|
||||||
var mech = session.CurrentSource.CapGetCurrent(CapabilityId.ICapXferMech).ConvertToEnum<XferMech>();
|
// default to memory
|
||||||
|
var mech = XferMech.Memory;
|
||||||
|
|
||||||
|
object mechRaw = session.CurrentSource.CapGetCurrent(CapabilityId.ICapXferMech);
|
||||||
|
if (mechRaw != null)
|
||||||
|
{
|
||||||
|
mech = mechRaw.ConvertToEnum<XferMech>();
|
||||||
|
}
|
||||||
|
|
||||||
switch (mech)
|
switch (mech)
|
||||||
{
|
{
|
||||||
case XferMech.Memory:
|
case XferMech.Memory:
|
||||||
@@ -108,7 +116,9 @@ namespace NTwain.Internals
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
} while (rc == ReturnCode.Success && pending.Count != 0);
|
// some poorly written scanner drivers return failure on EndXfer so only check for pending count now
|
||||||
|
//} while (rc == ReturnCode.Success && pending.Count != 0);
|
||||||
|
} while (pending.Count != 0);
|
||||||
|
|
||||||
session.ChangeState(5, true);
|
session.ChangeState(5, true);
|
||||||
session.DisableSource();
|
session.DisableSource();
|
||||||
|
|||||||
Reference in New Issue
Block a user