Skip to content

Commit 1e4dbb4

Browse files
authored
Merge branch 'master' into live
2 parents e4d2f71 + 150153e commit 1e4dbb4

File tree

263 files changed

+885
-850
lines changed

Some content is hidden

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

263 files changed

+885
-850
lines changed

docs/atl-mfc-shared/atl-mfc-shared-classes.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ Beginning with Visual C++ .NET 2002, several existing MFC utility classes were r
6363
[Microsoft Foundation Class Library (MFC) Reference](../mfc/mfc-desktop-applications.md)
6464
Provides reference material for the MFC Library, a set of classes in that constitute an application framework, which is the framework of an application written for the Windows API.
6565

66-
[NIB: Samples Included in Visual C++](http://msdn.microsoft.com/en-us/c9ec56b3-2bbd-49b4-8a4c-9ed4b78b7a84)
67-
Provides links to sample code showing the capabilities of Visual C++ and the libraries and technologies it supports.
68-
6966
[Visual C++ Libraries](http://msdn.microsoft.com/en-us/fec23c40-10c0-4857-9cdc-33a3b99b30ae)
7067
Provides links to the various libraries provided with Visual C++, including ATL, MFC, OLE DB Templates, the C run-time library, and the C++ Standard Library.
7168

docs/build/building-c-cpp-programs.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,5 @@ You can build Visual C++ projects either in Visual Studio or on the command line
6565
Describes how to set the Platform Toolset to target Windows XP development.
6666

6767
## Related Sections
68-
[NIB: Samples Included in Visual C++](http://msdn.microsoft.com/en-us/c9ec56b3-2bbd-49b4-8a4c-9ed4b78b7a84)
69-
Provides links to sample code that shows the capabilities of Visual C++ and the libraries and technologies it supports.
70-
7168
[Compiling and Building](/visualstudio/ide/compiling-and-building-in-visual-studio)
7269
Describes the Visual Studio build system and tools.

docs/build/reference/clr-common-language-runtime-compilation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ Enables applications and components to use features from the common language run
7474
**/clr:safe**
7575
Produces an MSIL-only (no native executable code), verifiable output file. **/clr:safe** enables verification diagnostics ([PEVerify Tool (Peverify.exe)](http://msdn.microsoft.com/Library/f4f46f9e-8d08-4e66-a94b-0c69c9b0bbfa)).
7676

77-
For more information, see [NIB: Writing Verifiably Type-Safe Code](http://msdn.microsoft.com/en-us/d18f10ef-3b48-4f47-8726-96714021547b).
78-
77+
7978
/clr:safe is deprecated. A future version of the compiler may not support this option. We recommend that you port code that must be pure, verifiable MSIL to C#.
8079

8180
**/clr:noAssembly**

docs/c-language/typedef-declarations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,5 @@ void box( int, int );
178178
```
179179

180180
## See Also
181-
[(NOTINBUILD)typedef Specifier](http://msdn.microsoft.com/en-us/cc96cf26-ba93-4179-951e-695d1f5fdcf1)
181+
182+

docs/c-runtime-library/reference/exit-exit-exit.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void _exit(
8787
## Remarks
8888
The `exit`, `_Exit` and `_exit` functions terminate the calling process. The `exit` function calls destructors for thread-local objects, then calls—in last-in-first-out (LIFO) order—the functions that are registered by `atexit` and `_onexit`, and then flushes all file buffers before it terminates the process. The `_Exit` and `_exit` functions terminate the process without destroying thread-local objects or processing `atexit` or `_onexit` functions, and without flushing stream buffers.
8989

90-
Although the `exit`, `_Exit` and `_exit` calls do not return a value, the low-order byte of `status` is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the `status` value to 0 to indicate a normal exit, or to some other value to indicate an error. The `status` value is available to the operating-system batch command `ERRORLEVEL` and is represented by one of two constants: `EXIT_SUCCESS`, which represents a value of 0, or `EXIT_FAILURE`, which represents a value of 1.
90+
Although the `exit`, `_Exit` and `_exit` calls do not return a value, the value in `status` is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the `status` value to 0 to indicate a normal exit, or to some other value to indicate an error. The `status` value is available to the operating-system batch command `ERRORLEVEL` and is represented by one of two constants: `EXIT_SUCCESS`, which represents a value of 0, or `EXIT_FAILURE`, which represents a value of 1.
9191

9292
The `exit`, `_Exit`, `_exit`, `quick_exit`, `_cexit`, and `_c_exit` functions behave as follows.
9393

@@ -100,13 +100,18 @@ void _exit(
100100
|`_cexit`|Performs complete C library termination procedures and returns to the caller. Does not terminate the process.|
101101
|`_c_exit`|Performs minimal C library termination procedures and returns to the caller. Does not terminate the process.|
102102

103-
When you call the `exit`, `_Exit` or `_exit` function, the destructors for any temporary or automatic objects that exist at the time of the call are not called. An automatic object is defined in a function where the object is not declared to be static. A temporary object is an object that's created by the compiler. To destroy an automatic object before you call `exit`, `_Exit`, or `_exit`, explicitly call the destructor for the object, as follows:
103+
When you call the `exit`, `_Exit` or `_exit` function, the destructors for any temporary or automatic objects that exist at the time of the call are not called. An automatic object is a non-static local object defined in a function. A temporary object is an object that's created by the compiler, such as a value returned by a function call. To destroy an automatic object before you call `exit`, `_Exit`, or `_exit`, explicitly call the destructor for the object, as shown here:
104104

105-
```
106-
myObject.myClass::~myClass();
105+
```cpp
106+
void last_fn() {}
107+
struct SomeClass {} myInstance{};
108+
// ...
109+
myInstance.~SomeClass(); // explicit destructor call
110+
exit(0);
111+
}
107112
```
108113
109-
Do not use `DLL_PROCESS_ATTACH` to call `exit` from `DllMain`. If you want to exit the `DLLMain` function, return `FALSE` from `DLL_PROCESS_ATTACH`.
114+
Do not use `DLL_PROCESS_ATTACH` to call `exit` from `DllMain`. To exit the `DLLMain` function, return `FALSE` from `DLL_PROCESS_ATTACH`.
110115
111116
## Requirements
112117
@@ -118,7 +123,7 @@ myObject.myClass::~myClass();
118123
119124
## Example
120125
121-
```
126+
```C
122127
// crt_exit.c
123128
// This program returns an exit code of 1. The
124129
// error code could be tested in a batch file.

docs/c-runtime-library/reference/imaxdiv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ imaxdiv_t imaxdiv(
7272
`imaxdiv` called with arguments of type [intmax_t](../../c-runtime-library/standard-types.md) returns a structure of type [imaxdiv_t](../../c-runtime-library/standard-types.md) that comprises the quotient and the remainder.
7373

7474
## Remarks
75-
The `imaxdiv` function divides `numer` by `denom` and thereby computes the quotient and the remainder. The `imaxdiv_t` structure contains the quotient, `intmax_t``quot`, and the remainder, `intmax_t``rem`. The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is the largest integer that is less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message.
75+
The `imaxdiv` function divides `numer` by `denom` and thereby computes the quotient and the remainder. The `imaxdiv_t` structure contains the quotient, `intmax_t quot`, and the remainder, `intmax_t rem`. The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is the largest integer that is less than the absolute value of the mathematical quotient. If the denominator is 0, the program terminates with an error message.
7676

7777
## Requirements
7878

docs/c-runtime-library/reference/malloc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void *malloc(
6666
Bytes to allocate.
6767

6868
## Return Value
69-
`malloc` returns a void pointer to the allocated space, or `NULL` if there is insufficient memory available. To return a pointer to a type other than `void`, use a type cast on the return value. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object that has an alignment requirement less than or equal to that of the fundamental alignment. (In Visual C++, the fundamental alignment is the alignment that's required for a `double`, or 8 bytes. In code that targets 64-bit platforms, it’s 16 bytes.) Use [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) to allocate storage for objects that have a larger alignment requirement—for example, the SSE types [__m128](../../cpp/m128.md) and `__m256`, and types that are declared by using `__declspec(align(``n``))` where `n` is greater than 8. If `size` is 0, `malloc` allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return from `malloc`, even if the amount of memory requested is small.
69+
`malloc` returns a void pointer to the allocated space, or `NULL` if there is insufficient memory available. To return a pointer to a type other than `void`, use a type cast on the return value. The storage space pointed to by the return value is guaranteed to be suitably aligned for storage of any type of object that has an alignment requirement less than or equal to that of the fundamental alignment. (In Visual C++, the fundamental alignment is the alignment that's required for a `double`, or 8 bytes. In code that targets 64-bit platforms, it’s 16 bytes.) Use [_aligned_malloc](../../c-runtime-library/reference/aligned-malloc.md) to allocate storage for objects that have a larger alignment requirement—for example, the SSE types [__m128](../../cpp/m128.md) and `__m256`, and types that are declared by using `__declspec(align( n ))` where `n` is greater than 8. If `size` is 0, `malloc` allocates a zero-length item in the heap and returns a valid pointer to that item. Always check the return from `malloc`, even if the amount of memory requested is small.
7070

7171
## Remarks
7272
The `malloc` function allocates a memory block of at least `size` bytes. The block may be larger than `size` bytes because of the space that's required for alignment and maintenance information.

docs/c-runtime-library/reference/mbsrtowcs-s.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ errno_t mbsrtowcs_s(
117117

118118
If `count` is the special value [_TRUNCATE](../../c-runtime-library/truncate.md), `mbsrtowcs_s` converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator.
119119

120-
If `mbsrtowcs_s` successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into `*``pReturnValue`, provided `pReturnValue` is not a null pointer. This occurs even if the `wcstr` argument is a null pointer and lets you determine the required buffer size. Note that if `wcstr` is a null pointer, `count` is ignored.
120+
If `mbsrtowcs_s` successfully converts the source string, it puts the size in wide characters of the converted string and the null terminator into `*pReturnValue`, provided `pReturnValue` is not a null pointer. This occurs even if the `wcstr` argument is a null pointer and lets you determine the required buffer size. Note that if `wcstr` is a null pointer, `count` is ignored.
121121

122122
If `wcstr` is not a null pointer, the pointer object pointed to by `mbstr` is assigned a null pointer if conversion stopped because a terminating null character was reached. Otherwise, it is assigned the address just past the last multibyte character converted, if any. This allows a subsequent function call to restart conversion where this call stopped.
123123

124124
If `mbstate` is a null pointer, the library internal `mbstate_t` conversion state static object is used. Because this internal static object is not thread-safe, we recommend that you pass your own `mbstate` value.
125125

126-
If `mbsrtowcs_s` encounters a multibyte character that is not valid in the current locale, it puts -1 in `*``pReturnValue`, sets the destination buffer `wcstr` to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
126+
If `mbsrtowcs_s` encounters a multibyte character that is not valid in the current locale, it puts -1 in `*pReturnValue`, sets the destination buffer `wcstr` to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
127127

128128
If the sequences pointed to by `mbstr` and `wcstr` overlap, the behavior of `mbsrtowcs_s` is undefined. `mbsrtowcs_s` is affected by the LC_TYPE category of the current locale.
129129

docs/c-runtime-library/reference/mbstowcs-s-mbstowcs-s-l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ errno_t _mbstowcs_s_l(
136136

137137
If `count` is the special value [_TRUNCATE](../../c-runtime-library/truncate.md), then `mbstowcs_s` converts as much of the string as will fit into the destination buffer, while still leaving room for a null terminator.
138138

139-
If `mbstowcs_s` successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into `*``pReturnValue` (provided `pReturnValue` is not `NULL`). This occurs even if the `wcstr` argument is `NULL` and provides a way to determine the required buffer size. Note that if `wcstr` is `NULL`, `count` is ignored, and `sizeInWords` must be 0.
139+
If `mbstowcs_s` successfully converts the source string, it puts the size in wide characters of the converted string, including the null terminator, into `*pReturnValue` (provided `pReturnValue` is not `NULL`). This occurs even if the `wcstr` argument is `NULL` and provides a way to determine the required buffer size. Note that if `wcstr` is `NULL`, `count` is ignored, and `sizeInWords` must be 0.
140140

141-
If `mbstowcs_s` encounters an invalid multibyte character, it puts 0 in `*``pReturnValue`, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
141+
If `mbstowcs_s` encounters an invalid multibyte character, it puts 0 in `*pReturnValue`, sets the destination buffer to an empty string, sets `errno` to `EILSEQ`, and returns `EILSEQ`.
142142

143143
If the sequences pointed to by `mbstr` and `wcstr` overlap, the behavior of `mbstowcs_s` is undefined.
144144

docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ translation.priority.mt:
6565
- "zh-tw"
6666
---
6767
# _mkgmtime, _mkgmtime32, _mkgmtime64
68-
Converts a UTC time represented by a `tm``struct` to a UTC time represented by a `time_t` type.
68+
Converts a UTC time represented by a `tm struct` to a UTC time represented by a `time_t` type.
6969

7070
## Syntax
7171

@@ -84,7 +84,7 @@ __time64_t _mkgmtime64(
8484

8585
#### Parameters
8686
`timeptr`
87-
A pointer to the UTC time as a `struct``tm` to convert.
87+
A pointer to the UTC time as a `struct tm` to convert.
8888

8989
## Return Value
9090
A quantity of type `__time32_t` or `__time64_t` representing the number of seconds elapsed since midnight, January 1, 1970, in Coordinated Universal Time (UTC). If the date is out of range (see the Remarks section) or the input cannot be interpreted as a valid time, the return value is -1.

docs/c-runtime-library/reference/splitpath-s-wsplitpath-s.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ errno_t _wsplitpath_s(
154154
If any of the buffers is too short to hold the result, these functions clear all the buffers to empty strings, set `errno` to `ERANGE`, and return `ERANGE`.
155155

156156
## Remarks
157-
The `_splitpath_s` function breaks a path into its four components. `_splitpath_s` automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. `_wsplitpath_s` is a wide-character version of `_splitpath_s`; the arguments to `_``wsplitpath_s` are wide-character strings. These functions behave identically otherwise
157+
The `_splitpath_s` function breaks a path into its four components. `_splitpath_s` automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use. `_wsplitpath_s` is a wide-character version of `_splitpath_s`; the arguments to `_wsplitpath_s` are wide-character strings. These functions behave identically otherwise
158158

159159
### Generic-Text Routine Mappings
160160

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ int swprintf_s(
142142

143143
One main difference between `sprintf_s` and `sprintf` is that `sprintf_s` checks the format string for valid formatting characters, whereas `sprintf` only checks if the format string or buffer are `NULL` pointers. If either check fails, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the function returns -1 and sets `errno` to `EINVAL`.
144144

145-
The other main difference between `sprintf_s` and `sprintf` is that `sprintf_s` takes a length parameter specifying the size of the output buffer in characters. If the buffer is too small for the formatted text, including the terminating null, then the buffer is set to an empty string by placing a null character at `buffer``[0]`, and the invalid parameter handler is invoked. Unlike `_snprintf`, `sprintf_s` guarantees that the buffer will be null-terminated unless the buffer size is zero.
145+
The other main difference between `sprintf_s` and `sprintf` is that `sprintf_s` takes a length parameter specifying the size of the output buffer in characters. If the buffer is too small for the formatted text, including the terminating null, then the buffer is set to an empty string by placing a null character at `buffer[0]`, and the invalid parameter handler is invoked. Unlike `_snprintf`, `sprintf_s` guarantees that the buffer will be null-terminated unless the buffer size is zero.
146146

147147
`swprintf_s` is a wide-character version of `sprintf_s`; the pointer arguments to `swprintf_s` are wide-character strings. Detection of encoding errors in `swprintf_s` may differ from that in `sprintf_s`. 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.
148148

docs/c-runtime-library/reference/stat-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ int _wstat64i32(
211211

212212
Variations of these functions support 32- or 64-bit time types, and 32- or 64-bit file lengths. The first numerical suffix (`32` or `64`) indicates the size of the time type used; the second suffix is either `i32` or `i64`, indicating whether the file size is represented as a 32-bit or 64-bit integer.
213213

214-
`_stat` is equivalent to `_stat64i32`, and `struct``_stat` contains a 64-bit time. This is true unless `_USE_32BIT_TIME_T` is defined, in which case the old behavior is in effect; `_stat` uses a 32-bit time, and `struct``_stat` contains a 32-bit time. The same is true for `_stati64`.
214+
`_stat` is equivalent to `_stat64i32`, and `struct _stat` contains a 64-bit time. This is true unless `_USE_32BIT_TIME_T` is defined, in which case the old behavior is in effect; `_stat` uses a 32-bit time, and `struct _stat` contains a 32-bit time. The same is true for `_stati64`.
215215

216216
> [!NOTE]
217217
> `_wstat` does not work with [!INCLUDE[wiprlhext](../../c-runtime-library/reference/includes/wiprlhext_md.md)] symbolic links. In these cases, `_wstat` will always report a file size of 0. `_stat` does work correctly with symbolic links.

docs/c-runtime-library/reference/tzset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void _tzset( void );
6666
## Remarks
6767
The `_tzset` function uses the current setting of the environment variable `TZ` to assign values to three global variables: `_daylight`, `_timezone`, and `_tzname`. These variables are used by the [_ftime](../../c-runtime-library/reference/ftime-ftime32-ftime64.md) and [localtime](../../c-runtime-library/reference/localtime-localtime32-localtime64.md) functions to make corrections from coordinated universal time (UTC) to local time, and by the `time` function to compute UTC from system time. Use the following syntax to set the `TZ` environment variable:
6868

69-
`set` `TZ`=`tzn`[+ | -]`hh`[`:``mm`[`:``ss`] ][`dzn`]
69+
`set` `TZ`=`tzn`[+ | -]`hh`[`:mm`[`:ss`] ][`dzn`]
7070

7171
`tzn`
7272
Three-letter time-zone name, such as PST. You must specify the correct offset from local time to UTC.

0 commit comments

Comments
 (0)