dbghelp: SymLoadModule* should return the base address in case of success, and 0 otherwise.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-09-06 10:39:49 +02:00 committed by Alexandre Julliard
parent 3f95a56e59
commit f2f27b6b95
1 changed files with 5 additions and 5 deletions

View File

@ -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));