50#define NTDLL_GET_PROC(func) do { \
51 p ## func = (void*)GetProcAddress(hntdll, #func); \
53 trace("GetProcAddress(%s) failed\n", #func); \
92 if (!pNtQuerySystemInformationEx)
93 win_skip(
"NtQuerySystemInformationEx() is not supported, some tests will be skipped.\n");
111 trace(
"Check nonexistent info class\n");
114 "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08x\n",
status);
117 trace(
"Check zero-length buffer\n");
122 trace(
"Check no SystemInformation buffer\n");
125 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got %08x\n",
status);
128 trace(
"Check no ReturnLength pointer\n");
133 trace(
"Check a too large buffer size\n");
138 trace(
"Check with correct parameters\n");
197 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE {
201 ULONG uCurrentTimeZoneId;
203 } SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE;
205 SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE sti;
223 trace(
"Windows version is NT, we have to cater for differences with W2K/WinXP\n");
229 sti.uCurrentTimeZoneId = 0xdeadbeef;
232 ok( 0xdeadbeef == sti.uCurrentTimeZoneId,
"This part of the buffer should not have been filled\n");
244 sti.uCurrentTimeZoneId = 0xdeadbeef;
248 ok( 0xdeadbeef == sti.uCurrentTimeZoneId,
"This part of the buffer should not have been filled\n");
250 sti.uCurrentTimeZoneId = 0xdeadbeef;
254 ok( 0xdeadbeef != sti.uCurrentTimeZoneId,
"Buffer should have been partially filled\n");
259 "ReturnLength should be 0, it is (%d)\n",
ReturnLength);
267 trace(
"uCurrentTimeZoneId : (%d)\n", sti.uCurrentTimeZoneId);
280 typedef struct _SYSTEM_PROCESS_INFORMATION_PRIVATE {
281 ULONG NextEntryOffset;
288 DWORD dwBasePriority;
297 } SYSTEM_PROCESS_INFORMATION_PRIVATE;
299 ULONG SystemInformationLength =
sizeof(SYSTEM_PROCESS_INFORMATION_PRIVATE);
307 "Expected a ReturnLength to show the needed length\n");
340 if (is_nt)
win_skip(
"Windows version is NT, we will skip thread tests\n");
354 last_pid = (
DWORD_PTR)spi->UniqueProcessId;
357 ok( spi->dwThreadCount > 0,
"Expected some threads for this process, got 0\n");
364 for (
j = 0;
j < spi->dwThreadCount;
j++)
368 ok ( spi->ti[
j].ClientId.UniqueProcess == spi->UniqueProcessId,
369 "The owning pid of the thread (%p) doesn't equal the pid (%p) of the process\n",
370 spi->ti[
j].ClientId.UniqueProcess, spi->UniqueProcessId);
374 if (!spi->NextEntryOffset)
break;
378 spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((
char*)spi + spi->NextEntryOffset);
380 trace(
"Total number of running processes : %d\n",
i);
381 if (!is_nt)
trace(
"Total number of running threads : %d\n",
k);
437 "Expected STATUS_SUCCESS or STATUS_INFO_LENGTH_MISMATCH, got %08x\n",
status);
468 ok(
ReturnLength > 0,
"Expected a ReturnLength to show the needed length\n");
478 ok( ModuleCount > 0,
"Expected some modules to be loaded\n");
481 for (
i = 0;
i < ModuleCount ;
i++)
483 ok(
i == sm->
Id,
"Id (%d) should have matched %u\n", sm->
Id,
i);
507 ok(
ReturnLength != 0xdeadbeef,
"Expected valid ReturnLength\n" );
511 memset(shi, 0x55, SystemInformationLength);
517 SystemInformationLength *= 2;
519 memset(shi, 0x55, SystemInformationLength);
525 "Expected length %u, got %u\n", ExpectedLength,
ReturnLength );
526 ok( shi->
Count > 1,
"Expected more than 1 handle, got %u\n", shi->
Count );
528 "Uninitialized second handle\n" );
531 win_skip(
"Skipping broken SYSTEM_HANDLE_INFORMATION\n");
551 SystemInformationLength *= 2;
559 ok( !found,
"Unexpectedly found event handle in handle list\n" );
584 ok(
ReturnLength != 0xdeadbeef,
"Expected valid ReturnLength\n" );
588 memset(shi, 0x55, SystemInformationLength);
595 ok( shi->
Count > 1,
"Expected more than 1 handle, got %u\n", (
DWORD)shi->
Count );
616 ok( !found,
"Unexpectedly found event handle in handle list\n" );
752 win_skip(
"SystemLogicalProcessorInformation is not supported\n");
757 todo_wine ok(0,
"SystemLogicalProcessorInformation is not implemented\n");
761 ok(
len%
sizeof(*slpi) == 0,
"Incorrect length %d\n",
len);
768 for(
i=0;
i<
len/
sizeof(*slpi);
i++) {
769 switch(slpi[
i].Relationship) {
773 proc_no += slpi[
i].ProcessorMask%2;
779 ok(proc_no > 0,
"No processors were found\n");
794 if (!pNtQuerySystemInformationEx)
812 ok(
len == len2,
"got %u, expected %u\n", len2,
len);
823 ret = pGetLogicalProcessorInformationEx(
RelationAll, infoex2, &len2);
825 ok(!
memcmp(infoex, infoex2,
len),
"returned info data mismatch\n");
831 "Got invalid relationship value: 0x%x\n",
ex->Relationship);
834 ok(0,
"got infoex[%u].Size=0\n",
i);
838 trace(
"infoex[%u].Size: %u\n",
i,
ex->Size);
839 switch(
ex->Relationship){
842 trace(
"infoex[%u].Relationship: 0x%x (Core == 0x0 or Package == 0x3)\n",
i,
ex->Relationship);
843 trace(
"infoex[%u].Processor.Flags: 0x%x\n",
i,
ex->Processor.Flags);
845 trace(
"infoex[%u].Processor.EfficiencyClass: 0x%x\n",
i,
ex->Processor.EfficiencyClass);
847 trace(
"infoex[%u].Processor.GroupCount: 0x%x\n",
i,
ex->Processor.GroupCount);
848 for(
j = 0;
j <
ex->Processor.GroupCount; ++
j){
849 trace(
"infoex[%u].Processor.GroupMask[%u].Mask: 0x%lx\n",
i,
j,
ex->Processor.GroupMask[
j].Mask);
850 trace(
"infoex[%u].Processor.GroupMask[%u].Group: 0x%x\n",
i,
j,
ex->Processor.GroupMask[
j].Group);
854 trace(
"infoex[%u].Relationship: 0x%x (NumaNode)\n",
i,
ex->Relationship);
855 trace(
"infoex[%u].NumaNode.NodeNumber: 0x%x\n",
i,
ex->NumaNode.NodeNumber);
856 trace(
"infoex[%u].NumaNode.GroupMask.Mask: 0x%lx\n",
i,
ex->NumaNode.GroupMask.Mask);
857 trace(
"infoex[%u].NumaNode.GroupMask.Group: 0x%x\n",
i,
ex->NumaNode.GroupMask.Group);
860 trace(
"infoex[%u].Relationship: 0x%x (Cache)\n",
i,
ex->Relationship);
861 trace(
"infoex[%u].Cache.Level: 0x%x\n",
i,
ex->Cache.Level);
862 trace(
"infoex[%u].Cache.Associativity: 0x%x\n",
i,
ex->Cache.Associativity);
863 trace(
"infoex[%u].Cache.LineSize: 0x%x\n",
i,
ex->Cache.LineSize);
864 trace(
"infoex[%u].Cache.CacheSize: 0x%x\n",
i,
ex->Cache.CacheSize);
865 trace(
"infoex[%u].Cache.Type: 0x%x\n",
i,
ex->Cache.Type);
866 trace(
"infoex[%u].Cache.GroupMask.Mask: 0x%lx\n",
i,
ex->Cache.GroupMask.Mask);
867 trace(
"infoex[%u].Cache.GroupMask.Group: 0x%x\n",
i,
ex->Cache.GroupMask.Group);
870 trace(
"infoex[%u].Relationship: 0x%x (Group)\n",
i,
ex->Relationship);
871 trace(
"infoex[%u].Group.MaximumGroupCount: 0x%x\n",
i,
ex->Group.MaximumGroupCount);
872 trace(
"infoex[%u].Group.ActiveGroupCount: 0x%x\n",
i,
ex->Group.ActiveGroupCount);
873 for(
j = 0;
j <
ex->Group.ActiveGroupCount; ++
j){
874 trace(
"infoex[%u].Group.GroupInfo[%u].MaximumProcessorCount: 0x%x\n",
i,
j,
ex->Group.GroupInfo[
j].MaximumProcessorCount);
875 trace(
"infoex[%u].Group.GroupInfo[%u].ActiveProcessorCount: 0x%x\n",
i,
j,
ex->Group.GroupInfo[
j].ActiveProcessorCount);
876 trace(
"infoex[%u].Group.GroupInfo[%u].ActiveProcessorMask: 0x%lx\n",
i,
j,
ex->Group.GroupInfo[
j].ActiveProcessorMask);
927 "Expected all but the last record to be overwritten.\n");
937 if (ppi[
i].
Number != 0xDEADBEEF)
break;
943 ok( ppi[1].
Number == 0xDEADBEEF,
"Expected untouched buffer.\n");
955 skip(
"Test needs more than one processor.\n");
979 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE, got %08x\n",
status);
1003 trace(
"Platform is_wow64 %d, ProcessInformation of ProcessWow64Information %lx\n",
is_wow64,
pbi[0]);
1047 typedef struct _PROCESS_BASIC_INFORMATION_PRIVATE {
1049 PPEB PebBaseAddress;
1063 trace(
"Check nonexistent info class\n");
1066 "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08x\n",
status);
1069 trace(
"Check NULL handle and buffer and zero-length buffersize\n");
1074 trace(
"Check NULL handle and buffer\n");
1077 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n",
status);
1080 trace(
"Check NULL handle\n");
1085 trace(
"Check NULL handle and too large buffersize\n");
1090 trace(
"Check NULL ReturnLength\n");
1095 trace(
"Check with correct parameters\n");
1101 trace(
"Too large buffersize\n");
1107 trace(
"ProcessID : %lx\n",
pbi.UniqueProcessId);
1108 ok(
pbi.UniqueProcessId > 0,
"Expected a ProcessID > 0, got 0\n");
1135 const SIZE_T alloc_size = 16 * 1024 * 1024;
1140 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n",
status);
1176 memset(&pvi, 0,
sizeof(pvi));
1201 "Expected to be greater than %lu, got %lu\n", prev_size + alloc_size, pvi.
VirtualSize);
1216 "Expected to be greater than %lu, got %lu\n", prev_size + alloc_size, pvi.
VirtualSize);
1226 "Expected to equal to %lu, got %lu\n", prev_size, pvi.
VirtualSize);
1240 win_skip(
"ProcessIoCounters information class is not supported\n");
1246 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n",
status);
1280 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n",
status);
1293 trace(
"ProcessTimes for current process\n");
1350 "Expected STATUS_INVALID_HANDLE, got %#x.\n",
status);
1357 &debug_port,
sizeof(debug_port),
NULL);
1361 &debug_port,
sizeof(debug_port) - 1,
NULL);
1365 &debug_port,
sizeof(debug_port) + 1,
NULL);
1369 &debug_port,
sizeof(debug_port),
NULL);
1370 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1371 ok(debug_port == 0,
"Expected port 0, got %#lx.\n", debug_port);
1374 &debug_port,
sizeof(debug_port),
NULL);
1375 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1403 DWORD orig_priority;
1409 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
status);
1427 "Expected PROCESS_PRIOCLASS_BELOW_NORMAL, got %u\n",
priority[0].PriorityClass);
1443 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n",
status);
1456 trace(
"ProcessHandleCount for current process\n");
1468 "Expected STATUS_INFO_LENGTH_MISMATCH or STATUS_SUCCESS, got %08x\n",
status);
1472 trace(
"HandleCount : %d\n", handlecount);
1475 ok( handlecount > 0,
"Expected some handles, got 0\n");
1491 win_skip(
"ProcessImageFileName is not supported\n");
1505 memcpy(&image_file_name,
buffer,
sizeof(image_file_name));
1537 win_skip(
"ProcessDebugObjectHandle is not supported\n");
1541 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n",
1545 sizeof(debug_object),
NULL);
1548 "Expected NtQueryInformationProcess to return STATUS_INVALID_HANDLE, got 0x%08x\n",
status);
1553 "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08x\n",
status);
1556 &debug_object,
sizeof(debug_object),
NULL);
1558 "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08x\n",
status);
1562 sizeof(debug_object) - 1,
NULL);
1564 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n",
status);
1568 sizeof(debug_object) + 1,
NULL);
1570 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n",
status);
1572 debug_object = (
HANDLE)0xdeadbeef;
1575 sizeof(debug_object),
NULL);
1577 "Expected NtQueryInformationProcess to return STATUS_PORT_NOT_SET, got 0x%08x\n",
status);
1578 ok(debug_object ==
NULL ||
1580 "Expected debug object handle to be NULL, got %p\n", debug_object);
1582 debug_object = (
HANDLE)0xdeadbeef;
1584 &debug_object,
sizeof(debug_object),
NULL);
1587 "Expected NtQueryInformationProcess to return STATUS_SUCCESS, got 0x%08x\n",
status);
1590 "Expected debug object handle to be non-NULL, got %p\n", debug_object);
1619 DWORD debug_flags = 0xdeadbeef;
1632 "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n",
status);
1636 "Expected STATUS_INVALID_HANDLE, got %#x.\n",
status);
1643 &debug_flags,
sizeof(debug_flags),
NULL);
1645 "Expected STATUS_INVALID_HANDLE, got %#x.\n",
status);
1648 &debug_flags,
sizeof(debug_flags) - 1,
NULL);
1652 &debug_flags,
sizeof(debug_flags) + 1,
NULL);
1657 &debug_flags,
sizeof(debug_flags),
NULL);
1658 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1659 ok(debug_flags ==
TRUE,
"Expected flag TRUE, got %x.\n", debug_flags);
1661 for (
i = 0;
i <
sizeof(test_flags)/
sizeof(test_flags[0]);
i++)
1674 &debug_flags,
sizeof(debug_flags),
NULL);
1675 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1676 ok(debug_flags ==
TRUE,
"Expected flag TRUE, got %x.\n", debug_flags);
1680 expected_flags =
FALSE;
1685 &debug_flags,
sizeof(debug_flags),
NULL);
1686 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1687 ok(debug_flags == expected_flags,
"Expected flag %x, got %x.\n", expected_flags, debug_flags);
1717 &debug_flags,
sizeof(debug_flags),
NULL);
1718 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1719 ok(debug_flags == expected_flags,
"Expected flag %x, got %x.\n", expected_flags, debug_flags);
1726 &debug_flags,
sizeof(debug_flags),
NULL);
1727 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1728 ok(debug_flags ==
FALSE,
"Expected flag FALSE, got %x.\n", debug_flags);
1737 for (
j = 0;
j < 100;
j++)
1742 "WaitForDebugEvent failed, last error %#x.\n",
GetLastError());
1752 ok(
j < 100 ||
broken(
j >= 100) ,
"Expected less than 100 debug events.\n");
1756 &debug_flags,
sizeof(debug_flags),
NULL);
1757 ok(!
status,
"NtQueryInformationProcess failed, status %#x.\n",
status);
1758 ok(debug_flags ==
FALSE,
"Expected flag FALSE, got %x.\n", debug_flags);
1772 static const char teststring[] =
"test string";
1776 ok(
process != 0,
"Expected to be able to open own process for reading memory\n");
1781 ok( readcount == 12,
"Expected to read 12 bytes, got %ld\n",readcount);
1782 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
1788 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
1795 ok( readcount == 0,
"Expected to read 0 bytes, got %ld\n",readcount);
1799 status = pNtReadVirtualMemory(0, teststring,
buffer, 12, &readcount);
1801 ok( readcount == 0,
"Expected to read 0 bytes, got %ld\n",readcount);
1807 ok( readcount == 12,
"Expected to read 12 bytes, got %ld\n",readcount);
1808 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
1811 status = pNtReadVirtualMemory(
process, teststring, (
void *)0x1234, 12, &readcount);
1813 ok( readcount == 0,
"Expected to read 0 bytes, got %ld\n",readcount);
1830 skip(
"No NtClose ... Win98\n");
1836 skip(
"Invalid Parameter on ProcessExecuteFlags query?\n");
1843 size.u.LowPart = 0x2000;
1844 size.u.HighPart = 0;
1845 status = pNtCreateSection ( &
h,
1862#if defined(__x86_64__) || defined(__i386__)
1863 *(
unsigned char*)
addr = 0xc3;
1864#elif defined(__arm__)
1865 *(
unsigned long*)
addr = 0xe12fff1e;
1866#elif defined(__aarch64__)
1867 *(
unsigned long*)
addr = 0xd65f03c0;
1869 ok(0,
"Add a return opcode for your architecture or expect a crash in this test\n");
1871 trace(
"trying to execute code in the readwrite only mapped anon file...\n");
1873 trace(
"...done.\n");
1877 ok( retlen ==
sizeof(
info),
"Expected STATUS_SUCCESS, got %08x\n",
status);
1892 static const WCHAR windowsW[] = {
'w',
'i',
'n',
'd',
'o',
'w',
's'};
1893 static const char teststring[] =
"test string";
1894 static char datatestbuf[42] =
"abc";
1895 static char rwtestbuf[42];
1910 trace(
"Check flags of the PE header of NTDLL.DLL at %p\n",
module);
1920 trace(
"Check flags of a function entry in NTDLL.DLL at %p\n", pNtQueryVirtualMemory);
1938 "mbi.Protect is 0x%x\n", mbi.
Protect);
1940 trace(
"Check flags of stack at %p\n", stackbuf);
1948 trace(
"Check flags of read-only data at %p\n", teststring);
1959 trace(
"Check flags of read-write data at %p\n", datatestbuf);
1967 "mbi.Protect is 0x%x\n", mbi.
Protect);
1969 trace(
"Check flags of read-write uninitialized data (.bss) at %p\n", rwtestbuf);
1978 "mbi.Protect is 0x%x\n", mbi.
Protect);
1980 else skip(
"bss is outside of module\n" );
1986 trace(
"Check section name of NTDLL.DLL with invalid size\n");
1988 memset(msn, 0,
sizeof(*msn));
1992 ok( readcount > 0,
"Expected readcount to be > 0\n");
1994 trace(
"Check section name of NTDLL.DLL with invalid size\n");
1996 memset(msn, 0,
sizeof(*msn));
2000 ok( readcount > 0,
"Expected readcount to be > 0\n");
2002 trace(
"Check section name of NTDLL.DLL\n");
2004 memset(msn, 0x55,
sizeof(*msn));
2005 memset(buffer_name, 0x77,
sizeof(buffer_name));
2009 ok( readcount > 0,
"Expected readcount to be > 0\n");
2014 ok( found,
"Section name does not contain \"Windows\"\n");
2016 trace(
"Check section name of non mapped memory\n");
2017 memset(msn, 0,
sizeof(buffer_name));
2021 ok( readcount == 0 ||
broken(readcount != 0) ,
"Expected readcount to be 0\n");
2032 DWORD_PTR proc_affinity, thread_affinity;
2039 proc_affinity =
pbi.AffinityMask;
2044 "Expected STATUS_INVALID_PARAMETER, got %08x\n",
status);
2049 "Expected STATUS_INVALID_PARAMETER, got %08x\n",
status);
2057 "Expected STATUS_INVALID_PARAMETER, got %08x\n",
status);
2058 thread_affinity = 0;
2061 "Expected STATUS_INVALID_PARAMETER, got %08x\n",
status);
2063 thread_affinity = 1;
2074 "Expected STATUS_SUCCESS, got %08x\n",
status);
2078 skip(
"only one processor, skipping affinity testing\n");
2088 "Unexpected thread affinity\n" );
2091 skip(
"Cannot test thread affinity mask for 'all processors' flag\n");
2098 proc_affinity =
pbi.AffinityMask;
2099 ok( proc_affinity == 2,
"Unexpected process affinity\n" );
2105 thread_affinity = 1;
2108 "Expected STATUS_INVALID_PARAMETER, got %08x\n",
status);
2117 "Unexpected thread affinity\n" );
2132 if (!pNtGetCurrentProcessorNumber) {
2133 win_skip(
"NtGetCurrentProcessorNumber not available\n");
2138 current_cpu = pNtGetCurrentProcessorNumber();
2142 old_process_mask =
pbi.AffinityMask;
2163 current_cpu = pNtGetCurrentProcessorNumber();
2164 ok((current_cpu ==
i),
"%d (new_mask 0x%lx): running on processor %d (AffinityMask: 0x%lx)\n",
2187 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %u bytes\n",
ret);
2202 ok(
module !=
NULL,
"expected non-NULL address for module\n");
2204 ok(
nt !=
NULL,
"expected non-NULL address for NT header\n");
2211 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %u bytes\n",
ret);
2213 ok(
entry == expected_entry,
"expected %p, got %p\n", expected_entry,
entry);
2215 entry = (
void *)0xdeadbeef;
2219 "expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER, got %08x\n",
status);
2228 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %u bytes\n",
ret);
2229 ok(
entry == (
void *)0xdeadbeef,
"expected 0xdeadbeef, got %p\n",
entry);
2258 if (
argc >= 3)
return;
2266 trace(
"Starting test_query_basic()\n");
2270 trace(
"Starting test_query_cpu()\n");
2274 trace(
"Starting test_query_performance()\n");
2278 trace(
"Starting test_query_timeofday()\n");
2282 trace(
"Starting test_query_process()\n");
2286 trace(
"Starting test_query_procperf()\n");
2290 trace(
"Starting test_query_module()\n");
2294 trace(
"Starting test_query_handle()\n");
2298 trace(
"Starting test_query_handle_ex()\n");
2302 trace(
"Starting test_query_cache()\n");
2306 trace(
"Starting test_query_interrupt()\n");
2310 trace(
"Starting test_query_kerndebug()\n");
2314 trace(
"Starting test_query_regquota()\n");
2318 trace(
"Starting test_query_logicalproc()\n");
2325 trace(
"Starting test_query_processor_power_info()\n");
2331 trace(
"Starting test_query_process_basic()\n");
2335 trace(
"Starting test_query_process_io()\n");
2339 trace(
"Starting test_query_process_vm()\n");
2343 trace(
"Starting test_query_process_times()\n");
2347 trace(
"Starting test_process_debug_port()\n");
2351 trace(
"Starting test_query_process_priority()\n");
2355 trace(
"Starting test_query_process_handlecount()\n");
2359 trace(
"Starting test_query_process_wow64()\n");
2363 trace(
"Starting test_query_process_image_file_name()\n");
2367 trace(
"Starting test_query_process_debug_object_handle()\n");
2371 trace(
"Starting test_process_debug_flags()\n");
2375 trace(
"Starting test_readvirtualmemory()\n");
2378 trace(
"Starting test_queryvirtualmemory()\n");
2381 trace(
"Starting test_mapprotection()\n");
2384 trace(
"Starting test_affinity()\n");
2387 trace(
"Starting test_NtGetCurrentProcessorNumber()\n");
2390 trace(
"Starting test_thread_start_address()\n");
2393 trace(
"Starting test_query_data_alignment()\n");
NTSTATUS NTAPI NtUnmapViewOfSection(IN HANDLE ProcessHandle, IN PVOID BaseAddress)
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
NTSTATUS NTAPI NtMapViewOfSection(IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect)
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
const char * file_nameA(const char *str) DECLSPEC_HIDDEN
#define ERROR_INSUFFICIENT_BUFFER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
@ ThreadQuerySetWin32StartAddress
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define WideCharToMultiByte
BOOL WINAPI DebugActiveProcessStop(IN DWORD dwProcessId)
BOOL WINAPI ContinueDebugEvent(IN DWORD dwProcessId, IN DWORD dwThreadId, IN DWORD dwContinueStatus)
BOOL WINAPI DebugActiveProcess(IN DWORD dwProcessId)
BOOL WINAPI WaitForDebugEvent(IN LPDEBUG_EVENT lpDebugEvent, IN DWORD dwMilliseconds)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
DWORD WINAPI GetPriorityClass(IN HANDLE hProcess)
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
DWORD WINAPI ResumeThread(IN HANDLE hThread)
DWORD WINAPI SuspendThread(IN HANDLE hThread)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
struct _SYSTEM_MODULE_INFORMATION SYSTEM_MODULE_INFORMATION
@ SystemKernelDebuggerInformation
@ SystemTimeOfDayInformation
@ SystemModuleInformation
@ SystemRegistryQuotaInformation
@ SystemInterruptInformation
@ SystemHandleInformation
@ SystemProcessInformation
@ SystemProcessorPerformanceInformation
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
GLuint GLuint GLsizei count
GLenum const GLvoid * addr
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 const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define PROCESS_QUERY_INFORMATION
@ ProcessBasicInformation
@ ProcessWow64Information
NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN)
@ ProcessDebugObjectHandle
#define PROCESS_PRIOCLASS_BELOW_NORMAL
void(CALLBACK * PRTL_THREAD_START_ROUTINE)(LPVOID)
struct _SYSTEM_CACHE_INFORMATION SYSTEM_CACHE_INFORMATION
@ SystemLogicalProcessorInformationEx
#define SystemPerformanceInformation
struct _SYSTEM_PERFORMANCE_INFORMATION SYSTEM_PERFORMANCE_INFORMATION
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
#define PROCESS_QUERY_LIMITED_INFORMATION
static HINSTANCE hkernel32
static void test_query_performance(void)
static void test_query_data_alignment(void)
#define NTDLL_GET_PROC(func)
static void test_query_timeofday(void)
static void test_query_processor_power_info(void)
static DWORD one_before_last_pid
static void test_query_process_vm(void)
static void test_query_process_debug_flags(int argc, char **argv)
static void test_query_process_io(void)
static SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX DWORD *static BOOL is_wow64
static void test_query_kerndebug(void)
static const void void SIZE_T *static SIZE_T *static const OBJECT_ATTRIBUTES const LARGE_INTEGER HANDLE
static void test_query_process_handlecount(void)
static void test_readvirtualmemory(void)
static void test_mapprotection(void)
static PVOID const LARGE_INTEGER SIZE_T SECTION_INHERIT
static void test_query_regquota(void)
static void test_query_procperf(void)
static void test_thread_start_address(void)
static void test_query_process_priority(void)
static void test_query_cache(void)
static void dump_vm_counters(const char *header, const VM_COUNTERS *pvi)
static void test_NtGetCurrentProcessorNumber(void)
static DWORD WINAPI start_address_thread(void *arg)
static void test_queryvirtualmemory(void)
static void test_query_handle_ex(void)
static void test_query_process_wow64(void)
static void test_query_basic(void)
static void test_query_handle(void)
static const void void SIZE_T *static LPCVOID
static void test_affinity(void)
static const void void SIZE_T *static SIZE_T *static ACCESS_MASK
static void test_query_module(void)
static void test_query_process_times(void)
static void test_query_cpu(void)
static void test_query_interrupt(void)
static void test_query_logicalproc(void)
static const void void SIZE_T *static MEMORY_INFORMATION_CLASS
static void test_query_process_basic(void)
static BOOL InitFunctionPtrs(void)
static void test_query_process_debug_port(int argc, char **argv)
static void test_query_process_image_file_name(void)
static const void void SIZE_T
static void test_query_process(void)
static void test_query_logicalprocex(void)
static void test_query_process_debug_object_handle(int argc, char **argv)
static const UNICODE_STRING BOOLEAN
struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
struct _SYSTEM_HANDLE_INFORMATION SYSTEM_HANDLE_INFORMATION
struct _SYSTEM_THREAD_INFORMATION SYSTEM_THREAD_INFORMATION
struct _SYSTEM_INTERRUPT_INFORMATION SYSTEM_INTERRUPT_INFORMATION
struct _SYSTEM_HANDLE_INFORMATION_EX SYSTEM_HANDLE_INFORMATION_EX
@ SystemLogicalProcessorInformation
@ SystemRecommendedSharedDataAlignment
@ SystemExtendedHandleInformation
#define MEM_EXECUTE_OPTION_ENABLE
#define SECTION_MAP_EXECUTE
#define SECTION_MAP_WRITE
#define PAGE_EXECUTE_READ
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define PAGE_EXECUTE_WRITECOPY
#define PAGE_EXECUTE_READWRITE
#define STANDARD_RIGHTS_REQUIRED
NTSTATUS NTAPI NtReadVirtualMemory(IN HANDLE ProcessHandle, IN PVOID BaseAddress, OUT PVOID Buffer, IN SIZE_T NumberOfBytesToRead, OUT PSIZE_T NumberOfBytesRead OPTIONAL)
NTSTATUS NTAPI NtQueryVirtualMemory(IN HANDLE ProcessHandle, IN PVOID BaseAddress, IN MEMORY_INFORMATION_CLASS MemoryInformationClass, OUT PVOID MemoryInformation, IN SIZE_T MemoryInformationLength, OUT PSIZE_T ReturnLength)
NTSTATUS NTAPI NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength)
NTSTATUS NTAPI NtQueryInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, OUT PVOID ThreadInformation, IN ULONG ThreadInformationLength, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
NTSTATUS NTAPI NtSetInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
struct _PROCESSOR_POWER_INFORMATION PROCESSOR_POWER_INFORMATION
enum _POWER_INFORMATION_LEVEL POWER_INFORMATION_LEVEL
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
#define STATUS_INVALID_ADDRESS
#define STATUS_ACCESS_VIOLATION
#define STATUS_PORT_NOT_SET
#define STATUS_INVALID_INFO_CLASS
#define STATUS_PARTIAL_COPY
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
#define disable_success_count
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
UNICODE_STRING SectionFileName
ULONGLONG OtherOperationCount
ULONG_PTR UniqueProcessId
DWORD dwNumberOfProcessors
SIZE_T QuotaPeakPagedPoolUsage
SIZE_T PeakWorkingSetSize
SIZE_T QuotaPeakNonPagedPoolUsage
SIZE_T QuotaNonPagedPoolUsage
SIZE_T QuotaPagedPoolUsage
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
#define FIELD_OFFSET(t, f)
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_INFO_LENGTH_MISMATCH
LPVOID NTAPI VirtualAlloc(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)
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
#define LOAD_DLL_DEBUG_EVENT
#define BELOW_NORMAL_PRIORITY_CLASS
DWORD WINAPI GetCurrentProcessId(void)
#define EXIT_PROCESS_DEBUG_EVENT
#define DEBUG_ONLY_THIS_PROCESS
_Inout_ PERBANDINFO * pbi
#define ERROR_SEM_TIMEOUT
_Out_ PHANDLE EventHandle
@ RelationProcessorPackage
enum _LOGICAL_PROCESSOR_RELATIONSHIP LOGICAL_PROCESSOR_RELATIONSHIP