There may be occasions when you inherit a project that
does not have the typelibrary compiled as a resource into the module that
implements your COM object (be it a COM server, ActiveX etc.). In such a
situation, a lot of people are left wondering how to make the typelibrary part
of the module’s resource instead of distributing the .TLB file separately.
The solution is really simple:
Step A) Open the project’s .rc file as text (i.e. select
‘Text’ in the ‘Open As’ combo-box on the ‘Open’ dialog.)
Step B) In the portion of the file
where all the TEXTINCLUDE’s are defined, add the following lines
3 TEXTINCLUDE DISCARDABLE
BEGIN"1 TYPELIB
""ProjectName.tlb""rn"
"