Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple typelib

0 views
Skip to first unread message

Pierre Jr Roy

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to
Hi,

Is it possible to use more than one type library for a COM server?

--
Pierre Jr Roy
Algorithm Designer
Visual Med inc.
pr...@vmedsys.com
514-363-8513

Binh Ly

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
If you mean is it possible to embed more than 1 tlb into a Delphi project,
yes. You will need to create an extra rc file and enumerate the type libs
individually - the syntax looks something like this (I can't remember
exactly)

1 TYPELIB TypeLib1.tlb
2 TYPELIB TypeLib2.tlb

And then run the rc file against the Borland Resource Compiler (brcc32). I
believe you'll find the correct syntax for the typelib rc from the
Automation Programmers Reference.

However, the VCL source is only aware of a single typelibrary file (the
primary type lib). So if you need to access the secondary type libs, you'll
need to manually load them using the ITypeLib APIs/interface.

have fun
--
Binh Ly
http://www.castle.net/~bly/Programming/Delphi


Pierre Jr Roy <pr...@vmedsys.com> wrote in message
news:7n4jfh$jv...@forums.borland.com...

Manoj Champanerkar

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to
you could try add the $R compiler directive & give the name/path of the
typelibrary. This is how Delphi builds your project typelib into your app
(i.e. Using $R *.TLB)

I have used this approach in one place, where my project did not have a type
library but it had an implementation of a COM server for one of the
interfaces defined in the Typelib (imported using the $R directive)

Hope it works for you

Manoj Champanerkar.

0 new messages