Skip to content

Commit 27a2281

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2505 from MicrosoftDocs/master637370854851282292
Repo sync for protected CLA branch
2 parents 0670602 + 9451db8 commit 27a2281

32 files changed

+170
-99
lines changed

docs/c-runtime-library/ansi-c-compliance.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "ANSI C Compliance"
3+
description: "An overview of Microsoft C runtime naming conventions for ANSI C compliance."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
f1_keywords: ["Ansi"]
57
helpviewer_keywords: ["underscores, leading", "compatibility [C++], ANSI C", "compliance with ANSI C", "conventions [C++], Microsoft extensions", "underscores", "naming conventions [C++], Microsoft library", "ANSI [C++], C standard", "Microsoft extensions naming conventions"]
68
ms.assetid: 6be271bf-eecf-491a-a928-0ee2dd60e3b9

docs/c-runtime-library/backward-compatibility.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Backward Compatibility"
3+
description: "How to use the Microsoft OLDNAMES.LIB library to map function names for backwards compatibility."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
helpviewer_keywords: ["CRT, compatibility", "backward compatibility, C run-time libraries", "compatibility, C run-time libraries", "backward compatibility"]
57
ms.assetid: cc3175cf-97fd-492f-b329-5791aea63090
68
---

docs/c-runtime-library/byte-and-wide-streams.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Byte and Wide Streams"
3+
description: "An overview of byte streams in the Microsoft C runtime library."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
f1_keywords: ["Byte and Wide Streams"]
57
helpviewer_keywords: ["byte streams", "wide streams"]
68
ms.assetid: 61ef0587-4cbc-4eb8-aae5-4c298dbbc6f9
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "C Run-Time Library Reference"
3+
description: "Links to information and reference for the Microsoft C runtime library functions."
34
ms.date: "11/04/2016"
45
f1_keywords: ["c.runtime"]
56
helpviewer_keywords: ["CRT", "run-time libraries", "CRT, reference"]
@@ -13,40 +14,40 @@ Sample programs are included in the individual reference topics for most routine
1314

1415
## In This Section
1516

16-
[C Run-Time Libraries](../c-runtime-library/crt-library-features.md)<br/>
17+
[C Run-Time Libraries](crt-library-features.md)\
1718
Discusses the .lib files that comprise the C run-time libraries.
1819

19-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
20+
[Universal C runtime routines by category](run-time-routines-by-category.md)\
2021
Provides links to the run-time library by category.
2122

22-
[Global Variables and Standard Types](../c-runtime-library/global-variables-and-standard-types.md)<br/>
23+
[Global Variables and Standard Types](global-variables-and-standard-types.md)\
2324
Provides links to the global variables and standard types provided by the run-time library.
2425

25-
[Global Constants](../c-runtime-library/global-constants.md)<br/>
26+
[Global Constants](global-constants.md)\
2627
Provides links to the global constants defined by the run-time library.
2728

28-
[Global State](../c-runtime-library/global-state.md)<br/>
29+
[Global State](global-state.md)\
2930
Describes the scope of global state in the C run-time library.
3031

31-
[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)<br/>
32+
[Alphabetical Function Reference](reference/crt-alphabetical-function-reference.md)\
3233
Provides a table of contents entry point into an alphabetical listing of all C run-time library functions.
3334

34-
[Generic-Text Mappings](../c-runtime-library/generic-text-mappings.md)<br/>
35+
[Generic-Text Mappings](generic-text-mappings.md)\
3536
Provides links to the generic-text mappings defined in Tchar.h.
3637

37-
[Language and Country/Region Strings](../c-runtime-library/locale-names-languages-and-country-region-strings.md)<br/>
38+
[Language and Country/Region Strings](locale-names-languages-and-country-region-strings.md)\
3839
Describes how to use the `setlocale` function to set the language and Country/Region strings.
3940

4041
## Related Sections
4142

42-
[Debug Routines](../c-runtime-library/debug-routines.md)<br/>
43+
[Debug Routines](debug-routines.md)\
4344
Provides links to the debug versions of the run-time library routines.
4445

45-
[Run-Time Error Checking](../c-runtime-library/run-time-error-checking.md)<br/>
46+
[Run-Time Error Checking](run-time-error-checking.md)\
4647
Provides links to functions that support run-time error checks.
4748

