[4/5] ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtQueryInformationThread.
Sebastian Lackner
sebastian at fds-team.de
Sun Jul 26 23:13:00 CDT 2015
---
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 74d512a..fd6c5eb 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1087,12 +1087,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 a1ab2613..15735e0 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -842,6 +842,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 0311966..902848e 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
More information about the wine-patches
mailing list