Click here to Skip to main content
Click here to Skip to main content
Go to top

HelloWorld.dll: The simplest way to create your first DLL

, 7 Feb 2013
Rate this:
Please Sign up or sign in to vote.
How to create your first DLL without coding too much... :)

Introduction

This tip is for seriously lazy people who don't take themselves too seriously and want to get over the creation of their first DLL quickly. This is an advanced beginner tutorial, not necessarily recommended for beginners.

Prerequisites 

You need to have the Microsoft Incremental Linker (link.exe). It comes with Microsoft Visual C++ and older MASM32 distributions. If you have Visual C++ installed then the linker is located somewhere around "c:\Program Files (x86)\Microsoft Visual Studio X.0\VC\bin\".

Creating your DLL

Run the following command: 

LINK /OUT:HelloWorld.dll /DLL /NOENTRY /NODEFAULTLIB 

And voila! Congratulations!!! You have created your first DLL! You can load it with LoadLibrary(), and unload it with FreeLibrary(), but demonstrating that is out of the scope of this beginner tutorial.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

pasztorpisti
Software Developer (Senior) CRYTEK
Hungary Hungary
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 7 Feb 2013
Article Copyright 2012 by pasztorpisti
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid