diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-05 13:58:46 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-05 16:20:36 +0100 |
commit | eb31b387ac4b679e4da851b8b17e9b4e35722c04 (patch) | |
tree | f37c18c6df0ef96013e4e01f355d2af6357db047 /embedserv | |
parent | 207d202ed2f1f44e5b62157b5a92ee5e8cc2c3e5 (diff) |
Use GetModuleHandleExW instead of GetModuleHandleW
... following commit d75bf2c7703d6a741f04e4a3fc5a6180428f53b2
Date: Wed Jan 05 13:20:09 2022 +0300
tdf#146554: use GetModuleHandleExW instead of GetModuleHandleW
Change-Id: I37c989de37c28123ca692145a429b6ba03202f99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128002
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/inprocserv/dllentry.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index dc7829c54ba1..6c06fae47f59 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.cxx @@ -203,7 +203,10 @@ STDAPI DllCanUnloadNow() STDAPI DllRegisterServer() { - HMODULE aCurModule = GetModuleHandleW( L"inprocserv.dll" ); + HMODULE aCurModule{}; + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS + | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, + reinterpret_cast<LPCWSTR>(&DllRegisterServer), &aCurModule); if( aCurModule ) { wchar_t aLibPath[1024]; |