title: Creating a com object with another com object in C#
body: <p>This is a follow up to a previous question. I'm trying to convert some Vb.net code to C#. A com object is created (atlDirectorObject.atlDirector) and it is used to create another com object (atl3270Tool) by parameter. atl3270Tool is not getting created in the C# version. Am I going the wrong route trying to reference atl3270Tool through an object array?</p>
  
  <pre><code>'working vb code
  Dim atl3270Tool
  Dim ErrMsg As String
  Dim atlDirectorObject = CreateObject("atlDirectorObject.atlDirector")
  atlDirectorObject.CreateTool("3270", 1, True, True, 0, atl3270Tool, ErrMsg)
  'atl3270Tool is working com object at this point = success
  
  //non-working c# code
  object atl3270Tool = null;
  string ErrMsg = null;
  object atlDirectorObject = Activator.CreateInstance(Type.GetTypeFromProgID("atlDirectorObject.atlDirector"));
  //atlDirectorObject is a com object now
  //attempt to reference atl3270Tool inside an object array
  object[] p = { "3270", 1, true, true, 0, atl3270Tool, ErrMsg };
  Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(atlDirectorObject, null, "CreateTool", p, null, null, null, false);
  //&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;atl3270Tool is still null at this point&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  </code></pre>