Instantiating a legacy COM object in C# dynamically (using its ID in a string)
<p>In Python, when I want to use this COM object, all I do is <code>win32com.client.Dispatch("Myapp.Thing.1")</code> and it gives me an object which I can call methods and such on. </p>

<p>I want to do this in C# and, shockingly, I can't seem to figure out how. I do <em>not</em> want to use one of those automatically generated COM wrappers, for reasons I can't get into. I need to do the late binding, dynamic COM of times past.</p>

<p>I've tried doing this, but I get a Null Ref Exception on the invoke call. </p>

<pre><code>Type t = Type.GetTypeFromProgID("Myapp.Thing.1")
o = Activator.CreateInstance(t) 
t.GetMethod("xyz").Invoke(o, args) 
</code></pre>

<p>Any example code that is able to load up a COM object by its name and use it in some basic manner would be ideal. </p>
