It would be really helpful to have thread descriptions available in bugreport.txt.
I can set this using the Windows 10 API:
https://docs.microsoft.com/en-us/window ... escription
Where in the MadExcept source code is the best place a place to add GetThreadDescription to display it alongside the Thread ID ?
Thread Description
Re: Thread Description
I have now found SetThreadInfo and made a change to add it to the implementation section of madExcept.pas so that I can call it after creating threads. The ones I need to show in bugreport.txt are actually created in a Microsoft C DLL which can already call some functions in the main Delphi program. This works well!
Re: Thread Description
There's already an API exported by madExcept.pas called "NameThread()":
Internally it calls "SetThreadInfo".
Code: Select all
// to make the bug report more readable, you can name your secondardy threads
procedure NameThread (threadId: dword; const threadName: UnicodeString);