Kernel32SetThreadDescription Method
Assigns a description to a thread.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static HResult SetThreadDescription(
IntPtr hThread,
string threadDescription
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true>]
Public Shared Function SetThreadDescription (
hThread As IntPtr,
threadDescription As String
) As HResult
Dim hThread As IntPtr
Dim threadDescription As String
Dim returnValue As HResult
returnValue = Kernel32.SetThreadDescription(hThread,
threadDescription)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true)]
static HResult SetThreadDescription(
IntPtr hThread,
String^ threadDescription
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)>]
static member SetThreadDescription :
hThread : IntPtr *
threadDescription : string -> HResult
No code example is currently available or this language may not be supported.
- hThread IntPtr
-
A handle for the thread for which you want to set the description.
The handle must have SetLimitedInformation access.
- threadDescription String
-
A Unicode string that specifies the description of the thread.
HResult
If the function succeeds, the return value is the
HResult that denotes a successful operation.
If the function fails, the return value is an
HResult that denotes the error.