title: How to execute not TThread based thread in main thread?
body: <p>For example from thread provided by callback from <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682485%28v=vs.85%29.aspx" rel="nofollow">CreateTimerQueueTimer</a> in executable or dll? It is significant to have same thread id as main thread.</p>
  
  <pre><code>procedure TMyMainClass.ExecuteMe(someparam: paramtype);
  begin
    {something}
  end;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>procedure TimerCallback(pvContext: pointer; fTimerOrWaitFired: boolean); stdcall;
  begin
    {do what ?}
  end;
  </code></pre>
  
  <p><code>Final update:</code><br>
  All this stuff (<code>TThread.Synchronize</code>, <code>TThread.Queue</code>, <code>PostThreadMessage</code> etc) works through messages. So be sure host application of your <code>dll</code> processing messages while waiting for callback.</p>