Skip to content

Commit 1abc1cf

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2531 from MicrosoftDocs/master637382083280066027
Repo sync for protected CLA branch
2 parents ccb1721 + 43cee7a commit 1abc1cf

33 files changed

+102
-102
lines changed

docs/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Because each copy of the CRT library has its own heap manager, allocating memory
2626

2727
The DLL and its clients normally use the same copy of the CRT library only if both are linked at load time to the same version of the CRT DLL. Because the DLL version of the Universal CRT library used by Visual Studio 2015, and later on Windows 10, is now a centrally deployed Windows component (ucrtbase.dll), it's the same for apps built with Visual Studio 2015 and later versions. However, even when the CRT code is identical, you can't give memory allocated in one heap to a component that uses a different heap.
2828

29-
## Example
29+
## Example: Pass file handle across DLL boundary
3030

3131
### Description
3232

@@ -68,7 +68,7 @@ int main(void)
6868
this is a string
6969
```
7070

71-
## Example
71+
## Example: Pass environment variables across DLL boundary
7272

7373
### Description
7474

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In addition to the above restrictions, when using the [/clr (Common Language Run
5757
|-------------|---------------------|
5858
|**_malloca**|\<malloc.h>|
5959

60-
## Example
60+
## Example: malloca
6161

6262
```C
6363
// crt_malloca_simple.c
@@ -77,7 +77,7 @@ int main()
7777
}
7878
```
7979

80-
## Example
80+
## Example: malloca exception
8181

8282
```C
8383
// crt_malloca_exception.c

docs/c-runtime-library/reference/set-se-translator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ When using **_set_se_translator** from managed code (code compiled with /clr) or
6060
6161
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6262
63-
## Example
63+
## Example: Catch __try exception error
6464
6565
This sample wraps the calls to set a structured exception translator and to restore the old one in an RAII class, `Scoped_SE_Translator`. This class lets you introduce a scope-specific translator as a single declaration. The class destructor restores the original translator when control leaves the scope.
6666
@@ -133,7 +133,7 @@ In __finally
133133
Caught a __try exception, error c0000094.
134134
```
135135

136-
## Example
136+
## Example: Catch SE_Exception error
137137

138138
Although the functionality provided by **_set_se_translator** is not available in managed code, it is possible to use this mapping in native code, even if that native code is in a compilation under the **/clr** switch, as long as the native code is indicated using `#pragma unmanaged`. If a structured exception is being thrown in managed code that is to be mapped, the code that generates and handles the exception must be marked `#pragma unmanaged`. The following code shows a possible use. For more information, see [Pragma Directives and the __Pragma Keyword](../../preprocessor/pragma-directives-and-the-pragma-keyword.md).
139139

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ By default, this function's global state is scoped to the application. To change
6262

6363
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
6464

65-
## Example
65+
## Example: Use _setmode to change stdin
6666

6767
```C
6868
// crt_setmode.c
@@ -90,7 +90,7 @@ int main( void )
9090
'stdin' successfully changed to binary mode
9191
```
9292

93-
## Example
93+
## Example: Use _setmode to change stdout
9494

9595
```C
9696
// crt_setmodeunicode.c

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The **_sprintf_p** function formats and stores a series of characters and values
9191

9292
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
9393

94-
## Example
94+
## Example: Use _sprintf_p to format data
9595

9696
```C
9797
// crt_sprintf_p.c
@@ -134,7 +134,7 @@ Output:
134134
character count = 79
135135
```
136136

137-
## Example
137+
## Example: Error code handling
138138

139139
```C
140140
// crt_swprintf_p.c

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ There are versions of **sprintf_s** that offer additional control over what happ
111111

112112
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
113113

114-
## Example
114+
## Example: Use sprintf_s to format data
115115

116116
```C
117117
// crt_sprintf_s.c
@@ -147,7 +147,7 @@ Output:
147147
character count = 79
148148
```
149149

150-
## Example
150+
## Example: Error code handling
151151

152152
```C
153153
// crt_swprintf_s.c

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ In C++, these functions have template overloads that invoke the newer, secure co
115115

116116
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
117117

118-
## Example
118+
## Example: Use sprintf to format data
119119

120120
```C
121121
// crt_sprintf.c
@@ -152,7 +152,7 @@ Output:
152152
character count = 79
153153
```
154154

155-
## Example
155+
## Example: Error code handling
156156

157157
```C
158158
// crt_swprintf.c

docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ By default, this function's global state is scoped to the application. To change
187187

188188
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
189189

190-
## Example
190+
## Example: Copy chars to a buffer
191191

192192
```cpp
193193
// crt_strncpy_s_1.cpp
@@ -314,7 +314,7 @@ Invalid parameter handler invoked: (L"Buffer is too small" && 0)
314314
new contents of dest: ''
315315
```
316316

317-
## Example
317+
## Example: strncpy and strncpy_s
318318

319319
```C
320320
// crt_strncpy_s_2.c

docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ In C++, these functions have template overloads that invoke the newer, secure co
153153

154154
The **_vsnprintf**, **_vsnprintf_l**, **_vsnwprintf** and **_vsnwprintf_l** functions are Microsoft-specific. For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
155155

156-
## Example
156+
## Example: Use wide characters with `_vsnwprintf()`
157157

158158
```C
159159
// crt_vsnwprintf.c
@@ -195,7 +195,7 @@ nSize: -1, buff: Hi there!
195195

196196
The behavior changes if you use vsnprintf instead, along with narrow-string parameters. The *count* parameter can be the entire size of the buffer, and the return value is the number of characters that would have been written if *count* was large enough:
197197

198-
## Example
198+
## Example: Use `vsnprintf()` with narrow strings
199199

200200
```C
201201
// crt_vsnprintf.c

docs/cpp/member-function-templates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The term member template refers to both member function templates and nested cla
1010

1111
Member functions can be function templates in several contexts. All functions of class templates are generic but are not referred to as member templates or member function templates. If these member functions take their own template arguments, they are considered to be member function templates.
1212

13-
## Example
13+
## Example: Declare member function templates
1414

1515
Member function templates of nontemplate or template classes are declared as function templates with their template parameters.
1616

@@ -29,7 +29,7 @@ int main()
2929
}
3030
```
3131

32-
## Example
32+
## Example: Member function template of template class
3333

3434
The following example shows a member function template of a template class.
3535

@@ -50,7 +50,7 @@ int main()
5050
}
5151
```
5252

53-
## Example
53+
## Example: Define member templates outside class
5454

5555
```cpp
5656
// defining_member_templates_outside_class.cpp
@@ -72,7 +72,7 @@ int main()
7272
}
7373
```
7474

75-
## Example
75+
## Example: Templated user-defined conversion
7676

7777
Local classes are not allowed to have member templates.
7878

0 commit comments

Comments
 (0)