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

Delphi & Import Type Library

501 views
Skip to first unread message

alang...@aol.com

unread,
Jan 9, 2012, 2:56:41 AM1/9/12
to
How does Delphi find, and what criteria are used to confirm a type
library, in the list displayed when one selects Project | Import Type
Library.

I seem to have items in my such list for which there appears to be
no .TLB file on my PC.

Alan Lloyd

S.G

unread,
Jan 9, 2012, 3:44:45 AM1/9/12
to
alang...@aol.com wrote:
>
> I seem to have items in my such list for which there appears to be
> no .TLB file on my PC.

Can you also call and use the functonality in those libraries?

I think Delphi just reads from the registry and shows listing of the
libraries that have at some point been registered to your system.
Any third party installation package can add their markings to that
registry section.

I am not sure if even .TLB file is actually needed, just plain reference
to some DLL file may also be enough.

I have not done anything with ActiveX etc libraries for some time, so
this all is partly my guessing only.
S.G.

Chris Cheney

unread,
Jan 9, 2012, 4:17:38 AM1/9/12
to
1) Probably via the HKCR/Typelib Windows registry key

2) Type libraries are stored as a Windows resource and can be found in
more than just .tlb files, e.g. in some .exe, .dll, .rll files.
There may be orphaned type library entries in the registry as an
application might not remove its type library entry/entries when it is
uninstalled.

Chris

Maarten Wiltink

unread,
Jan 9, 2012, 1:10:23 PM1/9/12
to
<alang...@aol.com> wrote in message
news:08d84f59-4ed4-4f24...@cf6g2000vbb.googlegroups.com...
Working from memory here (my Delphi machine at home is now off most of
the time), so I may be talking complete rubbish -

Doesn't importing a type library _produce_ a .tlb file? (And a _tlb.pas
file?)

If it does, that would happen by reading (through a standardised
interface) type information from registered COM dlls, which are listed
in the registry under HKCR/CLSID.

Groetjes,
Maarten Wiltink


alang...@aol.com

unread,
Jan 9, 2012, 2:30:06 PM1/9/12
to
On Jan 9, 6:10 pm, "Maarten Wiltink" <maar...@kittensandcats.net>
wrote:
> Working from memory here (my Delphi machine at home is now off most of
> the time), so I may be talking complete rubbish -
>
> Doesn't importing a type library _produce_ a .tlb file? (And a _tlb.pas
> file?)

A .tlb is, AIUI, produced from an IDL (Interface Definition Language)
file and _can_ be embedded into a .dll, .ocx or .lib file.

Although its VB & C+ orientated the following gives information about
creating, using, & storing type library information.

http://edndoc.esri.com/arcobjects/9.2/CPP_VB6_VBA_VCPP_Doc/COM/ExtendAO/TypeLibrariesAndIDL.htm

>
> If it does, that would happen by reading (through a standardised
> interface) type information from registered COM dlls, which are listed
> in the registry under HKCR/CLSID.
>

I think that is most likely correct.

Thanks

Alan Lloyd

Marco van de Voort

unread,
Jan 12, 2012, 1:57:11 PM1/12/12
to
On 2012-01-09, alang...@aol.com <alang...@aol.com> wrote:
> How does Delphi find, and what criteria are used to confirm a type
> library, in the list displayed when one selects Project | Import Type
> Library.

If you find out, please follow up here. I'm interested too.
0 new messages