twain调整只能扫描一次的问题

This commit is contained in:
yangjiaxuan 2023-05-11 21:07:00 +08:00
parent a295285040
commit 579a7c9d6c
2 changed files with 8 additions and 2 deletions

View File

@ -3011,6 +3011,11 @@ COM_API_IMPLEMENT(scanner, bool, ui_show_progress(HWND parent, bool bIndicator))
break;
case UI_RESULT_CLOSE_CANCEL:
uev = SANE_EVENT_UI_CLOSE_CANCEL;
if (!is_show_ui_)
{
on_ui_event(uev, (void*)uev);
}
else
stop();
break;
case UI_RESULT_START_SCAN:

View File

@ -995,7 +995,7 @@ Result huagao_ds::eventProcess(const Identity&, Event& event)
if(ev)
handle_scanner_event(ev);
}
// event.setMessage(Msg::Null);
event.setMessage(Msg::Null);
return { ReturnCode::NotDsEvent, ConditionCode::Success };
@ -1102,7 +1102,8 @@ Result huagao_ds::pendingXfersGet(const Identity&, PendingXfers& data)
if (!scanner_.get())
return seqError();
data.setCount(get_scanned_image_count(-1));
int cnt = get_scanned_image_count(-1);
data.setCount(cnt);
return success();
}
Result huagao_ds::pendingXfersEnd(const Identity& id, PendingXfers& data)