Commit c0ffd587 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

ntdll: Add stub for NtQueryInformationProcess(ProcessCycleTime).

parent fe6294c7
......@@ -3710,7 +3710,7 @@ static void test_process_info(HANDLE hproc)
0 /* FIXME: sizeof(?) ProcessTlsInformation */,
sizeof(ULONG) /* ProcessCookie */,
sizeof(SECTION_IMAGE_INFORMATION) /* ProcessImageInformation */,
0 /* FIXME: sizeof(PROCESS_CYCLE_TIME_INFORMATION) ProcessCycleTime */,
sizeof(PROCESS_CYCLE_TIME_INFORMATION) /* ProcessCycleTime */,
sizeof(ULONG) /* ProcessPagePriority */,
40 /* ProcessInstrumentationCallback */,
0 /* FIXME: sizeof(PROCESS_STACK_ALLOCATION_INFORMATION) ProcessThreadStackAllocation */,
......@@ -3780,6 +3780,7 @@ static void test_process_info(HANDLE hproc)
case ProcessHandleCount:
case ProcessImageFileName:
case ProcessImageInformation:
case ProcessCycleTime:
case ProcessPagePriority:
case ProcessImageFileNameWin32:
ok(status == STATUS_SUCCESS, "for info %lu expected STATUS_SUCCESS, got %08lx (ret_len %lu)\n", i, status, ret_len);
......
......@@ -1506,6 +1506,25 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
else ret = STATUS_INFO_LENGTH_MISMATCH;
break;
case ProcessCycleTime:
len = sizeof(PROCESS_CYCLE_TIME_INFORMATION);
if (size == len)
{
if (!info) ret = STATUS_ACCESS_VIOLATION;
else
{
PROCESS_CYCLE_TIME_INFORMATION cycles;
FIXME( "ProcessCycleTime (%p,%p,0x%08x,%p) stub\n", handle, info, (int)size, ret_len );
cycles.AccumulatedCycles = 0;
cycles.CurrentCycleCount = 0;
memcpy(info, &cycles, sizeof(PROCESS_CYCLE_TIME_INFORMATION));
}
}
else ret = STATUS_INFO_LENGTH_MISMATCH;
break;
case ProcessWineLdtCopy:
if (handle == NtCurrentProcess())
{
......
......@@ -774,6 +774,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationProcess( UINT *args )
case ProcessDebugFlags: /* ULONG */
case ProcessExecuteFlags: /* ULONG */
case ProcessCookie: /* ULONG */
case ProcessCycleTime: /* PROCESS_CYCLE_TIME_INFORMATION */
/* FIXME: check buffer alignment */
return NtQueryInformationProcess( handle, class, ptr, len, retlen );
......
......@@ -2272,6 +2272,11 @@ typedef struct _PROCESS_PRIORITY_CLASS {
UCHAR PriorityClass;
} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
typedef struct _PROCESS_CYCLE_TIME_INFORMATION {
ULONGLONG AccumulatedCycles;
ULONGLONG CurrentCycleCount;
} PROCESS_CYCLE_TIME_INFORMATION, *PPROCESS_CYCLE_TIME_INFORMATION;
typedef struct _PROCESS_STACK_ALLOCATION_INFORMATION
{
SIZE_T ReserveSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment