Hi
How do I access the 'NameThreadForDebugging' in a delphi Thread in Delphi 2010 ?
type
TMyThread = class(TThread)
protected
procedure Execute; override;
procedure UpdateCaption;
end;
implementation
procedure TMyThread.UpdateCaption;
begin
Form1.Caption := 'Name Thread For Debugging';
// how I get 'TestThread1' displayed in the caption
end;
procedure TMyThread.Execute;
begin
NameThreadForDebugging('TestThread1');
Synchronize(UpdateCaption);
Sleep(5000);
end;