Discussion:
Delphi & Import Type Library
(too old to reply)
a***@aol.com
2012-01-09 07:56:41 UTC
Permalink
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
2012-01-09 08:44:45 UTC
Permalink
Post by a***@aol.com
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
2012-01-09 09:17:38 UTC
Permalink
Post by a***@aol.com
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
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
2012-01-09 18:10:23 UTC
Permalink
Post by a***@aol.com
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.
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
a***@aol.com
2012-01-09 19:30:06 UTC
Permalink
Post by Maarten Wiltink
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
Post by Maarten Wiltink
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
2012-01-12 18:57:11 UTC
Permalink
Post by a***@aol.com
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.

Loading...