检查一下no namespace是否起了作用,参考: http://support.microsoft.com/kb/269194/en-usIf you encounter errors that are due to missing type definitions, check the comments at the head of the .TLH to see which dependent type libraries may need to be imported first. Likely errors are syntax errors (for example, C2143, C2146, C2321), C2501 (missing decl-specifiers), or C2433 ('inline' not permitted on data declaration) while compiling the .TLI file.
包含了
http://support.microsoft.com/kb/269194/en-usIf you encounter errors that are due to missing type definitions, check the comments at the head of the .TLH to see which dependent type libraries may need to be imported first. Likely errors are syntax errors (for example, C2143, C2146, C2321), C2501 (missing decl-specifiers), or C2433 ('inline' not permitted on data declaration) while compiling the .TLI file.
就是这个模板 _com_ptr_t<ImyInterface, IID_ImyInterface> ImyInterfacePtr;
#import "***\**.tlb" rename_namespace("***")
using namespace ***;