mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 10:19:07 +00:00
mscoree/tests: Trace the error when a Windows API fails.
This commit is contained in:
parent
632c8cfd2b
commit
c898503e94
|
@ -102,7 +102,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
|
||||||
ok(ret, "Compilation failed\n");
|
ok(ret, "Compilation failed\n");
|
||||||
|
|
||||||
ret = MoveFileA(path_temp, dest_path);
|
ret = MoveFileA(path_temp, dest_path);
|
||||||
ok(ret, "Moving temporary file failed\n");
|
ok(ret, "Could not move %s to %s: %lu\n", path_temp, dest_path, GetLastError());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ static BOOL runtime_is_usable(void)
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof(si);
|
||||||
|
|
||||||
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||||
ok(ret, "CreateProcessA failed\n");
|
ok(ret, "Could not create process: %lu\n", GetLastError());
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ static BOOL runtime_is_usable(void)
|
||||||
ret = GetExitCodeProcess(pi.hProcess, &exitcode);
|
ret = GetExitCodeProcess(pi.hProcess, &exitcode);
|
||||||
CloseHandle(pi.hProcess);
|
CloseHandle(pi.hProcess);
|
||||||
|
|
||||||
ok(ret, "GetExitCodeProcess failed\n");
|
ok(ret, "GetExitCodeProcess failed: %lu\n", GetLastError());
|
||||||
|
|
||||||
if (!ret || exitcode != 0)
|
if (!ret || exitcode != 0)
|
||||||
{
|
{
|
||||||
|
@ -424,7 +424,7 @@ static void create_xml_file(LPCWSTR filename)
|
||||||
DWORD dwNumberOfBytesWritten;
|
DWORD dwNumberOfBytesWritten;
|
||||||
HANDLE hfile = CreateFileW(filename, GENERIC_WRITE, 0, NULL,
|
HANDLE hfile = CreateFileW(filename, GENERIC_WRITE, 0, NULL,
|
||||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
ok(hfile != INVALID_HANDLE_VALUE, "File creation failed\n");
|
ok(hfile != INVALID_HANDLE_VALUE, "Could not open %s for writing: %lu\n", wine_dbgstr_w(filename), GetLastError());
|
||||||
WriteFile(hfile, xmldata, sizeof(xmldata) - 1, &dwNumberOfBytesWritten, NULL);
|
WriteFile(hfile, xmldata, sizeof(xmldata) - 1, &dwNumberOfBytesWritten, NULL);
|
||||||
CloseHandle(hfile);
|
CloseHandle(hfile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue