Hi, I'm new. With that out of the way, could somebody explain what a .dll does, and some practical uses for it? And how do I go about making one using MSVC++? Thanks
Hi, I'm new. With that out of the way, could somebody explain what a .dll does, and some practical uses for it? And how do I go about making one using MSVC++? Thanks
Welcome alpha2018.
Can't help you with making a dll but this site explains what it is quite good: What is a Windows DLL File
Clear the mines from our Shazbot!
Get the enemy Shazbot!
When you install the Windows OS, a ship-load of DLLs get copied onto your hard drive. These DLLs contain code for doing all of the common Windows operations, and the Windows "Look And Feel". This prevents a bunch of stuff from being duplicated in every Windows exe file.
For example, the code that displays the "open" or "save" window is not in the exe. It's in a DLL. All Windows GUI programs rely on the standard DLL files that ship with the Windows OS. When you write a Windows program, you just call the WinAPI functions. (You don't really have to know that they will be called from a DLL.)
Large application suites will have DLLs too. Word and Excel have a lot of common code. So, rather than duplicating the code in each program, the common-shared code can be included in a DLL.
You will probably never need to write your own DLL for you personal programs, unless you are working on a very large project.
I don't know the details for MSVC++ (and I'm not at my compiler right now), but I think you just select "Add to project-> DLL." It's not too difficult. I seem to remember a DLL creation exercise in Petzold
Last edited by DougDbug; 08-25-2004 at 12:47 PM.