I'm sure I've read about it somewhere before, but I never got to write one myself, so of course I don't know how to. I know it's simple, so could any of you just outline for me the following: -parameters i have to use with ML.EXE and LINK.EXE -how to call the functions from my LIB. -anything else that defers from writing a regular win32 app which runs in ring3. alternatively and preferably: just appoint me to a tut or something. Thanks A LOT. RingZer0
Posted on 2001-04-04 20:32:00 by RingZer0
Building a lib is so simple once you see one, it really doesn't need much of a tutorial, an example will suffice. And you're probably very familiar with at least one example: the MASM32 library It's shipped as part of the masm32 package, go check your M32LIB folder. You build a lib with :

\masm32\bin\ml /c /coff *.asm
\masm32\bin\lib *.obj /out:YourLibName.lib
That's it,unless you also place resources into the lib. Declare exported procedures with PUBLIC, exported (or imported too BTW) variables with externdef, and make an .inc file to define the proc, constant, variable, etc exports. It's usually best to divide a lib into many small .asm files, as each .asm makes a 'token' in the lib, code is imported as a whole 'token,' so the finer you split the asm files up, the smaller the linker will build the final program image.
Posted on 2001-04-04 23:19:00 by Ernie