25#define WIN32_NO_STATUS
35#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
36#define AlwaysOn DEPPolicyAlwaysOn
79#define NTDLL_GET_PROC(func) do { \
80 p ## func = (void*)GetProcAddress(hntdll, #func); \
82 trace("GetProcAddress(%s) failed\n", #func); \
87#define ACPI 0x41435049
88#define FIRM 0x4649524D
89#define RSMB 0x52534D42
151 "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08lx\n",
status);
160 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got %08lx\n",
status);
180 memset(&sbi2, 0xcc,
sizeof(sbi2));
185 ok(
sbi.unknown == sbi2.unknown,
"Expected unknown %#lx, got %#lx.\n",
sbi.unknown, sbi2.unknown);
186 ok(
sbi.KeMaximumIncrement == sbi2.KeMaximumIncrement,
"Expected KeMaximumIncrement %lu, got %lu.\n",
187 sbi.KeMaximumIncrement, sbi2.KeMaximumIncrement);
189 ok(
sbi.MmNumberOfPhysicalPages == sbi2.MmNumberOfPhysicalPages,
190 "Expected MmNumberOfPhysicalPages %lu, got %lu.\n",
191 sbi.MmNumberOfPhysicalPages, sbi2.MmNumberOfPhysicalPages);
192 ok(
sbi.MmLowestPhysicalPage == sbi2.MmLowestPhysicalPage,
"Expected MmLowestPhysicalPage %lu, got %lu.\n",
193 sbi.MmLowestPhysicalPage, sbi2.MmLowestPhysicalPage);
194 ok(
sbi.MmHighestPhysicalPage == sbi2.MmHighestPhysicalPage,
"Expected MmHighestPhysicalPage %lu, got %lu.\n",
195 sbi.MmHighestPhysicalPage, sbi2.MmHighestPhysicalPage);
198 "Expected AllocationGranularity %#Ix, got %#Ix.\n",
200 ok(
sbi.LowestUserAddress == sbi2.LowestUserAddress,
"Expected LowestUserAddress %p, got %p.\n",
201 sbi.LowestUserAddress, sbi2.LowestUserAddress);
203 "Expected ActiveProcessorsAffinityMask %#Ix, got %#Ix.\n",
208 ok(
sbi.HighestUserAddress == sbi2.HighestUserAddress,
"Expected HighestUserAddress %p, got %p.\n",
209 (
void *)
sbi.HighestUserAddress, (
void *)sbi2.HighestUserAddress);
211 ok(
sbi.HighestUserAddress == (
void *)0x7ffeffff,
"wrong limit %p\n",
sbi.HighestUserAddress);
213 ok( sbi2.HighestUserAddress == (
is_wow64 ? (
void *)0xfffeffff : (
void *)0x7ffeffff),
214 "wrong limit %p\n",
sbi.HighestUserAddress);
217 memset(&sbi3, 0xcc,
sizeof(sbi3));
225 "info is different\n" );
241 "info is different\n" );
257 ULONG64 ActiveProcessorsAffinityMask;
258 BYTE NumberOfProcessors;
262 memset( &sbi64, 0xcc,
sizeof(sbi64) );
268 ok(
sbi.unknown == sbi64.unknown,
"unknown %#lx / %#lx\n",
sbi.unknown, sbi64.unknown);
269 ok(
sbi.KeMaximumIncrement == sbi64.KeMaximumIncrement,
"KeMaximumIncrement %lu / %lu\n",
270 sbi.KeMaximumIncrement, sbi64.KeMaximumIncrement);
272 ok(
sbi.MmNumberOfPhysicalPages == sbi64.MmNumberOfPhysicalPages,
273 "MmNumberOfPhysicalPages %lu / %lu\n",
274 sbi.MmNumberOfPhysicalPages, sbi64.MmNumberOfPhysicalPages);
275 ok(
sbi.MmLowestPhysicalPage == sbi64.MmLowestPhysicalPage,
"MmLowestPhysicalPage %lu / %lu\n",
276 sbi.MmLowestPhysicalPage, sbi64.MmLowestPhysicalPage);
277 ok(
sbi.MmHighestPhysicalPage == sbi64.MmHighestPhysicalPage,
"MmHighestPhysicalPage %lu / %lu\n",
278 sbi.MmHighestPhysicalPage, sbi64.MmHighestPhysicalPage);
282 ok( (
ULONG_PTR)
sbi.LowestUserAddress == sbi64.LowestUserAddress,
"LowestUserAddress %p / %s\n",
285 "ActiveProcessorsAffinityMask %#Ix / %s\n",
289 ok( sbi64.HighestUserAddress == 0x7ffffffeffff,
"wrong limit %s\n",
294 memset(&sbi3, 0xcc,
sizeof(sbi3));
299 "info is different\n" );
301 for (
i = 0;
i < 256;
i++)
337 memset(&sci, 0xcc,
sizeof(sci));
340 ok(
sizeof(sci) ==
len,
"Inconsistent length %ld\n",
len);
342 memset(&sci2, 0xcc,
sizeof(sci2));
345 ok(
sizeof(sci2) ==
len,
"Unexpected length %lu.\n",
len);
357 "ProcessorArchitecture differs %x / %x\n",
376 memset(&sci3, 0xcc,
sizeof(sci3));
379 ok(
sizeof(sci3) ==
len,
"Unexpected length %lu.\n",
len);
390 "ProcessorArchitecture differs %x / %x\n",
406 ok( !
status,
"SystemProcessorFeaturesInformation failed %lx\n",
status );
407 ok(
len ==
sizeof(features),
"wrong len %lu\n",
len );
411 else skip(
"SystemProcessorFeaturesInformation is not supported\n" );
425 ok(
len == 49,
"wrong len %lu\n",
len );
431 ok(
len == 49,
"wrong len %lu\n",
len );
436 ok(
len == 49,
"wrong len %lu\n",
len );
441 ok(
len == 0xdeadbeef,
"wrong len %lu\n",
len );
443 else skip(
"SystemProcessorBrandString is not supported\n" );
480 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE {
484 ULONG uCurrentTimeZoneId;
486 } SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE;
488 SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE sti;
494 sti.uCurrentTimeZoneId = 0xdeadbeef;
498 ok( 0xdeadbeef == sti.uCurrentTimeZoneId,
"This part of the buffer should not have been filled\n");
500 sti.uCurrentTimeZoneId = 0xdeadbeef;
504 ok( 0xdeadbeef != sti.uCurrentTimeZoneId,
"Buffer should have been partially filled\n");
509 "ReturnLength should be 0, it is (%ld)\n",
ReturnLength);
532 typedef struct _SYSTEM_PROCESS_INFORMATION_PRIVATE {
533 ULONG NextEntryOffset;
536 ULONG HardFaultCount;
537 ULONG NumberOfThreadsHighWatermark;
543 DWORD dwBasePriority;
552 } SYSTEM_PROCESS_INFORMATION_PRIVATE;
555 SYSTEM_PROCESS_INFORMATION_PRIVATE *spi, *spi_buf;
558 void *expected_address;
559 ULONG thread_info_size;
581 win_skip(
"Zero return length, skipping tests." );
593 "Expected STATUS_SUCCESS, got %08lx\n",
status );
606 last_pid = (
DWORD_PTR)spi->UniqueProcessId;
607 ok( !(last_pid & 3),
"Unexpected PID low bits: %p\n", spi->UniqueProcessId );
610 current_process_found =
TRUE;
612 if (extended &&
is_wow64 && spi->UniqueProcessId)
615 cid.UniqueProcess = spi->UniqueProcessId;
616 cid.UniqueThread = 0;
619 "Got unexpected status %#lx, pid %p.\n",
status, spi->UniqueProcessId );
627 is_process_wow64 = !!
info;
632 for (
j = 0;
j < spi->dwThreadCount;
j++)
638 "The owning pid of the thread (%p) doesn't equal the pid (%p) of the process\n",
653 cid.UniqueProcess = 0;
666 expected_address = (
BYTE *)expected_address - 0x2000;
669 expected_address =
NULL;
672 win_skip(
"Could not get TebBaseAddress, thread %lu.\n",
j );
675 "Got unexpected TebBase %p, expected %p.\n", ti->
TebBase, expected_address );
682 if (!spi->NextEntryOffset)
689 spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((
char*)spi + spi->NextEntryOffset);
692 ok( current_process_found,
"Test process not found.\n" );
702 win_skip(
"Skipping ClientId tests on pre-NT6.\n");
707 for (
i = 1;
i < 4; ++
i)
711 cid.UniqueThread = 0;
715 "NtOpenProcess returned:%lx\n",
status );
726 for (
i = 1;
i < 4; ++
i)
729 cid.UniqueProcess = 0;
734 "NtOpenThread returned:%lx\n",
status );
799 "Expected STATUS_SUCCESS or STATUS_INFO_LENGTH_MISMATCH, got %08lx\n",
status);
827 ok(
size > 0,
"expected nonzero size\n");
833 ok(
info->ModulesCount > 0,
"Expected some modules to be loaded\n");
835 for (
i = 0;
i <
info->ModulesCount;
i++)
839 ok(
module->LoadOrderIndex ==
i,
"%lu: got index %u\n",
i,
module->LoadOrderIndex);
841 ok(
module->ImageSize,
"%lu: got 0 size\n",
i);
842 ok(
module->LoadCount,
"%lu: got 0 load count\n",
i);
850 win_skip(
"SystemModuleInformationEx is not supported.\n");
854 ok(
size > 0,
"expected nonzero size\n");
860 infoex = (
const void *)
buffer;
865 ok(
module->LoadOrderIndex ==
i,
"%lu: got index %u\n",
i,
module->LoadOrderIndex);
867 ok(
module->ImageSize,
"%lu: got 0 size\n",
i);
868 ok(
module->LoadCount,
"%lu: got 0 load count\n",
i);
870 infoex = (
const void *)((
const char *)infoex + infoex->
NextOffset);
873 "got size %lu, null terminator %Iu\n",
size, (
char *)infoex -
buffer);
899 ok(
ReturnLength != 0xdeadbeef,
"Expected valid ReturnLength\n" );
903 memset(shi, 0x55, SystemInformationLength);
909 SystemInformationLength *= 2;
911 memset(shi, 0x55, SystemInformationLength);
917 "Expected length %lu, got %lu\n", ExpectedLength,
ReturnLength );
918 ok( shi->
Count > 1,
"Expected more than 1 handle, got %lu\n", shi->
Count );
920 "Uninitialized second handle\n" );
923 win_skip(
"Skipping broken SYSTEM_HANDLE_INFORMATION\n");
950 SystemInformationLength *= 2;
958 ok( !found,
"Unexpectedly found event handle in handle list\n" );
994 ok(
size == expect_size,
"expected size %lu, got %lu\n", expect_size,
size);
995 ok(
info->NumberOfHandles > 1,
"got %Iu handles\n",
info->NumberOfHandles);
998 for (
i = 0;
i <
info->NumberOfHandles; ++
i)
1004 "got flags %#lx\n",
info->Handles[
i].HandleAttributes);
1008 ok(!
info->Handles[
i].CreatorBackTraceIndex,
"got backtrace index %u\n",
info->Handles[
i].CreatorBackTraceIndex);
1010 ok(found,
"event handle not found\n");
1024 ok(
size == expect_size,
"expected size %lu, got %lu\n", expect_size,
size);
1025 ok(
info->NumberOfHandles > 1,
"got %Iu handles\n",
info->NumberOfHandles);
1028 for (
i = 0;
i <
info->NumberOfHandles; ++
i)
1037 ok(!found,
"event handle found\n");
1137 "wrong value %x\n",
query.TimeAdjustmentDisabled );
1182 "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n",
status);
1186 win_skip(
"NtQuerySystemInformation(SystemKernelDebuggerInformationEx) is not implemented.\n" );
1232 skip(
"SystemLogicalProcessorInformation is not supported\n");
1236 ok(
len%
sizeof(*slpi) == 0,
"Incorrect length %ld\n",
len);
1243 for(
i=0;
i<
len/
sizeof(*slpi);
i++) {
1244 switch(slpi[
i].Relationship) {
1248 proc_no += slpi[
i].ProcessorMask%2;
1254 ok(proc_no > 0,
"No processors were found\n");
1264 static const char *
const names[] = {
"Core",
"NumaNode",
"Cache",
"Package",
"Group",
"Die",
"NumaNodeEx",
"Module" };
1266 *infoex_package, *infoex_group, *infoex_die, *infoex_numa_ex,
1267 *infoex_module, *
ex;
1268 DWORD relationship,
len, len_public, len_core, len_numa, len_cache, len_package, len_group, len_die, len_numa_ex,
1269 len_module, len_union,
ret_len;
1274 if (!pNtQuerySystemInformationEx)
1287 ok(len_core > 0,
"got %lu\n", len_core);
1293 ok(len_numa > 0,
"got %lu\n", len_numa);
1299 ok(len_cache > 0,
"got %lu\n", len_cache);
1305 ok(len_package > 0,
"got %lu\n", len_package);
1311 ok(len_group > 0,
"got %lu\n", len_group);
1316 "got 0x%08lx\n",
status);
1322 "got 0x%08lx\n",
status);
1328 "got 0x%08lx\n",
status);
1333 ok(
len == len_public,
"got %lu, expected %lu\n", len_public,
len);
1351 ret = pGetLogicalProcessorInformationEx(
RelationAll, infoex_public, &len_public);
1353 ok(!
memcmp(infoex, infoex_public,
len),
"returned info data mismatch\n");
1358 ex = (
void *)(((
char *)infoex) +
i);
1359 ok(
ex->Size,
"%u: got size 0\n",
i);
1367 trace(
"infoex[%u].Size: %lu\n",
i,
ex->Size);
1368 switch (
ex->Relationship)
1374 trace(
"infoex[%u].Relationship: 0x%x (%s)\n",
i,
ex->Relationship,
names[
ex->Relationship]);
1375 trace(
"infoex[%u].Processor.Flags: 0x%x\n",
i,
ex->Processor.Flags);
1376 trace(
"infoex[%u].Processor.EfficiencyClass: 0x%x\n",
i,
ex->Processor.EfficiencyClass);
1377 trace(
"infoex[%u].Processor.GroupCount: 0x%x\n",
i,
ex->Processor.GroupCount);
1378 for (
j = 0;
j <
ex->Processor.GroupCount; ++
j)
1380 trace(
"infoex[%u].Processor.GroupMask[%u].Mask: 0x%Ix\n",
i,
j,
ex->Processor.GroupMask[
j].Mask);
1381 trace(
"infoex[%u].Processor.GroupMask[%u].Group: 0x%x\n",
i,
j,
ex->Processor.GroupMask[
j].Group);
1386 trace(
"infoex[%u].Relationship: 0x%x (%s)\n",
i,
ex->Relationship,
names[
ex->Relationship]);
1387 trace(
"infoex[%u].NumaNode.NodeNumber: 0x%lx\n",
i,
ex->NumaNode.NodeNumber);
1388 trace(
"infoex[%u].NumaNode.GroupMask.Mask: 0x%Ix\n",
i,
ex->NumaNode.GroupMask.Mask);
1389 trace(
"infoex[%u].NumaNode.GroupMask.Group: 0x%x\n",
i,
ex->NumaNode.GroupMask.Group);
1392 trace(
"infoex[%u].Relationship: 0x%x (Cache)\n",
i,
ex->Relationship);
1393 trace(
"infoex[%u].Cache.Level: 0x%x\n",
i,
ex->Cache.Level);
1394 trace(
"infoex[%u].Cache.Associativity: 0x%x\n",
i,
ex->Cache.Associativity);
1395 trace(
"infoex[%u].Cache.LineSize: 0x%x\n",
i,
ex->Cache.LineSize);
1396 trace(
"infoex[%u].Cache.CacheSize: 0x%lx\n",
i,
ex->Cache.CacheSize);
1397 trace(
"infoex[%u].Cache.Type: 0x%x\n",
i,
ex->Cache.Type);
1398 trace(
"infoex[%u].Cache.GroupMask.Mask: 0x%Ix\n",
i,
ex->Cache.GroupMask.Mask);
1399 trace(
"infoex[%u].Cache.GroupMask.Group: 0x%x\n",
i,
ex->Cache.GroupMask.Group);
1402 trace(
"infoex[%u].Relationship: 0x%x (Group)\n",
i,
ex->Relationship);
1403 trace(
"infoex[%u].Group.MaximumGroupCount: 0x%x\n",
i,
ex->Group.MaximumGroupCount);
1404 trace(
"infoex[%u].Group.ActiveGroupCount: 0x%x\n",
i,
ex->Group.ActiveGroupCount);
1405 for (
j = 0;
j <
ex->Group.ActiveGroupCount; ++
j)
1407 trace(
"infoex[%u].Group.GroupInfo[%u].MaximumProcessorCount: 0x%x\n",
i,
j,
ex->Group.GroupInfo[
j].MaximumProcessorCount);
1408 trace(
"infoex[%u].Group.GroupInfo[%u].ActiveProcessorCount: 0x%x\n",
i,
j,
ex->Group.GroupInfo[
j].ActiveProcessorCount);
1409 trace(
"infoex[%u].Group.GroupInfo[%u].ActiveProcessorMask: 0x%Ix\n",
i,
j,
ex->Group.GroupInfo[
j].ActiveProcessorMask);
1413 ok(0,
"Got invalid relationship value: 0x%x\n",
ex->Relationship);
1428 ex = (
void *)(((
char*)infoex_core) +
i);
1429 ok(
ex->Size,
"%u: got size 0\n",
i);
1440 ex = (
void *)(((
char*)infoex_numa) +
i);
1441 ok(
ex->Size,
"%u: got size 0\n",
i);
1452 ex = (
void *)(((
char*)infoex_cache) +
i);
1453 ok(
ex->Size,
"%u: got size 0\n",
i);
1464 ex = (
void *)(((
char*)infoex_package) +
i);
1465 ok(
ex->Size,
"%u: got size 0\n",
i);
1476 ex = (
void *)(((
char *)infoex_group) +
i);
1477 ok(
ex->Size,
"%u: got size 0\n",
i);
1482 len_union = len_core + len_numa + len_cache + len_package + len_group + len_module;
1483 ok(
len == len_union,
"Expected %lu, got %lu\n",
len, len_union);
1500 unsigned int i, cpu_count;
1506 if (!pNtQuerySystemInformationEx)
1511 expected_len = cpu_count *
sizeof(*info);
1518 win_skip(
"SystemCpuSetInformation is not supported\n");
1523 ok(
len == expected_len,
"Got unexpected length %lu.\n",
len);
1528 "Got unexpected status %#lx.\n",
status);
1529 ok(
len == 0xdeadbeef,
"Got unexpected len %lu.\n",
len);
1535 ok(
len == 0xdeadbeef,
"Got unexpected length %lu.\n",
len);
1542 "Got unexpected status %#lx, length %lu.\n",
status,
len);
1547 ok(
len == 0xdeadbeef,
"Got unexpected length %lu.\n",
len);
1551 ok(
len == expected_len,
"Got unexpected length %lu.\n",
len);
1555 expected_len, &
len);
1557 ok(
len == 0xdeadbeef,
"Got unexpected length %lu.\n",
len);
1563 ok(
len == expected_len,
"Got unexpected length %lu.\n",
len);
1565 for (
i = 0;
i < cpu_count; ++
i)
1569 ok(
d->Size ==
sizeof(*
d),
"Got unexpected size %lu, i %u.\n",
d->Size,
i);
1571 ok(
d->CpuSet.Id == 0x100 +
i,
"Got unexpected Id %#lx, i %u.\n",
d->CpuSet.Id,
i);
1572 ok(!
d->CpuSet.Group,
"Got unexpected Group %u, i %u.\n",
d->CpuSet.Group,
i);
1573 ok(
d->CpuSet.LogicalProcessorIndex ==
i,
"Got unexpected LogicalProcessorIndex %u, i %u.\n",
1574 d->CpuSet.LogicalProcessorIndex,
i);
1575 ok(!
d->CpuSet.AllFlags,
"Got unexpected AllFlags %#x, i %u.\n",
d->CpuSet.AllFlags,
i);
1588 ok(!!sfti,
"Failed to allocate memory\n");
1596 "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n",
status);
1599 win_skip(
"SystemFirmwareTableInformation is not available\n");
1603 ok(len1 == min_sfti_len,
"Expected length %lu, got %lu\n", min_sfti_len, len1);
1607 ok(len1 == 0,
"Expected length 0, got %lu\n", len1);
1616 win_skip(
"SystemFirmwareTableInformation not available\n");
1622 ok(len1 >= min_sfti_len,
"Expected length >= %lu, got %lu\n", min_sfti_len, len1);
1624 "Expected length %lu, got %lu\n", len1 - min_sfti_len, sfti->
TableBufferLength);
1627 ok(!!sfti,
"Failed to allocate memory\n");
1631 ok(len2 == len1,
"Expected length %lu, got %lu\n", len1, len2);
1633 "Expected length %lu, got %lu\n", len1 - min_sfti_len, sfti->
TableBufferLength);
1648 skip(
"SystemBatteryState not implemented\n");
1655 trace(
"Battery state:\n");
1656 trace(
"AcOnLine : %u\n",
bs.AcOnLine);
1657 trace(
"BatteryPresent : %u\n",
bs.BatteryPresent);
1658 trace(
"Charging : %u\n",
bs.Charging);
1659 trace(
"Discharging : %u\n",
bs.Discharging);
1661 trace(
"MaxCapacity : %lu\n",
bs.MaxCapacity);
1662 trace(
"RemainingCapacity : %lu\n",
bs.RemainingCapacity);
1664 trace(
"EstimatedTime : %lu\n",
bs.EstimatedTime);
1665 trace(
"DefaultAlert1 : %lu\n",
bs.DefaultAlert1);
1666 trace(
"DefaultAlert2 : %lu\n",
bs.DefaultAlert2);
1669 ok(
bs.MaxCapacity >=
bs.RemainingCapacity,
1670 "expected MaxCapacity %lu to be greater than or equal to RemainingCapacity %lu\n",
1671 bs.MaxCapacity,
bs.RemainingCapacity);
1673 if (!
bs.BatteryPresent)
1675 else if (!
bs.Charging && (
LONG)
bs.Rate < 0)
1676 time_left = 3600 *
bs.RemainingCapacity / -(
LONG)
bs.Rate;
1679 ok(
bs.EstimatedTime == time_left,
1680 "expected %lu minutes remaining got %lu minutes\n", time_left,
bs.EstimatedTime);
1719 "Expected all but the last record to be overwritten.\n");
1729 if (ppi[
i].
Number != 0xDEADBEEF)
break;
1735 ok( ppi[1].
Number == 0xDEADBEEF,
"Expected untouched buffer.\n");
1747 skip(
"Test needs more than one processor.\n");
1771 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE, got %08lx\n",
status);
1841 typedef struct _PROCESS_BASIC_INFORMATION_PRIVATE {
1843 PPEB PebBaseAddress;
1858 "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08lx\n",
status);
1865 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n",
status);
1885 ok(
pbi.UniqueProcessId > 0,
"Expected a ProcessID > 0, got 0\n");
1911 const SIZE_T alloc_size = 16 * 1024 * 1024;
1916 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n",
status);
1948 memset(&pvi, 0,
sizeof(pvi));
1977 "Expected to be greater than %Iu, got %Iu\n", prev_size + alloc_size, pvi.
VirtualSize);
1994 "Expected to be greater than %Iu, got %Iu\n", prev_size + alloc_size, pvi.
VirtualSize);
2005 "Expected to equal to %Iu, got %Iu\n", prev_size, pvi.
VirtualSize);
2017 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n",
status);
2051 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n",
status);
2128 &debug_port,
sizeof(debug_port), &
len);
2131 "len set to %lx\n",
len );
2135 &debug_port,
sizeof(debug_port) - 1, &
len);
2138 "len set to %lx\n",
len );
2142 &debug_port,
sizeof(debug_port) + 1, &
len);
2145 "len set to %lx\n",
len );
2149 &debug_port,
sizeof(debug_port), &
len);
2150 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2151 ok(debug_port == 0,
"Expected port 0, got %#Ix.\n", debug_port);
2152 ok(
len ==
sizeof(debug_port),
"len set to %lx\n",
len );
2156 &debug_port,
sizeof(debug_port), &
len);
2157 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2159 ok(
len ==
sizeof(debug_port),
"len set to %lx\n",
len );
2184 HANDLE old_debug_obj, debug_obj;
2210 old_debug_obj = pDbgUiGetThreadDebugObject();
2211 pDbgUiSetThreadDebugObject(debug_obj);
2220 if (!
ret)
goto close_debug_obj;
2240 pDbgUiSetThreadDebugObject(old_debug_obj);
2277 if (!pDbgUiSetThreadDebugObject)
2279 win_skip(
"DbgUiGetThreadDebugObject not found\n");
2283 if (!pDbgUiGetThreadDebugObject)
2285 win_skip(
"DbgUiSetThreadDebugObject not found\n");
2307 DWORD orig_priority;
2313 "Expected STATUS_ACCESS_VIOLATION, got %08lx\n",
status);
2331 "Expected PROCESS_PRIOCLASS_BELOW_NORMAL, got %u\n",
priority[0].PriorityClass);
2347 "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n",
status);
2371 "Expected STATUS_INFO_LENGTH_MISMATCH or STATUS_SUCCESS, got %08lx\n",
status);
2378 ok( handlecount > 0,
"Expected some handles, got 0\n");
2384 static const WCHAR deviceW[] = {
'\\',
'D',
'e',
'v',
'i',
'c',
'e',
'\\'};
2404 "Expected image name to begin with \\Device\\, got %s\n",
2411 win_skip(
"ProcessImageFileNameWin32 is not supported\n");
2426 "Expected image name not to begin with \\Device\\, got %s\n",
2454 "wrong major version %x/%x\n",
2457 "wrong minor version %x/%x\n",
2461 "wrong major OS version %x/%x\n",
2465 ok(
info.MinorOperatingSystemVersion == 0,
"wrong minor version %x/%x\n",
info.MinorOperatingSystemVersion, 0 );
2469 "wrong minor OS version %x/%x\n",
2494 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08lx\n",
2497 "len set to %lx\n",
len );
2503 "Expected NtQueryInformationProcess to return STATUS_INVALID_HANDLE, got 0x%08lx\n",
status);
2505 "len set to %lx\n",
len );
2510 "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08lx\n",
status);
2512 "len set to %lx\n",
len );
2515 &debug_object,
sizeof(debug_object),
NULL);
2517 "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08lx\n",
status);
2523 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08lx\n",
status);
2525 "len set to %lx\n",
len );
2531 "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08lx\n",
status);
2533 "len set to %lx\n",
len );
2536 debug_object = (
HANDLE)0xdeadbeef;
2539 sizeof(debug_object), &
len);
2541 "Expected NtQueryInformationProcess to return STATUS_PORT_NOT_SET, got 0x%08lx\n",
status);
2542 ok(debug_object ==
NULL ||
2544 "Expected debug object handle to be NULL, got %p\n", debug_object);
2545 ok(
len ==
sizeof(debug_object),
"len set to %lx\n",
len );
2548 debug_object = (
HANDLE)0xdeadbeef;
2550 &debug_object,
sizeof(debug_object), &
len);
2552 "Expected NtQueryInformationProcess to return STATUS_SUCCESS, got 0x%08lx\n",
status);
2554 "Expected debug object handle to be non-NULL, got %p\n", debug_object);
2555 ok(
len ==
sizeof(debug_object),
"len set to %lx\n",
len );
2586 DWORD debug_flags = 0xdeadbeef;
2599 "Expected STATUS_INFO_LENGTH_MISMATCH, got %#lx.\n",
status);
2603 "Expected STATUS_INVALID_HANDLE, got %#lx.\n",
status);
2610 &debug_flags,
sizeof(debug_flags),
NULL);
2612 "Expected STATUS_INVALID_HANDLE, got %#lx.\n",
status);
2615 &debug_flags,
sizeof(debug_flags) - 1,
NULL);
2619 &debug_flags,
sizeof(debug_flags) + 1,
NULL);
2624 &debug_flags,
sizeof(debug_flags),
NULL);
2625 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2626 ok(debug_flags ==
TRUE,
"Expected flag TRUE, got %lx.\n", debug_flags);
2641 &debug_flags,
sizeof(debug_flags),
NULL);
2642 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2643 ok(debug_flags ==
TRUE,
"Expected flag TRUE, got %lx.\n", debug_flags);
2647 expected_flags =
FALSE;
2652 &debug_flags,
sizeof(debug_flags),
NULL);
2653 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2654 ok(debug_flags == expected_flags,
"Expected flag %lx, got %lx.\n", expected_flags, debug_flags);
2682 &debug_flags,
sizeof(debug_flags),
NULL);
2683 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2684 ok(debug_flags == expected_flags,
"Expected flag %lx, got %lx.\n", expected_flags, debug_flags);
2691 &debug_flags,
sizeof(debug_flags),
NULL);
2692 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2693 ok(debug_flags ==
FALSE,
"Expected flag FALSE, got %lx.\n", debug_flags);
2702 for (
j = 0;
j < 100;
j++)
2706 "WaitForDebugEvent failed, last error %#lx.\n",
GetLastError());
2715 ok(
j < 100 ||
broken(
j >= 100) ,
"Expected less than 100 debug events.\n");
2719 &debug_flags,
sizeof(debug_flags),
NULL);
2720 ok(!
status,
"NtQueryInformationProcess failed, status %#lx.\n",
status);
2721 ok(debug_flags ==
FALSE,
"Expected flag FALSE, got %lx.\n", debug_flags);
2747 memset(&qlimits, 0,
sizeof(qlimits));
2755 ok(qlimits.
PagefileLimit == ~0,
"Expected PagefileLimit = ~0, got %s\n",
2762 trace(
"Quota Limits:\n");
2767 memset(&qlimits, 0,
sizeof(qlimits));
2772 memset(&qlimits, 0,
sizeof(qlimits));
2777 memset(&qlimits, 0,
sizeof(qlimits));
2788 static const char teststring[] =
"test string";
2792 ok(
process != 0,
"Expected to be able to open own process for reading memory\n");
2797 ok( readcount == 12,
"Expected to read 12 bytes, got %Id\n",readcount);
2798 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
2804 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
2811 ok( readcount == 0,
"Expected to read 0 bytes, got %Id\n",readcount);
2815 status = pNtReadVirtualMemory(0, teststring,
buffer, 12, &readcount);
2817 ok( readcount == 0,
"Expected to read 0 bytes, got %Id\n",readcount);
2823 ok( readcount == 12,
"Expected to read 12 bytes, got %Id\n",readcount);
2824 ok(
strcmp(teststring,
buffer) == 0,
"Expected read memory to be the same as original memory\n");
2827 status = pNtReadVirtualMemory(
process, teststring, (
void *)0x1234, 12, &readcount);
2829 "Expected STATUS_ACCESS_VIOLATION, got %08lx\n",
status);
2831 ok( readcount == 0,
"Expected to read 0 bytes, got %Id\n",readcount);
2852 skip(
"Unable to query process execute flags on this platform\n");
2862 skip(
"Unable to turn off noexec\n");
2866 if (pGetSystemDEPPolicy && pGetSystemDEPPolicy() == AlwaysOn)
2868 skip(
"System policy requires noexec\n");
2877 size.u.LowPart = 0x2000;
2878 size.u.HighPart = 0;
2879 status = pNtCreateSection ( &
h,
2896#if defined(__x86_64__) || defined(__i386__)
2897 *(
unsigned char*)
addr = 0xc3;
2898#elif defined(__arm__)
2899 *(
unsigned long*)
addr = 0xe12fff1e;
2900#elif defined(__aarch64__)
2901 *(
unsigned long*)
addr = 0xd65f03c0;
2903 ok(0,
"Add a return opcode for your architecture or expect a crash in this test\n");
2905 if (
winetest_debug > 1)
trace(
"trying to execute code in the readwrite only mapped anon file...\n");
2911 ok( retlen ==
sizeof(
info),
"Expected STATUS_SUCCESS, got %08lx\n",
status);
2930 info.ReserveSize = 0x100000;
2931 info.StackBase = (
void *)0xdeadbeef;
2934 ok(
info.StackBase != (
void *)0xdeadbeef,
"stackbase not set\n" );
2937 &meminfo,
sizeof(meminfo), &retlen );
2939 ok( retlen ==
sizeof(meminfo),
"Expected STATUS_SUCCESS, got %08lx\n",
status);
2950 &info_ex,
sizeof(info_ex) );
2958 ok( retlen ==
sizeof(meminfo),
"Expected STATUS_SUCCESS, got %08lx\n",
status);
2974 &info_ex,
sizeof(info_ex) - 1 );
2977 &info_ex,
sizeof(info_ex) + 1 );
2980 else win_skip(
"ProcessThreadStackAllocation ex not supported\n" );
2989 static const char teststring[] =
"test string";
2990 static char datatestbuf[42] =
"abc";
2991 static char rwtestbuf[42];
3026 "mbi.Protect is 0x%lx\n", mbi.
Protect);
3051 "mbi.Protect is 0x%lx\n", mbi.
Protect);
3061 "mbi.Protect is 0x%lx\n", mbi.
Protect);
3063 else skip(
"bss is outside of module\n" );
3095 readcount = 0xdeadbeef;
3097 name,
sizeof(*
name) + 16, &readcount);
3099 ok(
name->SectionFileName.Length == 0xcccc ||
broken(!
name->SectionFileName.Length),
3100 "Wrong len %u\n",
name->SectionFileName.Length);
3101 ok(readcount >
sizeof(*
name),
"Wrong count %Iu\n", readcount);
3104 readcount = 0xdeadbeef;
3108 ok(
name->SectionFileName.Buffer == (
WCHAR *)(
name + 1),
"Wrong ptr %p/%p\n",
3109 name->SectionFileName.Buffer,
name + 1 );
3110 ok(
name->SectionFileName.Length != 0xcccc,
"Wrong len %u\n",
name->SectionFileName.Length);
3111 ok(
name->SectionFileName.MaximumLength ==
name->SectionFileName.Length +
sizeof(
WCHAR),
3112 "Wrong maxlen %u/%u\n",
name->SectionFileName.MaximumLength,
name->SectionFileName.Length);
3113 ok(readcount ==
sizeof(
name->SectionFileName) +
name->SectionFileName.MaximumLength,
3114 "Wrong count %Iu/%u\n", readcount,
name->SectionFileName.MaximumLength);
3115 ok( !
name->SectionFileName.Buffer[
name->SectionFileName.Length /
sizeof(
WCHAR)],
3116 "buffer not null-terminated\n" );
3129 readcount = 0xdeadbeef;
3131 name,
sizeof(*
name) - 1, &readcount);
3133 ok(
name->SectionFileName.Length == 0xcccc,
"Wrong len %u\n",
name->SectionFileName.Length);
3134 ok(readcount == prev,
"Wrong count %Iu\n", readcount);
3137 readcount = 0xdeadbeef;
3141 ok(readcount == 0xdeadbeef ||
broken(readcount == 1024 +
sizeof(*
name)),
3142 "Wrong count %Iu\n", readcount);
3145 readcount = 0xdeadbeef;
3149 ok(
name->SectionFileName.Length == 0xcccc,
"Wrong len %u\n",
name->SectionFileName.Length);
3150 ok(readcount == 0xdeadbeef ||
broken(readcount == 1024 +
sizeof(*
name)),
3151 "Wrong count %Iu\n", readcount);
3153 readcount = 0xdeadbeef;
3157 ok(
name->SectionFileName.Length == 0xcccc,
"Wrong len %u\n",
name->SectionFileName.Length);
3158 ok(readcount == 0xdeadbeef ||
broken(readcount == 1024 +
sizeof(*
name)),
3159 "Wrong count %Iu\n", readcount);
3161 readcount = 0xdeadbeef;
3163 name,
sizeof(*
name) - 1, &readcount);
3165 ok(
name->SectionFileName.Length == 0xcccc,
"Wrong len %u\n",
name->SectionFileName.Length);
3166 ok(readcount == 0xdeadbeef ||
broken(readcount == 15),
3167 "Wrong count %Iu\n", readcount);
3174 DWORD_PTR proc_affinity, thread_affinity;
3181 proc_affinity =
pbi.AffinityMask;
3188 "Expected STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3193 "Expected STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3203 "Expected STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3205 thread_affinity = 0;
3208 "Expected STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3210 thread_affinity = 1;
3218 thread_affinity = (
pbi.AffinityMask << 1) |
pbi.AffinityMask;
3242 "Expected STATUS_SUCCESS, got %08lx\n",
status);
3246 skip(
"only one processor, skipping affinity testing\n");
3258 skip(
"Cannot test thread affinity mask for 'all processors' flag\n");
3265 proc_affinity =
pbi.AffinityMask;
3266 ok( proc_affinity == 2,
"Unexpected process affinity\n" );
3272 thread_affinity = 1;
3275 "Expected STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3284 "Unexpected thread affinity\n" );
3314 win_skip(
"ThreadHideFromDebugger not available\n");
3325 ok(
dummy == 1,
"Expected dummy == 1, got %08lx\n",
dummy );
3335 ok(
dummy == 0,
"Expected dummy == 0, got %08lx\n",
dummy );
3343 ok(
dummy == 1,
"Expected dummy == 1, got %08lx\n",
dummy );
3363 if (!pNtGetCurrentProcessorNumber) {
3364 win_skip(
"NtGetCurrentProcessorNumber not available\n");
3369 current_cpu = pNtGetCurrentProcessorNumber();
3373 old_process_mask =
pbi.AffinityMask;
3394 current_cpu = pNtGetCurrentProcessorNumber();
3395 ok((current_cpu ==
i),
"%ld (new_mask 0x%Ix): running on processor %ld (AffinityMask: 0x%Ix)\n",
3449 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %lu bytes\n",
ret);
3464 ok(
module !=
NULL,
"expected non-NULL address for module\n");
3466 ok(
nt !=
NULL,
"expected non-NULL address for NT header\n");
3473 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %lu bytes\n",
ret);
3475 ok(
entry == expected_entry,
"expected %p, got %p\n", expected_entry,
entry);
3477 entry = (
void *)0xdeadbeef;
3481 "expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER, got %08lx\n",
status);
3490 ok(
ret ==
sizeof(
entry),
"NtQueryInformationThread returned %lu bytes\n",
ret);
3491 ok(
entry == (
void *)0xdeadbeef,
"expected 0xdeadbeef, got %p\n",
entry);
3559 cid.UniqueProcess = 0;
3581 cid.UniqueProcess = 0;
3586 "NtOpenThread returned %#lx\n",
status);
3644 ok(
data == 0xcccccccc,
"wrong data %lx\n",
data );
3645 ok(
len == 0xdeadbeef,
"wrong len %lu\n",
len );
3652 ok(
data == 0xcccccccc,
"wrong data %lx\n",
data );
3653 ok(
len == 0xdeadbeef,
"wrong len %lu\n",
len );
3690 ok( !
status,
"NtSetInformationDebugObject failed %lx\n",
status );
3691 ok( !
len,
"wrong len %lu\n",
len );
3696 ok( !
status,
"NtSetInformationDebugObject failed %lx\n",
status );
3697 ok( !
len,
"wrong len %lu\n",
len );
3713 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3714 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3720 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3721 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3723 state.NewState = 11;
3727 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3728 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3731 state.StateInfo.ExitProcess.ExitStatus = 0x123456;
3733 ok( !
status,
"DbgUiConvertStateChangeStructure failed %lx\n",
status );
3734 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3735 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3736 ok(
event.u.ExitProcess.dwExitCode == 0x123456,
"event not updated %lx\n",
event.u.ExitProcess.dwExitCode );
3741 ok( !
status,
"DbgUiConvertStateChangeStructure failed %lx\n",
status );
3742 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3743 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3744 ok(
event.u.CreateProcessInfo.nDebugInfoSize == 0xdddddddd,
"event not updated %lx\n",
event.u.CreateProcessInfo.nDebugInfoSize );
3745 ok(
event.u.CreateProcessInfo.lpThreadLocalBase ==
NULL,
"event not updated %p\n",
event.u.CreateProcessInfo.lpThreadLocalBase );
3746 ok(
event.u.CreateProcessInfo.lpImageName ==
NULL,
"event not updated %p\n",
event.u.CreateProcessInfo.lpImageName );
3747 ok(
event.u.CreateProcessInfo.fUnicode ==
TRUE,
"event not updated %x\n",
event.u.CreateProcessInfo.fUnicode );
3752 ok( !
status,
"DbgUiConvertStateChangeStructure failed %lx\n",
status );
3753 ok(
event.dwProcessId == 0xdddddddd,
"event not updated %lx\n",
event.dwProcessId );
3754 ok(
event.dwThreadId == 0xdddddddd,
"event not updated %lx\n",
event.dwThreadId );
3755 ok(
event.u.LoadDll.nDebugInfoSize == 0xdddddddd,
"event not updated %lx\n",
event.u.LoadDll.nDebugInfoSize );
3756 ok(
PtrToUlong(
event.u.LoadDll.lpImageName) == 0xdddddddd,
"event not updated %p\n",
event.u.LoadDll.lpImageName );
3757 ok(
event.u.LoadDll.fUnicode ==
TRUE,
"event not updated %x\n",
event.u.LoadDll.fUnicode );
3770 win_skip(
"ProcessInstrumentationCallback is not supported.\n" );
3783 "Got unexpected status %#lx.\n",
status );
3787 win_skip(
"NtSetInformationProcess failed, skipping further tests.\n" );
3792 &
info.Callback,
sizeof(
info.Callback) );
3795 &
info.Callback,
sizeof(
info.Callback) + 4 );
3798 &
info.Callback,
sizeof(
info.Callback) / 2 );
3806 DWORD debug_flags = 0xdeadbeef;
3812 ok(0,
"insufficient arguments for child process\n");
3820 &debug_port,
sizeof(debug_port),
NULL );
3821 ok( !
status,
"NtQueryInformationProcess ProcessDebugPort failed, status %#lx.\n",
status );
3822 ok( debug_port == ~(
DWORD_PTR)0,
"Expected port %#Ix, got %#Ix.\n", ~(
DWORD_PTR)0, debug_port );
3825 &debug_flags,
sizeof(debug_flags),
NULL );
3826 ok( !
status,
"NtQueryInformationProcess ProcessDebugFlags failed, status %#lx.\n",
status );
3831 ok(
status == expect_status,
"NtQueryInformationProcess ProcessDebugObjectHandle expected status %#lx, actual %#lx.\n", expect_status,
status );
3856 terminated = 0xdeadbeef;
3859 ok( !terminated,
"got %lu.\n", terminated );
3866 ok( terminated == 1,
"got %lu.\n", terminated );
3891 "class %d, got %#lx.\n",
class,
status );
3896 "class %d, got %#lx.\n",
class,
status );
3980 char image_name_buffer[1024 *
sizeof(
WCHAR)];
3992 sizeof(image_name_buffer),
NULL );
3994 length = image_name->Length;
3995 image_name->Buffer[
length] = 0;
4002 info.ProcessId = 0xdeadbeef;
4003 info.ImageName.Length =
info.ImageName.MaximumLength = 0;
4007 ok( !
info.ImageName.Length,
"got %#x.\n",
info.ImageName.Length );
4008 ok( !
info.ImageName.MaximumLength,
"got %#x.\n",
info.ImageName.MaximumLength );
4014 ok( !
info.ImageName.Length,
"got %#x.\n",
info.ImageName.Length );
4016 "got %#x.\n",
info.ImageName.MaximumLength );
4018 info.ImageName.MaximumLength =
sizeof(
name);
4024 "got %u.\n",
info.ImageName.Length );
4026 "got %#x.\n",
info.ImageName.MaximumLength );
4028 info.ProcessId = 0xdeadbeef;
4029 info.ImageName.MaximumLength =
sizeof(
name);
4031 info.ImageName.Length = 0;
4034 ok( !
info.ImageName.Length,
"got %#x.\n",
info.ImageName.Length );
4035 ok(
info.ImageName.MaximumLength ==
sizeof(
name),
"got %#x.\n",
info.ImageName.MaximumLength );
4039 info.ImageName.MaximumLength =
sizeof(
name);
4041 info.ImageName.Length = 0;
4044 ok( !
info.ImageName.Length,
"got %#x.\n",
info.ImageName.Length );
4045 ok(
info.ImageName.MaximumLength ==
sizeof(
name),
"got %#x.\n",
info.ImageName.MaximumLength );
4046 ok(
info.ImageName.Buffer ==
name,
"got non NULL.\n" );
4049 info.ImageName.MaximumLength =
sizeof(
name);
4051 info.ImageName.Length = 4;
4054 ok(
info.ImageName.Length == 4,
"got %#x.\n",
info.ImageName.Length );
4055 ok(
info.ImageName.MaximumLength ==
sizeof(
name),
"got %#x.\n",
info.ImageName.MaximumLength );
4056 ok(
info.ImageName.Buffer ==
name,
"got non NULL.\n" );
4059 info.ImageName.MaximumLength =
sizeof(
name);
4061 info.ImageName.Length = 4;
4064 ok(
info.ImageName.Length == 4,
"got %#x.\n",
info.ImageName.Length );
4065 ok(
info.ImageName.MaximumLength ==
sizeof(
name),
"got %#x.\n",
info.ImageName.MaximumLength );
4067 info.ImageName.Length = 0;
4071 ok(
info.ImageName.Length ==
length,
"got %#x.\n",
info.ImageName.Length );
4073 ok(
info.ImageName.MaximumLength ==
info.ImageName.Length + 2,
"got %#x.\n",
info.ImageName.MaximumLength );
4074 ok( !
name[
info.ImageName.Length / 2],
"got %#x.\n",
name[
info.ImageName.Length / 2] );
4076 ok(
info.ImageName.Length == image_name->Length,
"got %#x, %#x.\n",
info.ImageName.Length, image_name->Length );
4079#if !defined (__REACTOS__) || (DLL_EXPORT_VERSION >= 0x601)
4082 for (
i = 0;
i <
len /
sizeof(*pids); ++
i)
4090 info.ProcessId = pids[
i];
4091 info.ImageName.Length = 0;
4092 info.ImageName.MaximumLength =
sizeof(
name);
4095 ok(
info.ImageName.Buffer ==
name || (!
info.ImageName.MaximumLength && !
info.ImageName.Length),
4096 "got %p, %p, pid %lu, lengh %u / %u.\n",
info.ImageName.Buffer,
name, pids[
i],
4097 info.ImageName.Length,
info.ImageName.MaximumLength );
4109 unsigned int cpu_count =
NtCurrentTeb()->Peb->NumberOfProcessors;
4128 ok(
size == 0xdeadbeef,
"got %#lx.\n",
size );
4136 if (pNtQuerySystemInformationEx ==
NULL)
4138 win_skip(
"NtQuerySystemInformationEx is not available.\n");
4147 ok(
size == 0xdeadbeef,
"got %#lx.\n",
size );
4152 ok(
size == 0xdeadbeef,
"got %#lx.\n",
size );
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, _Outptr_result_bytebuffer_(*ViewSize) _Pre_valid_ PVOID *BaseAddress, _In_ ULONG_PTR ZeroBits, _In_ SIZE_T CommitSize, _Inout_opt_ PLARGE_INTEGER SectionOffset, _Inout_ PSIZE_T ViewSize, _In_range_(ViewShare, ViewUnmap) SECTION_INHERIT InheritDisposition, _In_ ULONG AllocationType, _In_ ULONG Win32Protect)
NTSYSAPI NTSTATUS NTAPI NtSetSystemInformation(IN INT SystemInformationClass, IN PVOID SystemInformation, IN ULONG SystemInformationLength)
#define STATUS_PRIVILEGE_NOT_HELD
_In_ PVOID _In_ ULONG _Out_ PVOID _In_ ULONG _Inout_ PULONG ReturnLength
#define OBJ_PROTECT_CLOSE
EXTERN_C NTSTATUS WINAPI NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG)
@ ProcessBasicInformation
@ ProcessWow64Information
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
#define STATUS_OBJECT_TYPE_MISMATCH
NTSTATUS NTAPI NtSystemDebugControl(_In_ SYSDBG_COMMAND Command, _In_reads_bytes_(InputBufferLength) PVOID InputBuffer, _In_ ULONG InputBufferLength, _Out_writes_bytes_(OutputBufferLength) PVOID OutputBuffer, _In_ ULONG OutputBufferLength, _Out_opt_ PULONG ReturnLength)
Perform various queries to the kernel debugger.
NTSTATUS NTAPI NtSetInformationDebugObject(IN HANDLE DebugHandle, IN DEBUGOBJECTINFOCLASS DebugObjectInformationClass, IN PVOID DebugInformation, IN ULONG DebugInformationLength, OUT PULONG ReturnLength OPTIONAL)
NTSTATUS NTAPI NtCreateDebugObject(OUT PHANDLE DebugHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG Flags)
@ DebugObjectKillProcessOnExitInformation
@ DbgCreateProcessStateChange
@ DbgExitProcessStateChange
NTSTATUS NTAPI DbgUiConvertStateChangeStructure(IN PDBGUI_WAIT_STATE_CHANGE WaitStateChange, OUT PVOID Win32DebugEvent)
VOID NTAPI DbgUiSetThreadDebugObject(HANDLE DebugObject)
#define ERROR_INSUFFICIENT_BUFFER
static const WCHAR deviceW[]
#define NT_SUCCESS(StatCode)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
BOOL WINAPI AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
BOOL WINAPI DuplicateTokenEx(IN HANDLE ExistingTokenHandle, IN DWORD dwDesiredAccess, IN LPSECURITY_ATTRIBUTES lpTokenAttributes OPTIONAL, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, IN TOKEN_TYPE TokenType, OUT PHANDLE DuplicateTokenHandle)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
@ ThreadEnableAlignmentFaultFixup
@ ThreadQuerySetWin32StartAddress
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define ERROR_ACCESS_DENIED
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)
BOOL WINAPI SetHandleInformation(IN HANDLE hObject, IN DWORD dwMask, IN DWORD dwFlags)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
BOOL WINAPI EnumProcesses(DWORD *ids, DWORD count, DWORD *used)
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)
static const struct _KUSER_SHARED_DATA * user_shared_data
#define DECLSPEC_ALIGN(x)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
@ SystemKernelDebuggerInformation
@ SystemTimeOfDayInformation
@ SystemModuleInformation
@ SystemRegistryQuotaInformation
@ SystemInterruptInformation
@ SystemFileCacheInformation
@ SystemHandleInformation
@ SystemProcessInformation
@ SystemTimeAdjustmentInformation
@ SystemProcessorPerformanceInformation
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
#define STATUS_ACCESS_VIOLATION
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLenum const GLvoid * addr
GLuint GLint GLboolean GLint GLenum access
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 flag
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 token
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
#define THREAD_QUERY_INFORMATION
int WINAPI lstrlenA(LPCSTR lpString)
PFN_NUMBER MmLowestPhysicalPage
PFN_NUMBER MmHighestPhysicalPage
#define SystemPerformanceInformation
struct _SYSTEM_PERFORMANCE_INFORMATION SYSTEM_PERFORMANCE_INFORMATION
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define LOAD_DLL_DEBUG_EVENT
#define EXIT_PROCESS_DEBUG_EVENT
static struct msdos_boot_sector bs
#define THREAD_QUERY_LIMITED_INFORMATION
#define PROCESS_QUERY_LIMITED_INFORMATION
static unsigned int number
#define STATUS_DEBUGGER_INACTIVE
static PROCESS_INFORMATION pi
static HINSTANCE hkernel32
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
static void test_query_performance(void)
static DWORD WINAPI test_ThreadIsTerminated_thread(void *stop_event)
static void test_debug_object(void)
static void test_query_data_alignment(void)
#define NTDLL_GET_PROC(func)
static void test_query_timeofday(void)
static DWORD WINAPI hide_from_debugger_thread(void *arg)
static TOKEN_OWNER * get_current_owner(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_process_instrumentation_callback(void)
static void test_query_process_io(void)
static void dump_vm_counters(const char *header, const VM_COUNTERS_EX *pvi)
static void test_query_kerndebug(void)
static const void void SIZE_T *static SIZE_T *static ACCESS_MASK
static void test_query_process_quota_limits(void)
static DEBUGOBJECTINFOCLASS
static void test_thread_lookup(void)
static void test_query_process_debug_port_custom_dacl(int argc, char **argv)
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_thread_ideal_processor(void)
static void test_mapprotection(void)
static const OBJECT_ATTRIBUTES const CLIENT_ID *static OBJECT_INFORMATION_CLASS
static PVOID const LARGE_INTEGER SIZE_T SECTION_INHERIT
static void test_query_regquota(void)
static void test_query_battery(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 test_process_id(void)
static void test_NtGetCurrentProcessorNumber(void)
static DWORD WINAPI start_address_thread(void *arg)
static void test_query_firmware(void)
static void test_time_adjustment(void)
static void test_ThreadIsTerminated(void)
static void test_queryvirtualmemory(void)
static void test_query_handle_ex(void)
static void test_query_process_wow64(void)
static void test_processor_idle_cycle_time(void)
static void test_process_token(int argc, char **argv)
static void InitFunctionPtrs(void)
static void test_query_basic(void)
static void test_query_handle(void)
static void subtest_query_process_debug_port_custom_dacl(int argc, char **argv, ACCESS_MASK access, PSID sid)
static void test_query_cpusetinfo(void)
static void test_system_debug_control(void)
static const void void SIZE_T *static LPCVOID
static void test_affinity(void)
static DWORD_PTR get_affinity_mask(DWORD num_cpus)
static void test_query_module(void)
static void test_query_process_times(void)
static void test_query_cpu(void)
static void test_threadstack(void)
static void test_query_process(BOOL extended)
static void test_query_interrupt(void)
static void test_HideFromDebugger(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 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_logicalprocex(void)
static void test_ThreadEnableAlignmentFaultFixup(void)
static void test_query_process_image_info(void)
static void test_query_process_debug_object_handle(int argc, char **argv)
static void test_thread_info(void)
static void test_debuggee_dbgport(int argc, char **argv)
#define InitializeObjectAttributes(p, n, a, r, s)
static SYSTEM_BASIC_INFORMATION sbi
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
@ SystemFirmwareTableInformation
@ SystemProcessorBrandString
@ SystemLogicalProcessorInformation
@ SystemEmulationBasicInformation
@ SystemModuleInformationEx
@ SystemProcessIdInformation
@ SystemProcessorFeaturesInformation
@ SystemRecommendedSharedDataAlignment
@ SystemKernelDebuggerInformationEx
@ SystemExtendedHandleInformation
@ SystemEmulationProcessorInformation
@ SystemExtendedProcessInformation
@ SystemCpuSetInformation
@ SystemNativeBasicInformation
@ SystemProcessorIdleCycleTimeInformation
@ SysDbgDisableKernelDebugger
enum _SYSDBG_COMMAND SYSDBG_COMMAND
#define PROCESSOR_ARCHITECTURE_ARM
#define PROCESSOR_ARCHITECTURE_AMD64
#define PROCESSOR_ARCHITECTURE_INTEL
#define MEM_EXECUTE_OPTION_PERMANENT
#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
static void ULONG *static PIO_STATUS_BLOCK void ULONG FS_INFORMATION_CLASS info_class
PFN_COUNT MmNumberOfPhysicalPages
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 NtOpenProcess(OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId)
NTSTATUS NTAPI NtQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_writes_bytes_to_opt_(ThreadInformationLength, *ReturnLength) PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_opt_ PULONG ReturnLength)
NTSTATUS NTAPI NtSetInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _In_reads_bytes_(ProcessInformationLength) PVOID ProcessInformation, _In_ ULONG ProcessInformationLength)
NTSTATUS NTAPI NtSetInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation, _In_ ULONG ThreadInformationLength)
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)
NTSTATUS NTAPI NtOpenThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId OPTIONAL)
struct _PROCESSOR_POWER_INFORMATION PROCESSOR_POWER_INFORMATION
enum _POWER_INFORMATION_LEVEL POWER_INFORMATION_LEVEL
#define STATUS_INVALID_ADDRESS
#define STATUS_INVALID_CID
#define STATUS_TOKEN_ALREADY_IN_USE
#define STATUS_BAD_TOKEN_TYPE
#define STATUS_PORT_NOT_SET
#define STATUS_DATATYPE_MISALIGNMENT
#define STATUS_INVALID_INFO_CLASS
#define STATUS_PARTIAL_COPY
#define STATUS_BAD_IMPERSONATION_LEVEL
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
#define _WIN32_WINNT_WIN7
#define _WIN32_WINNT_VISTA
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
#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)
ULONGLONG OtherOperationCount
INT64 MaximumWorkingSetSize
INT64 MinimumWorkingSetSize
DWORD dwNumberOfProcessors
BOOLEAN TimeAdjustmentDisabled
SIZE_T QuotaNonPagedPoolUsage
SIZE_T PeakWorkingSetSize
SIZE_T QuotaPeakNonPagedPoolUsage
SIZE_T QuotaPeakPagedPoolUsage
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)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define FIELD_OFFSET(t, f)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#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)
DWORD WINAPI GetCurrentThreadId(void)
#define HANDLE_FLAG_PROTECT_FROM_CLOSE
#define BELOW_NORMAL_PRIORITY_CLASS
#define HANDLE_FLAG_INHERIT
DWORD WINAPI GetCurrentProcessId(void)
#define DEBUG_ONLY_THIS_PROCESS
enum _DEP_SYSTEM_POLICY_TYPE DEP_SYSTEM_POLICY_TYPE
_Inout_ PERBANDINFO * pbi
struct _SYSTEM_EXTENDED_THREAD_INFORMATION SYSTEM_EXTENDED_THREAD_INFORMATION
NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void)
@ MemoryMappedFilenameInformation
NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS, void *, ULONG, void *, ULONG, ULONG *)
NTSYSAPI HANDLE WINAPI DbgUiGetThreadDebugObject(void)
@ SystemFirmwareTable_Get
NTSYSAPI NTSTATUS WINAPI RtlGetNativeSystemInformation(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *)
@ ProcessInstrumentationCallback
@ ProcessImageInformation
@ ProcessImageFileNameWin32
@ ProcessThreadStackAllocation
@ ProcessDebugObjectHandle
#define PROCESS_PRIOCLASS_BELOW_NORMAL
void(CALLBACK * PRTL_THREAD_START_ROUTINE)(LPVOID)
struct _SYSTEM_CACHE_INFORMATION SYSTEM_CACHE_INFORMATION
#define DEBUG_KILL_ON_CLOSE
@ SystemLogicalProcessorInformationEx
#define ERROR_SEM_TIMEOUT
#define PROCESSOR_ARCHITECTURE_ARM64
_Out_ PHANDLE EventHandle
SYSTEM_CPU_SET_INFORMATION
@ RelationProcessorModule
@ RelationProcessorPackage
enum _LOGICAL_PROCESSOR_RELATIONSHIP LOGICAL_PROCESSOR_RELATIONSHIP
#define TOKEN_ADJUST_PRIVILEGES
#define TOKEN_ASSIGN_PRIMARY
#define TOKEN_ADJUST_DEFAULT
#define SECURITY_DESCRIPTOR_REVISION
#define SECURITY_MAX_SID_SIZE