48-
[DLLs and Visual C++ run-time library behavior](../build/run-time-library-behavior.md)<br/>
49+
[DLLs and Visual C++ run-time library behavior](../build/run-time-library-behavior.md)\
4950
Discusses the entry point and startup code used for a DLL.
5051

51-
[Debugging](/visualstudio/debugger/debugging-in-visual-studio)<br/>
52+
[Debugging](/visualstudio/debugger/debugging-in-visual-studio)\
5253
Provides links to using the Visual Studio debugger to correct logic errors in your application or stored procedures.

docs/c-runtime-library/code-pages.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: "Code Pages"
3+
description: "A description of code page support in the Microsoft C runtime."
4+
ms.topic: "conceptual"
35
ms.date: "11/04/2016"
46
helpviewer_keywords: ["character sets [C++], code pages", "ANSI [C++], code pages", "system-default code page", "multibyte code pages [C++]", "localization [C++], code pages", "code pages [C++], types of", "locale code pages [C++]"]
57
ms.assetid: 4a26fc42-185a-4add-98bf-a7b314ae6186
@@ -8,25 +10,25 @@ ms.assetid: 4a26fc42-185a-4add-98bf-a7b314ae6186
810

911
A *code page* is a character set, which can include numbers, punctuation marks, and other glyphs. Different languages and locales may use different code pages. For example, ANSI code page 1252 is used for English and most European languages; OEM code page 932 is used for Japanese Kanji.
1012

11-
A code page can be represented in a table as a mapping of characters to single-byte values or multibyte values. Many code pages share the ASCII character set for characters in the range 0x00 - 0x7F.
13+
A code page can be represented in a table as a mapping of characters to single-byte or multibyte values. Many code pages share the ASCII character set for characters in the range 0x00 - 0x7F.
1214

13-
The Microsoft run-time library uses the following types of code pages:
15+
The Microsoft runtime library uses the following types of code pages:
1416

15-
- System-default ANSI code page. By default, at startup the run-time system automatically sets the multibyte code page to the system-default ANSI code page, which is obtained from the operating system. The call:
17+
- System-default ANSI code page. By default, at startup the runtime system automatically sets the multibyte code page to the system-default ANSI code page, which is obtained from the operating system. The call:
1618

1719
```C
1820
setlocale ( LC_ALL, "" );
1921
```
2022

2123
also sets the locale to the system-default ANSI code page.
2224

23-
- Locale code page. The behavior of a number of run-time routines is dependent on the current locale setting, which includes the locale code page. (For more information, see [Locale-Dependent Routines](../c-runtime-library/locale.md).) By default, all locale-dependent routines in the Microsoft run-time library use the code page that corresponds to the "C" locale. At run-time you can change or query the locale code page in use with a call to [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md).
25+
- Locale code page. The behavior of a number of run-time routines is dependent on the current locale setting, which includes the locale code page. (For more information, see [Locale-Dependent Routines](../c-runtime-library/locale.md).) By default, all locale-dependent routines in the Microsoft run-time library use the code page that corresponds to the "C" locale. At run time, you can change or query the locale code page in use with a call to [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md).
2426

2527
- Multibyte code page. The behavior of most of the multibyte-character routines in the run-time library depends on the current multibyte code page setting. By default, these routines use the system-default ANSI code page. At run-time you can query and change the multibyte code page with [_getmbcp](../c-runtime-library/reference/getmbcp.md) and [_setmbcp](../c-runtime-library/reference/setmbcp.md), respectively.
2628

27-
- The "C" locale is defined by ANSI to correspond to the locale in which C programs have traditionally executed. The code page for the "C" locale ("C" code page) corresponds to the ASCII character set. For example, in the "C" locale, **islower** returns true for the values 0x61 - 0x7A only. In another locale, **islower** may return true for these as well as other values, as defined by that locale.
29+
- The "C" locale is defined by ANSI to correspond to the locale in which C programs have traditionally executed. The code page for the "C" locale ("C" code page) corresponds to the ASCII character set. For example, in the "C" locale, **islower** returns true for the values 0x61 - 0x7A only. In another locale, **islower** may return `true` for these and other values, as defined by that locale.
2830

2931
## See also
3032

31-
[Internationalization](../c-runtime-library/internationalization.md)<br/>
32-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
33+
[Internationalization](../c-runtime-library/internationalization.md)\
34+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)

