Commit 82973927 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Set the process creation time in NtQuerySystemInformation(SystemProcessInformation).

Process Hacker displays this information. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 644dbf06
......@@ -2140,6 +2140,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
memset(nt_process, 0, sizeof(*nt_process));
if (i < process_count - 1)
nt_process->NextEntryOffset = proc_len;
nt_process->CreationTime.QuadPart = server_process->start_time;
nt_process->dwThreadCount = server_process->thread_count;
nt_process->dwBasePriority = server_process->priority;
nt_process->UniqueProcessId = UlongToHandle(server_process->pid);
......
......@@ -2416,6 +2416,7 @@ struct thread_info
struct process_info
{
timeout_t start_time;
data_size_t name_len;
int thread_count;
int priority;
......@@ -2423,6 +2424,7 @@ struct process_info
process_id_t parent_pid;
int handle_count;
int unix_pid;
int __pad;
};
......@@ -6652,7 +6654,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 618
#define SERVER_PROTOCOL_VERSION 619
/* ### protocol_version end ### */
......
......@@ -1829,6 +1829,7 @@ DECL_HANDLER(list_processes)
pos = (pos + 7) & ~7;
process_info = (struct process_info *)(buffer + pos);
process_info->start_time = process->start_time;
process_info->name_len = exe ? exe->namelen : 0;
process_info->thread_count = process->running_threads;
process_info->priority = process->priority;
......
......@@ -1870,6 +1870,7 @@ struct thread_info
struct process_info
{
timeout_t start_time;
data_size_t name_len;
int thread_count;
int priority;
......@@ -1877,6 +1878,7 @@ struct process_info
process_id_t parent_pid;
int handle_count;
int unix_pid;
int __pad;
/* VARARG(name,unicode_str,name_len); */
/* VARARG(threads,struct thread_info,thread_count); */
};
......
......@@ -1113,7 +1113,8 @@ static void dump_varargs_process_info( const char *prefix, data_size_t size )
process = (const struct process_info *)((const char *)cur_data + pos);
if (size - pos < sizeof(*process)) break;
if (pos) fputc( ',', stderr );
fprintf( stderr, "{thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
dump_timeout( "{start_time=", &process->start_time );
fprintf( stderr, ",thread_count=%u,priority=%d,pid=%04x,parent_pid=%04x,handle_count=%u,unix_pid=%d,",
process->thread_count, process->priority, process->pid,
process->parent_pid, process->handle_count, process->unix_pid );
pos += sizeof(*process);
......
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