Skip to content

Commit 708fc4f

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 11ac0dc + 0d61502 commit 708fc4f

File tree

444 files changed

+2325
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+2325
-1323
lines changed

docs/c-runtime-library/c-run-time-library-reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Provides links to the global variables and standard types provided by the run-ti
2525
[Global Constants](../c-runtime-library/global-constants.md)<br/>
2626
Provides links to the global constants defined by the run-time library.
2727

28+
[Global State](../c-runtime-library/global-state.md)<br/>
29+
Describes the scope of global state in the C run-time library.
30+
2831
[Alphabetical Function Reference](../c-runtime-library/reference/crt-alphabetical-function-reference.md)<br/>
2932
Provides a table of contents entry point into an alphabetical listing of all C run-time library functions.
3033

docs/c-runtime-library/cgets-cgetws.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_cgets, _cgetws"
3-
ms.date: "11/04/2016"
4-
api_name: ["_cgetws", "_cgets"]
5-
api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr80.dll", "msvcr120.dll", "msvcr90.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_cgetws", "_cgets", "_o__cgets", "_o__cgetws"]
5+
api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr80.dll", "msvcr120.dll", "msvcr90.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-conio-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["cgetws", "_cgetws", "_cgets"]
@@ -55,6 +55,8 @@ Because all editing keys are active when `_cgets` or `_cgetws` is called while i
5555

5656
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md).
5757

58+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
59+
5860
### Generic-Text Routine Mappings
5961

6062
|Tchar.h routine|_UNICODE and _MBCS not defined|_MBCS defined|_UNICODE defined|

