Thread: [Dev-C++] Nobody can help me with .tlb ?? :/
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <we...@ha...> - 2002-06-26 15:25:57
|
Hi Guys, I'm listen several peoples speaking (in the web) about .tlb files. I = search in google but can't find how to create it. I understood that .tlb is a file where u have several .dll's together, = am i correct ?? In the fact i belive that it should work like this: A file is generated with .tlb extension in this file u have the "index = where u point where is the offset of start and end of each dll" when u = call a function from a .tlb it extract in memory and pass the function = to it, then the "answer" it re-pass to program that call .tlb, am i = correct ?? hehehe ps.: Sorry for stupied questions. :)) Where can i find a example of create a .tlb in c (with dev-c++) and how = to call it in other program ?? (if possible with comments). Thkz a lot. Best Regards. [ ]'s |
|
From: Mac R. <re...@no...> - 2002-06-26 15:51:07
|
A .tlb is a TypeLibrary, which is a COM idea. A TLB file provides
interface information to a COM client about the services that are present
in a COM server. A COM server could be a DLL, or an EXE, or an ActiveX
Control (a highly specialized DLL or EXE). Unless you really want to get
into COM component creation, you won't be making TLB files.
Mac
At 12:30 PM 6/26/02 -0300, we...@ha... wrote:
> Hi Guys, I'm listen several peoples speaking (in the web) about .tlb
>files. I search in google but can't find how to create it. I understood
>that .tlb is a file where u have several .dll's together, am i correct ??
> In the fact i belive that it should work like this: pass the function
>to it, then the "answer" it re-pass to program that call .tlb, am i
>correct ?? hehehe ps.: Sorry for stupied questions. :)) Where can i
>find a example of create a .tlb in c (with dev-c++) and how to call it in
>other program ?? (if possible with comments). Thkz a lot. Best
>Regards. [ ]'s
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|
|
From: Mac R. <re...@no...> - 2002-06-26 19:25:41
|
At 10:48 AM 6/26/02 -0500, Mac Reiter wrote:
>A .tlb is a TypeLibrary, which is a COM idea. A TLB file provides
>interface information to a COM client about the services that are present
>in a COM server. A COM server could be a DLL, or an EXE, or an ActiveX
>Control (a highly specialized DLL or EXE). Unless you really want to get
>into COM component creation, you won't be making TLB files.
>
>Mac
OK, before I get flamed to death, I just remembered something else about
TLBs. A TLB can be made such that it contains all of the information
needed to talk to a set of DLLs, even if those DLLs are not COM components.
IMPORTANT : the TLB does not contain the DLLs themselves. All it contains
is information for a client that says "If you want to call function foo(),
you need to load DLL BAR and use the 7th function in the import list." The
DLLs would still need to be installed separately.
The only place I personally have seen TLBs used is in Visual Basic
development. The best example, relevant to the "group of DLLs" approach,
is a Win32 TLB. Visual Basic does not use header files, so it can't just
"#include <windows.h>" to get access to the Win32 SDK. Someone extremely
patient managed to build a Win32 TLB, which allows VB programmers to just
add that TLB to their project and now all of the Win32 SDK functions appear
to be normal VB functions.
Hopefully that is closer to the whole truth and nothing but the truth...
Mac
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|
|
From: <we...@ha...> - 2002-06-26 20:25:27
|
Hi Mac and Dev-C++ users, My problem is exactily it. :) I use Visual Basic 6 and i have several problems with several dll's that i need copy together with executable. For example the vbrun. Every time that i will create a package i need lose several minutes finding and puting DLL's to this package. :/ And what i need is make it eays. Create a .tbl (or something like) that allow me to export only this file. :) Have someone ideas or a source code as example ?? Thkz. Best Regards. [ ]'s |
|
From: Mac R. <re...@no...> - 2002-06-26 21:38:57
|
At 05:30 PM 6/26/02 -0300, we...@ha... wrote:
>Hi Mac and Dev-C++ users,
>
>My problem is exactily it. :)
>
>I use Visual Basic 6 and i have several problems with several dll's that i
>need copy together with executable. For example the vbrun.
You don't need a C++ compiler for this. I strongly suggest getting the
book "Hardcore Visual Basic" or "Visual Basic x.0 Programmer's Guide to the
Win32 API". I know that the last version of "Hardcore Visual Basic"
includes instructions on how to create a TLB.
The current preferred method is to write up the description in IDL
(Interface Description Language) and compile it into a TLB with MIDL. But
MIDL is not included in Visual Basic -- in comes with Visual C++, and I
don't know what the redistribution rights to it are... The older method is
to write up the description in ODL (Object Description Language) and use
MkTypLib, which you *CAN* get from your Visual Basic install disk (for
vb5.0 it was in \Tools\Unsupprt\Typlib on the CD, but I don't know about
6.0). The author of "Hardcore VB" prefers the IDL method over the ODL
method for unspecified reasons, but you may not have a choice. I don't
have references on hand for IDL or ODL syntax, but you can probably find
some info (or at least examples) either in that directory or on the Web. I
doubt that Dev-C++ (being based on GCC) supports creation of type
libraries, but I could easily be wrong.
Mac
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|