Eric Pouech : dbghelp: Return correct error code when reloading a module in SymLoadModule*.
Alexandre Julliard
julliard at winehq.org
Mon Sep 6 16:15:05 CDT 2021
Module: wine
Branch: master
Commit: 2296b4952a3f665e12a189f64457ac2d3074590c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2296b4952a3f665e12a189f64457ac2d3074590c
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Mon Sep 6 10:40:02 2021 +0200
dbghelp: Return correct error code when reloading a module in SymLoadModule*.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dbghelp/module.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 916aaf5ce53..e0d1dce0c86 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -815,6 +815,20 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
if (wImageName)
{
module = module_is_already_loaded(pcs, wImageName);
+ if (module)
+ {
+ if (module->module.BaseOfImage == BaseOfDll)
+ SetLastError(ERROR_SUCCESS);
+ else
+ {
+ /* native allows to load the same module at different addresses
+ * we don't support this for now
+ */
+ SetLastError(ERROR_INVALID_PARAMETER);
+ FIXME("Reloading %s at different base address isn't supported\n", debugstr_w(module->modulename));
+ }
+ return 0;
+ }
if (!module && module_is_container_loaded(pcs, wImageName, BaseOfDll))
{
/* force the loading of DLL as builtin */
More information about the wine-cvs
mailing list