29#define WIN32_NO_STATUS
45#define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000)
47#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff)
49#define expect_eq_d(expected, actual) \
51 int value = (actual); \
52 ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \
53 (int)(expected), value); \
55#define expect_eq_s(expected, actual) \
57 LPCSTR value = (actual); \
58 ok(lstrcmpA((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \
61#define expect_eq_ws_i(expected, actual) \
63 LPCWSTR value = (actual); \
64 ok(lstrcmpiW((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \
65 wine_dbgstr_w(expected), wine_dbgstr_w(value)); \
118#define MAX_LISTED_ENV_VAR 128
173 if (
c >=
'0' &&
c <=
'9')
return c -
'0';
174 if (
c >=
'a' &&
c <=
'f')
return c -
'a' + 10;
326#if defined(__REACTOS__) && defined(_WIN64)
330#define HATTR_NULL 0x0d
332#define HATTR_NULL 0x08
334#define HATTR_INVALID 0x04
335#define HATTR_TYPE 0x0c
336#define HATTR_UNTOUCHED 0x10
337#define HATTR_INHERIT 0x20
338#define HATTR_PROTECT 0x40
339#define HATTR_DANGLING 0x80
341#define HANDLE_UNTOUCHEDW (HANDLE)(DWORD_PTR)(0x5050505050505050ull)
387 char *ptrA, *ptrA_save;
388 WCHAR *ptrW, *ptrW_save;
399 memset(&siA, 0xA0,
sizeof(siA));
402 "[StartupInfoA]\ncb=%08lu\nlpDesktop=%s\nlpTitle=%s\n"
403 "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n"
404 "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n"
405 "dwFlags=%lu\nwShowWindow=%u\n"
406 "hStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n"
407 "hStdInputEncode=%u\nhStdOutputEncode=%u\nhStdErrorEncode=%u\n\n",
418 "[TEB]\nhStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n"
419 "hStdInputEncode=%u\nhStdOutputEncode=%u\nhStdErrorEncode=%u\n\n",
425 memset(&siW, 0x50,
sizeof(siW));
428 "[StartupInfoW]\ncb=%08lu\nlpDesktop=%s\nlpTitle=%s\n"
429 "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n"
430 "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n"
431 "dwFlags=%lu\nwShowWindow=%u\n"
432 "hStdInput=%Iu\nhStdOutput=%Iu\nhStdError=%Iu\n"
433 "hStdInputEncode=%u\nhStdOutputEncode=%u\nhStdErrorEncode=%u\n\n",
443 childPrintf(
hFile,
"[Arguments]\nargcA=%d\n",
myARGC);
454 memset(&pe, 0,
sizeof(pe));
459 if (!pProcess32Next(
snapshot, &pe))
break;
462#if !defined(__REACTOS__) || !defined(_WIN64)
466 "[Toolhelp]\ncntUsage=%lu\nth32DefaultHeapID=%Iu\n"
467 "th32ModuleID=%lu\ncntThreads=%lu\nth32ParentProcessID=%lu\n"
468 "pcPriClassBase=%lu\ndwFlags=%lu\nszExeFile=%s\n\n",
479 childPrintf(
hFile,
"[EnvironmentA]\n");
488 childPrintf(
hFile,
"len=%d\n\n",
i);
498 childPrintf(
hFile,
"[EnvironmentW]\n");
508 childPrintf(
hFile,
"len=%d\n\n",
i);
512 childPrintf(
hFile,
"[Misc]\n");
517 childPrintf(
hFile,
"\n");
524 DWORD modeIn, modeOut;
526 childPrintf(
hFile,
"[Console]\n");
529 childPrintf(
hFile,
"SizeX=%d\nSizeY=%d\nCursorX=%d\nCursorY=%d\nAttributes=%d\n",
531 childPrintf(
hFile,
"winLeft=%d\nwinTop=%d\nwinRight=%d\nwinBottom=%d\n",
533 childPrintf(
hFile,
"maxWinWidth=%d\nmaxWinHeight=%d\n",
536 childPrintf(
hFile,
"InputCP=%d\nOutputCP=%d\n",
539 childPrintf(
hFile,
"InputMode=%lu\n", modeIn);
541 childPrintf(
hFile,
"OutputMode=%lu\n", modeOut);
548 win_skip(
"Setting the codepage is not implemented\n");
552 ok(
ret,
"Setting CP\n");
583 childPrintf(
hFile,
"[ExitCode]\nvalue=%d\n\n", 123);
597 if (
buf[0] ==
'\0' || (
buf[0] ==
'-' &&
buf[1] ==
'\0'))
return NULL;
609 if (
buf[0] ==
'\0' || (
buf[0] ==
'-' &&
buf[1] ==
'\0'))
return NULL;
617 if (!
s1 && !
s2)
return 0;
624 const char *
expect,
int sensitive )
632 const char *
expect,
int sensitive )
669#define okChildString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 1 )
670#define okChildIString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 0 )
671#define okChildStringWA(sect, key, expect) ok_child_stringWA(__LINE__, (sect), (key), (expect), 1 )
672#define okChildInt(sect, key, expect) ok_child_int(__LINE__, (sect), (key), (expect))
673#define okChildHexInt(sect, key, expect, is_broken) ok_child_hexint(__LINE__, (sect), (key), (expect), (is_broken))
681 static CHAR title[] =
"I'm the title string",
682 desktop[] =
"winsta0\\default",
693 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
719 startup.dwXCountChars = 0x12121212;
720 startup.dwYCountChars = 0x23232323;
725 startup.dwFillAttribute = 0xA55A;
729 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
755 startup.dwXCountChars = 0x12121212;
756 startup.dwYCountChars = 0x23232323;
761 startup.dwFillAttribute = 0xA55A;
765 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
791 startup.dwXCountChars = 0x12121212;
792 startup.dwYCountChars = 0x23232323;
797 startup.dwFillAttribute = 0xA55A;
801 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
827 startup.dwXCountChars = 0x12121212;
828 startup.dwYCountChars = 0x23232323;
833 startup.dwFillAttribute = 0xA55A;
837 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
865 startup.dwXCountChars = 0x12121212;
866 startup.dwYCountChars = 0x23232323;
871 startup.dwFillAttribute = 0xA55A;
875 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
901 startup.dwXCountChars = 0x12121212;
902 startup.dwYCountChars = 0x23232323;
907 startup.dwFillAttribute = 0xA55A;
911 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
950 ok(!
CreateProcessA(
buffer,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess unexpectedly succeeded\n");
957 ok(!
info.hProcess,
"unexpected hProcess %p\n",
info.hProcess);
958 ok(!
info.hThread,
"unexpected hThread %p\n",
info.hThread);
959 ok(!
info.dwProcessId,
"unexpected dwProcessId %04lx\n",
info.dwProcessId);
960 ok(!
info.dwThreadId,
"unexpected dwThreadId %04lx\n",
info.dwThreadId);
965 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
976 okChildString(
"Arguments",
"argvA4",
"C:\\Program Files\\my nice app.exe");
985 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1082 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1084 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
1092 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1096 "Expected ERROR_PATH_NOT_FOUND, got %ld\n",
GetLastError());
1103 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1107 "Expected ERROR_PATH_NOT_FOUND, got %ld\n",
GetLastError());
1112 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1117 "Expected ERROR_FILE_NOT_FOUND, got %ld\n",
GetLastError());
1120 strcpy(buffer2,
"does not exist.exe");
1125 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1130 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1136 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1141 ok(!
ret,
"CreateProcessA unexpectedly succeeded\n");
1151 ok(
cmdline == cmdline_backup,
"Expected cached address from TEB, got %p\n",
cmdline);
1152 NtCurrentTeb()->Peb->ProcessParameters->CommandLine.Buffer = cmdline_backup;
1172 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL, windir, &
startup, &
info),
"CreateProcess\n");
1181 ok(
CreateProcessA(
NULL,
cmdline,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1190 NULL,
"non\\existent\\directory", &
startup, &
info),
"CreateProcess\n");
1197#if defined(__REACTOS__) && defined(_WIN64)
1198 skip(
"test_Toolhelp() times out on x86_64.\n");
1217 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1222 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1233 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
1243 for (
i = 0;
i < 20;
i++)
1253 ok(
i < 20 ||
broken(
i == 20),
"process object not released\n");
1262 memset(&pe, 0,
sizeof(pe));
1264 if (pProcess32First(
snapshot, &pe))
1267 if (!pProcess32Next(
snapshot, &pe))
break;
1270 ok(pe.
th32ProcessID == nested_pid,
"failed to find nested child process\n");
1279 memset(&te, 0,
sizeof(te));
1284 if (!pThread32Next(
snapshot, &te))
break;
1292 ok(
ret == 1,
"expected 1, got %lu\n",
ret);
1300 okChildInt(
"Toolhelp",
"th32DefaultHeapID", 0);
1313 return str[0] ==
'=' &&
str[1] >=
'A' &&
str[1] <=
'Z' &&
str[2] ==
':' &&
1331 if ((ptrA = gesA) !=
NULL)
1335 for (
i = 0;
i < clen;
i++)
1343 ok(found,
"Parent-env string %s isn't in child process\n", ptrA);
1345 ptrA +=
strlen(ptrA) + 1;
1350 for (
i = 0;
i < clen;
i++)
1354 if ((ptrA = gesA) !=
NULL)
1360 ptrA +=
strlen(ptrA) + 1;
1362 if (!*ptrA) ptrA =
NULL;
1367 found = ptrA !=
NULL;
1368 ok(found,
"Child-env string %s isn't in parent process\n",
res);
1394 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1417 child_env_len += slen;
1421 child_env_len += 256;
1425 sprintf(
ptr,
"=%c:=%s",
'C',
"C:\\FOO\\BAR");
1427 strcpy(
ptr,
"PATH=C:\\WINDOWS;C:\\WINDOWS\\SYSTEM;C:\\MY\\OWN\\DIR");
1437 for (ptr2 =
env; *ptr2; ptr2 +=
strlen(ptr2) + 1)
1439 if (
strncmp(ptr2,
"PATH=", 5) != 0 &&
1447 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0
L, child_env,
NULL, &
startup, &
info),
"CreateProcess\n");
1475 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
CREATE_SUSPENDED,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1508 void *processbase =
NULL;
1523 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
DEBUG_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1541 ok(dbg,
"I have seen a debug event\n");
1572 DWORD modeIn, modeOut, modeInC, modeOutC;
1573 DWORD cpIn, cpOut, cpInC, cpOutC;
1575 HANDLE hChildIn, hChildInInh, hChildOut, hChildOutInh, hParentIn, hParentOut;
1576 const char*
msg =
"This is a std-handle inheritance test.";
1586 sa.nLength =
sizeof(
sa);
1587 sa.lpSecurityDescriptor =
NULL;
1588 sa.bInheritHandle =
TRUE;
1619 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1632 modeOut = (modeOut & ~ENABLE_VIRTUAL_TERMINAL_PROCESSING) |
1643 "GetLastError: expecting %u got %lu\n",
1653 "GetLastError: expecting %u got %lu\n",
1694 okChildInt(
"Console",
"OutputMode", modeOut);
1698 ok(cpInC == 1252,
"Wrong console CP (expected 1252 got %ld/%ld)\n", cpInC, cpIn);
1699 ok(cpOutC == 1252,
"Wrong console-SB CP (expected 1252 got %ld/%ld)\n", cpOutC, cpOut);
1702 win_skip(
"Setting the codepage is not implemented\n");
1704 ok(modeInC == (modeIn ^ 1),
"Wrong console mode\n");
1705 ok(modeOutC == (modeOut ^ 1),
"Wrong console-SB mode\n");
1710 ok(
CreatePipe(&hParentIn, &hChildOut,
NULL, 0),
"Creating parent-input pipe\n");
1713 "Duplicating as inheritable child-output pipe\n");
1716 ok(
CreatePipe(&hChildIn, &hParentOut,
NULL, 0),
"Creating parent-output pipe\n");
1719 "Duplicating as inheritable child-input pipe\n");
1726 startup.hStdInput = hChildInInh;
1727 startup.hStdOutput = hChildOutInh;
1728 startup.hStdError = hChildOutInh;
1732 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
TRUE,
DETACHED_PROCESS,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1738 ok(
w == msg_len,
"Should have written %u bytes, actually wrote %lu\n", msg_len,
w);
1770 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0,
NULL,
NULL, &
startup, &
info),
"CreateProcess\n");
1797 ok(!addr1,
"VirtualAllocEx should fail\n");
1801 win_skip(
"VirtualAllocEx not implemented\n");
1823 "VirtualQueryEx without PROCESS_QUERY_INFORMATION rights should fail\n");
1830 "ReadProcessMemory without PROCESS_VM_READ rights should fail\n");
1842 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1843 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1845 ok(
info.RegionSize == 0x10000,
"%Ix != 0x10000\n",
info.RegionSize);
1850 "%lx != PAGE_NOACCESS\n",
info.Protect);
1855 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1869 ok(
info.BaseAddress == addr1,
"%p != %p\n",
info.BaseAddress, addr1);
1870 ok(
info.AllocationBase == addr1,
"%p != %p\n",
info.AllocationBase, addr1);
1872 ok(
info.RegionSize == 0x10000,
"%Ix != 0x10000\n",
info.RegionSize);
1874 ok(
info.Protect == 0,
"%lx != PAGE_NOACCESS\n",
info.Protect);
1882 "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n");
1893 static char cmdline[] =
"winver.exe";
1930 static const char harddisk[] =
"\\Device\\HarddiskVolume";
1932 if (!pK32GetProcessImageFileNameA)
1934 win_skip(
"K32GetProcessImageFileNameA is unavailable\n");
1942 "K32GetProcessImageFileNameA(no buffer): returned %lu, le=%lu\n", rc,
GetLastError());
1953 if (!pQueryFullProcessImageNameA)
1954 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1969#define INIT_STR "Just some words"
1973 if (!pQueryFullProcessImageNameA)
1975 win_skip(
"QueryFullProcessImageNameA unavailable (added in Windows Vista)\n");
1988 ok((
buf[0] ==
'\\' &&
buf[1] ==
'\\') ||
2031 if (!pQueryFullProcessImageNameW)
2033 win_skip(
"QueryFullProcessImageNameW unavailable (added in Windows Vista)\n");
2115 ok(
buf[0] ==
'\\',
"NT path should begin with '\\'\n");
2149 "invalid current process handle %p\n",
handle );
2157 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2168 ok( !
ret,
"GetExitCodeProcess succeeded for %p\n",
handle );
2182 "wrong handle %p/%p\n", h2, h3 );
2192 static char cmdline[] =
"C:\\Program Files\\Internet Explorer\\iexplore.exe";
2193 static char cmdline_wow64[] =
"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe";
2195 if (!pIsWow64Process)
2197 win_skip(
"IsWow64Process is not available\n");
2208 trace(
"Created process %s\n", cmdline_wow64);
2211 ok(
ret,
"IsWow64Process failed.\n");
2215 ok(
ret,
"TerminateProcess error\n");
2231 ok(
ret,
"IsWow64Process failed.\n");
2235 ok(
ret,
"TerminateProcess error\n");
2248 static char cmdline[] =
"C:\\Program Files\\Internet Explorer\\iexplore.exe";
2249 static char cmdline_wow64[] =
"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe";
2252#elif defined __x86_64__
2254#elif defined __arm__
2256#elif defined __aarch64__
2259 USHORT expect_native = 0;
2262 if (!pIsWow64Process2)
2264 win_skip(
"IsWow64Process2 is not available\n");
2275 machine = native_machine = 0xdead;
2279#if defined(__i386__) || defined(__x86_64__)
2283 expect_native = native_machine;
2285 skip(
"not supported architecture\n");
2288 ok(
ret,
"TerminateProcess error\n");
2305 machine = native_machine = 0xdead;
2310 ok(native_machine == expect_native,
"got %#x\n", native_machine);
2319 ok(
ret,
"TerminateProcess error\n");
2329 machine = native_machine = 0xdead;
2336 ok(native_machine == expect_native,
"got %#x\n", native_machine);
2341 ok(native_machine == expect_native,
"got %#x\n", native_machine);
2360 if (!pGetNativeSystemInfo)
2362 win_skip(
"GetNativeSystemInfo is not available\n");
2369 pGetNativeSystemInfo(&nsi);
2375 "Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n",
2390 "Expected no difference for wProcessorArchitecture, got %d and %d\n",
2393 "Expected no difference for dwProcessorType, got %ld and %ld\n",
2400 DWORD active, maximum;
2402 if (!pGetActiveProcessorCount || !pGetMaximumProcessorCount)
2404 win_skip(
"GetActiveProcessorCount or GetMaximumProcessorCount is not available\n");
2410 ok(active <= maximum,
2411 "Number of active processors %li is greater than maximum number of processors %li\n",
2418 DWORD max_quota, used_quota;
2420 if (!pGetSystemRegistryQuota)
2422 win_skip(
"GetSystemRegistryQuota is not available\n");
2428 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2430 ret = pGetSystemRegistryQuota(&max_quota,
NULL);
2432 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2434 ret = pGetSystemRegistryQuota(
NULL, &used_quota);
2436 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2438 ret = pGetSystemRegistryQuota(&max_quota, &used_quota);
2440 "Expected GetSystemRegistryQuota to return TRUE, got %d\n",
ret);
2445 static char cmdline[] =
"winver.exe";
2487#if defined(__REACTOS__) && defined(_WIN64)
2489 ok(
FALSE,
"FIXME: test_DuplicateHandle() deadlocks on ReactOS x64!\n");
2525 ok(
f ==
out,
"f != out\n");
2533 ok(
f ==
out,
"f != out\n");
2543 ok(
f !=
out,
"f == out\n");
2564 ok(
f ==
out,
"f != out\n");
2580 ok(
r &&
info == 0,
"Unexpected info %lx\n",
info);
2586 ok(
r &&
info == 0,
"Unexpected info %lx\n",
info);
2614 ok(
r &&
info == 0,
"Unexpected info %lx\n",
info);
2618#define test_completion(a, b, c, d, e) _test_completion(__LINE__, a, b, c, d, e)
2631 ok_(__FILE__,
line)(
key == ekey,
"unexpected key %lx\n",
key);
2637#define create_process(cmd, pi) _create_process(__LINE__, cmd, pi)
2650#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__)
2655 unsigned int i,
pid;
2665 "expected %u assigned processes, got %lu\n",
count,
list->NumberOfAssignedProcesses);
2667 "expected %u process IDs, got %lu\n",
count,
list->NumberOfProcessIdsInList);
2674 "wrong pid %u: expected %#04x, got %#04Ix\n",
i,
pid,
list->ProcessIdList[
i]);
2679#define test_accounting(a, b, c, d) _test_accounting(__LINE__, a, b, c, d)
2691 "expected %u total processes, got %lu\n",
total,
info.TotalProcesses);
2692 ok_(__FILE__,
line)(
info.ActiveProcesses == active,
2693 "expected %u active processes, got %lu\n", active,
info.ActiveProcesses);
2694 ok_(__FILE__,
line)(
info.TotalTerminatedProcesses == terminated,
2695 "expected %u terminated processes, got %lu\n", terminated,
info.TotalTerminatedProcesses);
2704 if (!pIsProcessInJob)
2706 win_skip(
"IsProcessInJob not available.\n");
2713 job2 = pCreateJobObjectW(
NULL,
NULL);
2721 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2728 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2738 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2745 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
2752 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2760 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
2798 ret = pTerminateJobObject(
job, 123);
2803 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %lu\n", dwret);
2810 ok(dwret == 123 ||
broken(dwret == 0) ,
2811 "wrong exitcode %lu\n", dwret);
2822 ok(!
ret,
"AssignProcessToJobObject unexpectedly succeeded\n");
2872 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2881 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2895 win_skip(
"Number of assigned processes broken on Win 8\n");
2901 "QueryInformationJobObject returned ret_len=%lu\n",
ret_len);
2912 sizeof(*basic_limit_info) - 1, &
ret_len);
2913 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2917 memset(basic_limit_info, 0x11,
sizeof(*basic_limit_info));
2919 sizeof(*basic_limit_info), &
ret_len);
2921 ok(
ret_len ==
sizeof(*basic_limit_info),
"QueryInformationJobObject returned ret_len=%lu\n",
ret_len);
2926 sizeof(ext_limit_info) - 1, &
ret_len);
2927 ok(!
ret,
"QueryInformationJobObject expected failure\n");
2931 memset(&ext_limit_info, 0x11,
sizeof(ext_limit_info));
2933 sizeof(ext_limit_info), &
ret_len);
2935 ok(
ret_len ==
sizeof(ext_limit_info),
"QueryInformationJobObject returned ret_len=%lu\n",
ret_len);
2940 sizeof(basic_accounting_info), &
ret_len);
2942 ok(
ret_len ==
sizeof(basic_accounting_info),
"QueryInformationJobObject returned ret_len=%lu\n",
ret_len);
2944#if defined(__REACTOS__)
3024 win_skip(
"Kill on job close limit not available\n");
3042 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %lu\n", dwret);
3062 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %lu\n", dwret);
3070 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %lu\n", dwret);
3072 ret = pTerminateJobObject(
job, 123);
3077 "WaitForSingleObject returned %lu\n", dwret);
3084 win_skip(
"TerminateJobObject doesn't signal job, skipping tests\n");
3090 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %lu\n", dwret);
3102 ok(dwret ==
WAIT_OBJECT_0,
"WaitForSingleObject returned %lu\n", dwret);
3104 ret = pTerminateJobObject(
job, 123);
3117 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %lu\n", dwret);
3129 ok(dwret ==
WAIT_TIMEOUT,
"WaitForSingleObject returned %lu\n", dwret);
3157 if (!pIsProcessInJob)
3159 win_skip(
"IsProcessInJob not available.\n");
3168 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
3184 if (!pIsProcessInJob)
3186 win_skip(
"IsProcessInJob not available.\n");
3195 "AssignProcessToJobObject error %lu\n",
GetLastError());
3198 win_skip(
"Nested jobs are not supported.\n");
3202 ok(!
ret,
"CreateProcessA expected failure\n");
3226 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
3230 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
3245 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
3254 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
3267 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
3301 ok(nthdr !=
NULL,
"Cannot get NT headers out of %s\n",
out);
3317#define ARG_STD 0x80000000
3318#define ARG_STARTUPINFO 0x00000000
3319#define ARG_CP_INHERIT 0x40000000
3320#define ARG_HANDLE_INHERIT 0x20000000
3321#define ARG_HANDLE_PROTECT 0x10000000
3322#define ARG_HANDLE_MASK (~0xff000000)
3359 startup->cb =
sizeof(*startup);
3386 ok(
ret,
"Couldn't create anon pipe\n");
3390 hstd[0] = hstd[1] =
NULL;
3406 ok(
ret,
"Couldn't set inherit flag to hstd[0]\n");
3408 ok(
ret,
"Couldn't set inherit flag to hstd[1]\n");
3420 startup->hStdOutput = hstd[1];
3531#define X(d, cg, s) {(d), (cg), s, ARRAY_SIZE(s), #s}
3532 X(0,
TRUE, nothing_cui),
3533 X(0,
FALSE, nothing_gui),
3541 ok(
FALSE,
"FIXME: These std handle tests on ReactOS confuses rosautotest\n");
3552 strcat(guiexec,
"process_gui.exe");
3555 strcat(cuiexec,
"process_cui.exe");
3566#if defined(__REACTOS__) && defined(_MSC_VER)
3579 ok(
ret,
"Couldn't run child\n");
3646#if defined(__i386__) || defined(__x86_64__)
3678 read_nt_header(process_handle, &mbi,
nt_header) &&
3692 ULONG_PTR orig_iat_entry_value, iat_entry_value;
3704 &iid,
sizeof(iid),
NULL);
3709 ok(iid.
Name,
"Module first IID does not have a Name\n");
3710 ok(iid.
FirstThunk,
"Module first IID does not have a FirstThunk\n");
3711 ok(!iid.
TimeDateStamp,
"Module first IID is a bound import (UNSUPPORTED for current test)\n");
3712 ok(iid.
OriginalFirstThunk,
"Module first IID does not have an OriginalFirstThunk (UNSUPPORTED for current test)\n");
3716 &iat_entry_value,
sizeof(iat_entry_value),
NULL);
3718 ok(iat_entry_value,
"IAT entry in FirstThunk is NULL\n");
3722 &orig_iat_entry_value,
sizeof(orig_iat_entry_value),
NULL);
3723 ok(
ret,
"Failed to read IAT entry from OriginalFirstThunk (%ld)\n",
GetLastError());
3724 ok(orig_iat_entry_value,
"IAT entry in OriginalFirstThunk is NULL\n");
3726 return iat_entry_value != orig_iat_entry_value;
3734 PVOID exe_base, exit_thread_ptr;
3741 ok(exit_thread_ptr !=
NULL,
"GetProcAddress ExitThread failed\n");
3748 ok(exe_base !=
NULL,
"Could not find EXE in remote process\n");
3751 ok(!
ret,
"IAT entry resolved prematurely\n");
3759 ok(!
ret,
"IAT entry resolved prematurely\n");
3766 ok( !
ctx.Rax,
"rax is not zero %Ix\n",
ctx.Rax );
3767 ok( !
ctx.Rbx,
"rbx is not zero %Ix\n",
ctx.Rbx );
3768 ok(
ctx.Rcx == (
ULONG_PTR)exit_thread_ptr,
"wrong rcx %Ix/%p\n",
ctx.Rcx, exit_thread_ptr );
3769 ok(
ctx.Rdx == 0x1234,
"wrong rdx %Ix\n",
ctx.Rdx );
3770 ok( !
ctx.Rsi,
"rsi is not zero %Ix\n",
ctx.Rsi );
3771 ok( !
ctx.Rdi,
"rdi is not zero %Ix\n",
ctx.Rdi );
3772 ok( !
ctx.Rbp,
"rbp is not zero %Ix\n",
ctx.Rbp );
3773 ok( !
ctx.R8,
"r8 is not zero %Ix\n",
ctx.R8 );
3774 ok( !
ctx.R9,
"r9 is not zero %Ix\n",
ctx.R9 );
3775 ok( !
ctx.R10,
"r10 is not zero %Ix\n",
ctx.R10 );
3776 ok( !
ctx.R11,
"r11 is not zero %Ix\n",
ctx.R11 );
3777 ok( !
ctx.R12,
"r12 is not zero %Ix\n",
ctx.R12 );
3778 ok( !
ctx.R13,
"r13 is not zero %Ix\n",
ctx.R13 );
3779 ok( !
ctx.R14,
"r14 is not zero %Ix\n",
ctx.R14 );
3780 ok( !
ctx.R15,
"r15 is not zero %Ix\n",
ctx.R15 );
3781 ok(
ctx.EFlags == 0x200,
"wrong flags %08lx\n",
ctx.EFlags );
3782 ok(
ctx.MxCsr == 0x1f80,
"wrong mxcsr %08lx\n",
ctx.MxCsr );
3783 ok(
ctx.FltSave.ControlWord == 0x27f,
"wrong control %08x\n",
ctx.FltSave.ControlWord );
3788 ok( !
ctx.Ecx,
"ecx is not zero %08lx\n",
ctx.Ecx );
3789 ok( !
ctx.Edx,
"edx is not zero %08lx\n",
ctx.Edx );
3790 ok( !
ctx.Esi,
"esi is not zero %08lx\n",
ctx.Esi );
3791 ok( !
ctx.Edi,
"edi is not zero %08lx\n",
ctx.Edi );
3793 ok(
ctx.Eax == (
ULONG_PTR)exit_thread_ptr,
"wrong eax %08lx/%p\n",
ctx.Eax, exit_thread_ptr );
3794 ok(
ctx.Ebx == 0x1234,
"wrong ebx %08lx\n",
ctx.Ebx );
3795 ok( (
ctx.EFlags & ~2) == 0x200,
"wrong flags %08lx\n",
ctx.EFlags );
3796 ok( (
WORD)
ctx.FloatSave.ControlWord == 0x27f,
"wrong control %08lx\n",
ctx.FloatSave.ControlWord );
3797 ok( *(
WORD *)
ctx.ExtendedRegisters == 0x27f,
"wrong control %08x\n", *(
WORD *)
ctx.ExtendedRegisters );
3805 ok(
exit_code == 0x1234,
"Invalid remote thread exit code\n");
3808 ok(
ret,
"EXE IAT entry not resolved\n");
3824 ULONG pipe_write_buf;
3825 ULONG pipe_read_buf;
3826 ULONG bytes_returned;
3831 struct remote_rop_chain
3833 void *exit_process_ptr;
3843 struct remote_rop_chain
3845 void *exit_process_ptr;
3853 void *unreached_ret;
3858 static const char pipe_name[] =
"\\\\.\\pipe\\TestPipe";
3859 static const ULONG pipe_write_magic = 0x454e4957;
3862 PVOID exe_base, remote_pipe_params, exit_process_ptr,
3865 struct pipe_params pipe_params;
3866 struct remote_rop_chain rop_chain;
3868 HANDLE server_pipe_handle;
3869 BOOL pipe_connected;
3870 ULONG pipe_magic, numb;
3872 void *user_thread_start, *start_ptr, *entry_ptr, *peb_ptr;
3876 ok(exit_process_ptr !=
NULL,
"GetProcAddress ExitProcess failed\n");
3879 ok(call_named_pipe_a !=
NULL,
"GetProcAddress CallNamedPipeA failed\n");
3887 ok(exe_base !=
NULL,
"Could not find EXE in remote process\n");
3890 ok(!
ret,
"IAT entry resolved prematurely\n");
3904 ok(remote_pipe_params !=
NULL,
"Failed allocating memory in remote process (%ld)\n",
GetLastError());
3906 pipe_params.pipe_write_buf = pipe_write_magic;
3907 pipe_params.pipe_read_buf = 0;
3908 pipe_params.bytes_returned = 0;
3909 strcpy(pipe_params.pipe_name, pipe_name);
3912 &pipe_params,
sizeof(pipe_params),
NULL);
3916 ok( !
ctx.Rax,
"rax is not zero %Ix\n",
ctx.Rax );
3917 ok( !
ctx.Rbx,
"rbx is not zero %Ix\n",
ctx.Rbx );
3918 ok( !
ctx.Rsi,
"rsi is not zero %Ix\n",
ctx.Rsi );
3919 ok( !
ctx.Rdi,
"rdi is not zero %Ix\n",
ctx.Rdi );
3920 ok( !
ctx.Rbp,
"rbp is not zero %Ix\n",
ctx.Rbp );
3921 ok( !
ctx.R8,
"r8 is not zero %Ix\n",
ctx.R8 );
3922 ok( !
ctx.R9,
"r9 is not zero %Ix\n",
ctx.R9 );
3923 ok( !
ctx.R10,
"r10 is not zero %Ix\n",
ctx.R10 );
3924 ok( !
ctx.R11,
"r11 is not zero %Ix\n",
ctx.R11 );
3925 ok( !
ctx.R12,
"r12 is not zero %Ix\n",
ctx.R12 );
3926 ok( !
ctx.R13,
"r13 is not zero %Ix\n",
ctx.R13 );
3927 ok( !
ctx.R14,
"r14 is not zero %Ix\n",
ctx.R14 );
3928 ok( !
ctx.R15,
"r15 is not zero %Ix\n",
ctx.R15 );
3929 ok(
ctx.EFlags == 0x200,
"wrong flags %08lx\n",
ctx.EFlags );
3930 ok(
ctx.MxCsr == 0x1f80,
"wrong mxcsr %08lx\n",
ctx.MxCsr );
3931 ok(
ctx.FltSave.ControlWord == 0x27f,
"wrong control %08x\n",
ctx.FltSave.ControlWord );
3932 start_ptr = (
void *)
ctx.Rip;
3933 entry_ptr = (
void *)
ctx.Rcx;
3934 peb_ptr = (
void *)
ctx.Rdx;
3936 rop_chain.exit_process_ptr = exit_process_ptr;
3939 ctx.R8 =
sizeof(pipe_params.pipe_write_buf);
3941 rop_chain.pipe_read_buf_size =
sizeof(pipe_params.pipe_read_buf);
3942 rop_chain.bytes_returned = (
ULONG_PTR)remote_pipe_params +
offsetof(
struct pipe_params, bytes_returned);
3943 rop_chain.timeout = 10000;
3946 ctx.Rsp -=
sizeof(rop_chain);
3948 ok(
ret,
"Failed to write to remote process thread stack (%ld)\n",
GetLastError());
3953 ok( !
ctx.Ecx,
"ecx is not zero %08lx\n",
ctx.Ecx );
3954 ok( !
ctx.Edx,
"edx is not zero %08lx\n",
ctx.Edx );
3955 ok( !
ctx.Esi,
"esi is not zero %08lx\n",
ctx.Esi );
3956 ok( !
ctx.Edi,
"edi is not zero %08lx\n",
ctx.Edi );
3958 ok( (
ctx.EFlags & ~2) == 0x200,
"wrong flags %08lx\n",
ctx.EFlags );
3959 ok( (
WORD)
ctx.FloatSave.ControlWord == 0x27f,
"wrong control %08lx\n",
ctx.FloatSave.ControlWord );
3960 ok( *(
WORD *)
ctx.ExtendedRegisters == 0x27f,
"wrong control %08x\n", *(
WORD *)
ctx.ExtendedRegisters );
3961 start_ptr = (
void *)
ctx.Eip;
3962 entry_ptr = (
void *)
ctx.Eax;
3963 peb_ptr = (
void *)
ctx.Ebx;
3965 rop_chain.exit_process_ptr = exit_process_ptr;
3966 rop_chain.pipe_name = (
ULONG_PTR)remote_pipe_params +
offsetof(
struct pipe_params, pipe_name);
3967 rop_chain.pipe_write_buf = (
ULONG_PTR)remote_pipe_params +
offsetof(
struct pipe_params, pipe_write_buf);
3968 rop_chain.pipe_write_buf_size =
sizeof(pipe_params.pipe_write_buf);
3969 rop_chain.pipe_read_buf = (
ULONG_PTR)remote_pipe_params +
offsetof(
struct pipe_params, pipe_read_buf);
3970 rop_chain.pipe_read_buf_size =
sizeof(pipe_params.pipe_read_buf);
3971 rop_chain.bytes_returned = (
ULONG_PTR)remote_pipe_params +
offsetof(
struct pipe_params, bytes_returned);
3972 rop_chain.timeout = 10000;
3973 rop_chain.exit_code = 0;
3976 ctx.Esp -=
sizeof(rop_chain);
3978 ok(
ret,
"Failed to write to remote process thread stack (%ld)\n",
GetLastError());
3986 if (user_thread_start)
3987 ok( start_ptr == user_thread_start,
3988 "wrong start addr %p / %p\n", start_ptr, user_thread_start );
3990 "wrong entry point %p/%p\n", entry_ptr,
4015 if (pNtQueryInformationThread)
4025 ok( child_teb.
Peb == peb_ptr,
"wrong Peb %p / %p\n", child_teb.
Peb, peb_ptr );
4052 ok(pipe_connected,
"Pipe did not connect\n");
4054 ret =
ReadFile(server_pipe_handle, &pipe_magic,
sizeof(pipe_magic), &numb,
NULL);
4057 ok(pipe_magic == pipe_write_magic,
"Did not get the correct magic from the remote process\n");
4064 ok(
ret,
"EXE IAT is not resolved\n");
4066 ret =
WriteFile(server_pipe_handle, &pipe_magic,
sizeof(pipe_magic), &numb,
NULL);
4095 if (!pGetNumaProcessorNode)
4097 win_skip(
"GetNumaProcessorNode is missing\n");
4102 for (
i = 0;
i < 256;
i++)
4106 ret = pGetNumaProcessorNode(
i, &
node);
4109 ok(
ret,
"GetNumaProcessorNode returned FALSE for processor %d\n",
i);
4110 ok(
node != 0xFF,
"expected node != 0xFF, but got 0xFF\n");
4114 ok(!
ret,
"GetNumaProcessorNode returned TRUE for processor %d\n",
i);
4123 DWORD session_id, active_session;
4128 trace(
"session_id = %lx\n", session_id);
4130 active_session = pWTSGetActiveConsoleSessionId();
4131 trace(
"active_session = %lx\n", active_session);
4137 static const ULONG info_size[] =
4185 sizeof(PROCESS_AFFINITY_UPDATE_MODE) ,
4186 sizeof(PROCESS_MEMORY_ALLOCATION_MODE) ,
4190 sizeof(PROCESS_WINDOW_INFORMATION) ,
4191 sizeof(PROCESS_HANDLE_SNAPSHOT_INFORMATION) ,
4192 sizeof(PROCESS_MITIGATION_POLICY_INFORMATION) ,
4195 sizeof(PROCESS_KEEPALIVE_COUNT_INFORMATION) ,
4196 sizeof(PROCESS_REVOKE_FILE_HANDLES_INFORMATION) ,
4197 sizeof(PROCESS_WORKING_SET_CONTROL) ,
4201 sizeof(PS_PROTECTION) ,
4202 sizeof(PROCESS_MEMORY_EXHAUSTION_INFO) ,
4203 sizeof(PROCESS_FAULT_INFORMATION) ,
4204 sizeof(PROCESS_TELEMETRY_ID_INFORMATION) ,
4205 sizeof(PROCESS_COMMIT_RELEASE_INFORMATION) ,
4211 sizeof(PROCESS_JOB_MEMORY_INFO) ,
4217 if (!pNtQueryInformationProcess)
4219 win_skip(
"NtQueryInformationProcess is not available on this platform\n");
4260 "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n",
i,
status,
ret_len);
4265 "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n",
i,
status,
ret_len);
4288 "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n",
i,
status,
ret_len);
4297 "for info %lu expected STATUS_ACCESS_DENIED, got %08lx (ret_len %lu)\n",
i,
status,
ret_len);
4309 if (!pGetLogicalProcessorInformationEx)
4311 win_skip(
"GetLogicalProcessorInformationEx() is not supported\n");
4338 skip(
"Cannot build test_GetSystemCpuSetInformation() until kernelbase is synced.\n");
4347 if (!pGetSystemCpuSetInformation)
4349 win_skip(
"GetSystemCpuSetInformation() is not supported.\n");
4367 ok(!
size,
"Got unexpected size %lu.\n",
size);
4373 ok(!
size,
"Got unexpected size %lu.\n",
size);
4379 ok(
size == expected_size,
"Got unexpected size %lu.\n",
size);
4391 ok(
size == expected_size,
"Got unexpected size %lu.\n",
size);
4393 ok(!
memcmp(
info, info_nt, expected_size),
"Info does not match NtQuerySystemInformationEx().\n");
4404 if (!pGetLargePageMinimum) {
4405 win_skip(
"No GetLargePageMinimum support.\n");
4408 size = pGetLargePageMinimum();
4410 ok((
size == 0) || (
size == 2*1024*1024) || (
size == 4*1024*1024),
"GetLargePageMinimum reports %Id size\n",
size);
4438 if (!pInitializeProcThreadAttributeList)
4440 win_skip(
"No support for ProcThreadAttributeList\n");
4444 for (
i = 0;
i <= 10;
i++)
4447 ret = pInitializeProcThreadAttributeList(
NULL,
i, 0, &
size);
4452 ok(
size == needed,
"%d: got %Id expect %Id\n",
i,
size, needed);
4455 ret = pInitializeProcThreadAttributeList(&
list,
i, 0, &
size);
4457 ok(
list.mask == 0,
"%d: got %08lx\n",
i,
list.mask);
4459 ok(
list.count == 0,
"%d: got %08lx\n",
i,
list.count);
4460 ok(
list.unk == 0,
"%d: got %08Ix\n",
i,
list.unk);
4464 memset(&expect_list, 0xcc,
sizeof(expect_list));
4465 expect_list.
mask = 0;
4466 expect_list.
size =
i - 1;
4467 expect_list.
count = 0;
4468 expect_list.
unk = 0;
4489 expect_list.
count++;
4506 expect_list.
count++;
4521 expect_list.
count++;
4529 unsigned int i = expect_list.
count++;
4538 pDeleteProcThreadAttributeList(&
list);
4571 if (!pInitializeProcThreadAttributeList)
4573 win_skip(
"No support for ProcThreadAttributeList.\n");
4578 sa.nLength =
sizeof(
sa);
4579 sa.bInheritHandle =
TRUE;
4595 memset(&parent_data, 0,
sizeof(parent_data));
4598 "Got unexpected ret %#x, level %u, GetLastError() %lu.\n",
4604 ok(
parent_id == parent_data.parent_id,
"Got parent id %lu, parent_data.parent_id %lu.\n",
4610 si.StartupInfo.cb =
sizeof(
si);
4617 ret = pInitializeProcThreadAttributeList(
NULL, 1, 0, &
size);
4619 "Got unexpected ret %#x, GetLastError() %lu.\n",
ret,
GetLastError());
4631 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4642 pDeleteProcThreadAttributeList(
si.lpAttributeList);
4646 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4656 pDeleteProcThreadAttributeList(
si.lpAttributeList);
4660 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4670 pDeleteProcThreadAttributeList(
si.lpAttributeList);
4674 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4684 "Got unexpected ret %#x, GetLastError() %lu.\n",
ret,
GetLastError());
4687 pDeleteProcThreadAttributeList(
si.lpAttributeList);
4691 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4708 pDeleteProcThreadAttributeList(
si.lpAttributeList);
4746#if !defined(__REACTOS__) || DLL_EXPORT_VERSION >= 0x600
4756#if !defined(__REACTOS__) || DLL_EXPORT_VERSION >= 0x600
4769 skip(
"test_handle_list_attribute() crashes on WS03.\n");
4773 ret = pInitializeProcThreadAttributeList(
NULL, 1, 0, &
size);
4775 "Got unexpected ret %#x, GetLastError() %lu.\n",
ret,
GetLastError());
4778 si.StartupInfo.cb =
sizeof(
si);
4780 ret = pInitializeProcThreadAttributeList(
si.lpAttributeList, 1, 0, &
size);
4784 sa.nLength =
sizeof(
sa);
4785 sa.bInheritHandle =
TRUE;
4788 ok(
ret,
"Failed to create a pipe.\n");
4821 skip(
"test_dead_process() crashes on WS03.\n");
4835 memset( prio, 0xcc,
sizeof(*prio) );
4840 memset( &basic, 0xcc,
sizeof(basic) );
4843 ok( basic.
ExitStatus == 0,
"ProcessBasicInformation info modified\n" );
4848 ok(
image.Machine == 0xcccc,
"ProcessImageInformation info modified\n" );
4867 ok( !found,
"process still enumerated\n" );
4894 job_parent = pCreateJobObjectW(
NULL,
NULL);
4895 ok(!!job_parent,
"CreateJobObjectA error %lu\n",
GetLastError());
4904 "AssignProcessToJobObject error %lu\n",
GetLastError());
4907 win_skip(
"Nested jobs are not supported.\n");
4916 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
4921 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
4926 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
4931 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
4959 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
4964 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
4991 ok(!
ret,
"GetQueuedCompletionStatus succeeded.\n");
4996 ok(!
ret,
"AssignProcessToJobObject succeeded\n");
5022 if (!pIsProcessInJob)
5024 win_skip(
"IsProcessInJob not available.\n");
5028 job1 = pCreateJobObjectW(
NULL,
NULL);
5029 ok(!!job1,
"CreateJobObjectW failed, error %lu.\n",
GetLastError());
5030 job2 = pCreateJobObjectW(
NULL,
NULL);
5031 ok(!!job2,
"CreateJobObjectW failed, error %lu.\n",
GetLastError());
5033 create_succeeded =
TRUE;
5035 for (
i = 0;
i < 2; ++
i)
5040 create_succeeded =
FALSE;
5046 if (create_succeeded)
5051 if (!already_in_job)
5060 ok(!
ret,
"AssignProcessToJobObject succeeded\n");
5069 ok(!
ret,
"AssignProcessToJobObject succeeded\n");
5081 win_skip(
"Test process is already in job, can't test parenting non-empty job.\n");
5087 job1 = pCreateJobObjectW(
NULL,
L"test_nested_jobs_0");
5088 ok(!!job1,
"CreateJobObjectW failed, error %lu.\n",
GetLastError());
5089 job2 = pCreateJobObjectW(
NULL,
L"test_nested_jobs_1");
5090 ok(!!job2,
"CreateJobObjectW failed, error %lu.\n",
GetLastError());
5093 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0,
NULL,
NULL, &
si, &
info[0]),
5094 "CreateProcess failed\n");
5097 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE, 0,
NULL,
NULL, &
si, &
info[1]),
5098 "CreateProcess failed\n");
5100 for (
i = 0;
i < 2; ++
i)
5127 if (!pInitializeProcThreadAttributeList)
5129 win_skip(
"No support for ProcThreadAttributeList\n");
5133 ret = pInitializeProcThreadAttributeList(
NULL, 1, 0, &
size);
5135 "Got unexpected ret %#x, GetLastError() %lu.\n",
ret,
GetLastError());
5139 jobs[0] = (
HANDLE)0xdeadbeef;
5142 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5149 win_skip(
"PROC_THREAD_ATTRIBUTE_JOB_LIST is not supported.\n");
5150 pDeleteProcThreadAttributeList(
attrs);
5156 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5163 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5169 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5175 si.StartupInfo.cb =
sizeof(
si);
5184 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5193 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5203 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5208 jobs[0] = pCreateJobObjectW(
NULL,
NULL);
5210 jobs[1] = pCreateJobObjectW(
NULL,
NULL);
5222 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5232 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
5236 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5240 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
5246 jobs[1] = pCreateJobObjectW(
NULL,
NULL);
5249 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5259 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5263 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5267 ok(!
out,
"IsProcessInJob returned out=%u\n",
out);
5275 ok(!
job_info.TotalProcesses,
"Got unexpected TotalProcesses %lu.\n",
job_info.TotalProcesses);
5276 ok(!
job_info.ActiveProcesses,
"Got unexpected ActiveProcesses %lu.\n",
job_info.ActiveProcesses);
5281 ok(
job_info.TotalProcesses == 1,
"Got unexpected TotalProcesses %lu.\n",
job_info.TotalProcesses);
5282 ok(!
job_info.ActiveProcesses ||
job_info.ActiveProcesses == 1,
"Got unexpected ActiveProcesses %lu.\n",
5286 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5300 ok(!
ret,
"GetQueuedCompletionStatus succeeded.\n");
5326 ok(!
ret,
"GetQueuedCompletionStatus succeeded.\n");
5334 ok(
job_info.TotalProcesses == 1,
"Got unexpected TotalProcesses %lu.\n",
job_info.TotalProcesses);
5335 ok(!
job_info.ActiveProcesses,
"Got unexpected ActiveProcesses %lu.\n",
job_info.ActiveProcesses);
5340 ok(
job_info.TotalProcesses == 1,
"Got unexpected TotalProcesses %lu.\n",
job_info.TotalProcesses);
5341 ok(!
job_info.ActiveProcesses,
"Got unexpected ActiveProcesses %lu.\n",
job_info.ActiveProcesses);
5344 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5354 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5358 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5367 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5379 jobs[0] = pCreateJobObjectW(
NULL,
NULL);
5381 jobs[1] = pCreateJobObjectW(
NULL,
NULL);
5385 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5395 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5399 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5403 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5408 ret = pInitializeProcThreadAttributeList(
attrs, 1, 0, &
size);
5418 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5422 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5426 ok(
out,
"IsProcessInJob returned out=%u\n",
out);
5434 pDeleteProcThreadAttributeList(
attrs);
5448 ULONG services_pid = 0, services_session_id = ~0;
5454 for (
try = 0;
try < 3;
try++)
5472 if (!
wcsnicmp(spi->ProcessName.Buffer,
L"services.exe", spi->ProcessName.Length/
sizeof(
WCHAR)))
5480 ok(services_pid != 0,
"services.exe not found\n");
5482 ok(services_session_id == 0,
"got services.exe SessionId %lu\n", services_session_id);
5507 ok(startup_beforeA.
dwX == startup_afterA.
dwX,
"Unexpected field value\n");
5508 ok(startup_beforeA.
dwFlags == startup_afterA.
dwFlags,
"Unexpected field value\n");
5514 "Unexpected field value\n");
5516 "Unexpected field value\n");
5528 ok(~startup_beforeW.
dwX == startup_afterW.
dwX,
"Unexpected field value\n");
5536 ok(startup_beforeW.
hStdInput == (
HANDLE)0x12340000,
"Unexpected field value\n");
5576 if (!pGetProcessInformation)
5578 win_skip(
"GetProcessInformation() is not available.\n");
5586 win_skip(
"GetProcessInformation(ProcessMachineTypeInfo) is not supported.\n");
5589 ok(!
ret,
"Unexpected return value %d.\n",
ret);
5593 ok(!
ret,
"Unexpected return value %d.\n",
ret);
5597 ok(!
ret,
"Unexpected return value %d.\n",
ret);
5601 ok(!
ret,
"Unexpected return value %d.\n",
ret);
5605 ok(
ret,
"Unexpected return value %d.\n",
ret);
5607#if !defined(__REACTOS__) || DLL_EXPORT_VERSION >= 0x601
5610 machines,
sizeof(machines),
NULL );
5611 ok(!
status,
"Failed to get architectures information.\n");
5616 ok(
mi.ProcessMachine == machines[
i].
Machine,
"Unexpected process machine %#x.\n",
mi.ProcessMachine);
5618 mi.MachineAttributes);
5620 mi.MachineAttributes);
5622 mi.MachineAttributes);
5624 mi.MachineAttributes);
5635 ok(
b,
"Basic init of CreateProcess test\n");
5648 ok(0,
"Child process not killed\n");
5680 ok(
CreateProcessA(
NULL,
buffer,
NULL,
NULL,
FALSE,
CREATE_SUSPENDED,
NULL,
NULL, &
startup, &
info),
"CreateProcess failed\n");
5689 childPrintf(
hFile,
"[Nested]\nPid=%08lu\n",
info.dwProcessId);
5712 ok(0,
"Unexpected command %s\n",
myARGV[2]);
5722 win_skip(
"PROCESS_QUERY_LIMITED_INFORMATION is not supported on this platform\n");
5770 ok(
FALSE,
"FIXME: ReactOS's job support is too basic for these tests.\n");
5774 if (!pCreateJobObjectW)
5776 win_skip(
"No job object support\n");
static void startup(void)
static struct sockaddr_in sa
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
BOOL WINAPI SetConsoleOutputCP(IN UINT wCodepage)
BOOL WINAPI SetConsoleCursorPosition(IN HANDLE hConsoleOutput, IN COORD dwCursorPosition)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
@ ProcessBreakOnTermination
@ ProcessBasicInformation
@ ProcessWow64Information
SIZE_T LPPROCESS_INFORMATION
#define STATUS_NOT_IMPLEMENTED
static LPCWSTR LPCWSTR module_name
static LPCWSTR LPCWSTR LPCWSTR env
#define ERROR_INSUFFICIENT_BUFFER
static const WCHAR deviceW[]
static const WCHAR empty[]
#define ReadProcessMemory(a, b, c, d, e)
#define IMAGE_FILE_MACHINE_ARMNT
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define ReadFile(a, b, c, d, e)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define CreateFileA(a, b, c, d, e, f, g)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define stricmp(_String1, _String2)
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define IMAGE_FILE_MACHINE_ARM64
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
BOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle, LPDWORD lpMode)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCP(UINT wCodePageID)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleMode(HANDLE hConsoleHandle, DWORD dwMode)
BOOL WINAPI ContinueDebugEvent(IN DWORD dwProcessId, IN DWORD dwThreadId, IN DWORD dwContinueStatus)
BOOL WINAPI WaitForDebugEvent(IN LPDEBUG_EVENT lpDebugEvent, IN DWORD dwMilliseconds)
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
BOOL WINAPI FreeEnvironmentStringsA(IN LPSTR EnvironmentStrings)
BOOL WINAPI CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetFileType(HANDLE hFile)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI QueryInformationJobObject(IN HANDLE hJob, IN JOBOBJECTINFOCLASS JobObjectInformationClass, IN LPVOID lpJobObjectInformation, IN DWORD cbJobObjectInformationLength, OUT LPDWORD lpReturnLength)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL NTAPI WriteProcessMemory(IN HANDLE hProcess, IN LPVOID lpBaseAddress, IN LPCVOID lpBuffer, IN SIZE_T nSize, OUT SIZE_T *lpNumberOfBytesWritten)
VOID WINAPI ExitProcess(IN UINT uExitCode)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
VOID WINAPI GetStartupInfoA(IN LPSTARTUPINFOA lpStartupInfo)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
DWORD WINAPI ResumeThread(IN HANDLE hThread)
HANDLE WINAPI CreateRemoteThread(IN HANDLE hProcess, IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI SetThreadContext(IN HANDLE hThread, IN CONST CONTEXT *lpContext)
HANDLE WINAPI OpenThread(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwThreadId)
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
BOOL WINAPI GetThreadContext(IN HANDLE hThread, OUT LPCONTEXT lpContext)
INT WINAPI GetPrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR def_val, LPSTR buffer, UINT len, LPCSTR filename)
UINT WINAPI GetPrivateProfileIntA(LPCSTR section, LPCSTR entry, INT def_val, LPCSTR filename)
BOOL WINAPI DECLSPEC_HOTPATCH WritePrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI DECLSPEC_HOTPATCH FreeConsole(void)
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleCP(void)
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleOutputCP(void)
BOOL WINAPI AllocConsole(void)
BOOL WINAPI DECLSPEC_HOTPATCH ProcessIdToSessionId(DWORD pid, DWORD *id)
void WINAPI DECLSPEC_HOTPATCH GetStartupInfoW(STARTUPINFOW *info)
BOOL WINAPI DECLSPEC_HOTPATCH GetHandleInformation(HANDLE handle, DWORD *flags)
DWORD WINAPI DECLSPEC_HOTPATCH GetProcessVersion(DWORD pid)
HANDLE WINAPI DECLSPEC_HOTPATCH GetStdHandle(DWORD std_handle)
BOOL WINAPI DECLSPEC_HOTPATCH SetHandleInformation(HANDLE handle, DWORD mask, DWORD flags)
BOOL WINAPI DECLSPEC_HOTPATCH FreeEnvironmentStringsW(LPWSTR ptr)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
LPWSTR WINAPI DECLSPEC_HOTPATCH GetEnvironmentStringsW(void)
BOOL WINAPI DECLSPEC_HOTPATCH DuplicateHandle(HANDLE source_process, HANDLE source, HANDLE dest_process, HANDLE *dest, DWORD access, BOOL inherit, DWORD options)
LPSTR WINAPI DECLSPEC_HOTPATCH GetEnvironmentStringsA(void)
BOOL WINAPI DECLSPEC_HOTPATCH GetExitCodeProcess(HANDLE process, LPDWORD exit_code)
LPWSTR WINAPI GetCommandLineW(void)
LPSTR WINAPI GetCommandLineA(void)
BOOL WINAPI DECLSPEC_HOTPATCH SetStdHandle(DWORD std_handle, HANDLE handle)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP double __cdecl fmin(double, double)
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl vsprintf(char *, const char *, va_list) __WINE_CRT_PRINTF_ATTR(2
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl sscanf(const char *, const char *,...) __WINE_CRT_SCANF_ATTR(2
_ACRTIMP int __cdecl atoi(const char *)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
_ACRTIMP char *__cdecl strrchr(const char *, int)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
@ SystemProcessInformation
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLuint GLint GLboolean GLint GLenum access
GLenum GLenum GLenum GLenum mapping
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
struct _PROCESS_PRIORITY_CLASS PROCESS_PRIORITY_CLASS
#define PROCESS_QUERY_INFORMATION
#define JOB_OBJECT_LIMIT_BREAKAWAY_OK
struct _JOBOBJECT_BASIC_PROCESS_ID_LIST JOBOBJECT_BASIC_PROCESS_ID_LIST
enum _JOBOBJECTINFOCLASS JOBOBJECTINFOCLASS
#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
#define PROCESS_VM_OPERATION
#define JOB_OBJECT_TERMINATE
@ JobObjectAssociateCompletionPortInformation
@ JobObjectBasicLimitInformation
@ JobObjectBasicAccountingInformation
@ JobObjectExtendedLimitInformation
@ JobObjectBasicProcessIdList
#define JOB_OBJECT_ASSIGN_PROCESS
#define PROCESS_CREATE_PROCESS
#define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK
#define JOB_OBJECT_SET_ATTRIBUTES
struct _PROCESS_BASIC_INFORMATION PROCESS_BASIC_INFORMATION
REFIID LPVOID DWORD_PTR dw
NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS, void *, ULONG, void *, ULONG, ULONG *)
struct _KERNEL_USER_TIMES KERNEL_USER_TIMES
struct _PROCESS_CYCLE_TIME_INFORMATION PROCESS_CYCLE_TIME_INFORMATION
@ ProcessLUIDDeviceMapsEnabled
@ ProcessDynamicFunctionTableInformation
@ ProcessImageInformation
@ ProcessImageFileNameWin32
@ ProcessDefaultHardErrorMode
@ ProcessDebugObjectHandle
NTSYSAPI PEB *WINAPI RtlGetCurrentPeb(void)
struct _IO_COUNTERS IO_COUNTERS
BOOL WINAPI GetQueuedCompletionStatus(IN HANDLE CompletionHandle, IN LPDWORD lpNumberOfBytesTransferred, OUT PULONG_PTR lpCompletionKey, OUT LPOVERLAPPED *lpOverlapped, IN DWORD dwMilliseconds)
int WINAPI lstrlenA(LPCSTR lpString)
_In_ BOOL _In_ HANDLE hProcess
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
#define CREATE_PROCESS_DEBUG_EVENT
#define LOAD_DLL_DEBUG_EVENT
#define EXIT_PROCESS_DEBUG_EVENT
PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE
#define EXCEPTION_DEBUG_EVENT
struct _OVERLAPPED * LPOVERLAPPED
#define ERROR_FILE_NOT_FOUND
#define FILE_FLAG_WRITE_THROUGH
static IMAGE_DOS_HEADER dos_header
static IMAGE_NT_HEADERS32 nt_header
static struct test_info tests[]
#define PROCESS_QUERY_LIMITED_INFORMATION
static BOOL run_tests(void)
static PROCESS_INFORMATION pi
static void test_nested_jobs(void)
#define expect_eq_ws_i(expected, actual)
static void test_nested_jobs_child(unsigned int index)
#define okChildHexInt(sect, key, expect, is_broken)
static void test_Toolhelp(void)
static void _test_accounting(int line, HANDLE job, unsigned int total, unsigned int active, unsigned int terminated)
static BOOL check_run_child(const char *exec, DWORD flags, BOOL cp_inherit, STARTUPINFOA *si)
#define test_completion(a, b, c, d, e)
static void _test_assigned_proc(int line, HANDLE job, unsigned int count,...)
static SIZE_T *static DWORD_PTR
#define test_accounting(a, b, c, d)
static void test_ExitCode(void)
static HANDLE ULONG_PTR key
#define MAX_LISTED_ENV_VAR
static const char * encodeA(const char *str)
static void test_StdHandleInheritance(void)
static HINSTANCE hkernel32
static char * memory_index
static void test_SuspendFlag(void)
static void test_KillOnJobClose(void)
static void ok_child_string(int line, const char *sect, const char *key, const char *expect, int sensitive)
static void _test_completion(int line, HANDLE port, DWORD ekey, ULONG_PTR evalue, ULONG_PTR eoverlapped, DWORD wait)
static void test_CommandLine(void)
static void test_startupinfo(void)
#define PROCESS_ALL_ACCESS_NT4
static void test_IsProcessInJob(void)
static void test_SuspendProcessState(void)
static HANDLE test_AddSelfToJob(void)
static unsigned encode_handle_attributes(HANDLE h)
static USHORT USHORT *static DWORD dwFlags
static int strCmp(const char *s1, const char *s2, BOOL sensitive)
#define ARG_HANDLE_PROTECT
static void doChild(const char *file, const char *option)
#define okChildString(sect, key, expect)
static void test_Directory(void)
#define okChildStringWA(sect, key, expect)
static void test_GetProcessVersion(void)
#define test_assigned_proc(job,...)
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
#define expect_eq_s(expected, actual)
static BOOL is_str_env_drive_dir(const char *str)
#define expect_eq_d(expected, actual)
static unsigned decode_char(char c)
#define okChildIString(sect, key, expect)
static void test_job_list_attribute(HANDLE parent_job)
static void test_services_exe(void)
#define HANDLE_UNTOUCHEDW
static USHORT USHORT *static DWORD LPSTR PDWORD lpdwSize
static void test_SystemInfo(void)
static HANDLE ULONG_PTR DWORD threads
static void test_DebuggingFlag(void)
static char * decodeA(const char *str)
static void test_WaitForJobObject(void)
static HANDLE existing_port
static void ok_child_int(int line, const char *sect, const char *key, UINT expect)
#define THREAD_ALL_ACCESS_NT4
static HANDLE PBOOL result
static void test_CompletionPort(void)
static void ok_child_stringWA(int line, const char *sect, const char *key, const char *expect, int sensitive)
static SIZE_T *static void SIZE_T
static void test_TerminateProcess(void)
#define create_process(cmd, pi)
static void test_jobInheritance(HANDLE job)
static void test_Handles(void)
static void copy_change_subsystem(const char *in, const char *out, DWORD subsyst)
static void test_DuplicateHandle(void)
static USHORT USHORT *static DWORD LPSTR lpExeName
static BOOL build_startupinfo(STARTUPINFOA *startup, unsigned args, HANDLE hstd[2])
static void test_handle_list_attribute(BOOL child, HANDLE handle1, HANDLE handle2)
static void test_QueryFullProcessImageNameW(void)
static void ok_child_hexint(int line, const char *sect, const char *key, UINT expect, UINT is_broken)
static WCHAR * decodeW(const char *str)
static void test_IsWow64Process(void)
static void test_session_info(void)
static void _create_process(int line, const char *command, LPPROCESS_INFORMATION pi)
static PROCESS_INFORMATION_CLASS
static void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
static void test_Startup(void)
static void reload_child_info(const char *resfile)
static void test_dead_process(void)
#define ARG_HANDLE_INHERIT
static void test_OpenProcess(void)
static void test_largepages(void)
static void test_Console(void)
static void release_memory(void)
static char memory[1024 *256]
static void test_process_info(HANDLE hproc)
#define okChildInt(sect, key, expect)
static char resfile[MAX_PATH]
static void test_QueryInformationJobObject(void)
static WCHAR * getChildStringW(const char *sect, const char *key)
static void test_QueryFullProcessImageNameA(void)
static void test_SuspendProcessNewThread(void)
static char * grab_memory(size_t len)
static void test_GetProcessImageFileNameA(void)
static void test_GetSystemCpuSetInformation(void)
static void test_ProcThreadAttributeList(void)
static void test_GetNumaProcessorNode(void)
static void test_BreakawayOk(HANDLE parent_job)
static void test_RegistryQuota(void)
static JOBOBJECTINFOCLASS LPVOID info
static void cmpEnvironment(const char *gesA)
static void test_GetLogicalProcessorInformationEx(void)
static void test_TerminateJobObject(void)
static void test_IsWow64Process2(void)
static char selfname[MAX_PATH]
static void test_ProcessorCount(void)
static void wait_and_close_child_process(PROCESS_INFORMATION *pi)
static void test_Environment(void)
static char * getChildString(const char *sect, const char *key)
static void test_GetProcessInformation(void)
static char std_handle_file[MAX_PATH]
static const char * encodeW(const WCHAR *str)
static DWORD CALLBACK read_pipe(void *arg)
static const char machine[]
#define __WINE_PRINTF_ATTR(fmt, args)
static SCRIPT_CACHE SCRIPT_ANALYSIS * psa
@ SystemSupportedProcessorArchitectures
@ SystemCpuSetInformation
#define PROCESSOR_ARCHITECTURE_AMD64
#define PROCESSOR_ARCHITECTURE_INTEL
#define DUPLICATE_SAME_ATTRIBUTES
BOOL WINAPI ConnectNamedPipe(IN HANDLE hNamedPipe, IN LPOVERLAPPED lpOverlapped)
HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize)
#define ALL_PROCESSOR_GROUPS
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IMAGE_SUBSYSTEM_WINDOWS_CUI
#define IMAGE_SUBSYSTEM_WINDOWS_GUI
#define IMAGE_FILE_MACHINE_AMD64
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_writes_bytes_to_opt_(ProcessInformationLength, *ReturnLength) PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define STATUS_PROCESS_IS_TERMINATING
#define STATUS_PORT_NOT_SET
#define STATUS_INVALID_INFO_CLASS
static BOOL read_bytes(parse_buffer *buf, LPVOID data, DWORD size)
#define IMAGE_DIRECTORY_ENTRY_IMPORT
#define IMAGE_FILE_MACHINE_I386
#define IMAGE_FILE_MACHINE_UNKNOWN
#define IMAGE_NT_SIGNATURE
#define IMAGE_DOS_SIGNATURE
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
#define _WIN32_WINNT_WIN8
#define _WIN32_WINNT_VISTA
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
union _DEBUG_EVENT::@3249 u
LOAD_DLL_DEBUG_INFO LoadDll
CREATE_PROCESS_DEBUG_INFO CreateProcessInfo
ULONG NumberOfProcessIdsInList
ULONG NumberOfAssignedProcesses
ULONG_PTR ProcessIdList[1]
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
UNICODE_STRING CSDVersion
ULONG HeapDeCommitTotalFreeThreshold
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
LARGE_INTEGER CriticalSectionTimeout
PRTL_BITMAP TlsExpansionBitmap
ULONG HeapDeCommitFreeBlockThreshold
struct proc_thread_attr attrs[1]
UNICODE_STRING CommandLine
DWORD dwNumberOfProcessors
WORD wProcessorArchitecture
WCHAR StaticUnicodeBuffer[261]
PVOID * TlsExpansionSlots
UNICODE_STRING StaticUnicodeString
COORD dwMaximumWindowSize
DWORD th32ParentProcessID
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenSemaphoreA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
#define TH32CS_SNAPPROCESS
#define TH32CS_SNAPTHREAD
#define FIELD_OFFSET(t, f)
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INFO_LENGTH_MISMATCH
static EFI_HANDLE * handles
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
LPVOID NTAPI VirtualAllocEx(IN HANDLE hProcess, IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
SIZE_T NTAPI VirtualQueryEx(IN HANDLE hProcess, IN LPCVOID lpAddress, OUT PMEMORY_BASIC_INFORMATION lpBuffer, IN SIZE_T dwLength)
BOOL NTAPI VirtualFreeEx(IN HANDLE hProcess, IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
#define PROCESS_NAME_NATIVE
#define STD_OUTPUT_HANDLE
#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE
#define CREATE_BREAKAWAY_FROM_JOB
DWORD WINAPI GetLastError(void)
#define PROC_THREAD_ATTRIBUTE_JOB_LIST
#define STARTF_USESHOWWINDOW
@ ProcThreadAttributePseudoConsole
@ ProcThreadAttributeIdealProcessor
@ ProcThreadAttributeParentProcess
@ ProcThreadAttributeHandleList
#define PIPE_ACCESS_DUPLEX
#define HANDLE_FLAG_PROTECT_FROM_CLOSE
#define FILE_TYPE_UNKNOWN
#define FILE_MAP_ALL_ACCESS
#define HANDLE_FLAG_INHERIT
DWORD WINAPI GetCurrentProcessId(void)
struct _SYSTEM_INFO * LPSYSTEM_INFO
#define PIPE_READMODE_MESSAGE
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD _Out_opt_ LPSTR * lpFilePart
#define PROC_THREAD_ATTRIBUTE_PARENT_PROCESS
#define EXTENDED_STARTUPINFO_PRESENT
#define PROC_THREAD_ATTRIBUTE_HANDLE_LIST
#define PIPE_TYPE_MESSAGE
#define STARTF_USESTDHANDLES
#define PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING
_Inout_ PERBANDINFO * pbi
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define ERROR_OBJECT_NAME_EXISTS
#define ERROR_PATH_NOT_FOUND
#define ERROR_BAD_PATHNAME
#define ERROR_PIPE_CONNECTED
#define JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO
#define PROCESSOR_INTEL_PENTIUM
#define PROCESSOR_AMD_X8664
#define JOB_OBJECT_MSG_EXIT_PROCESS
#define JOB_OBJECT_MSG_NEW_PROCESS
SYSTEM_CPU_SET_INFORMATION
enum _LOGICAL_PROCESSOR_RELATIONSHIP LOGICAL_PROCESSOR_RELATIONSHIP
#define DUPLICATE_SAME_ACCESS
#define DUPLICATE_CLOSE_SOURCE