diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 9c3584b..33c10a1 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -3664,14 +3664,14 @@ std::wstring huagao_ds::get_config_value(const wchar_t* sec, const wchar_t* key) return v; } -DWORD huagao_ds::get_config_number(const wchar_t* sec, const wchar_t* key) +DWORD huagao_ds::get_config_number(const wchar_t* sec, const wchar_t* key, DWORD def, DWORD empty) { std::wstring cfg_f(get_config_file()); if (cfg_f.empty()) - return 0; + return empty; else - return GetPrivateProfileIntW(sec, key, 0, get_config_file().c_str()); + return GetPrivateProfileIntW(sec, key, def, get_config_file().c_str()); } int huagao_ds::handle_scanner_event(int ev, bool from_event_proc) {