As you know, Win32 DLLs can contain both code and resources.  They can also contain only code, and only resource.  A DLL with no code and only resources is called a resource-only DLL.  Resource-only DLLs are used for many purposes, like building multilingual applications, in which each resource-only DLL contains the resources specific to a language, and at runtime, depending on the user's choice, you load one appropriate DLL using the LoadLibrary( ) function.

Creating a resource-only DLL is not a complicated task.  You should create an empty Win32 DLL project, add a resource script (RC) file to the project, and adding the “/noentry” switch to the linker's options.  Although it's an easy task, my being lazy caused me to create a custom AppWizard for creating these kind of DLLs.  The AppWizard does not have any steps (it doesn't need to!), and once you create a resource-only DLL using it, you can add resources to the RC file, and build the DLL without any change to the project's settings.  Download the source and binary files for this custom AppWizard at the bottom of the article.  You should copy the AWX file in the C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Template directory to see it in the New Project dialog box.  Please note that this AppWizard has been built for Visual C++ 6.

 Download source code and the AppWizard for the article

This article originally appeared on BeginThread.com. It's been republished here, and may contain modifications from the original article.