Forums › TWAIN Classic › DSM 2.0 does not work with DS 1.9 on Windows 7 › Reply To: DSM 2.0 does not work with DS 1.9 on Windows 7
We found that in Windows 7 implementation of major functions is moved from “kermel32.dll” to “kernelbase.dll”. Thus it’s “kernelbase.dll” which calls “LdrGetProcedureAddress” from ntdll.dll. For more details see http://www.nirsoft.net/articles/windows_7_kernel_architecture_changes.html
So on Windows 7 DSM should hook “kernelbase.dll” instead of “kermel32.dll”.
In our tests following fix of hook.cpp [CTwHook::Hook(), line #360] resolved the issue:
//hmodule = GetModuleHandle(“kernel32.dll”);
hmodule = GetModuleHandle(“kernelbase.dll”); //Windows 7
Of course, regular DSM needs a little bit more complex code to distinguish Windows 7 case, etc..
Hope that above information will help to fix and release next verison of DSM soon.