From: Nobody on 1 Jul 2010 18:14 My try, edit as needed: A Type Library is a file that describes software implemented in another file(DLL/EXE/OCX). In the context of ADO, type libraries are used to insure that the software developer does not use new features that only exist in later versions by mistake. For example, if the developer used a feature that only exists in Vista and after, then the software will not work on XP. To avoid this, the developer needs to use a type library that describes the minimum version he is planning to support. Windows 2000 came with ADO version 2.5, so selecting this version insures that the software will work with Windows 2000 and after. ADO version 2.5 can also be installed on Windows 9x, so the developer can support them if needed.
From: ralph on 2 Jul 2010 00:42 On Thu, 01 Jul 2010 13:52:50 -0600, Tony Toews <ttoews(a)telusplanet.net> wrote: >> <snipped to save space, not because it was not relevant. <g>> > >... Another definition is the first paragraph at What Is Type >Library and How Is It Related to the Registry? > It might help to appreciate that the author's comment "A type library can be thought of as a binary version of an IDL... file" is a tad misleading because a type library IS a tokenized binary efficient IDL file. [But not necessarily an exact replical since not all type library compilers can compile all the information that can be contained in an IDL - but that is a story best left for another time.] A Type Library is not an "active" participate in the resulting executable, it is simply a 'header' file that provides declarations and descriptions that (in this case) VB can use to Symbols/Names rather than CLSIDS/GUIDS, and how to construct a "stub" - a block of code with pointers that can be dynamically thunked or filled out when a DLL is loaded. In fact it should be noted that type libraries are not limited to COM, nor even to VB, but can be used to provide all sorts of external information - structures, variables definitions, enums, or for declaring functions in regular/standard DLLs, for a wide variety of languages. For example, you can use a type library to replace the need for typing out Declare Function/Sub directives or defining WinApi structs. This is easier to see in C where if you import a type library, the preprocessor will take the information and create a header and code files (the .h and .c). VB conveniently hides all that nasty stuff away. <g> -ralph
From: ralph on 2 Jul 2010 01:07 On Thu, 01 Jul 2010 13:52:50 -0600, Tony Toews <ttoews(a)telusplanet.net> wrote: > >ADO always had me confused. Look at the references list and you can >see a bunch of different versions all but that last one pointing to a >TLB file. I didn't really understand what a TLB file was until >recently so that didn't help either. The TLB acronyum stands for type >library file. A TLB file, somehow, provides and interface and points >to other files. I�ve been using a shelllnk.tlb file for many years in >my Auto FE Updater utility so it can create shortcuts. > >In ADO, for example, the ADO 2.7 Library TLB file has the identical >binary interfaces that ADO version 2.7 itself had. But msado27.tlb >points to/interfaces with/references/whatever msado15.dll. See COM, >DCOM, and Type Libraries for a definition if that page helps or >confuses. Another definition is the first paragraph at What Is Type >Library and How Is It Related to the Registry? > ADO is an excellent example of ActiveX at its best. Why you are seeing so many references (and you would in fact see even more TLBs if you would install the MDACs released sequentially) is because one component supports multiple Interfaces. What interfaces are supported depends on the version of MsADO15.dll you have. This was a design trade-off and a good one. Instead of having to release an new msado20.dll, msado25.dll, msado26.dll, or msado27.dll, to fix bugs, for provide a new interface, one can just release one component. No matter what version ADO a client requires, one simply needs to provide the latest 'n greatest msado15.dll and all is well. -ralph
From: ralph on 2 Jul 2010 02:27 On Fri, 02 Jul 2010 00:07:39 -0500, ralph <nt_consulting64(a)yahoo.net> wrote: >one can just release one component. No matter what version ADO a >client requires, one simply needs to provide the latest 'n greatest >msado15.dll and all is well. > Before some purist jumps in and flames me. The above is not completely accurate since msado15.dll comes with a matched set of system-specific OLE support files. ie, you can't just provide the single component but the whole suite. -ralph
First
|
Prev
|
Pages: 1 2 Prev: in VB6, how to get an equation from the ChartSpace control Next: Saving decision tree |