Click here to Skip to main content
15,885,842 members
Articles / Programming Languages / C++
Tip/Trick

Creating a Resource-Only DLL

Rate me:
Please Sign up or sign in to vote.
3.36/5 (7 votes)
15 Dec 2022CPOL 11.2K   18   3
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)


Written By
Student
Iran (Islamic Republic of) Iran (Islamic Republic of)
I learned VB from VB 6.0, And Now Use Visual Studio 2015.
I have made 'Group Policy Admin Template Maker' App to making GP Administrative Template for WinXP.

Comments and Discussions

 
QuestionHow to Use It? Pin
LooWooL19-Dec-22 0:20
professionalLooWooL19-Dec-22 0:20 
AnswerRe: How to Use It? Pin
vblover Programmer19-Dec-22 1:12
vblover Programmer19-Dec-22 1:12 
Questionsome screenshots are not visible Pin
Southmountain15-Dec-22 9:07
Southmountain15-Dec-22 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.