Skip to content

Commit d68f364

Browse files
Taojunshencolin-homeopbld16opbld15opbld17
authored
8/17/2022 AM Publish (#4472)
* crtsetdbgflag.md: _CrtCheckMemory is not called by default * Visual C++ 17.0 has unlimited string literals * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording * Update .openpublishing.publish.config.json * Repo sync for protected CLA branch (#4061) * add initial doc stubs * Initial docs push, contains stubs for some files and a stub for a landing page * update some links * add more cards and links to the Hub page * fix error * remove monikor's so it's easy to test, fix rtos-view.md path * fix link * add more to the sidebar * update peripheral view by consolidating to the table, change things to objects in rtos-view * add tabs * forgot to end tabbed section * fix items after adding tabs * update h1 * slightly fix some wording * add link from C++ and C workloads, features, and libraries to embedded hub * move into own directory so that the url is better * fix some warnings * remove next steps that pointed to linux items * prefer tabbed view vs table * attempt to add moniker * attempt highest moniker in range * assign to a specific version * push again to get new build * add '=' sign to try and test it * add metadata for msvc-170 * add moniker range for index.yml * remove inline moniker since we only need it on the files themselves * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown * Edit pass for house style * add 'while debugging' for peripheral-view * Fix table issue, stray punctuation Co-authored-by: Garrett Campbell <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: Alma Jenks <[email protected]> * Update ios-functions.md fix typo (#4071) showps→showpos * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4442) * 7/27/2022 AM Publish (#4432) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * 7/28/2022 AM Publish (#4437) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * 7/29/2022 AM Publish (#4441) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> Co-authored-by: Alma Jenks <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * Address cpp-docs 4075 __assume issues * Address cpp-docs 4072 clarity issue * update date * Update multithreading-and-locales.md Wrong `setlocale()` reference, it should be a C runtime function, not a preprocessor macro. * Update for consistent branding. * Update peripheral view docs (#4444) * 7/27/2022 AM Publish (#4432) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * 7/28/2022 AM Publish (#4437) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * 7/29/2022 AM Publish (#4441) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4430) * 7/19/2022 AM Publish (#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/20/2022 AM Publish (#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * 7/21/2022 AM Publish (#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> * add search/filter capability to peripheral view docs * add last column bar * Fixing alt-text Co-authored-by: Alma Jenks <[email protected]> Co-authored-by: Taojunshen <[email protected]> Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> Co-authored-by: Regan Downer <[email protected]> * Update the ARM64EC-related predefined macros * Update modules tutorial style * Updates for v17.3 * fix copypasta error * Fix dates * Add suggested fixes to corouptines warning * fix uppercase letter fix uppercase letter * fix github #4089 * acrolinx * wording change (#4467) Co-authored-by: TylerMSFT <[email protected]> * fix: ordered list #4055 * Describe why we add (STL) to the C++ Standard Library name (#4469) * wording change * address github 4092 * some acrolinx * update wording * a little more wordsmithing * fix github #4096 and follow up on PR feedback * acrolinx * pr feedback * fix line spacing * line spacing * really fixing line spacing... Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Oliver Old <[email protected]> Co-authored-by: Igor Zhukov <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: Feng Xu <[email protected]> Co-authored-by: JiayueHu <[email protected]> Co-authored-by: Bryan Gold <[email protected]> Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: PRMerger20 <[email protected]> Co-authored-by: irushx <[email protected]> Co-authored-by: Garrett Campbell <[email protected]> Co-authored-by: Alma Jenks <[email protected]> Co-authored-by: pea-sys <[email protected]> Co-authored-by: PRMerger7 <[email protected]> Co-authored-by: Anton <[email protected]> Co-authored-by: Garrett Campbell <[email protected]> Co-authored-by: Regan Downer <[email protected]> Co-authored-by: Ben Niu <[email protected]> Co-authored-by: PRMerger19 <[email protected]> Co-authored-by: PRMerger4 <[email protected]> Co-authored-by: PRMerger Service account 2 <[email protected]> Co-authored-by: Gabor Horvath <[email protected]> Co-authored-by: Diana Richards <[email protected]> Co-authored-by: 薄景仁 <[email protected]> Co-authored-by: Linda Spiller <[email protected]> Co-authored-by: AugusMeow <[email protected]>
1 parent 621198f commit d68f364

File tree

5 files changed

+193
-209
lines changed

5 files changed

+193
-209
lines changed

docs/atl/putting-the-control-on-a-web-page-atl-tutorial-part-7.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ In this step, you add functionality to the control and script the Web page to re
1515

1616
### To add control features
1717

18-
1. Open PolyCtl.cpp and replace the following code:
19-
20-
```cpp
21-
if (PtInRegion(hRgn, xPos, yPos))
22-
Fire_ClickIn(xPos, yPos);
23-
else
24-
Fire_ClickOut(xPos, yPos);
25-
```
26-
27-
with
28-
29-
```cpp
30-
short temp = m_nSides;
31-
if (PtInRegion(hRgn, xPos, yPos))
32-
{
33-
Fire_ClickIn(xPos, yPos);
34-
put_Sides(++temp);
35-
}
36-
else
37-
{
38-
Fire_ClickOut(xPos, yPos);
39-
put_Sides(--temp);
40-
}
41-
```
18+
Open PolyCtl.cpp and replace the following code:
19+
20+
```cpp
21+
if (PtInRegion(hRgn, xPos, yPos))
22+
Fire_ClickIn(xPos, yPos);
23+
else
24+
Fire_ClickOut(xPos, yPos);
25+
```
26+
27+
with
28+
29+
```cpp
30+
short temp = m_nSides;
31+
if (PtInRegion(hRgn, xPos, yPos))
32+
{
33+
Fire_ClickIn(xPos, yPos);
34+
put_Sides(++temp);
35+
}
36+
else
37+
{
38+
Fire_ClickOut(xPos, yPos);
39+
put_Sides(--temp);
40+
}
41+
```
4242

4343
The shape will now add or remove sides depending on where you click.
4444

docs/c-runtime-library/crt-library-features.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "C runtime (CRT) and C++ Standard Library .lib files"
3-
description: "List of Microsoft C runtime and C++ Standard Library .lib files that you can link against and their associated compiler options and preprocessor directives."
2+
title: "C runtime (CRT) and C++ Standard Library (STL) .lib files"
3+
description: "List of Microsoft C runtime and C++ Standard Library (STL) .lib files that you can link against and their associated compiler options and preprocessor directives."
44
ms.date: "3/5/2021"
55
ms.topic: "reference"
66
ms.custom: contperf-fy21q3
7-
helpviewer_keywords: ["MSVCR71.dll", "libraries [C++], multithreaded", "library files, run-time", "LIBCMT.lib", "LIBCP.lib", "LIBCPMT.lib", "run-time libraries, C", "CRT, release versions", "MSVCP71.dll", "LIBC.lib", "libraries [C++]", "libraries [C++], run-time", "linking [C++], libraries"]
7+
helpviewer_keywords: ["MSVCR71.dll", "libraries [C++], multithreaded", "library files, run-time", "LIBCMT.lib", "LIBCP.lib", "LIBCPMT.lib", "run-time libraries, C", "CRT, release versions", "MSVCP71.dll", "LIBC.lib", "libraries [C++]", "libraries [C++], run-time", "linking [C++], libraries", "STL libraries", "Microsoft standard template libraries"]
88
---
99
# C runtime (CRT) and C++ Standard Library (STL) `.lib` files
1010

@@ -14,6 +14,11 @@ See [Redistributing Visual C++ files](../windows/redistributing-visual-cpp-files
1414

1515
See [C runtime library reference](../c-runtime-library/c-run-time-library-reference.md) if you're looking for API reference for the C runtime library.
1616

17+
>[!NOTE]
18+
> Microsoft's implementation of the C++ Standard Library is often referred to as the *STL* or *Standard Template Library*. Although *C++ Standard Library* is the official name of the library as defined in ISO 14882, due to the popular use of "STL" and "Standard Template Library" in search engines, we occasionally use those names to make it easier to find our documentation.
19+
20+
From a historical perspective, "STL" originally referred to the Standard Template Library written by Alexander Stepanov. Parts of that library were standardized in the C++ Standard Library, along with the ISO C runtime library, parts of the Boost library, and other functionality. Sometimes "STL" is used to refer to the containers and algorithms parts of the C++ Standard Library adapted from Stepanov's STL. In this documentation, Standard Template Library (STL) refers to the C++ Standard Library as a whole.
21+
1722
## C runtime `.lib` files
1823

1924
The C runtime Library (CRT) is the part of the C++ Standard Library that incorporates the ISO C standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development. Most of the libraries support both static linking, to link the library directly into your code, or dynamic linking to let your code use common DLL files.
@@ -63,17 +68,17 @@ If you link your program from the command line without a compiler option that sp
6368

6469
Using the statically linked CRT implies that any state information saved by the C runtime library will be local to that instance of the CRT. For example, if you use [`strtok`](../c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md) when using a statically linked CRT, the position of the `strtok` parser is unrelated to the `strtok` state used in code in the same process (but in a different DLL or EXE) that is linked to another instance of the static CRT. In contrast, the dynamically linked CRT shares state for all code within a process that is dynamically linked to the CRT. This concern doesn't apply if you use the new more secure versions of these functions; for example, `strtok_s` doesn't have this problem.
6570

66-
Because a DLL built by linking to a static CRT has its own CRT state, it isn't recommended to link statically to the CRT in a DLL unless the consequences of this are specifically desired and understood. For example, if you call [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL will not be caught by the translator, but hardware exceptions generated by code in the main executable will be caught.
71+
Because a DLL built by linking to a static CRT has its own CRT state, it isn't recommended to link statically to the CRT in a DLL unless the consequences of this are desired and understood. For example, if you call [`_set_se_translator`](../c-runtime-library/reference/set-se-translator.md) in an executable that loads the DLL linked to its own static CRT, any hardware exceptions generated by the code in the DLL won't be caught by the translator, but hardware exceptions generated by code in the main executable will be caught.
6772

68-
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, `msvcmrt.lib`. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically-linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
73+
If you're using the **`/clr`** compiler switch, your code will be linked with a static library, `msvcmrt.lib`. The static library provides a proxy between your managed code and the native CRT. You can't use the statically linked CRT ( **`/MT`** or **`/MTd`** options) with **`/clr`**. Use the dynamically linked libraries (**`/MD`** or **`/MDd`**) instead. The pure managed CRT libraries are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
6974

7075
For more information on using the CRT with **`/clr`**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md).
7176

7277
To build a debug version of your application, the [`_DEBUG`](../c-runtime-library/debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
7378

7479
This version of the CRT isn't fully conformant with the C99 standard. In versions before Visual Studio 2019 version 16.8, the `<tgmath.h>` header isn't supported. In all versions, the `CX_LIMITED_RANGE` and `FP_CONTRACT` pragma macros aren't supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use **`/Zc`** compiler conformance options and specify linker options to control some aspects of library conformance.
7580

76-
## C++ Standard Library `.lib` files
81+
## C++ Standard Library (STL) `.lib` files
7782

7883
| C++ Standard Library | Characteristics | Option | Preprocessor directives |
7984
|--|--|--|--|
@@ -92,9 +97,9 @@ For binary compatibility, more than one DLL file may be specified by a single im
9297

9398
## What problems exist if an application uses more than one CRT version?
9499

95-
Every executable image (EXE or DLL) can have its own statically linked CRT, or can dynamically link to a CRT. The version of the CRT statically included in or dynamically loaded by a particular image depends on the version of the tools and libraries it was built with. A single process may load multiple EXE and DLL images, each with its own CRT. Each of those CRTs may use a different allocator, may have different internal structure layouts, and may use different storage arrangements. This means allocated memory, CRT resources, or classes passed across a DLL boundary can cause problems in memory management, internal static usage, or layout interpretation. For example, if a class is allocated in one DLL but passed to and deleted by another, which CRT deallocator is used? The errors caused can range from the subtle to the immediately fatal, and therefore direct transfer of such resources is strongly discouraged.
100+
Every executable image (EXE or DLL) can have its own statically linked CRT, or can dynamically link to a CRT. The version of the CRT statically included in or dynamically loaded by a particular image depends on the version of the tools and libraries it was built with. A single process may load multiple EXE and DLL images, each with its own CRT. Each of those CRTs may use a different allocator, may have different internal structure layouts, and may use different storage arrangements. This means allocated memory, CRT resources, or classes passed across a DLL boundary can cause problems in memory management, internal static usage, or layout interpretation. For example, if a class is allocated in one DLL but passed to and deleted by another, which CRT deallocator is used? The errors caused can range from the subtle to the immediately fatal, and therefore direct transfer of such resources is discouraged.
96101

97-
You can avoid many of these issues by using Application Binary Interface (ABI) technologies instead, as they are designed to be stable and versionable. Design your DLL export interfaces to pass information by value, or to work on memory that is passed in by the caller rather than allocated locally and returned to the caller. Use marshaling techniques to copy structured data between executable images. Encapsulate resources locally and only allow manipulation through handles or functions you expose to clients.
102+
You can avoid many of these issues by using Application Binary Interface (ABI) technologies instead, as they're designed to be stable and versionable. Design your DLL export interfaces to pass information by value, or to work on memory that is passed in by the caller rather than allocated locally and returned to the caller. Use marshaling techniques to copy structured data between executable images. Encapsulate resources locally and only allow manipulation through handles or functions you expose to clients.
98103

99104
It's also possible to avoid some of these issues if all of the images in your process use the same dynamically loaded version of the CRT. To ensure that all components use the same DLL version of the CRT, build them by using the **`/MD`** option, and use the same compiler toolset and property settings.
100105

0 commit comments

Comments
 (0)