Can a .dll use a .dl?

Posted on 2003-03-31
Medium Priority
Last Modified: 2010-04-06
I have a piece of a program that I would like to change into a dynamic .dll to reduce my code size.

My problem is: this piece of code already references a .dll, can a DLL use another DLL?  
Since this is kind of a yes or no question, please support your contention, like you have done this previously and it did or did not work.

If it IS possible, is there anything that I should be aware of, or wary of?

Question by:jpedwards
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8244005
Why you think it will reduce your code size?

Expert Comment

ID: 8244151

I use something like that in the company I work for. So my answer is yes :-). The person who is resonsible for the dll told me that for some unknown reason there are some problems with dynamic laoding (LoadLibrary(...)). Static loading seems to work fine (external 'yourDll.dll;). Sorry, I can't provide you with more information :-(


Accepted Solution

tkalchev earned 800 total points
ID: 8244401
Absolutely YES, you CAN use a DLL from another DLL. Otherwise the whole Windoze will not work, almost all DLLs are using internally kernel32.dll, user32.dll, gdi32.dll, shell32.dll and a lot of more :)

Expert Comment

ID: 8245000
Yes, you can load a dll from another DLL and tkalchev is absolutely right, windows is almost nothing but a bunch of DLLs.

If you are doing this, the only thing you should be aware of is their use of other units or components, since the size of the dlls may increase a lot. Split your program up the best way ;-)

Btw. Microsoft is trying to move away from the usage of common dlls, since we don't have much storage problems any more.


Author Comment

ID: 8265400
The dll that my program is calling is loaded statically.  I don't want to mess with it, but I do know how to make a dynamic dll, attach and detach from it.

The dll is used very infrequently and I do not want that bloating of my program, so, yes, Slavak, I do hope that it will reduce my executable size.

Thanks to each of you for your help, especially you, tkalchev.


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 8 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question