title: Stuck at initiallizing COM out-of-process object in C#
body: <p>I need to embed a out-of-prcess COM execution in my C# application. The COM execution is written in C++/ATL. 
  Sometimes my COM create process will not start, so I manage to use a timeout to interrupt it.</p>
  
  <p>My COM object initializing process:</p>
  
  <pre><code>using MyCOM;
  //...
  private MyCOM.Mylib _com;  // COM object
  private void MyInitJob()
  {
      _com = new MyCOM.Mylib();            
  }
  private bool Initial()
  {
      System.Threading.Thread mythread = new System.Threading.Thread(MyInitJob);
      mythread.Start();
      if (!mythread.Join(5000))
      {
          mythread.Abort();
          return false;
      }
      else
      {
          return true;
      }
  }
  </code></pre>
  
  <p>The above code seems could not stop <code>MyInitJob()</code> thread while timeout is reached, and <code>Initial()</code> will hang forever when new a COM object is stuck.</p>
  
  <p>Could I know why <code>new</code> takes forever, and could I interrupt when it takes too long?</p>