Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C++

Creating a Resource-Only DLL

3.36/5 (7 votes)
15 Dec 2022CPOL 12.6K  
Create a resource-only DLL
A resource-only DLL is a DLL that contains nothing but resources, such as icons, bitmaps, strings, and dialog boxes. Using a resource-only DLL is a good way to share the same set of resources among multiple programs. It's also a good way to provide an application with resources localized for multiple languages.

To create a resource-only DLL, you create a new Windows DLL (non-MFC) project, and add your resources to the project:

  1. Select Win32 Project in the New Project dialog box. Enter the project and solution names, and choose OK.

    Image 1

  2. In the Win32 Application Wizard, select Application Settings. Choose an Application type of DLL. Under Additional options, select Empty project. Choose Finish to create your project.

    Image 2

  3. Create a new resource script that contains the resources for the DLL (such as a string or a menu). Save the .rc file.

    Image 3

  4. On the Project menu, select Add Existing Item, and then insert the new .rc file into the project.

    Image 4

  5. Open Project Properties.

    Image 5

    • Select the Configuration Properties > Linker > Advanced property page.

      Image 6

    • Set the No Entry Point property to Yes (/NOENTRY).

    • Build the DLL.

      Image 7

      Image 8

History

  • 15th December, 2022: Initial version

License

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