Skip to content

Commit

Permalink
wiasane: Skip SCAN_FIRST if ADF is already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mback2k committed Jun 23, 2014
1 parent a437025 commit c4e6b09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wiasane/wiasane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ WIAMICRO_API HRESULT MicroEntry(LONG lCommand, _Inout_ PVAL pValue)
case CMD_LOAD_ADF: // online
Trace(TEXT("CMD_LOAD_ADF"));

if (pContext->pTask && pContext->pTask->bUsingADF) {
hr = S_OK;
break;
}

hr = OpenScannerDevice(pValue->pScanInfo, pContext);
if (SUCCEEDED(hr)) {
oOption = pContext->oDevice->GetOption(WIASANE_OPTION_SOURCE);
Expand Down Expand Up @@ -355,7 +360,6 @@ WIAMICRO_API HRESULT MicroEntry(LONG lCommand, _Inout_ PVAL pValue)

CloseScannerDevice(pValue->pScanInfo, pContext);
}

break;

case CMD_UNLOAD_ADF: // online
Expand Down

0 comments on commit c4e6b09

Please sign in to comment.