ReactOS 0.4.16-dev-1946-g52006dd
SetThreadDescription.c File Reference
#include "k32_vista.h"
#include <debug.h>
Include dependency graph for SetThreadDescription.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define TRACE   DPRINT
 

Functions

HRESULT WINAPI DECLSPEC_HOTPATCH SetThreadDescription (HANDLE thread, PCWSTR description)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 3 of file SetThreadDescription.c.

◆ TRACE

#define TRACE   DPRINT

Definition at line 7 of file SetThreadDescription.c.

Function Documentation

◆ SetThreadDescription()

HRESULT WINAPI DECLSPEC_HOTPATCH SetThreadDescription ( HANDLE  thread,
PCWSTR  description 
)

Definition at line 12 of file SetThreadDescription.c.

13{
15 int length;
16
17 TRACE( "(%p, %s)\n", thread, debugstr_w( description ));
18
19 length = description ? lstrlenW( description ) * sizeof(WCHAR) : 0;
20
21 if (length > USHRT_MAX)
23
24 info.ThreadName.Length = info.ThreadName.MaximumLength = length;
25 info.ThreadName.Buffer = (WCHAR *)description;
26
28}
#define TRACE
static HANDLE thread
Definition: service.c:33
#define lstrlenW
Definition: compat.h:750
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
#define USHRT_MAX
Definition: limits.h:38
@ ThreadNameInformation
Definition: winternl.h:2319
#define debugstr_w
Definition: kernel32.h:32
NTSTATUS NTAPI NtSetInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _In_reads_bytes_(ThreadInformationLength) PVOID ThreadInformation, _In_ ULONG ThreadInformationLength)
Definition: query.c:2268
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
const char * description
Definition: directx.c:2497
#define HRESULT_FROM_NT(x)
Definition: winerror.h:216
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by rpcrt4_http_timer_thread(), RPCRT4_io_thread(), and RPCRT4_server_thread().