How to get the name of a Win32 Thread?
问题 I know of the non-intuitive process to set the name of a thread under Windows (see "How to set name to a Win32 Thread?"). Is there a way to get the name of the thread? I don't see any Windows API that lets me do this (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684847(v=vs.85).aspx). 回答1: There is no such WinAPI call since there exists no such thing as thread names. If you set a thread name then the debugger of your IDE will store it for you, which makes it easier to debug.