From f2f27b6b9589a31cf92600db1b3cc8a1610dbdca Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 6 Sep 2021 10:39:49 +0200 Subject: [PATCH] dbghelp: SymLoadModule* should return the base address in case of success, and 0 otherwise. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/dbghelp/module.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 3bc2a9e143a..f2c0eca5df6 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -786,19 +786,19 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam if (Data) FIXME("Unsupported load data parameter %p for %s\n", Data, debugstr_w(wImageName)); - if (!validate_addr64(BaseOfDll)) return FALSE; + if (!validate_addr64(BaseOfDll)) return 0; - if (!(pcs = process_find_by_handle(hProcess))) return FALSE; + if (!(pcs = process_find_by_handle(hProcess))) return 0; if (Flags & SLMFLAG_VIRTUAL) { - if (!wImageName) return FALSE; + if (!wImageName) return 0; module = module_new(pcs, wImageName, DMT_PE, TRUE, BaseOfDll, SizeOfDll, 0, 0); - if (!module) return FALSE; + if (!module) return 0; if (wModuleName) module_set_module(module, wModuleName); module->module.SymType = SymVirtual; - return TRUE; + return module->module.BaseOfImage; } if (Flags & ~(SLMFLAG_VIRTUAL)) FIXME("Unsupported Flags %08x for %s\n", Flags, debugstr_w(wImageName));