Module: wine Branch: master Commit: 1d281c620d3062c2f30cdf533fe4ac06905a07b8 URL: https://gitlab.winehq.org/wine/wine/-/commit/1d281c620d3062c2f30cdf533fe4ac0...
Author: Eric Pouech epouech@codeweavers.com Date: Mon Jun 26 18:34:46 2023 +0200
dbghelp/tests: Don't call SymSetExtendedOption() directly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55128 Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/dbghelp/tests/dbghelp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 575b9f76d20..c456a99d370 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -318,10 +318,17 @@ static unsigned get_module_count(HANDLE proc)
static unsigned get_native_module_count(HANDLE proc) { + static BOOL (*WINAPI pSymSetExtendedOption)(IMAGEHLP_EXTENDED_OPTIONS option, BOOL value); unsigned count = 0; BOOL old, ret;
- old = SymSetExtendedOption(SYMOPT_EX_WINE_NATIVE_MODULES, TRUE); + if (!pSymSetExtendedOption) + { + pSymSetExtendedOption = (void*)GetProcAddress(GetModuleHandleA("dbghelp.dll"), "SymSetExtendedOption"); + ok(pSymSetExtendedOption != NULL, "SymSetExtendedOption should be present on Wine\n"); + } + + old = pSymSetExtendedOption(SYMOPT_EX_WINE_NATIVE_MODULES, TRUE); ret = SymEnumerateModules64(proc, count_native_module_cb, &count); ok(ret, "SymEnumerateModules64 failed: %lu\n", GetLastError()); SymSetExtendedOption(SYMOPT_EX_WINE_NATIVE_MODULES, old);