title: Problems with #import of .NET out-of-proc server
body: <p>In C++ program, I am trying to #import TLB of .NET out-of-proc server.</p>
  <p>I get errors like:</p>
  <blockquote>
  <p>z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType'</p>
  <p>z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers</p>
  <p>z:\server.tli(74) : error C2143: syntax error : missing ';' before 'tag::id'</p>
  <p>z:\server.tli(74) : error C2433: '_TypePtr' : 'inline' not permitted on data declarations</p>
  <p>z:\server.tli(74) : error C2501: '_TypePtr' : missing storage-class or type specifiers</p>
  <p>z:\server.tli(74) : fatal error C1004: unexpected end of file found</p>
  </blockquote>
  <p>The TLH looks like:</p>
  <pre><code>_bstr_t GetToString();
  VARIANT_BOOL Equals (const _variant_t &amp; obj);
  long GetHashCode();
  _TypePtr GetType();
  long Open();
  </code></pre>
  <p>I am not really interested in the having the base object .NET object methods like GetType(), Equals(), etc. But GetType() seems to be causing problems.</p>
  <p>Some google research indicates I could <code>#import mscorlib.tlb</code> (or put it in path), but I can't get that to compile either.</p>
  <p>Any tips?</p>