docs/c-runtime-library/ciatan.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIatan"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIatan"]
5-
api_location: ["msvcr120.dll", "msvcr110.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIatan", "_o__CIatan"]
5+
api_location: ["msvcr120.dll", "msvcr110.dll", "msvcrt.dll", "msvcr80.dll", "msvcr100.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_CIatan", "CIatan"]
@@ -25,6 +25,8 @@ This version of the `atan` function has a specialized calling convention that th
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/ciatan2.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIatan2"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIatan2"]
5-
api_location: ["msvcr80.dll", "msvcrt.dll", "msvcr120.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr100.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIatan2", "_o__CIatan2"]
5+
api_location: ["msvcr80.dll", "msvcrt.dll", "msvcr120.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "msvcr100.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIatan2", "_CIatan2"]
@@ -25,6 +25,8 @@ This version of the `atan2` function has a specialized calling convention that t
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cicos.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIcos"
3-
ms.date: "04/11/2018"
4-
api_name: ["_CIcos"]
5-
api_location: ["msvcr90.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIcos", "_o__CIcos"]
5+
api_location: ["msvcr90.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIcos", "_CIcos"]
@@ -25,6 +25,8 @@ This version of the [cos](../c-runtime-library/reference/cos-cosf-cosl.md) funct
2525

2626
The resulting value is pushed onto the top of the floating-point stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/ciexp.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIexp"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIexp"]
5-
api_location: ["msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIexp", "_o__CIexp"]
5+
api_location: ["msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110_clr0400.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIexp", "_CIexp"]
@@ -25,6 +25,8 @@ This version of the `exp` function has a specialized calling convention that the
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cifmod.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIfmod"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIfmod"]
5-
api_location: ["msvcrt.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIfmod", "_o__CIfmod"]
5+
api_location: ["msvcrt.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_CIfmod", "CIfmod"]
@@ -25,6 +25,8 @@ This version of the `fmod` function has a specialized calling convention that th
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cilog.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIlog"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIlog"]
5-
api_location: ["msvcr90.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcrt.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIlog", "_o__CIlog"]
5+
api_location: ["msvcr90.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr100.dll", "msvcrt.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_CIlog", "CIlog"]
@@ -25,6 +25,8 @@ This version of the `log` function has a specialized calling convention that the
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cilog10.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIlog10"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIlog10"]
5-
api_location: ["msvcr100.dll", "msvcr120.dll", "msvcr80.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIlog10", "_o__CIlog10"]
5+
api_location: ["msvcr100.dll", "msvcr120.dll", "msvcr80.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr110.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIlog10", "_CIlog10"]
@@ -25,6 +25,8 @@ This version of the `log10` function has a specialized calling convention that t
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cipow.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIpow"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIpow"]
5-
api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIpow", "_o__CIpow"]
5+
api_location: ["msvcr100.dll", "msvcr110.dll", "msvcr120.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr90.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIpow", "_CIpow"]
@@ -25,6 +25,8 @@ This version of the `pow` function has a specialized calling convention that the
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cisin.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIsin"
3-
ms.date: "04/10/2018"
4-
api_name: ["_CIsin"]
5-
api_location: ["msvcr80.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIsin", "_o__CIsin"]
5+
api_location: ["msvcr80.dll", "msvcr100.dll", "msvcrt.dll", "msvcr110.dll", "msvcr120.dll", "msvcr90.dll", "msvcr110_clr0400.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["CIsin", "_CIsin"]
@@ -25,6 +25,8 @@ This intrinsic version of the [sin](../c-runtime-library/reference/sin-sinf-sinl
2525

2626
The resulting value is pushed onto the top of the floating-point stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/cisqrt.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CIsqrt"
3-
ms.date: "11/04/2016"
4-
api_name: ["_CIsqrt"]
5-
api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcrt.dll", "msvcr110.dll", "msvcr100.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CIsqrt", "_o__CIsqrt"]
5+
api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcrt.dll", "msvcr110.dll", "msvcr100.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_CIsqrt", "CIsqrt"]
@@ -25,6 +25,8 @@ This version of the `sqrt` function has a specialized calling convention that th
2525

2626
The resulting value is pushed onto the top of the stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/citan.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_CItan"
3-
ms.date: "04/11/2018"
4-
api_name: ["_CItan"]
5-
api_location: ["msvcr100.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcrt.dll", "msvcr110.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-math-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_CItan", "_o__CItan"]
5+
api_location: ["msvcr100.dll", "msvcr110_clr0400.dll", "msvcr80.dll", "msvcrt.dll", "msvcr110.dll", "msvcr90.dll", "msvcr120.dll", "api-ms-win-crt-math-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_CItan", "CItan"]
@@ -25,6 +25,8 @@ This version of the [tan](../c-runtime-library/reference/tan-tanf-tanl.md) funct
2525

2626
The resulting value is pushed onto the top of the floating-point stack.
2727

28+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
29+
2830
## Requirements
2931

3032
**Platform:** x86

docs/c-runtime-library/execute-onexit-table-initialize-onexit-table-register-onexit-function.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "_execute_onexit_table, _initialize_onexit_table, _register_onexit_function"
3-
ms.date: "11/04/2016"
4-
api_name: ["_execute_onexit_table", "_initialize_onexit_table", "_register_onexit_function"]
5-
api_location: ["api-ms-win-crt-runtime-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_execute_onexit_table", "_initialize_onexit_table", "_register_onexit_function", "_o__execute_onexit_table", "_o__initialize_onexit_table", "_o__register_onexit_function"]
5+
api_location: ["api-ms-win-crt-runtime-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_execute_onexit_table", "process/_execute_onexit_table", "_initialize_onexit_table", "process/_initialize_onexit_table", "_register_onexit_function", "process/_register_onexit_function"]
@@ -52,6 +52,8 @@ The `_register_onexit_function` function appends a function to the end of the on
5252

5353
The `_execute_onexit_table` function executes all of the functions in the onexit function table, clears the table, and then returns. After a call to `_execute_onexit_table`, the table is in a non-valid state; it must be reinitialized by a call to `_initialize_onexit_table` before it is used again.
5454

55+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
56+
5557
## Requirements
5658

5759
|Routine|Required header|

docs/c-runtime-library/gets-getws.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "gets, _getws"
3-
ms.date: "11/04/2016"
4-
api_name: ["_getws", "gets"]
5-
api_location: ["msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
3+
ms.date: "4/2/2020"
4+
api_name: ["_getws", "gets", "_o__getws", "_o_gets"]
5+
api_location: ["msvcr80.dll", "msvcr90.dll", "msvcr120.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr100.dll", "api-ms-win-crt-stdio-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["_getts", "gets", "_getws"]
@@ -56,6 +56,8 @@ The `gets` function reads a line from the standard input stream `stdin` and stor
5656
5757
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure Template Overloads](../c-runtime-library/secure-template-overloads.md).
5858

59+
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](global-state.md).
60+
5961
### Generic-Text Routine Mappings
6062

6163
|TCHAR.H routine|_UNICODE & _MBCS not defined|_MBCS defined|_UNICODE defined|
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Global state in the CRT"
3+
ms.date: "04/02/2020"
4+
helpviewer_keywords: ["CRT global state"]
5+
---
6+
7+
# Global state in the CRT
8+
9+
Some functions in the Universal C Runtime (UCRT) use global state. For example, `setlocale()` sets the locale for the entire program, which affects the digit separators, text code page, and so on.
10+
11+
The UCRT's global state is not shared between applications and the OS. For example, if your application calls `setlocale()`, it won't affect the locale for any OS components that uses the C run-time, or vice-versa.
12+
13+
## OS-specific versions of CRT functions
14+
15+
In the UCRT, functions that interact with global state have a "twin" function, prefixed with `_o_`. For example:
16+
17+
`setlocale()` affects global state specific to the app.
18+
`_o_setlocale()` affects global state shared by all OS components, but not apps.
19+
20+
The only difference between these "twin" functions is that when they read/write the global CRT state, the OS-specific versions (that is, the versions that start with `_o_`) use the OS copy of global state instead of the app's copy of global state.
21+
22+
The OS-specific versions of these functions are in `ucrt.osmode.lib`. For example, the OS-specific version of `setlocale()` is `_o_setlocale()`
23+
24+
There are two ways to isolate your component's CRT state from an app's CRT state:
25+
26+
- Statically link your component by using compiler options /MT (release) or MTd (debug). For details, see [/MD, /MT, /LD](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2019). Note that static linking can greatly increase binary size.
27+
- Starting with Windows 10 20H2, get CRT state isolation by dynamically linking to the CRT but call the OS-mode exports (the functions that begin with _o_). To call the OS-mode exports, statically link as before, but ignore the static UCRT by using linker option `/NODEFAULTLIB:libucrt.lib` (release) or `/NODEFAULTLIB:libucrtd.lib` (debug) See [/NODEFAULTLIB (Ignore Libraries)](https://docs.microsoft.com/cpp/build/reference/nodefaultlib-ignore-libraries?view=vs-2019) for details. And add `ucrt.osmode.lib` to the linker input.
28+
29+
> [!Note]
30+
> In source code, write `setlocale()`, not `_o_setlocale()`. When you link against `ucrt.osmode.lib`, the linker will automatically substitute the OS-specific version of the function. That is, `setlocale()` will be substituted with `_o_setlocale()`.
31+
32+
Linking against `ucrt.osmode.lib` disables some UCRT calls that are only available in app mode. Attempting to call these will result in a link error.
33+
34+
## Global state affected by app/OS separation
35+
36+
Global state affected by the separation of app and OS state includes:
37+
38+
- [Locale data](locale.md)
39+
- Signal handlers set by [signal](reference/signal.md)
40+
- Termination routines set by [terminate](reference/set-terminate-crt.md)
41+
- [errno and _doserrno](errno-doserrno-sys-errlist-and-sys-nerr.md)
42+
- Random number generation state used by [rand](reference/rand.md) and [srand](reference/srand.md)
43+
- Functions that return a buffer that the user doesn't need to release:
44+
[strtok, wcstok, _mbstok](reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l.md)
45+
[Tmpnam, _wtmpnam](reference/tempnam-wtempnam-tmpnam-wtmpnam.md)
46+
[asctime, _wasctime](reference/asctime-wasctime.md)
47+
[gmtime, _gmtime32, _gmtime64](reference/gmtime-gmtime32-gmtime64.md)
48+
[_fcvt](reference/fcvt.md)
49+
[_ecvt](reference/ecvt.md)
50+
[strerror, _strerror, _wcserror, __wcserror](reference/strerror-strerror-wcserror-wcserror.md)
51+
- The buffer used by [_putch, _putwch](reference/putch-putwch.md)
52+
- [_set_invalid_parameter_handler, _set_thread_local_invalid_parameter_handler](reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler.md)
53+
- [_set_new_handler](reference/set-new-handler.md) and [_set_new_mode](reference/set-new-mode.md)
54+
- [fmode] (text-and-binary-mode-file-i-o.md)
55+
- [Time zone information](time-management.md)
56+
57+
## See also
58+
59+
[C Run-Time library reference](c-run-time-library-reference.md)

0 commit comments

Comments
 (0)