I've created a managed COM object with related TLB file in VS2005. If I import the dll in a C++ source file, I can use the interface. However, I want to import the TLB in the header file, because I want to make a global object of an interface object.
Now I have the following code (at the very top of the file) in the cpp file:
#include <iostream>
#import "someTLB.tlb"
using namespace <SomeNameSpace>;
If I move this piece of code to the header file, I get compile errors in winnt.h and some other files. (Error C2143: syntax error: missing ';' before '*'). There are no conflicting header files
Any ideas what's wrong here?