Skip to content

Commit

Permalink
Fix missing GetThreadDescription symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
gleocadie committed Nov 26, 2024
1 parent b15c82c commit f09ad5d
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "CrashReportingWindows.h"
#include "TlHelp32.h"
#include "DbgHelp.h"
#include "OpSysTools.h"
#include "Psapi.h"

#include <shared/src/native-src/string.h>
Expand Down Expand Up @@ -75,15 +76,8 @@ std::vector<std::pair<int32_t, std::string>> CrashReportingWindows::GetThreads()

if (thread.IsValid())
{
std::string threadName;
PWSTR description;

if (SUCCEEDED(GetThreadDescription(thread, &description)))
{
threadName = shared::ToString(description);
}

threads.push_back({ threadEntry.th32ThreadID, std::move(threadName) });
auto wThreadName = OpSysTools::GetNativeThreadName(thread);
threads.push_back({ threadEntry.th32ThreadID, shared::ToString(wThreadName) });
}
}
} while (Thread32Next(threadSnapshot, &threadEntry));
Expand Down

0 comments on commit f09ad5d

Please sign in to comment.