SetThreadName does not set the thread name in Visual Studio 2005 when used below:
DWORD threadId;
HANDLE handle = CreateThread(NULL, stackSize, ThreadFunction,
ThreadParam, CREATE_SUSPENDED, &threadId);
if (handle)
{
SetThreadName(threadId, "NiceName");
ResumeThread(handle);
}
After opening the Threads window instead of NiceName, I see the name ThreadFunction. Other tools (like Intel Parallel Inspector) use NiceName as expected.
source
share