[PATCH 3/7] dbghelp: return correct error code when reloading a module in SymLoadModule*
Eric Pouech
eric.pouech at gmail.com
Mon Sep 6 03:40:02 CDT 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
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-devel
mailing list