29#define WIN32_NO_STATUS
43#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
45#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff)
47#define expect_eq_d(expected, actual) \
49 int value = (actual); \
50 ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \
53#define expect_eq_s(expected, actual) \
55 LPCSTR value = (actual); \
56 ok(lstrcmpA((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \
59#define expect_eq_ws_i(expected, actual) \
61 LPCWSTR value = (actual); \
62 ok(lstrcmpiW((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \
63 wine_dbgstr_w(expected), wine_dbgstr_w(value)); \
112#define MAX_LISTED_ENV_VAR 128
167 if (
c >=
'0' &&
c <=
'9')
return c -
'0';
168 if (
c >=
'a' &&
c <=
'f')
return c -
'a' + 10;
312 char *ptrA, *ptrA_save;
313 WCHAR *ptrW, *ptrW_save;
326 "[StartupInfoA]\ncb=%08u\nlpDesktop=%s\nlpTitle=%s\n"
327 "dwX=%u\ndwY=%u\ndwXSize=%u\ndwYSize=%u\n"
328 "dwXCountChars=%u\ndwYCountChars=%u\ndwFillAttribute=%u\n"
329 "dwFlags=%u\nwShowWindow=%u\n"
330 "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n",
338 childPrintf(
hFile,
"[TEB]\nhStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n",
345 memset(&siW, 0,
sizeof(siW));
348 "[StartupInfoW]\ncb=%08u\nlpDesktop=%s\nlpTitle=%s\n"
349 "dwX=%u\ndwY=%u\ndwXSize=%u\ndwYSize=%u\n"
350 "dwXCountChars=%u\ndwYCountChars=%u\ndwFillAttribute=%u\n"
351 "dwFlags=%u\nwShowWindow=%u\n"
352 "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n",
360 childPrintf(
hFile,
"[Arguments]\nargcA=%d\n",
myARGC);
371 memset(&pe, 0,
sizeof(pe));
376 if (!pProcess32Next(
snapshot, &pe))
break;
381 "[Toolhelp]\ncntUsage=%u\nth32DefaultHeapID=%lu\n"
382 "th32ModuleID=%u\ncntThreads=%u\nth32ParentProcessID=%u\n"
383 "pcPriClassBase=%u\ndwFlags=%u\nszExeFile=%s\n\n",
394 childPrintf(
hFile,
"[EnvironmentA]\n");
403 childPrintf(
hFile,
"len=%d\n\n",
i);
413 childPrintf(
hFile,
"[EnvironmentW]\n");
423 childPrintf(
hFile,
"len=%d\n\n",
i);
427 childPrintf(
hFile,
"[Misc]\n");
432 childPrintf(
hFile,
"\n");
439 DWORD modeIn, modeOut;
441 childPrintf(
hFile,
"[Console]\n");
444 childPrintf(
hFile,
"SizeX=%d\nSizeY=%d\nCursorX=%d\nCursorY=%d\nAttributes=%d\n",
446 childPrintf(
hFile,
"winLeft=%d\nwinTop=%d\nwinRight=%d\nwinBottom=%d\n",
448 childPrintf(
hFile,
"maxWinWidth=%d\nmaxWinHeight=%d\n",
451 childPrintf(
hFile,
"InputCP=%d\nOutputCP=%d\n",
454 childPrintf(
hFile,
"InputMode=%u\n", modeIn);
456 childPrintf(
hFile,
"OutputMode=%u\n", modeOut);
463 win_skip(
"Setting the codepage is not implemented\n");
467 ok(
ret,
"Setting CP\n");
498 childPrintf(
hFile,
"[ExitCode]\nvalue=%d\n\n", 123);
512 if (
buf[0] ==
'\0' || (
buf[0] ==
'-' &&
buf[1] ==
'\0'))
return NULL;
524 if (
buf[0] ==
'\0' || (
buf[0] ==
'-' &&
buf[1] ==
'\0'))
return NULL;
538 while (c1 == c2 && c1)
540 c1 = *p1++; c2 = *p2++;
551 if (!
s1 && !
s2)
return 0;
558 const char *
expect,
int sensitive )
566 const char *
expect,
int sensitive )
597#define okChildString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 1 )
598#define okChildIString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 0 )
599#define okChildStringWA(sect, key, expect) ok_child_stringWA(__LINE__, (sect), (key), (expect), 1 )
600#define okChildInt(sect, key, expect) ok_child_int(__LINE__, (sect), (key), (expect))
608 static CHAR title[] =
"I'm the title string",
609 desktop[] =
"winsta0\\default",
620 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
650 startup.dwXCountChars = 0x12121212;
651 startup.dwYCountChars = 0x23232323;
656 startup.dwFillAttribute = 0xA55A;
660 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
690 startup.dwXCountChars = 0x12121212;
691 startup.dwYCountChars = 0x23232323;
696 startup.dwFillAttribute = 0xA55A;
700 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
730 startup.dwXCountChars = 0x12121212;
731 startup.dwYCountChars = 0x23232323;
736 startup.dwFillAttribute = 0xA55A;
740 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
770 startup.dwXCountChars = 0x12121212;
771 startup.dwYCountChars = 0x23232323;
776 startup.dwFillAttribute = 0xA55A;
780 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
812 startup.dwXCountChars = 0x12121212;
813 startup.dwYCountChars = 0x23232323;
818 startup.dwFillAttribute = 0xA55A;
822 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
852 startup.dwXCountChars = 0x12121212;
853 startup.dwYCountChars = 0x23232323;
858 startup.dwFillAttribute = 0xA55A;
862 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
904 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
913 okChildString(
"Arguments",
"argvA4",
"C:\\Program Files\\my nice app.exe");
927 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1011 sprintf(buffer2,
"dummy tests/process.c dump \"%s\" \"a\\\"b\\\\\" c\\\" d",
resfile);
1033 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1035 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1043 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1047 "Expected ERROR_PATH_NOT_FOUND, got %d\n",
GetLastError());
1054 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1058 "Expected ERROR_PATH_NOT_FOUND, got %d\n",
GetLastError());
1063 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1068 "Expected ERROR_FILE_NOT_FOUND, got %d\n",
GetLastError());
1071 strcpy(buffer2,
"does not exist.exe");
1076 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1081 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1087 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1092 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1113 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL, windir, &
startup, &
info),
"CreateProcess\n");
1126 ok(
CreateProcessA(
NULL,
cmdline,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1135 NULL,
"non\\existent\\directory", &
startup, &
info),
"CreateProcess\n");
1151#if defined(__REACTOS__) && defined(_M_AMD64)
1154 skip(
"ROSTESTS-372: Skipping test in kernel32_winetest:process test_Toolhelp because it leaves a process behind on Windows Server 2003 x64-Testbot. Set winetest_interactive to run it anyway.\n");
1166 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1173 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1182#if defined(__REACTOS__) && defined(_M_AMD64)
1185 skip(
"ROSTESTS-371: Skipping kernel32_winetest:sync test_apc_deadlock because it fails on Windows Server 2003 x64-Testbot. Set winetest_interactive to run it anyway.\n");
1193 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1202#if defined(__REACTOS__) && defined(_M_AMD64)
1206 for (
i = 0;
i < 20;
i++)
1216 ok(
i < 20 ||
broken(
i == 20),
"process object not released\n");
1220 memset(&pe, 0,
sizeof(pe));
1222 if (pProcess32First(
snapshot, &pe))
1225 if (!pProcess32Next(
snapshot, &pe))
break;
1235 memset(&te, 0,
sizeof(te));
1240 if (!pThread32Next(
snapshot, &te))
break;
1248 ok(
ret == 1,
"expected 1, got %u\n",
ret);
1256 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1268 return str[0] ==
'=' &&
str[1] >=
'A' &&
str[1] <=
'Z' &&
str[2] ==
':' &&
1286 if ((ptrA = gesA) !=
NULL)
1290 for (
i = 0;
i < clen;
i++)
1298 ok(found,
"Parent-env string %s isn't in child process\n", ptrA);
1300 ptrA +=
strlen(ptrA) + 1;
1305 for (
i = 0;
i < clen;
i++)
1309 if ((ptrA = gesA) !=
NULL)
1315 ptrA +=
strlen(ptrA) + 1;
1317 if (!*ptrA) ptrA =
NULL;
1322 found = ptrA !=
NULL;
1323 ok(found,
"Child-env string %s isn't in parent process\n",
res);
1349 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1374 child_env_len += slen;
1378 child_env_len += 256;
1382 sprintf(
ptr,
"=%c:=%s",
'C',
"C:\\FOO\\BAR");
1384 strcpy(
ptr,
"PATH=C:\\WINDOWS;C:\\WINDOWS\\SYSTEM;C:\\MY\\OWN\\DIR");
1395 for (ptr2 =
env; *ptr2; ptr2 +=
strlen(ptr2) + 1)
1397 if (
strncmp(ptr2,
"PATH=", 5) != 0 &&
1398 strncmp(ptr2,
"WINELOADER=", 11) != 0 &&
1406 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L, child_env,
NULL, &
startup, &
info),
"CreateProcess\n");
1436 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
CREATE_SUSPENDED,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1471 void *processbase =
NULL;
1486 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
DEBUG_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1504 ok(dbg,
"I have seen a debug event\n");
1542 DWORD modeIn, modeOut, modeInC, modeOutC;
1543 DWORD cpIn, cpOut, cpInC, cpOutC;
1545 HANDLE hChildIn, hChildInInh, hChildOut, hChildOutInh, hParentIn, hParentOut;
1546 const char*
msg =
"This is a std-handle inheritance test.";
1556 sa.nLength =
sizeof(
sa);
1557 sa.lpSecurityDescriptor =
NULL;
1558 sa.bInheritHandle =
TRUE;
1584 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1607 "GetLastError: expecting %u got %u\n",
1617 "GetLastError: expecting %u got %u\n",
1658 okChildInt(
"Console",
"OutputMode", modeOut);
1662 ok(cpInC == 1252,
"Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
1663 ok(cpOutC == 1252,
"Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
1666 win_skip(
"Setting the codepage is not implemented\n");
1668 ok(modeInC == (modeIn ^ 1),
"Wrong console mode\n");
1669 ok(modeOutC == (modeOut ^ 1),
"Wrong console-SB mode\n");
1676 ok(
CreatePipe(&hParentIn, &hChildOut,
NULL, 0),
"Creating parent-input pipe\n");
1679 "Duplicating as inheritable child-output pipe\n");
1682 ok(
CreatePipe(&hChildIn, &hParentOut,
NULL, 0),
"Creating parent-output pipe\n");
1685 "Duplicating as inheritable child-input pipe\n");
1692 startup.hStdInput = hChildInInh;
1693 startup.hStdOutput = hChildOutInh;
1694 startup.hStdError = hChildOutInh;
1698 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE,
DETACHED_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1704 ok(
w == msg_len,
"Should have written %u bytes, actually wrote %u\n", msg_len,
w);
1738 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1761 if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) {
1762 win_skip(
"VirtualAllocEx not found\n");
1772 ok(!addr1,
"VirtualAllocEx should fail\n");
1776 win_skip(
"VirtualAllocEx not implemented\n");
1798 "VirtualQueryEx without PROCESS_QUERY_INFORMATION rights should fail\n");
1805 "ReadProcessMemory without PROCESS_VM_READ rights should fail\n");
1817 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1818 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1820 ok(
info.RegionSize == 0x10000,
"%lx != 0x10000\n",
info.RegionSize);
1825 "%x != PAGE_NOACCESS\n",
info.Protect);
1830 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1844 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1845 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1847 ok(
info.RegionSize == 0x10000,
"%lx != 0x10000\n",
info.RegionSize);
1849 ok(
info.Protect == 0,
"%x != PAGE_NOACCESS\n",
info.Protect);
1857 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1868 static char cmdline[] =
"winver.exe";
1881 memset(&si, 0,
sizeof(si));
1905 static const char harddisk[] =
"\\Device\\HarddiskVolume";
1907 if (!pK32GetProcessImageFileNameA)
1909 win_skip(
"K32GetProcessImageFileNameA is unavailable\n");
1917 "K32GetProcessImageFileNameA(no buffer): returned %u, le=%u\n", rc,
GetLastError());
1928 if (!pQueryFullProcessImageNameA)
1929 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1944#define INIT_STR "Just some words"
1948 if (!pQueryFullProcessImageNameA)
1950 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1963 ok((
buf[0] ==
'\\' &&
buf[1] ==
'\\') ||
2005 if (!pQueryFullProcessImageNameW)
2007 win_skip(
"QueryFullProcessImageNameW unavailable (added in Windows Vista)\n");
2062 ok(
buf[0] ==
'\\',
"NT path should begin with '\\'\n");
2096 "invalid current process handle %p\n",
handle );
2104 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2115 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2129 "wrong handle %p/%p\n", h2, h3 );
2139 static char cmdline[] =
"C:\\Program Files\\Internet Explorer\\iexplore.exe";
2140 static char cmdline_wow64[] =
"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe";
2142 if (!pIsWow64Process)
2144 skip(
"IsWow64Process is not available\n");
2148 memset(&si, 0,
sizeof(si));
2155 trace(
"Created process %s\n", cmdline_wow64);
2158 ok(
ret,
"IsWow64Process failed.\n");
2162 ok(
ret,
"TerminateProcess error\n");
2168 memset(&si, 0,
sizeof(si));
2178 ok(
ret,
"IsWow64Process failed.\n");
2182 ok(
ret,
"TerminateProcess error\n");
2194 if (!pGetNativeSystemInfo)
2196 win_skip(
"GetNativeSystemInfo is not available\n");
2203 pGetNativeSystemInfo(&nsi);
2209 "Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n",
2210 S(
U(nsi)).wProcessorArchitecture);
2212 "Expected PROCESSOR_AMD_X8664, got %d\n",
2218 ok(
S(
U(si)).wProcessorArchitecture ==
S(
U(nsi)).wProcessorArchitecture,
2219 "Expected no difference for wProcessorArchitecture, got %d and %d\n",
2220 S(
U(si)).wProcessorArchitecture,
S(
U(nsi)).wProcessorArchitecture);
2222 "Expected no difference for dwProcessorType, got %d and %d\n",
2230 DWORD max_quota, used_quota;
2232 if (!pGetSystemRegistryQuota)
2234 win_skip(
"GetSystemRegistryQuota is not available\n");
2240 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2242 ret = pGetSystemRegistryQuota(&max_quota,
NULL);
2244 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2246 ret = pGetSystemRegistryQuota(
NULL, &used_quota);
2248 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2250 ret = pGetSystemRegistryQuota(&max_quota, &used_quota);
2252 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2257 static char cmdline[] =
"winver.exe";
2263 memset(&si, 0,
sizeof(si));
2331 ok(
f ==
out,
"f != out\n");
2339 ok(
f ==
out,
"f != out\n");
2349 ok(
f !=
out,
"f == out\n");
2370 ok(
f ==
out,
"f != out\n");
2377 skip(
"DuplicateHandle on console handle\n");
2389#define test_completion(a, b, c, d, e) _test_completion(__LINE__, a, b, c, d, e)
2402 ok_(__FILE__,
line)(
key == ekey,
"unexpected key %x\n",
key);
2408#define create_process(cmd, pi) _create_process(__LINE__, cmd, pi)
2421#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__)
2438 "Expected NumberOfAssignedProcesses to be %d (expected_count) is %d\n",
2442 "Expected NumberOfProcessIdsInList to be %d (expected_count) is %d\n",
2450 "Expected pid_list->ProcessIdList[%d] to be %x is %lx\n",
2457#define test_accounting(job, total_proc, active_proc, terminated_proc) _test_accounting(__LINE__, job, total_proc, active_proc, terminated_proc)
2464 memset(&basic_accounting, 0,
sizeof(basic_accounting));
2473 "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %d\n",
2477 "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %d\n",
2480 "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %d\n",
2492 if (!pIsProcessInJob)
2494 win_skip(
"IsProcessInJob not available.\n");
2501 job2 = pCreateJobObjectW(
NULL,
NULL);
2509 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2514 ret = pIsProcessInJob(
pi.hProcess, job2, &
out);
2516 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2523 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2525 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2531 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2536 ret = pIsProcessInJob(
pi.hProcess, job2, &
out);
2538 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2545 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2550 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2555 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2579 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2584 ret = pTerminateJobObject(
job, 123);
2588 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2596 "wrong exitcode %u\n", dwret);
2605 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2608 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2609 ok(!
ret,
"AssignProcessToJobObject unexpectedly succeeded\n");
2639 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2655 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2665 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2682 win_skip(
"Number of assigned processes broken on Win 8\n");
2689 "QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2704 sizeof(*basic_limit_info) - 1, &
ret_len);
2705 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2709 memset(basic_limit_info, 0x11,
sizeof(*basic_limit_info));
2711 sizeof(*basic_limit_info), &
ret_len);
2713 ok(
ret_len ==
sizeof(*basic_limit_info),
"QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2718 sizeof(ext_limit_info) - 1, &
ret_len);
2719 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2723 memset(&ext_limit_info, 0x11,
sizeof(ext_limit_info));
2725 sizeof(ext_limit_info), &
ret_len);
2727 ok(
ret_len ==
sizeof(ext_limit_info),
"QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2762 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2769 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2795 win_skip(
"Kill on job close limit not available\n");
2804 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2812 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2831 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2835 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2839 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2841 ret = pTerminateJobObject(
job, 123);
2846 "WaitForSingleObject returned %u\n", dwret);
2853 ok(0,
"HACK: Killing process to speed up the test\n");
2860 win_skip(
"TerminateJobObject doesn't signal job, skipping tests\n");
2866 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2874 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2878 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2880 ret = pTerminateJobObject(
job, 123);
2893 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2897 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2901 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);