TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Steph Valentine
from: Dean Roddey
date: 1994-09-29 05:16:18
subject: What are DLLs?

Thanks Steph for your msg about What are DLLs?, on 26 09-26-1994

.Dlls are similar to the .Lib files you might have used under
Dos. The difference is that, under OS/2, the .Lib file just
contains the names of the functions (not the code for them.) So
you link your .Exe against the .Lib file just so that the linker
can be sure that the functions/data you want are actually in the
.Dll. The .Dll file contains the code and is not linked into or
directly connected to the .Exe file in any way.

So, under OS/2, when you load a program, the loader is a linking
loader. This means that it not only loads the program, it also
does a lot of the work that a Dos Linker would do. It looks
throught the header of the .Exe file and finds all of the
references to .Dlls that the .Exe is dependent upon. It then loads
them and goes through the .Exe code and 'fixes up' all of the
references to these external functions. Actually, the process is
recursive because .Dlls can reference other .Dlls.

The big benefits of this are:

1) The .Dll can be modified (as long as no function names or
parameters are modified) and distributed without relinking the
rest of the .Exes and .Dlls that depend upon it.

2) Since the .Dll code is loaded at run time, OS/2 carves out a
unique area in the virtual address space to load it. It will then
set aside this range of the virtual address space for every
program that is loaded. So, if another program uses the same .Dll,
the linking loader will just map that program's extern references
to the same .Dll code in memory. SO, you only pay for the .Dll
code in memory once, no matter how many programs are using it. A
LOT of OS/2 itself is in the form of .Dlls. Since all programs use
this code, there is a massive savings of memory.

___
 X KWQ/2 1.2b X If at first you don't succeed, put it out for beta test (KWQ Beta

--- Maximus/2 2.01wb

* Origin: Fernwood - your source for OS/2 files! (1:141/209)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.