Skip to content

What are Some Common Use Cases for DLL's in Windows Applications

twitter logo github logo ・1 min read  

I understand the core principle of what a DLL (Dynamic Linking Library) is, and can even implement a very basic one to use with my program. However, I'm curious to understand the rationale of them being implemented from a software engineering perspective. Are there common use cases that could help me understand their purpose better?

I notice many programs use them, yet in tutorials and even my coursework so far, DLL's never come up.

twitter logo DISCUSS (5)
markdown guide

Encapsulation and reusability. If you write some generally useful functionality (an XML parser, a communications layer, a device driver) it only does you so much good if it's bolted into a single application. Better to factor it out into a library you can drop in and invoke from anywhere, and it's easier to maintain and test independently too.


Here's an example I worked on in my current sprint. The user story was to create an encryption/decryption component to encode and decode data strings for certain devices. It needed to be callable from SSIS scripts, C# desktop manufacturing floor apps and by web apps via a web service. This same DLL can be used in all these locations and in any new applications that require this functionality. This means that code won't be duplicated in several places by different programmers.

I've created a lot of other such components over the years for things like database access, device control and many other things. The basic idea is to build a library of functions, you might call it an API, that are commonly used across several applications, either current ones or planned new development.

Increasingly, DLLs are being replaced by web services although the basic strategy of not duplicating functionality and code across many apps is still in place.


Thank you for the response. It makes sense that web services are gaining traction with more apps being distributed and accessed over the web.


Plugins and modules that can be added to a program by placing it in a common folder or structure. It comes in handy especially if you have a team or teams of people working at different cadences. There's more flexibility in iterating if you're not bound by the cadence of the main project vs a self-contained module.

Classic DEV Post from Aug 4 '19

You're not worth hiring unless...

Nicholas Fazzolari profile image
In the process of a career change from the world of kitchens and touring in bands to front-end web developer. I love building web apps and digital design. UI's are my jam! Studying computer science.