Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!nosc!logicon.com!trantor.harris-atd.com!trantor!dsampson From: dsampson@x102a.harris-atd.com (sampson david 58163) Newsgroups: comp.windows.ms Subject: Re: .DLL files under Windows 3.0 Message-ID: Date: 13 Sep 90 17:25:01 GMT References: <90255.141800GOODWIN@MAINE.BITNET> <26131@cs.yale.edu> Sender: news@trantor.harris-atd.com Organization: Harris Gov't Aerospace Systems Division Lines: 70 In-reply-to: spolsky-joel@cs.yale.edu's message of 12 Sep 90 23:23:21 GMT In article <26131@cs.yale.edu> spolsky-joel@cs.yale.edu (Joel Spolsky) writes: In article <90255.141800GOODWIN@MAINE.BITNET> GOODWIN@MAINE.BITNET (John A Potelle) writes: >I know the .dll files are called Dynamic Link Libraries, but what >are they used for ? >> They are libraries of subroutines that are linked at runtime instead >> of compile time. This way if > 1 running application need the same >> subroutines only one copy needs to be in memory. DLLs actually have more utility than this. As Joel says, you can use the same code for more than 1 instance of an application at a time. That way you don't replicate code in memory each time you load an instance of a program. DLLs are also useful for managing programs during the development phase. If you have a program that is fairly large and consists of several major components, you can put each component chunk of code in a seperate DLL (yep, just like an old fashion library). This also facilitates code development when you have a team of people working on one project. Just define the DLL interface and call back functions (if any) and you can hide the implementation details from the other coders on the team and let them work at the interface level. DLLs are used for creating code that is re-usable. For example, say you develop some drawing routines that you put in a DLL. If you design your DLL "correctly" you can reuse the DLL if you create a new program (or a family of programs) that requires drawing routines. I think that Micrografix does this with their programs. After all, why keep writing code to draw a box on the screen. Use a DLL and the same implementation works for every application you design. As we've seen with programs like Screen Peace, a core program can be written to access DLLs via some defined method (i.e. interface). Third party developers can then provide the DLL to hook into the "core" program. I remember reading that it is possible for 3rd party developers to write DLLs for us Windows programmers (like all other 3rd party libraries) but I haven't seen any yet. Hummmm, now maybe there's a market to look into..... Lastly, you can store resources in DLLs. The icon draw program that being circulated on BBSs, stores icons in it's DLL. I believe the Petzold book said that you could also store menus, bitmaps, and other resources in a DLL. Obviously, whether you want to do that is a different question and subject to what you're designing. -- V ' ' ' ' ' * I Damn Pigeons! David Sampson Harris Corporation dsampson@x102a.ess.harris.com Gov't Aerospace Systems Divison uunet!x102a!dsampson Melbourne, Florida -------------------------------------------------------------------------------