Reputation:
I am trying to #include an application tlb file in VC++ project.
Getting following compilation errors, after #import "CANoe.tlb" in my project source file. -
Please suggest, if I am doing some wrong.
Also, is there a way to verify the .tlb file contents and resolve these errors. Is it possible to make corrections in tlb file ? If so, how do I create a updated tlb
Thanks in advance
Upvotes: 1
Views: 2922
Reputation: 170489
If the type library file is intact the next step is to try find the generated .tlh and .tli files - they will be located in some temporary folder and have the same name as type library file and ".tlh"/".tli" extensions. If they exist examining them might help a lot.
import
directive does two things - it builds the ".tlh" and ".tli" files and then includes them - the error messages correspond to the second stage - when the C++ compiler just refuses to compile them. Examining the files will likely help identify the reason.
Upvotes: 0
Reputation: 754883
My first thought is that you are dealing with a file that is not a TLB. Or at least, is corrupted.
I would try and bring up the TLB in OleView. This should give you a quick sanity check that the TLB is or is not valid.
Upvotes: 3