docs/c-runtime-library/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Compatibility"
33
description: "Describes the compatibility of the Microsoft Universal C runtime library (UCRT) with the Standard C library, POSIX, the Safe CRT, and Store apps."
44
ms.date: "9/11/2020"
5+
ms.topic: "conceptual"
56
helpviewer_keywords: ["CRT, compatibility", "compatibility, C runtime libraries", "compatibility"]
67
ms.assetid: 346709cb-edda-4909-9a19-3d253eddb6b7
78
---

docs/c-runtime-library/controlling-streams.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Controlling Streams"
3+
description: "An overview of working with streams in the Microsoft C runtime library."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
f1_keywords: ["Controlling Streams"]
57
helpviewer_keywords: ["streams, controlling", "controlling streams", "streams"]
68
ms.assetid: 267e9013-9afc-45f6-91e3-ca093230d9d9

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
22
title: "CRT Initialization"
3+
description: "Describes how the CRT initializes global state in native code."
4+
ms.topic: "conceptual"
35
ms.date: "11/04/2016"
46
helpviewer_keywords: ["CRT initialization [C++]"]
57
ms.assetid: e7979813-1856-4848-9639-f29c86b74ad7
68
---
79
# CRT Initialization
810

9-
This topic describes how the CRT initializes global states in native code.
11+
This topic describes how the CRT initializes global state in native code.
1012

1113
By default, the linker includes the CRT library, which provides its own startup code. This startup code initializes the CRT library, calls global initializers, and then calls the user-provided `main` function for console applications.
1214

@@ -30,11 +32,11 @@ int main()
3032

3133
According to the C/C++ standard, `func()` must be called before `main()` is executed. But who calls it?
3234

33-
One way to determine this is to set a breakpoint in `func()`, debug the application, and examine the stack. This is possible because the CRT source code is included with Visual Studio.
35+
One way to determine the caller is to set a breakpoint in `func()`, debug the application, and examine the stack. This is possible because the CRT source code is included with Visual Studio.
3436

35-
When you browse the functions on the stack, you will find that the CRT is looping through a list of function pointers and calling each one as it encounters them. These functions are either similar to `func()` or constructors for class instances.
37+
When you browse the functions on the stack, you'll see that the CRT is calling a list of function pointers. These functions are similar to `func()`, or constructors for class instances.
3638

37-
The CRT obtains the list of function pointers from the Microsoft C++ compiler. When the compiler sees a global initializer, it generates a dynamic initializer in the `.CRT$XCU` section (where `CRT` is the section name and `XCU` is the group name). To obtain a list of those dynamic initializers run the command **dumpbin /all main.obj**, and then search the `.CRT$XCU` section (when main.cpp is compiled as a C++ file, not a C file). It will be similar to the following:
39+
The CRT gets the list of function pointers from the Microsoft C++ compiler. When the compiler sees a global initializer, it generates a dynamic initializer in the `.CRT$XCU` section where `CRT` is the section name and `XCU` is the group name. To get a list of dynamic initializers, run the command **dumpbin /all main.obj**, and then search the `.CRT$XCU` section. This applies when main.cpp is compiled as a C++ file, not a C file. It will be similar to the following example:
3840

