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");
1158 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1165 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1176 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1186 for (
i = 0;
i < 20;
i++)
1196 ok(
i < 20 ||
broken(
i == 20),
"process object not released\n");
1200 memset(&pe, 0,
sizeof(pe));
1202 if (pProcess32First(
snapshot, &pe))
1205 if (!pProcess32Next(
snapshot, &pe))
break;
1215 memset(&te, 0,
sizeof(te));
1220 if (!pThread32Next(
snapshot, &te))
break;
1228 ok(
ret == 1,
"expected 1, got %u\n",
ret);
1236 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1248 return str[0] ==
'=' &&
str[1] >=
'A' &&
str[1] <=
'Z' &&
str[2] ==
':' &&
1266 if ((ptrA = gesA) !=
NULL)
1270 for (
i = 0;
i < clen;
i++)
1278 ok(found,
"Parent-env string %s isn't in child process\n", ptrA);
1280 ptrA +=
strlen(ptrA) + 1;
1285 for (
i = 0;
i < clen;
i++)
1289 if ((ptrA = gesA) !=
NULL)
1295 ptrA +=
strlen(ptrA) + 1;
1297 if (!*ptrA) ptrA =
NULL;
1302 found = ptrA !=
NULL;
1303 ok(found,
"Child-env string %s isn't in parent process\n",
res);
1329 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1354 child_env_len += slen;
1358 child_env_len += 256;
1362 sprintf(
ptr,
"=%c:=%s",
'C',
"C:\\FOO\\BAR");
1364 strcpy(
ptr,
"PATH=C:\\WINDOWS;C:\\WINDOWS\\SYSTEM;C:\\MY\\OWN\\DIR");
1375 for (ptr2 =
env; *ptr2; ptr2 +=
strlen(ptr2) + 1)
1377 if (
strncmp(ptr2,
"PATH=", 5) != 0 &&
1378 strncmp(ptr2,
"WINELOADER=", 11) != 0 &&
1386 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L, child_env,
NULL, &
startup, &
info),
"CreateProcess\n");
1416 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
CREATE_SUSPENDED,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1451 void *processbase =
NULL;
1466 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
DEBUG_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1484 ok(dbg,
"I have seen a debug event\n");
1522 DWORD modeIn, modeOut, modeInC, modeOutC;
1523 DWORD cpIn, cpOut, cpInC, cpOutC;
1525 HANDLE hChildIn, hChildInInh, hChildOut, hChildOutInh, hParentIn, hParentOut;
1526 const char*
msg =
"This is a std-handle inheritance test.";
1536 sa.nLength =
sizeof(
sa);
1537 sa.lpSecurityDescriptor =
NULL;
1538 sa.bInheritHandle =
TRUE;
1564 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1587 "GetLastError: expecting %u got %u\n",
1597 "GetLastError: expecting %u got %u\n",
1638 okChildInt(
"Console",
"OutputMode", modeOut);
1642 ok(cpInC == 1252,
"Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
1643 ok(cpOutC == 1252,
"Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
1646 win_skip(
"Setting the codepage is not implemented\n");
1648 ok(modeInC == (modeIn ^ 1),
"Wrong console mode\n");
1649 ok(modeOutC == (modeOut ^ 1),
"Wrong console-SB mode\n");
1656 ok(
CreatePipe(&hParentIn, &hChildOut,
NULL, 0),
"Creating parent-input pipe\n");
1659 "Duplicating as inheritable child-output pipe\n");
1662 ok(
CreatePipe(&hChildIn, &hParentOut,
NULL, 0),
"Creating parent-output pipe\n");
1665 "Duplicating as inheritable child-input pipe\n");
1672 startup.hStdInput = hChildInInh;
1673 startup.hStdOutput = hChildOutInh;
1674 startup.hStdError = hChildOutInh;
1678 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE,
DETACHED_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1684 ok(
w == msg_len,
"Should have written %u bytes, actually wrote %u\n", msg_len,
w);
1718 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1741 if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) {
1742 win_skip(
"VirtualAllocEx not found\n");
1752 ok(!addr1,
"VirtualAllocEx should fail\n");
1756 win_skip(
"VirtualAllocEx not implemented\n");
1778 "VirtualQueryEx without PROCESS_QUERY_INFORMATION rights should fail\n");
1785 "ReadProcessMemory without PROCESS_VM_READ rights should fail\n");
1797 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1798 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1800 ok(
info.RegionSize == 0x10000,
"%lx != 0x10000\n",
info.RegionSize);
1805 "%x != PAGE_NOACCESS\n",
info.Protect);
1810 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1824 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1825 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1827 ok(
info.RegionSize == 0x10000,
"%lx != 0x10000\n",
info.RegionSize);
1829 ok(
info.Protect == 0,
"%x != PAGE_NOACCESS\n",
info.Protect);
1837 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1848 static char cmdline[] =
"winver.exe";
1861 memset(&si, 0,
sizeof(si));
1885 static const char harddisk[] =
"\\Device\\HarddiskVolume";
1887 if (!pK32GetProcessImageFileNameA)
1889 win_skip(
"K32GetProcessImageFileNameA is unavailable\n");
1897 "K32GetProcessImageFileNameA(no buffer): returned %u, le=%u\n", rc,
GetLastError());
1908 if (!pQueryFullProcessImageNameA)
1909 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1924 #define INIT_STR "Just some words" 1928 if (!pQueryFullProcessImageNameA)
1930 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1943 ok((
buf[0] ==
'\\' &&
buf[1] ==
'\\') ||
1985 if (!pQueryFullProcessImageNameW)
1987 win_skip(
"QueryFullProcessImageNameW unavailable (added in Windows Vista)\n");
2042 ok(
buf[0] ==
'\\',
"NT path should begin with '\\'\n");
2076 "invalid current process handle %p\n",
handle );
2084 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2095 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2109 "wrong handle %p/%p\n", h2, h3 );
2119 static char cmdline[] =
"C:\\Program Files\\Internet Explorer\\iexplore.exe";
2120 static char cmdline_wow64[] =
"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe";
2122 if (!pIsWow64Process)
2124 skip(
"IsWow64Process is not available\n");
2128 memset(&si, 0,
sizeof(si));
2135 trace(
"Created process %s\n", cmdline_wow64);
2138 ok(
ret,
"IsWow64Process failed.\n");
2142 ok(
ret,
"TerminateProcess error\n");
2148 memset(&si, 0,
sizeof(si));
2158 ok(
ret,
"IsWow64Process failed.\n");
2162 ok(
ret,
"TerminateProcess error\n");
2174 if (!pGetNativeSystemInfo)
2176 win_skip(
"GetNativeSystemInfo is not available\n");
2183 pGetNativeSystemInfo(&nsi);
2189 "Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n",
2190 S(
U(nsi)).wProcessorArchitecture);
2192 "Expected PROCESSOR_AMD_X8664, got %d\n",
2198 ok(
S(
U(si)).wProcessorArchitecture ==
S(
U(nsi)).wProcessorArchitecture,
2199 "Expected no difference for wProcessorArchitecture, got %d and %d\n",
2200 S(
U(si)).wProcessorArchitecture,
S(
U(nsi)).wProcessorArchitecture);
2202 "Expected no difference for dwProcessorType, got %d and %d\n",
2210 DWORD max_quota, used_quota;
2212 if (!pGetSystemRegistryQuota)
2214 win_skip(
"GetSystemRegistryQuota is not available\n");
2220 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2222 ret = pGetSystemRegistryQuota(&max_quota,
NULL);
2224 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2226 ret = pGetSystemRegistryQuota(
NULL, &used_quota);
2228 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2230 ret = pGetSystemRegistryQuota(&max_quota, &used_quota);
2232 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2237 static char cmdline[] =
"winver.exe";
2243 memset(&si, 0,
sizeof(si));
2311 ok(
f ==
out,
"f != out\n");
2319 ok(
f ==
out,
"f != out\n");
2329 ok(
f !=
out,
"f == out\n");
2350 ok(
f ==
out,
"f != out\n");
2357 skip(
"DuplicateHandle on console handle\n");
2369 #define test_completion(a, b, c, d, e) _test_completion(__LINE__, a, b, c, d, e) 2382 ok_(__FILE__,
line)(
key == ekey,
"unexpected key %x\n",
key);
2388 #define create_process(cmd, pi) _create_process(__LINE__, cmd, pi) 2401 #define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__) 2418 "Expected NumberOfAssignedProcesses to be %d (expected_count) is %d\n",
2422 "Expected NumberOfProcessIdsInList to be %d (expected_count) is %d\n",
2430 "Expected pid_list->ProcessIdList[%d] to be %x is %lx\n",
2437 #define test_accounting(job, total_proc, active_proc, terminated_proc) _test_accounting(__LINE__, job, total_proc, active_proc, terminated_proc) 2444 memset(&basic_accounting, 0,
sizeof(basic_accounting));
2453 "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %d\n",
2457 "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %d\n",
2460 "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %d\n",
2472 if (!pIsProcessInJob)
2474 win_skip(
"IsProcessInJob not available.\n");
2481 job2 = pCreateJobObjectW(
NULL,
NULL);
2489 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2494 ret = pIsProcessInJob(
pi.hProcess, job2, &
out);
2496 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2503 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2505 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2511 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2516 ret = pIsProcessInJob(
pi.hProcess, job2, &
out);
2518 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2525 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2530 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2535 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2559 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2564 ret = pTerminateJobObject(
job, 123);
2568 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2576 "wrong exitcode %u\n", dwret);
2585 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2588 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2589 ok(!
ret,
"AssignProcessToJobObject unexpectedly succeeded\n");
2619 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2635 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2645 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2662 win_skip(
"Number of assigned processes broken on Win 8\n");
2669 "QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2684 sizeof(*basic_limit_info) - 1, &
ret_len);
2685 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2689 memset(basic_limit_info, 0x11,
sizeof(*basic_limit_info));
2691 sizeof(*basic_limit_info), &
ret_len);
2693 ok(
ret_len ==
sizeof(*basic_limit_info),
"QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2698 sizeof(ext_limit_info) - 1, &
ret_len);
2699 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2703 memset(&ext_limit_info, 0x11,
sizeof(ext_limit_info));
2705 sizeof(ext_limit_info), &
ret_len);
2707 ok(
ret_len ==
sizeof(ext_limit_info),
"QueryInformationJobObject returned ret_len=%u\n",
ret_len);
2742 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2749 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2775 win_skip(
"Kill on job close limit not available\n");
2784 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2792 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2811 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2815 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2819 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2821 ret = pTerminateJobObject(
job, 123);
2826 "WaitForSingleObject returned %u\n", dwret);
2833 ok(0,
"HACK: Killing process to speed up the test\n");
2840 win_skip(
"TerminateJobObject doesn't signal job, skipping tests\n");
2846 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2854 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2858 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2860 ret = pTerminateJobObject(
job, 123);
2873 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2877 ret = pAssignProcessToJobObject(
job,
pi.hProcess);
2881 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %u\n", dwret);
2912 if (!pIsProcessInJob)
2914 win_skip(
"IsProcessInJob not available.\n");
2926 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2931 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2946 if (!pIsProcessInJob)
2948 win_skip(
"IsProcessInJob not available.\n");
2955 ok(!
ret,
"CreateProcessA expected failure\n");
2965 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2980 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2985 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
2999 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
3004 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %u\n", dwret);
3029 &
info),
"CreateProcess\n");
3061 &
info),
"CreateProcess\n");
3083 #if defined(__i386__) || defined(__x86_64__)