| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Oct 27, 2003 11:04 am Post subject: SharedDLLs |
|
|
Hi,
can somebody explain me the advantage of registering a dll as shared dll ?
Is the dll loaded only once into the memory ?
My application (several vds exe files) needs much ram - i think because of the many dlls I use in each exe.
Thanks for your help
Bye, Fabian |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Oct 27, 2003 6:50 pm Post subject: |
|
|
| X-Tools wrote: | | registering a dll |
??
Are U talking about active-X dlls?
I assume regular win32 dlls.
Even if you call multiple instances of the dll, the dll is loaded only once.
Now what happens when U exit one application while others are running. In Case of VDS EXTERNAL dll's - I don't know - but think must be same as other true dlls - decrements the reference count.
When the last app using the dll exits the library is unloaded entirely from memory. Each module (dll) is recognised on it's file name. So if U name the same dll differently on different apps I think memory usage may increase.
Also U may note that only part of the dll is loaded into memory on initialization and then only the parts containing the functions especailly on NT based systems ( I am not using technically correct words but somthing similar). _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon Oct 27, 2003 7:03 pm Post subject: |
|
|
Hi Codescript,
thanks for your answer.
Several installers (for example innosetup) have the option for registering a dll as shared dll (in the registry). So you say there is no difference for working with a vds dll in my directory and a vds dll registered as shared dll ?
Bye, Fabian |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Oct 27, 2003 7:19 pm Post subject: |
|
|
I don't know what the setup does ?
I think shared means it is placing the dll in system directory.
IMHO placing the dll in your app directory/subdirectory is far better to avoid the "dll hell" (dll version conflict problems) _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Oct 27, 2003 8:04 pm Post subject: |
|
|
I think the option for registering shared DLLs is purely to do with uninstalling. If you register it as a shared DLL, Windows keeps a count of the number of applications that used it, and if the count decrements to zero, the installer can offer you the option of removing it. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|