解决websdk设置参数时返回值失败的问题

This commit is contained in:
luoliangyi 2024-07-09 16:38:41 +08:00
parent a88eaf3b6b
commit 90962ac5b2
1 changed files with 26 additions and 23 deletions

View File

@ -3625,6 +3625,8 @@ namespace ver_2
if (0 == strcmp(devParams[i].name.c_str(), name) || 0 == strcmp(devParams[i].title.c_str(), title))
{
if (!IS_CAP_READONLY(desp->cap))
{
if (SANE_TYPE_STRING == desp->type)
{
if (SANE_STATUS_GOOD != sane_control_option(hdev, j, SANE_ACTION_SET_VALUE, (void*)devParams[i].stringValue.c_str(), NULL))
@ -3647,6 +3649,7 @@ namespace ver_2
SANE_Bool value = (SANE_Bool)devParams[i].boolValue;
if (SANE_STATUS_GOOD != sane_control_option(hdev, j, SANE_ACTION_SET_VALUE, &value, NULL))
ret = -1;
}
}
find = true;