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
Copy file name to clipboardExpand all lines: docs/build/dlls-in-visual-cpp.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Create C/C++ DLLs in Visual Studio"
3
-
ms.date: "05/06/2019"
3
+
ms.date: "07/18/2019"
4
4
helpviewer_keywords: ["executable files [C++]", "dynamic linking [C++]", "linking [C++], dynamic vs. static", "DLLs [C++]", "DLLs [C++], about DLLs"]
5
5
ms.assetid: 5216bca4-51e2-466b-b221-0e3e776056f0
6
6
---
@@ -26,23 +26,23 @@ Even though DLLs and applications are both executable modules, they differ in se
26
26
27
27
## Advantages of using DLLs
28
28
29
-
Dynamic linking instead of static linking to code and resources offers several advantages. When you use DLLs, you can save memory space and reduce swapping. When multiple applications can use a single copy of a DLL, you can save disk space and download bandwidth. DLLs can be deployed and updated separately, which lets you provide after-market support and software updates without having to rebuild and ship all your code. DLLs are a convenient way to supply locale-specific resources, which can support multi-language programs, and ease creating international versions of your applications. Explicit linking can allow your application to discover and load DLLs at runtime, such as extensions that provide new capabilities.
30
-
31
-
Dynamic linking has the following advantages:
29
+
Dynamic linking to code and resources offers several advantages over static linking:
32
30
33
31
- Dynamic linking saves memory and reduces swapping. Many processes can use a DLL simultaneously, sharing a single copy of the read-only parts of a DLL in memory. In contrast, every application that is built by using a statically linked library has a complete copy of the library code that Windows must load into memory.
34
32
35
33
- Dynamic linking saves disk space and bandwidth. Many applications can share a single copy of the DLL on disk. In contrast, each application built by using a static link library has the library code linked into its executable image, which uses more disk space and takes more bandwidth to transfer.
36
34
37
35
- Maintenance, security fixes and upgrades can be easier. When your applications use common functions in a DLL, then as long as the function arguments and return values do not change, you can implement bug fixes and deploy updates to the DLL. When DLLs are updated, the applications that use them do not need to be recompiled or relinked, and they make use of the new DLL as soon as it's deployed. In contrast, fixes you make in statically linked object code require you to relink and redeploy every application that uses it.
38
36
39
-
- You can use DLLs to provide after-market support. For example, a display driver DLL can be modified to support a display that was not available when the application was shipped. You can use explicit linking to load application extensions as DLLs, and add new functionality to your app without rebuilding or redeploying it.
37
+
- You can use DLLs to provide after-market support. For example, a display driver DLL can be modified to support a display that was not available when the application was shipped.
38
+
39
+
- You can use explicit linking to discover and load DLLS at runtime, such as application extensions that add new functionality to your app without rebuilding or redeploying it.
40
40
41
41
- Dynamic linking makes it easier to support applications written in different programming languages. Programs written in different programming languages can call the same DLL function as long as the programs follow the function's calling convention. The programs and the DLL function must be compatible in the following ways: the order in which the function expects its arguments to be pushed onto the stack, whether the function or the application is responsible for cleaning up the stack, and whether any arguments are passed in registers.
42
42
43
43
- Dynamic linking provides a mechanism to extend the MFC library classes. You can derive classes from the existing MFC classes and place them in an MFC extension DLL for use by MFC applications.
44
44
45
-
- Dynamic linking makes creation of international versions of your application easier. By placing locale-specific resources in a DLL, it is much easier to create international versions of an application. Instead of shipping many localized versions of your application, you can place the strings and images for each language in a separate resource DLL, and then your application can load the appropriate resources for that locale at runtime.
45
+
- Dynamic linking makes creation of international versions of your application easier. DLLs are a convenient way to supply locale-specific resources, which make it much easier to create international versions of an application. Instead of shipping many localized versions of your application, you can place the strings and images for each language in a separate resource DLL, and then your application can load the appropriate resources for that locale at runtime.
46
46
47
47
A potential disadvantage to using DLLs is that the application is not self-contained; it depends on the existence of a separate DLL module that you must deploy or verify yourself as part of your installation.
0 commit comments