dll.. a rookies intro

DLL stands for Dynamically Linked Libraries and does exactly what it stands for.. hee he.. ok ok .. heres a small background…

ive heard a lot about DLLs when i was in college… in fact ive been hearing about DLLs for the past 5 years!! i kinda figured that it was something important and indeed it was.. i’ve even mentioned about it in my exam papers ( coz it sounded cool!!) ..but never knew what it really was until a a week ago.. i had to write a setup program that involved writing DLLs …

from what ive grasped and dealt with, DLL can be of two kinds..

1. A resource only DLL: eg: can contain mp3s, exe, gifs, etc..
2. A function library DLL: that is, it consists of functions or procedures

it is loaded into memory only when it is required.. that is dynamically loaded and linked

advantages of DLL…

1. a program written in any langauge like C#, Delphi, VB, etc can access the functions or resources in the DLL by following late/early binding conventions. ( the different calling conventions are stdcall, cdecl, register, pascal) The DLL is language oblivious. In other words, its language stupid!!

2. when working with setup programs like INNO, u have a limited number of classes to work with. u cant access win32 apis either.. so ur really restricted… but by creating a dll using Delphi or C#, ur functionality extends to the limits of the VCL (Visual Class Library of Delphi) or .NET classes…

3. modularity in programming.. u can group similar functions into the same dll..

4. the program that uses DLL has a lesser memory footprint.. it can load and unload DLLs into the memory as and when it requires….

theres a issue popularly called as “DLL Hell” which i havent really had to contend with. its basically got to do with the problems ull have to deal with if theres no dll versioning.. .net has got around it by using assemblies.. more on those later..

in summary, the DLL working is awesome.. in fact it is fundamental to the working of the windows OS.. kernel32.dll, user32.dll, comctl32.dll, gdi32.dll.. does those strike a chord?? well, if not, its the core of the windows OS.. any program running on ur system uses the functions and procedures in these dll at the lowest layer…

for a better overview on it go here
heres a very simple Delphi DLL writing tutorial…


Leave a comment

Filed under All, new_to_me

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s