In C++ program, I am trying to #import TLB of .NET out-of-proc server.
I get errors like:
z:\server.tlh(111) : error C2146: syntax error : missing ';' before identifier 'GetType'
z:\server.tlh(111) : error C2501: '_TypePtr' : missing storage-class or type specifiers
z:\server.tli(74) : error C2143: syntax error : missing ';' before 'tag::id'
z:\server.tli(74) : error C2433: '_TypePtr' : 'inline' not permitted on data declarations
z:\server.tli(74) : error C2501: '_TypePtr' : missing storage-class or type specifiers
z:\server.tli(74) : fatal error C1004: unexpected end of file found
The TLH looks like:
_bstr_t GetToString();
VARIANT_BOOL Equals (const _variant_t & obj);
long GetHashCode();
_TypePtr GetType();
long Open();
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.
Some google research indicates I could #import mscorlib.tlb
(or put it in path), but I can't get that to compile either.
Any tips?