DLL files are part of the main program that is loaded into the OS upon the request of a running program during its execution (Run-time), i.e. dynamically (Dynamic Link Library, DLL in Windows). The same set of functions (subroutines) can be used at once in several working programs, because of what they have one more name – the shared libraries (Shared Library). If the dynamic library is loaded into the address space of the OS itself (System Library), the only copy can be used by many programs running with it, which has a positive effect on the utilization of the RAM resource.
DLLs can contain both critical parts for the program and additional functions. An additional advantage of this approach is that the dynamic library can be used as a plug-in (Plug-ins), which expands the functionality of the program. The downside is that if the module that contains the critical part is missing, the program will not be able to continue working.
Dynamic libraries are usually stored in a specific location and have a standard extension. For example, the .library files in the logical volume Libs: in AmigaOS; in Microsoft Windows and OS / 2, public library files have a .dll extension; in UNIX-like operating systems – usually .so; in Mac OS – .dylib.
When writing a program, it is enough for the programmer to specify to the translator (compiler or interpreter) of the programming language that it is necessary to connect a certain library and use a certain function from it. Here is a example, download steam_api64.dll and test for all function. Neither the source code nor the executable function code is part of the program.
Static dll files can be in the form of the source code that the programmer connects to its program at the writing stage (for example, for Fortran there is a huge number of libraries for solving different tasks in the source code) or as object files attached (linked) to the executable the program at the compilation stage (in Microsoft Windows such files have the .lib extension, on UNIX-like OSes – usually .a).
As a result, the program includes all the necessary functions, which makes it standalone, but increases the size. Without static libraries of object modules (files), most modern compiling languages and programming systems can not be used: Fortran, Pascal, C, C ++ and others.