修改加载DLL方式,以避免卸载不成功的问题
This commit is contained in:
parent
14bdeda089
commit
c13456a44d
|
@ -361,9 +361,13 @@ namespace callback
|
||||||
{
|
{
|
||||||
std::string root(hg_sane_middleware::sane_path());
|
std::string root(hg_sane_middleware::sane_path());
|
||||||
|
|
||||||
|
if (hui)
|
||||||
|
FreeLibrary(hui);
|
||||||
|
|
||||||
root += OEM_SHORT_NAME_E;
|
root += OEM_SHORT_NAME_E;
|
||||||
root += "TwainUI.dll";
|
root += "TwainUI.dll";
|
||||||
hui = LoadLibraryExA(root.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
|
// hui = LoadLibraryExA(root.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||||
|
hui = LoadLibraryA(root.c_str());
|
||||||
if (!hui)
|
if (!hui)
|
||||||
{
|
{
|
||||||
std::wstring info(L"Load '" + local_trans::a2u(root.c_str(), CP_UTF8));
|
std::wstring info(L"Load '" + local_trans::a2u(root.c_str(), CP_UTF8));
|
||||||
|
|
Loading…
Reference in New Issue