Click to See Complete Forum and Search --> : want to know about .tli and .tlh file


sohail_k
March 19th, 2004, 01:38 AM
Hi there.

Can someone of you explain me the use of *.tli and *.tlh files which are made with a COM component and how are they used.

If there is a good tutorial or a link to any article regarding the same please let me know.

Thank you

Sam Hobbs
March 20th, 2004, 08:11 PM
Those files are generated by #import. Usually for samples of #import, it is easier to find examples of the object you want to use.

sohail_k
March 22nd, 2004, 12:06 AM
Thankyou Sam.

Sam can you please give me a link to any one article about using #import
and also what happens when we do
#import "myCom.dll"

where "myCom.dll" is a COM component.


Thanx once again.

Regards,
Sohail

jjggww2003
March 22nd, 2004, 08:04 AM
good

Sam Hobbs
March 22nd, 2004, 03:10 PM
It is difficult to find relevant articles and such. However if you search for _COM_SMARTPTR_TYPEDEF then you will find the few relevant articles. The _COM_SMARTPTR_TYPEDEF macro is used in the generated tlh file and the variables defined by it are among the most important.

sohail_k
March 22nd, 2004, 11:33 PM
Thx Sam,
I think what you said is usage of "Smart Pointers"...I'll check that out.

By the way can you tell me what happens when we do

#import "myCom.dll"

where "myCom.dll" is a COM component ?

Sam Hobbs
March 23rd, 2004, 12:38 AM
Smart Pointers is a general term, much more general than just the #import statement. The #import statement uses Smart Pointers but it is not the only thing that uses them. So if you look for information about Smart Pointers then you will get a lot that is not relevant.

The #import statement reads type libraries and generates the temprorary tlh and tli files. (You can usually ignore the tli files.) Type libraries can be in a DLL or EXE file or in a tlb file. A type library contains the kind of information that a h (#include) file contains, except a type library is in a more general-purpose and defined format for use by compilers and translators of many languages.

sohail_k
March 23rd, 2004, 01:18 AM
Thank you very much.


Have a nice day!

Regards,
Sohail