ntdll: Set the process creation time in NtQuerySystemInformation(SystemProcessInformation).
Process Hacker displays this information. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
644dbf0644
commit
8297392734
|
@ -2140,6 +2140,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||||
memset(nt_process, 0, sizeof(*nt_process));
|
memset(nt_process, 0, sizeof(*nt_process));
|
||||||
if (i < process_count - 1)
|
if (i < process_count - 1)
|
||||||
nt_process->NextEntryOffset = proc_len;
|
nt_process->NextEntryOffset = proc_len;
|
||||||
|
nt_process->CreationTime.QuadPart = server_process->start_time;
|
||||||
nt_process->dwThreadCount = server_process->thread_count;
|
nt_process->dwThreadCount = server_process->thread_count;
|
||||||
nt_process->dwBasePriority = server_process->priority;
|
nt_process->dwBasePriority = server_process->priority;
|
||||||
nt_process->UniqueProcessId = UlongToHandle(server_process->pid);
|
nt_process->UniqueProcessId = UlongToHandle(server_process->pid);
|
||||||
|
|
|
@ -2416,6 +2416,7 @@ struct thread_info
|
||||||
|
|
||||||
struct process_info
|
struct process_info
|
||||||
{
|
{
|
||||||
|
timeout_t start_time;
|
||||||
data_size_t name_len;
|
data_size_t name_len;
|
||||||
int thread_count;
|
int thread_count;
|
||||||
int priority;
|
int priority;
|
||||||
|
@ -2423,6 +2424,7 @@ struct process_info
|
||||||
process_id_t parent_pid;
|
process_id_t parent_pid;
|
||||||
int handle_count;
|
int handle_count;
|
||||||
int unix_pid;
|
int unix_pid;
|
||||||
|
int __pad;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -6652,7 +6654,7 @@ union generic_reply
|
||||||
|
|
||||||
/* ### protocol_version begin ### */
|
/* ### protocol_version begin ### */
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 618
|
#define SERVER_PROTOCOL_VERSION 619
|
||||||
|
|
||||||
/* ### protocol_version end ### */
|
/* ### protocol_version end ### */
|
||||||
|
|
||||||
|
|
|
@ -1829,6 +1829,7 @@ DECL_HANDLER(list_processes)
|
||||||
|
|
||||||
pos = (pos + 7) & ~7;
|
pos = (pos + 7) & ~7;
|
||||||
process_info = (struct process_info *)(buffer + pos);
|
process_info = (struct process_info *)(buffer + pos);
|
||||||
|
process_info->start_time = process->start_time;
|
||||||
process_info->name_len = exe ? exe->namelen : 0;
|
process_info->name_len = exe ? exe->namelen : 0;
|
||||||
process_info->thread_count = process->running_threads;
|
process_info->thread_count = process->running_threads;
|
||||||
process_info->priority = process->priority;
|
process_info->priority = process->priority;
|
||||||
|
|
|
@ -1870,6 +1870,7 @@ struct thread_info
|
||||||
|
|
||||||
struct process_info
|
struct process_info
|
||||||
{
|
{
|
||||||
|
timeout_t start_time;
|
||||||
data_size_t name_len;
|
data_size_t name_len;
|
||||||
int thread_count;
|
int thread_count;
|
||||||
int priority;
|
int priority;
|
||||||
|
@ -1877,6 +1878,7 @@ struct process_info
|
||||||
process_id_t parent_pid;
|
process_id_t parent_pid;
|
||||||
int handle_count;
|
int handle_count;
|
||||||
int unix_pid;
|
int unix_pid;
|
||||||
|
int __pad;
|
||||||
/* VARARG(name,unicode_str,name_len); */
|
/* VARARG(name,unicode_str,name_len); */
|
||||||
/* VARARG(threads,struct thread_info,thread_count); */
|
/* 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);
|
process = (const struct process_info *)((const char *)cur_data + pos);
|
||||||
if (size - pos < sizeof(*process)) break;
|
if (size - pos < sizeof(*process)) break;
|
||||||
if (pos) fputc( ',', stderr );
|
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->thread_count, process->priority, process->pid,
|
||||||
process->parent_pid, process->handle_count, process->unix_pid );
|
process->parent_pid, process->handle_count, process->unix_pid );
|
||||||
pos += sizeof(*process);
|
pos += sizeof(*process);
|
||||||
|
|
Loading…
Reference in New Issue