Module: wine Branch: master Commit: 2eb10c2e22b6930b00ccb8e1aa4203e6eb3b32be URL: http://source.winehq.org/git/wine.git/?a=commit;h=2eb10c2e22b6930b00ccb8e1aa...
Author: Rob Shearman rob@codeweavers.com Date: Thu Nov 1 13:26:33 2007 +0000
ole32: Improve the error reporting in the marshal test when CreateProcess fails.
---
dlls/ole32/tests/marshal.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index ba7793a..d15b879 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2469,11 +2469,13 @@ static HANDLE create_target_process(const char *arg) STARTUPINFO si = { 0 }; si.cb = sizeof(si);
+ pi.hThread = NULL; + pi.hProcess = NULL; winetest_get_mainargs( &argv ); sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); ok(CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, - &si, &pi) != 0, "error: %u\n", GetLastError()); - ok(CloseHandle(pi.hThread) != 0, "error %u\n", GetLastError()); + &si, &pi) != 0, "CreateProcess failed with error: %u\n", GetLastError()); + if (pi.hThread) CloseHandle(pi.hThread); return pi.hProcess; }