Модератор: Модераторы
procedure SetThreadName(const AName: string);
...
try
// This is a wierdo Windows way to pass the info in
RaiseException($406D1388, 0, SizeOf(LThreadNameInfo) div SizeOf(LongWord), PDWord(@LThreadNameInfo));
except end;
...
That is a requirement of debuggers. $406D1388 is a special-case exception code that tells the debugger what the name of the calling thread is so it can be cached for display purposes. There is no way to raise $406D1388 other than by calling RaiseException() directly. This technique for naming threads was introduced by Microsoft, and is used by both Microsoft and CodeGear debuggers:
How to: Set a Thread Name in Native Code
msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 13