significance of DLLBASE

hi
my printer driver’s sources file contains an entry like
TARGETTYPE=DYNLINK
DLLBASE=0x01102000

what is the significance of it, and if it is really the starting address
where the dll is loaded, what if i make two drivers with same dllbase
address, will the second one will corrupt the first instance of driver.

all dlls that are made using DYNLINK setting require this, so how much
important it isto specifya valid address to it.
thanks in advance
vaibhav



Daring ideas are like chessmen moved forward. They may be beaten, but they
may start a winning game.

loading performance, no relocating must be done by the loader.
if two dlls with the same base are loaded, the second one will be relocated
by the loader, so no corruption.

johnny

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Vaibhav Kalia
Sent: Mittwoch, 13. März 2002 06:37
To: NT Developers Interest List
Subject: [ntdev] significance of DLLBASE

hi
my printer driver’s sources file contains an entry like
TARGETTYPE=DYNLINK
DLLBASE=0x01102000

what is the significance of it, and if it is really the starting address
where the dll is loaded, what if i make two drivers with same dllbase
address, will the second one will corrupt the first instance of driver.

all dlls that are made using DYNLINK setting require this, so how much
important it isto specifya valid address to it.
thanks in advance
vaibhav



Daring ideas are like chessmen moved forward. They may be beaten, but they
may start a winning game.


You are currently subscribed to ntdev as: xxxxx@yahoo.de
To unsubscribe send a blank email to %%email.unsub%%


Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com

> what is the significance of it, and if it is really the starting address

where the dll is loaded, what if i make two drivers with same dllbase
address, will the second one will corrupt the first instance of driver.

No, this is a preferred load address. If this address space is free - then the DLL will be loaded there without any relocations,
just as a memory-mapped file.
Otherwise, it will be loaded to some other free address, this will require relocations, and relocations will “dirty” the code and
data pages and make them per-process-private instead of mapped-file-shared, thus increasing the commit charge load on the OS.
Also note that relocation will fault in all image’s pages, and this can take noticeable amount of time.

There was a great article on DLL base addresses on MSDN.

Max