Skip to content

Commit 4ae326a

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 69e2190 + 8645408 commit 4ae326a

5 files changed

Lines changed: 54 additions & 53 deletions

File tree

‎docs/build/reference/manifestuac-embeds-uac-information-in-manifest.md‎

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "/MANIFESTUAC (Embeds UAC information in manifest)"
3-
ms.date: "11/04/2016"
3+
ms.date: "06/12/2020"
44
f1_keywords: ["VC.Project.VCLinkerTool.UACUIAccess", "VC.Project.VCLinkerTool.UACExecutionLevel", "VC.Project.VCLinkerTool.EnableUAC"]
55
helpviewer_keywords: ["/MANIFESTUAC linker option", "MANIFESTUAC linker option", "-MANIFESTUAC linker option"]
66
ms.assetid: 2d243c39-fa13-493c-b56f-d0d972a1603a
@@ -11,52 +11,51 @@ Specifies whether User Account Control (UAC) information is embedded in the prog
1111

1212
## Syntax
1313

14-
```
15-
/MANIFESTUAC
16-
/MANIFESTUAC:NO
17-
/MANIFESTUAC:fragment
18-
/MANIFESTUAC:level=_level
19-
/MANIFESTUAC:uiAccess=_uiAccess
20-
```
14+
> **`/MANIFESTUAC`**\
15+
> **`/MANIFESTUAC:NO`**\
16+
> **`/MANIFESTUAC:`**_`level`_\
17+
> **`/MANIFESTUAC:`**_`uiAccess`_\
18+
> **`/MANIFESTUAC:`**_`fragment`_
2119
2220
### Parameters
2321

24-
*fragment*<br/>
25-
A string that contains the `level` and `uiAccess` values. For more information, see the Remarks section later in this topic.
22+
**`NO`**<br/>
23+
The linker doesn't embed UAC information in the program manifest.
2624

