ntdll: Implement NtQueryInformationProcess(ProcessSessionInformation).
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ad93413c71
commit
bf4105b731
|
@ -987,7 +987,6 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
|
|||
UNIMPLEMENTED_INFO_CLASS(ProcessWx86Information);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessPriorityBoost);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessDeviceMap);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessSessionInformation);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessForegroundInformation);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessLUIDDeviceMapsEnabled);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessBreakOnTermination);
|
||||
|
@ -1272,6 +1271,21 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
|
|||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
|
||||
case ProcessSessionInformation:
|
||||
len = sizeof(DWORD);
|
||||
if (size == len)
|
||||
{
|
||||
SERVER_START_REQ(get_process_info)
|
||||
{
|
||||
req->handle = wine_server_obj_handle( handle );
|
||||
if (!(ret = wine_server_call( req )))
|
||||
*(DWORD *)info = reply->session_id;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
}
|
||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
|
||||
case ProcessWow64Information:
|
||||
len = sizeof(ULONG_PTR);
|
||||
if (size != len) ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
|
|
|
@ -1004,11 +1004,12 @@ struct get_process_info_reply
|
|||
client_ptr_t peb;
|
||||
timeout_t start_time;
|
||||
timeout_t end_time;
|
||||
unsigned int session_id;
|
||||
int exit_code;
|
||||
int priority;
|
||||
unsigned short machine;
|
||||
/* VARARG(image,pe_image_info); */
|
||||
char __pad_58[6];
|
||||
char __pad_62[2];
|
||||
};
|
||||
|
||||
|
||||
|
@ -6251,7 +6252,7 @@ union generic_reply
|
|||
|
||||
/* ### protocol_version begin ### */
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 721
|
||||
#define SERVER_PROTOCOL_VERSION 722
|
||||
|
||||
/* ### protocol_version end ### */
|
||||
|
||||
|
|
|
@ -1456,6 +1456,7 @@ DECL_HANDLER(get_process_info)
|
|||
reply->peb = process->peb;
|
||||
reply->start_time = process->start_time;
|
||||
reply->end_time = process->end_time;
|
||||
reply->session_id = process->session_id;
|
||||
reply->machine = process->machine;
|
||||
if (get_reply_max_size())
|
||||
{
|
||||
|
|
|
@ -957,6 +957,7 @@ typedef struct
|
|||
client_ptr_t peb; /* PEB address in process address space */
|
||||
timeout_t start_time; /* process start time */
|
||||
timeout_t end_time; /* process end time */
|
||||
unsigned int session_id; /* process session id */
|
||||
int exit_code; /* process exit code */
|
||||
int priority; /* priority class */
|
||||
unsigned short machine; /* process architecture */
|
||||
|
|
|
@ -781,9 +781,10 @@ C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, affinity) == 16 );
|
|||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, peb) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, start_time) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, end_time) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 52 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, machine) == 56 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, session_id) == 48 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, exit_code) == 52 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, priority) == 56 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_info_reply, machine) == 60 );
|
||||
C_ASSERT( sizeof(struct get_process_info_reply) == 64 );
|
||||
C_ASSERT( FIELD_OFFSET(struct get_process_debug_info_request, handle) == 12 );
|
||||
C_ASSERT( sizeof(struct get_process_debug_info_request) == 16 );
|
||||
|
|
|
@ -1584,6 +1584,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re
|
|||
dump_uint64( ", peb=", &req->peb );
|
||||
dump_timeout( ", start_time=", &req->start_time );
|
||||
dump_timeout( ", end_time=", &req->end_time );
|
||||
fprintf( stderr, ", session_id=%08x", req->session_id );
|
||||
fprintf( stderr, ", exit_code=%d", req->exit_code );
|
||||
fprintf( stderr, ", priority=%d", req->priority );
|
||||
fprintf( stderr, ", machine=%04x", req->machine );
|
||||
|
|
Loading…
Reference in New Issue