forked from mia/Aegisub
Clean up SetThreadName a little
Originally committed to SVN as r6217.
This commit is contained in:
parent
c0d8270815
commit
dc58b3db40
1 changed files with 10 additions and 25 deletions
|
@ -92,8 +92,6 @@ IMPLEMENT_APP(AegisubApp)
|
||||||
static const char *LastStartupState = NULL;
|
static const char *LastStartupState = NULL;
|
||||||
|
|
||||||
#ifdef WITH_STARTUPLOG
|
#ifdef WITH_STARTUPLOG
|
||||||
|
|
||||||
/// DOCME
|
|
||||||
#define StartupLog(a) MessageBox(0, L ## a, L"Aegisub startup log", 0)
|
#define StartupLog(a) MessageBox(0, L ## a, L"Aegisub startup log", 0)
|
||||||
#else
|
#else
|
||||||
#define StartupLog(a) LastStartupState = a
|
#define StartupLog(a) LastStartupState = a
|
||||||
|
@ -104,30 +102,17 @@ static const char *LastStartupState = NULL;
|
||||||
/// DOCME
|
/// DOCME
|
||||||
#define MS_VC_EXCEPTION 0x406d1388
|
#define MS_VC_EXCEPTION 0x406d1388
|
||||||
|
|
||||||
|
/// Parameters for setting the thread name
|
||||||
|
struct THREADNAME_INFO {
|
||||||
|
DWORD dwType; ///< must be 0x1000
|
||||||
|
LPCSTR szName; ///< pointer to name (in same addr space)
|
||||||
|
DWORD dwThreadID; ///< thread ID (-1 caller thread)
|
||||||
|
DWORD dwFlags; ///< reserved for future use, most be zero
|
||||||
|
};
|
||||||
|
|
||||||
/// DOCME
|
/// Set the name of a thread in the visual studio debugger
|
||||||
typedef struct tagTHREADNAME_INFO {
|
/// @param dwThreadID Thread ID, or -1 for caller
|
||||||
|
/// @param szThreadName New name for the thread
|
||||||
/// DOCME
|
|
||||||
DWORD dwType; // must be 0x1000
|
|
||||||
|
|
||||||
/// DOCME
|
|
||||||
LPCSTR szName; // pointer to name (in same addr space)
|
|
||||||
|
|
||||||
/// DOCME
|
|
||||||
DWORD dwThreadID; // thread ID (-1 caller thread)
|
|
||||||
|
|
||||||
/// DOCME
|
|
||||||
DWORD dwFlags; // reserved for future use, most be zero
|
|
||||||
|
|
||||||
/// DOCME
|
|
||||||
} THREADNAME_INFO;
|
|
||||||
|
|
||||||
|
|
||||||
/// @brief DOCME
|
|
||||||
/// @param dwThreadID
|
|
||||||
/// @param szThreadName
|
|
||||||
///
|
|
||||||
void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
|
void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
|
||||||
THREADNAME_INFO info;
|
THREADNAME_INFO info;
|
||||||
info.dwType = 0x1000;
|
info.dwType = 0x1000;
|
||||||
|
|
Loading…
Reference in a new issue