Module: wine Branch: master Commit: e1f41c0a174f874f8b19dbe813480a343d67f369 URL: https://gitlab.winehq.org/wine/wine/-/commit/e1f41c0a174f874f8b19dbe813480a3...
Author: Eric Pouech eric.pouech@gmail.com Date: Wed Mar 8 11:43:22 2023 +0100
dbghelp/tests: Preserve last error in process_get_kind().
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/dbghelp/tests/dbghelp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 07dfe6fbf6e..f6cea0125f4 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -564,7 +564,7 @@ enum process_kind PCSKIND_WOW64, /* Wine "new" wow64 configuration, and Windows with wow64 support */ };
-static enum process_kind get_process_kind(HANDLE process) +static enum process_kind get_process_kind_internal(HANDLE process) { USHORT m1, m2;
@@ -601,6 +601,14 @@ static enum process_kind get_process_kind(HANDLE process) return PCSKIND_ERROR; }
+static enum process_kind get_process_kind(HANDLE process) +{ + DWORD gle = GetLastError(); + enum process_kind pcskind = get_process_kind_internal(process); + SetLastError(gle); + return pcskind; +} + struct loaded_module_aggregation { HANDLE proc;