Twain sample app ,data.m_cont is null,but DotNet(和气) data.m_cont not is null .

This commit is contained in:
13038267101 2023-03-28 15:52:43 +08:00
parent f41bb8730e
commit 2bb81702ac
1 changed files with 11 additions and 1 deletions

View File

@ -1543,7 +1543,17 @@ void huagao_ds::init_support_caps(void)
load_sane_util::log_info(m_bIndicator ? L"Set show indicator: true\r\n" : L"Set show indicator: false\r\n", 0);
return success();
}
return CapSupGetAllReset<bool, Bool, CapType::Indicators>(msg, data, { FALSE,TRUE }, m_bIndicator, TRUE, m_bIndicator ? 1 : 0, 1);
load_sane_util::log_info(m_bIndicator ? L"Set show indicator: true\r\n" : L"Set show indicator: false\r\n", 0);
// data.type
if (!data.operator bool()) //具有风险性 (和气) Twain sample app ,data.m_cont is null,but DotNet和气 data.m_cont not is null .
{
data = Capability::createEnumeration<CapType::Indicators>({ FALSE,TRUE }, m_bIndicator ? 1 : 0, 1);
}
else
data = Capability::createOneValue<CapType::Indicators>(m_bIndicator);
return success();
//return CapSupGetAllReset<bool, Bool, CapType::Indicators>(msg, data, { TRUE,FALSE }, m_bIndicator, TRUE, (BOOL)(m_bIndicator ? 1 : 0), 1);
};
}