ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtQueryInformationThread.

This commit is contained in:
Sebastian Lackner 2015-07-27 18:31:33 +02:00 committed by Alexandre Julliard
parent 6ab494ceb5
commit 845164004b
6 changed files with 29 additions and 8 deletions

View File

@ -1086,12 +1086,28 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_END_REQ;
return status;
}
case ThreadQuerySetWin32StartAddress:
{
SERVER_START_REQ( get_thread_info )
{
req->handle = wine_server_obj_handle( handle );
req->tid_in = 0;
status = wine_server_call( req );
if (status == STATUS_SUCCESS)
{
PRTL_THREAD_START_ROUTINE entry = wine_server_get_ptr( reply->entry_point );
if (data) memcpy( data, &entry, min( length, sizeof(entry) ) );
if (ret_len) *ret_len = min( length, sizeof(entry) );
}
}
SERVER_END_REQ;
return status;
}
case ThreadPriority:
case ThreadBasePriority:
case ThreadImpersonationToken:
case ThreadEnableAlignmentFaultFixup:
case ThreadEventPair_Reusable:
case ThreadQuerySetWin32StartAddress:
case ThreadZeroTlsCell:
case ThreadPerformanceCount:
case ThreadIdealProcessor:

View File

@ -892,11 +892,12 @@ struct get_thread_info_reply
process_id_t pid;
thread_id_t tid;
client_ptr_t teb;
client_ptr_t entry_point;
affinity_t affinity;
int exit_code;
int priority;
int last;
char __pad_44[4];
char __pad_52[4];
};
@ -6113,6 +6114,6 @@ union generic_reply
struct terminate_job_reply terminate_job_reply;
};
#define SERVER_PROTOCOL_VERSION 483
#define SERVER_PROTOCOL_VERSION 484
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -841,6 +841,7 @@ struct rawinput_device
process_id_t pid; /* server process id */
thread_id_t tid; /* server thread id */
client_ptr_t teb; /* thread teb pointer */
client_ptr_t entry_point; /* thread entry point */
affinity_t affinity; /* thread affinity mask */
int exit_code; /* thread exit code */
int priority; /* thread priority level */

View File

@ -768,11 +768,12 @@ C_ASSERT( sizeof(struct get_thread_info_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, pid) == 8 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, tid) == 12 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, teb) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, affinity) == 24 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, exit_code) == 32 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, priority) == 36 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, last) == 40 );
C_ASSERT( sizeof(struct get_thread_info_reply) == 48 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, entry_point) == 24 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, affinity) == 32 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, exit_code) == 40 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, priority) == 44 );
C_ASSERT( FIELD_OFFSET(struct get_thread_info_reply, last) == 48 );
C_ASSERT( sizeof(struct get_thread_info_reply) == 56 );
C_ASSERT( FIELD_OFFSET(struct get_thread_times_request, handle) == 12 );
C_ASSERT( sizeof(struct get_thread_times_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_thread_times_reply, creation_time) == 8 );

View File

@ -1375,6 +1375,7 @@ DECL_HANDLER(get_thread_info)
reply->pid = get_process_id( thread->process );
reply->tid = get_thread_id( thread );
reply->teb = thread->teb;
reply->entry_point = thread->entry_point;
reply->exit_code = (thread->state == TERMINATED) ? thread->exit_code : STATUS_PENDING;
reply->priority = thread->priority;
reply->affinity = thread->affinity;

View File

@ -1300,6 +1300,7 @@ static void dump_get_thread_info_reply( const struct get_thread_info_reply *req
fprintf( stderr, " pid=%04x", req->pid );
fprintf( stderr, ", tid=%04x", req->tid );
dump_uint64( ", teb=", &req->teb );
dump_uint64( ", entry_point=", &req->entry_point );
dump_uint64( ", affinity=", &req->affinity );
fprintf( stderr, ", exit_code=%d", req->exit_code );
fprintf( stderr, ", priority=%d", req->priority );