From b4684bc561257de99ce2b3bef29cc9b622aab239 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 8 Nov 2019 00:54:33 +1000 Subject: [PATCH] kernelbase: Add stub for SetThreadDescription(). Used by Hitman 2. Signed-off-by: Conor McCarthy Signed-off-by: Alexandre Julliard --- .../api-ms-win-core-processthreads-l1-1-3.spec | 2 +- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/thread.c | 10 ++++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec b/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec index 3b57e1c8989..6f0c4fa7529 100644 --- a/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec +++ b/dlls/api-ms-win-core-processthreads-l1-1-3/api-ms-win-core-processthreads-l1-1-3.spec @@ -5,6 +5,6 @@ @ stub GetThreadSelectedCpuSets @ stub SetProcessDefaultCpuSets @ stub SetProcessInformation -@ stub SetThreadDescription +@ stdcall SetThreadDescription(ptr wstr) kernel32.SetThreadDescription @ stdcall SetThreadIdealProcessor(long long) kernel32.SetThreadIdealProcessor @ stub SetThreadSelectedCpuSets diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 23c25b7acd8..88708845df2 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1447,6 +1447,7 @@ @ stdcall SetTermsrvAppInstallMode(long) @ stdcall SetThreadAffinityMask(long long) @ stdcall -import SetThreadContext(long ptr) +@ stdcall -import SetThreadDescription(ptr wstr) @ stdcall -import SetThreadErrorMode(long ptr) @ stdcall SetThreadExecutionState(long) @ stdcall -import SetThreadGroupAffinity(long ptr ptr) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index c1fa479525b..a86a3fe2524 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1478,7 +1478,7 @@ @ stdcall SetSystemTime(ptr) @ stdcall SetSystemTimeAdjustment(long long) kernel32.SetSystemTimeAdjustment @ stdcall SetThreadContext(long ptr) -# @ stub SetThreadDescription +@ stdcall SetThreadDescription(ptr wstr) @ stdcall SetThreadErrorMode(long ptr) @ stdcall SetThreadGroupAffinity(long ptr ptr) @ stdcall SetThreadIdealProcessor(long long) diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index 0cac2b69419..345f44dff7f 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -387,6 +387,16 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetThreadContext( HANDLE thread, const CONTEXT *co } +/*********************************************************************** + * SetThreadDescription (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ SetThreadDescription( HANDLE thread, PCWSTR description ) +{ + FIXME( "(%p %s): stub\n", thread, debugstr_w( description )); + return E_NOTIMPL; +} + + /*********************************************************************** * SetThreadErrorMode (kernelbase.@) */