解决win7调用twain崩溃的问题
This commit is contained in:
parent
1e329882af
commit
43c4a0b731
|
@ -79,6 +79,19 @@ int Manager::showSettingUi(SANE_Handle device, HWND parent, LPSANEAPI api, const
|
|||
m_device = device;
|
||||
scanner_cfg_ = cfg;
|
||||
m_settingUiParent = (HGWindow)parent;
|
||||
|
||||
#ifdef HG_CMP_MSC
|
||||
OSVERSIONINFOW info;
|
||||
info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
|
||||
if (GetVersionExW(&info))
|
||||
{
|
||||
if (info.dwMajorVersion == 6 && info.dwMinorVersion == 1)
|
||||
{
|
||||
m_settingUiParent = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
memcpy(&m_api, api, sizeof(m_api));
|
||||
m_devName = devName;
|
||||
m_with_scan = with_scan;
|
||||
|
|
Loading…
Reference in New Issue