27-
*_level*<br/>
28-
One of *asInvoker*, *highestAvailable*, or *requireAdministrator*. Defaults to asInvoker. For more information, see the Remarks section later in this topic.
25+
*`level`*<br/>
26+
**`level=`** followed by one of **`'asInvoker'`**, **`'highestAvailable'`**, or **`'requireAdministrator'`**. Defaults to **`'asInvoker'`**. For more information, see the [Remarks](#remarks) section.
2927

30-
*_uiAccess*<br/>
31-
**true** if you want the application to bypass user interface protection levels and drive input to higher-permission windows on the desktop; otherwise, **false**. Defaults to **false**. Set to **true** only for user interface accessibility applications.
28+
*`uiAccess`*<br/>
29+
**`uiAccess='true'`** if you want the application to bypass user interface protection levels and drive input to higher-permission windows on the desktop; otherwise, **`uiAccess='false'`**. Defaults to **`uiAccess='false'`**. Set this argument to **`uiAccess='true'`** only for user interface accessibility applications.
30+
31+
*`fragment`*<br/>
32+
A string that contains the *`level`* and *`uiAccess`* values. May optionally be enclosed in double quotes. For more information, see the [Remarks](#remarks) section.
3233

3334
## Remarks
3435

35-
If you specify multiple /MANIFESTUAC options on the command-line, the last one entered takes precedence.
36+
If you specify multiple **`/MANIFESTUAC`** options on the command-line, the last one entered takes precedence.
3637

37-
The choices for /MANIFESTUAC:level are as follows:
38+
The choices for **`/MANIFESTUAC:`**_`level`_ are as follows:
3839

39-
- `asInvoker`: The application will run with the same permissions as the process that started it. The application can be elevated to a higher permission level by selecting **Run as Administrator**.
40+
- **`level='asInvoker'`**: The application runs at the same permission level as the process that started it. You can elevate the application to a higher permission level by selecting **Run as Administrator**.
4041

41-
- highestAvailable: The application will run with the highest permission level that it can. If the user who starts the application is a member of the Administrators group, this option is the same as requireAdministrator. If the highest available permission level is higher than the level of the opening process, the system will prompt for credentials.
42+
- **`level='highestAvailable'`**: The application runs at the highest permission level that it can. If the user who starts the application is a member of the Administrators group, this option is the same as **`level='requireAdministrator'`**. If the highest available permission level is higher than the level of the opening process, the system prompts for credentials.
4243

43-
- requireAdministrator: The application will run with administrator permissions. The user who starts the application must be a member of the Administrators group. If the opening process is not running with administrative permissions, the system will prompt for credentials.
44+
- **`level='requireAdministrator'`**: The application runs using administrator permissions. The user who starts the application must be a member of the Administrators group. If the opening process isn't running with administrative permissions, the system prompts for credentials.
4445

45-
You can specify the level and uiAccess values in one step by using the /MANIFESTUAC:fragment option. The fragment must be in the following form:
46+
You can specify both the *`level`* and *`uiAccess`* values in one step by using the **`/MANIFESTUAC:`**_`fragment`_ option. The fragment must be in the following form:
4647

47-
```
48-
"level=[ asInvoker | highestAvailable | requireAdministrator ] uiAccess=[ true | false ]"
49-
```
48+
> **`/MANIFESTUAC:`** \[ **`"`** ] **`level=`** { **`'asInvoker'`** | **`'highestAvailable'`** | **`'requireAdministrator'`** } **`uiAccess=`** { **`'true'`** | **`'false'`** } \[ **`"`** ]
5049
51-
### To set this linker option in the Visual Studio development environment
50+
For example:
5251

53-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
52+
**`/MANIFESTUAC:"level='highestAvailable' uiAccess='true'"`**
5453

55-
1. Expand the **Configuration Properties** node.
54+
### To set this linker option in the Visual Studio development environment
5655

57-
1. Expand the **Linker** node.
56+
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
5857

59-
1. Select the **Manifest File** property page.
58+
1. Select the **Configuration Properties** > **Linker** > **Manifest File** property page.
6059

6160
1. Modify the **Enable User Account Control (UAC)**, **UAC Execution Level**, and **UAC Bypass UI Protection** properties.
6261

‎docs/c-runtime-library/reference/getchar-getwchar.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "getchar, getwchar"
3-
ms.date: "4/2/2020"
3+
ms.date: "06/23/2020"
44
api_name: ["getchar", "getwchar", "_o_getchar", "_o_getwchar"]
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
66
api_type: ["DLLExport"]
@@ -22,13 +22,15 @@ wint_t getwchar();
2222

2323
## Return Value
2424

25-
Returns the character read. To indicate a read error or end-of-file condition, **getchar** returns **EOF**, and **getwchar** returns **WEOF**. For **getchar**, use **ferror** or **feof** to check for an error or for end of file.
25+
Returns the character read. These functions wait for input and don't return until input is available.
26+
27+
To indicate a read error or end-of-file condition, **getchar** returns **EOF**, and **getwchar** returns **WEOF**. For **getchar**, use **ferror** or **feof** to check for an error or for end of file.
2628

2729
## Remarks
2830

29-
Each routine reads a single character from **stdin** and increments the associated file pointer to point to the next character. **getchar** is the same as [_fgetchar](fgetc-fgetwc.md), but it is implemented as a function and as a macro.
31+
Each routine reads a single character from **stdin** and increments the associated file pointer to point to the next character. **getchar** is the same as [_fgetchar](fgetc-fgetwc.md), but it's implemented as a function and as a macro.
3032

31-
These functions lock the calling thread and are therefore thread-safe. For a non-locking version, see [_getchar_nolock, _getwchar_nolock](getchar-nolock-getwchar-nolock.md).
33+
These functions also lock the calling thread and are thread-safe. For a non-locking version, see [_getchar_nolock, _getwchar_nolock](getchar-nolock-getwchar-nolock.md).
3234

3335
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
3436

@@ -45,7 +47,7 @@ By default, this function's global state is scoped to the application. To change
4547
|**getchar**|\<stdio.h>|
4648
|**getwchar**|\<stdio.h> or \<wchar.h>|
4749

48-
The console is not supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
50+
The console isn't supported in Universal Windows Platform (UWP) apps. The standard stream handles that are associated with the console, **stdin**, **stdout**, and **stderr**, must be redirected before C run-time functions can use them in UWP apps. For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
4951

5052
## Example
5153

‎docs/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l"
3-
ms.date: "11/04/2016"
3+
ms.date: "06/23/2020"
44
api_name: ["__swprintf_l", "sprintf", "_sprintf_l", "_swprintf_l", "swprintf"]
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "ntoskrnl.exe"]
66
api_type: ["DLLExport"]
@@ -11,7 +11,7 @@ ms.assetid: f6efe66f-3563-4c74-9455-5411ed939b81
1111
---
1212
# sprintf, _sprintf_l, swprintf, _swprintf_l, __swprintf_l
1313

14-
Write formatted data to a string. More secure versions of some of these functions are available; see [sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md). The secure versions of **swprintf** and **_swprintf_l** do not take a *count* parameter.
14+
Write formatted data to a string. More secure versions of some of these functions are available; see [sprintf_s, _sprintf_s_l, swprintf_s, _swprintf_s_l](sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md). The secure versions of **swprintf** and **_swprintf_l** take the size of the buffer as a parameter.
1515

1616
## Syntax
1717

@@ -91,9 +91,9 @@ The number of characters written, or -1 if an error occurred. If *buffer* or *fo
9191
The **sprintf** function formats and stores a series of characters and values in *buffer*. Each *argument* (if any) is converted and output according to the corresponding format specification in *format*. The format consists of ordinary characters and has the same form and function as the *format* argument for [printf](printf-printf-l-wprintf-wprintf-l.md). A null character is appended after the last character written. If copying occurs between strings that overlap, the behavior is undefined.
9292

9393
> [!IMPORTANT]
94-
> Using **sprintf**, there is no way to limit the number of characters written, which means that code using **sprintf** is susceptible to buffer overruns. Consider using the related function [_snprintf](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), which specifies a maximum number of characters to be written to *buffer*, or use [_scprintf](scprintf-scprintf-l-scwprintf-scwprintf-l.md) to determine how large a buffer is required. Also, ensure that *format* is not a user-defined string.
94+
> Using **sprintf**, there is no way to limit the number of characters written, which means that code using **sprintf** is susceptible to buffer overruns. Consider using the related function [_snprintf](snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), which specifies a maximum number of characters to write to *buffer*, or use [_scprintf](scprintf-scprintf-l-scwprintf-scwprintf-l.md) to determine how large a buffer is required. Also, ensure that *format* is not a user-defined string.
9595
96-
**swprintf** is a wide-character version of **sprintf**; the pointer arguments to **swprintf** are wide-character strings. Detection of encoding errors in **swprintf** may differ from that in **sprintf**. **swprintf** and **fwprintf** behave identically except that **swprintf** writes output to a string rather than to a destination of type **FILE**, and **swprintf** requires the *count* parameter to specify the maximum number of characters to be written. The versions of these functions with the **_l** suffix are identical except that they use the locale parameter passed in instead of the current thread locale.
96+
**swprintf** is a wide-character version of **sprintf**; the pointer arguments to **swprintf** are wide-character strings. Detection of encoding errors in **swprintf** may differ from **sprintf**. **swprintf** and **fwprintf** behave identically except **swprintf** writes output to a string rather than to a destination of type **FILE**, and **swprintf** requires the *count* parameter to specify the maximum number of characters to write. The versions of these functions with the **_l** suffix are identical except they use the locale parameter passed in instead of the current thread locale.
9797

9898
**swprintf** conforms to the ISO C Standard, which requires the second parameter, *count*, of type **size_t**. To force the old nonstandard behavior, define **_CRT_NON_CONFORMING_SWPRINTFS**. In a future version, the old behavior may be removed, so code should be changed to use the new conformant behavior.
9999

‎docs/safeint/safeint-functions.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "SafeInt Functions"
3-
ms.date: "10/22/2018"
3+
ms.date: "06/23/2020"
44
ms.topic: "reference"
55
f1_keywords: ["SafeInt functions", "SafeAdd", "SafeCast", "SafeDivide", "SafeEquals", "SafeGreaterThan", "SafeGreaterThanEquals", "SafeLessThan", "SafeLessThanEquals", "SafeModulus", "SafeMultiply", "SafeNotEquals", "SafeSubtract"]
66
helpviewer_keywords: ["functions, SafeInt", "SafeAdd function", "SafeCast function", "SafeDivide function", "SafeEquals function", "SafeGreaterThan function", "SafeGreaterThanEquals function", "SafeLessThan function", "SafeLessThanEquals function", "SafeModulus function", "SafeMultiply function", "SafeNotEquals function", "SafeSubtract function"]
77
ms.assetid: fdc208e5-5d8a-41a9-8271-567fd438958d
88
---
99
# SafeInt Functions
1010

11-
The SafeInt library provides several functions that you can use without creating an instance of the [SafeInt class](safeint-class.md). If you want to protect a single mathematical operation from integer overflow, you can use these functions. If you want to protect multiple mathematical operations, you should create `SafeInt` objects. It is more efficient to create `SafeInt` objects than to use these functions multiple times.
11+
The SafeInt library provides several functions that you can use without creating an instance of the [SafeInt class](safeint-class.md). If you want to protect a single mathematical operation from integer overflow, you can use these functions. If you want to protect multiple mathematical operations, you should create `SafeInt` objects. It's more efficient to create `SafeInt` objects than to use these functions multiple times.
1212

1313
These functions enable you to compare or perform mathematical operations on two different types of parameters without having to convert them to the same type first.
1414

@@ -104,10 +104,10 @@ inline bool SafeDivide (
104104
### Parameters
105105

106106
*t*<br/>
107-
[in] The divisor. This must be of type T.
107+
[in] The dividend. This must be of type T.
108108

109109
*u*<br/>
110-
[in] The dividend. This must be of type U.
110+
[in] The divisor. This must be of type U.
111111

112112
*result*<br/>
113113
[out] The parameter where `SafeDivide` stores the result.
@@ -118,7 +118,7 @@ inline bool SafeDivide (
118118

119119
## <a name="safeequals"></a> SafeEquals
120120

121-
Compares two numbers to determine whether they are equal.
121+
Compares two numbers to determine whether they're equal.
122122

123123
```cpp
124124
template<typename T, typename U>
@@ -218,7 +218,7 @@ inline bool SafeLessThan (
218218
[in] The first number. This must be of type `T`.
219219

220220
*u*<br/>
221-
[in] The second numer. This must be of type `U`.
221+
[in] The second number. This must be of type `U`.
222222

223223
### Return Value
224224

@@ -314,7 +314,7 @@ inline bool SafeMultiply (
314314

315315
## <a name="safenotequals"></a> SafeNotEquals
316316

317-
Determines if two numbers are not equal.
317+
Determines if two numbers aren't equal.
318318

319319
```cpp
320320
template<typename T, typename U>
@@ -334,7 +334,7 @@ inline bool SafeNotEquals (
334334

335335
### Return Value
336336

337-
**true** if *t* and *u* are not equal; otherwise **false**.
337+
**true** if *t* and *u* aren't equal; otherwise **false**.
338338

339339
### Remarks
340340

0 commit comments

Comments
 (0)