From: Sebastian Lackner Subject: [3/4] ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtQueryInformationThread. (resend) Message-Id: <55B65CE5.9090608@fds-team.de> Date: Mon, 27 Jul 2015 18:31:33 +0200 No changes in this patch. --- dlls/ntdll/thread.c | 18 +++++++++++++++++- server/protocol.def | 1 + server/thread.c | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 3e95fd4..0a8a7b9 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -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: diff --git a/server/protocol.def b/server/protocol.def index 47cedff..3e25e40 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -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 */ diff --git a/server/thread.c b/server/thread.c index f020908..981bcc1 100644 --- a/server/thread.c +++ b/server/thread.c @@ -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; -- 2.4.5