You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,18 +14,37 @@ A resource-only DLL is a DLL that contains nothing but resources, such as icons,
13
14
14
15
To create a resource-only DLL, you create a new Windows DLL (non-MFC) project, and add your resources to the project:
15
16
17
+
::: moniker range="vs-2015"
18
+
19
+
1. Select **Win32 Project** in the **New Project** dialog box. Enter the project and solution names, and choose **OK**.
20
+
21
+
1. 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.
22
+
23
+
1. Create a new resource script that contains the resources for the DLL (such as a string or a menu). Save the `.rc` file.
24
+
25
+
1. On the **Project** menu, select **Add Existing Item**, and then insert the new `.rc` file into the project.
26
+
27
+
1. Specify the [/NOENTRY](reference/noentry-no-entry-point.md) linker option. `/NOENTRY` prevents the linker from linking a reference to `_main` into the DLL; this option is required to create a resource-only DLL.
28
+
29
+
1. Build the DLL.
30
+
31
+
::: moniker-end
32
+
::: moniker range=">=vs-2017"
33
+
16
34
1. Select **Windows Desktop Wizard** in the **New Project** dialog box and choose **Next**. In the **Configure your new project** page, enter the project and solution names, and choose **Create**.
17
35
18
36
1. In the **Windows Desktop Project** dialog box, select an **Application type** of **Dynamic Link Library**. Under **Additional options**, select **Empty project**. Choose **OK** to create your project.
19
37
20
38
1. Create a new resource script that contains the resources for the DLL (such as a string or a menu). Save the `.rc` file.
21
39
22
-
1. On the **Project** menu, click**Add Existing Item**, and then insert the new `.rc` file into the project.
40
+
1. On the **Project** menu, select**Add Existing Item**, and then insert the new `.rc` file into the project.
23
41
24
-
1. Specify the [/NOENTRY](reference/noentry-no-entry-point.md) linker option. /NOENTRY prevents the linker from linking a reference to `_main` into the DLL; this option is required to create a resource-only DLL.
42
+
1. Specify the [/NOENTRY](reference/noentry-no-entry-point.md) linker option. `/NOENTRY` prevents the linker from linking a reference to `_main` into the DLL; this option is required to create a resource-only DLL.
25
43
26
44
1. Build the DLL.
27
45
46
+
::: moniker-end
47
+
28
48
## Use a resource-only DLL
29
49
30
50
The application that uses the resource-only DLL should call [LoadLibraryEx](loadlibrary-and-afxloadlibrary.md) or a related function to explicitly link to the DLL. To access the resources, call the generic functions `FindResource` and `LoadResource`, which work on any kind of resource. Or, call one of the following resource-specific functions:
0 commit comments