title: How does one access the 'NameThreadForDebugging' in Delphi 2010
body: <p>How do I access the 'NameThreadForDebugging' in a delphi Thread in Delphi 2010 ?</p>
  
  <pre><code>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;
  </code></pre>