3941
```
4042
SECTION HEADER #6
@@ -56,10 +58,10 @@ RAW DATA #6
5658
00000000: 00 00 00 00 ....
5759
5860
RELOCATIONS #6
59-
Symbol Symbol
61+
Symbol Symbol
6062
Offset Type Applied To Index Name
61-
-------- ---------------- ----------------- -------- ------
62-
00000000 DIR32 00000000 C ??__Egi@@YAXXZ (void __cdecl `dynamic initializer for 'gi''(void))
63+
-------- ---------------- ----------------- -------- -------
64+
00000000 DIR32 00000000 C ??__Egi@@YAXXZ (void __cdecl `dynamic initializer for 'gi''(void))
6365
```
6466

6567
The CRT defines two pointers:
@@ -68,11 +70,11 @@ The CRT defines two pointers:
6870

6971
- `__xc_z` in `.CRT$XCZ`
7072

71-
Both groups do not have any other symbols defined except `__xc_a` and `__xc_z`.
73+
Neither group has any other symbols defined except `__xc_a` and `__xc_z`.
7274

7375
Now, when the linker reads various `.CRT` groups, it combines them in one section and orders them alphabetically. This means that the user-defined global initializers (which the Microsoft C++ compiler puts in `.CRT$XCU`) will always come after `.CRT$XCA` and before `.CRT$XCZ`.
7476

75-
The section will resemble the following:
77+
The section will resemble the following example:
7678

7779
```
7880
.CRT$XCA
@@ -84,7 +86,7 @@ The section will resemble the following:
8486
__xc_z
8587
```
8688

87-
So, the CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they are laid out in memory after the image is loaded.
89+
So, the CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they're laid out in memory after the image is loaded.
8890

8991
## See also
9092

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "CRT Library Features"
3-
description: "The files that contain the Microsoft C run-time libraries, and their associated compiler options and preprocessor directives."
3+
description: "List of files that contain the Microsoft C run-time libraries, and their associated compiler options and preprocessor directives."
44
ms.date: 09/03/2020
5+
ms.topic: "conceptual"
56
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"]
67
ms.assetid: a889fd39-807d-48f2-807f-81492612463f
78
---

docs/c-runtime-library/direction-flag.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Direction Flag"
3+
description: "Describes the effect of the CPU direction flag on Microsoft C runtime functions."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
helpviewer_keywords: ["direction flag"]
57
ms.assetid: 0836b4af-dbbb-4ab8-a4b2-156f2e2099e2
68
---

docs/c-runtime-library/files-and-streams.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Files and Streams"
3+
description: "An overview of files and streams in the Microsoft C runtime library."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
helpviewer_keywords: ["files [C++]", "streams"]
57
ms.assetid: f61e712b-eac9-4c28-bb18-97c3786ef387
68
---

docs/c-runtime-library/global-state.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Global state in the CRT"
3-
description: "Describes how shared global state is handled in the Universal C Runtime."
3+
description: "Describes how shared global state is handled in the Microsoft Universal C Runtime."
4+
ms.topic: "conceptual"
45
ms.date: "04/02/2020"
56
helpviewer_keywords: ["CRT global state"]
67
---
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
---
22
title: "Internationalization"
3-
ms.date: "11/04/2016"
3+
ms.date: "09/29/2020"
4+
description: "A description of Microsoft runtime library support for writing apps for international markets."
5+
ms.topic: "conceptual"
46
helpviewer_keywords: ["localization, routines for", "locale-dependent routines", "internationalization routines", "international applications, run-time routines for"]
57
ms.assetid: ee536a04-3558-4729-8e10-6dabcde055fd
68
---
9+
710
# Internationalization
811

9-
The Microsoft run-time library provides many routines that are useful for creating different versions of a program for international markets. This includes [locale-related routines](../c-runtime-library/locale.md), wide-character routines, multibyte-character routines, and generic-text routines. For convenience, most locale-related routines are also categorized in this reference according to the operations they perform. In this section and in the alphabetic reference, multibyte-character routines and wide-character routines are described with single-byte-character counterparts, where they exist.
12+
The Microsoft runtime library provides many routines that you can use to customize your app for international markets such as:
13+
- [locale-related routines](../c-runtime-library/locale.md)
14+
- wide-character routines
15+
- multibyte-character routines
16+
- generic-text routines
17+
18+
For convenience, most locale-related routines are also categorized by what they do.
19+
20+
Multibyte routines and wide-character routines are described alongside their single-byte-character counterparts, when they exist.
1021

11-
Also included are the ISO646 operator alternatives.
22+
ISO646 operator alternatives are also included.
1223

1324
## See also
1425

15-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
26+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)

docs/c-runtime-library/locale-names-languages-and-country-region-strings.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: "Locale Names, Languages, and Country-Region Strings"
3+
description: "An overview of using Microsoft Universal CRT locale, language, and country and region strings."
4+
ms.topic: "conceptual"
35
ms.date: "12/10/2018"
46
helpviewer_keywords: ["country/region strings", "localization, locale", "locales", "setlocale function", "language strings"]
57
ms.assetid: a0e5a0c5-5602-4da0-b65f-de3d6c8530a2

docs/c-runtime-library/multithreaded-libraries-performance.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Multithreaded Libraries Performance"
3+
description: "An overview of how to get the most performance from the Microsoft C runtime multithreaded libraries."
34
ms.date: "11/04/2016"
5+
ms.topic: "conceptual"
46
helpviewer_keywords: ["threading [C++], performance", "libraries, multithreaded", "performance, multithreading", "multithreaded libraries"]
57
ms.assetid: faa5d808-087c-463d-8f0d-8c478d137296
68
---

0 commit comments

Comments
 (0)