[PATCH 01/10] kernelbase: Add stub for SetThreadDescription().

Conor McCarthy cmccarthy at codeweavers.com
Thu Nov 7 08:54:33 CST 2019


Used by Hitman 2.

Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
 .../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 3b57e1c8..6f0c4fa7 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 23c25b7a..88708845 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 c1fa4795..a86a3fe2 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 0cac2b69..4775f69c 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, wine_dbgstr_w( description ) );
+    return E_NOTIMPL;
+}
+
+
 /***********************************************************************
  *           SetThreadErrorMode   (kernelbase.@)
  */
-- 
2.23.0




More information about the wine-devel mailing list