Hi Guys,

I need create a .tlb file "to 'pack' several dll's in only one file .tlb and use it" how can i create it with win32asm ??

I'm using masm compiler. :)

Someone can send-me a source code of hwo to code it and use ?? Comments are welcome.

Or maybe a link to a tutorial. :)

Thkz a lot.

Best Regards.

[ ]'s
Posted on 2002-06-26 14:08:50 by wendel
AFAIK a .tlb is a "Type Library"... in fact a COM library. Dunno if you can create it in assembly :rolleyes:
Posted on 2002-06-26 14:11:04 by bazik
Type libraries are written in a different language called 'IDL' or 'ODL' (both very similar, one is Interface Definition Language, the other is Object Description Language).

Once you have written the 'source' (which can be done in any text editor), you compile it into a typelib with the command line app MKTYPLIB.EXE or MIDL.EXE (invoke either one with '/?' on the command line to get it to list its parameters).

Typelibs also have to be registered with the command line app REGTLIB.EXE, just like a COM/ActiveX dll. REGTLIB.EXE should be somewhere in your %Windows% directory or below. Personally, i have a file association set up so all i have to do is double-click on a typelib to register it.

I got my copies of MKTYPLIB.EXE and MIDL.EXE with Visual Studio, i am not sure if you can pick it up separately from MS or not. I have found typelibs handy for declaring user defined types (structs) in VB, by doing it in a typelib i can then pass these structs around as parameters between different modules (i.e. between different dlls in the same process space). For a good article/tutorial on IDL and typelibs, check this link, just bypass all the VB specific stuff.
Posted on 2002-06-26 18:21:03 by sluggy
Hi,

Thkz for help and attention. :)

ps.: What is AFAIK ?

Best Regards.

[ ]'s
Posted on 2002-06-27 07:41:35 by wendel
AFAIK = As Far As I Know

And a few others for good measure:
FYI = For Your Information
IIRC = If I Remember Correctly
IMO = In My Opinion
IMHO = In My Humble Opinion
Posted on 2002-06-27 08:55:47 by AmkG
Hi,

Thkz a lot for your explanations. :)

Best Regards.

[ ]'s
Posted on 2002-06-27 12:42:37 by wendel
Batch:



@ECHO OFF
FOR %%F IN (*.ODL) DO C:\RadASM\binc\MKTYPLIB.EXE %%F
PAUSE


ODL:



[uuid(00000000-0000-0000-0000-000000000000),
version(1.0),
lcid(0x0409),
helpstring("LibName"),
helpfile("LibName.hlp"),
helpcontext(1)
]
library LibName
{
typedef struct DN_T
{
[helpstring("Certificate"), helpcontext(0)]
unsigned char DName[256];
} DN_P;

typedef enum tagOID
{
signed_data1 = 300
} OIDSMimeConstants;

[
dllname("LibName.dll"),
helpstring("LibName Functions"),
helpcontext(2)
]
module LibFunctions
{
[
helpstring("LibName."),
helpcontext(3),
// entry("IsDisk")
entry(1)
]
boolean __stdcall IsDisk ([in] LPSTR lpszDriveName);
} // EOM
}


Giovanni
Posted on 2002-07-03 08:29:22 by sch.jnn