title: How to post messages to an STA thread running a message pump?
body: <p>So, following <a href="https://stackoverflow.com/questions/21451313">this</a>, I decided to explicitly instantiate a COM object on a dedicated STA thread. Experiments showed that the COM object needed a message pump, which I created by calling <code>Application.Run()</code>:</p>
  
  <pre><code>private MyComObj _myComObj;
  
  // Called from Main():
  Thread myStaThread = new Thread(() =&gt;
  {
      _myComObj = new MyComObj();
      _myComObj.SomethingHappenedEvent += OnSomthingHappened;
      Application.Run();
  });
  myStaThread.SetApartmentState(ApartmentState.STA);
  myStaThread.Start();
  </code></pre>
  
  <p>How do I post messages the the STA thread's message pump from other threads?</p>
  
  <p><strong>Note:</strong>
  I heavily edited the question for the sake of brevity. Some parts of @Servy's answer now seems unrelated, but they were for the original question.</p>