Skip to content

Commit 12b55ff

Browse files
author
Colin Robertson
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/cpp-docs-pr into cr-cats-3-of-n
2 parents a396349 + ece6a50 commit 12b55ff

12 files changed

Lines changed: 100 additions & 95 deletions

docs/atl/reference/caxwindow-class.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@ HRESULT CreateControl(
114114
*lpszName*<br/>
115115
A pointer to a string to create the control. Must be formatted in one of the following ways:
116116

117-
- A ProgID such as "MSCAL.Calendar.7"
117+
- A ProgID such as `"MSCAL.Calendar.7"`
118118

119-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
119+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
120120

121-
- A URL such as "<http://www.microsoft.com>"
121+
- A URL such as `"<https://www.microsoft.com>"`
122122

123-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
123+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
124124

125-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
125+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
126126

127127
> [!NOTE]
128-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream. Only the ProgID and CLSID are supported in Windows Mobile platforms. Windows CE embedded platforms, other than Windows Mobile with support for CE IE support all types including ProgID, CLSID, URL, reference to active document, and fragment of HTML.
128+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream. Only the ProgID and CLSID are supported in Windows Mobile platforms. Windows CE embedded platforms, other than Windows Mobile with support for CE IE support all types including ProgID, CLSID, URL, reference to active document, and fragment of HTML.
129129
130130
*pStream*<br/>
131131
[in] A pointer to a stream that is used to initialize the properties of the control. Can be NULL.
@@ -181,18 +181,18 @@ HRESULT CreateControlEx(
181181
*lpszName*<br/>
182182
A pointer to a string to create the control. Must be formatted in one of the following ways:
183183

184-
- A ProgID such as "MSCAL.Calendar.7"
184+
- A ProgID such as `"MSCAL.Calendar.7"`
185185

186-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
186+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
187187

188-
- A URL such as "<http://www.microsoft.com>"
188+
- A URL such as `"<https://www.microsoft.com>"`
189189

190-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
190+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
191191

192-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
192+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
193193

194194
> [!NOTE]
195-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream. Only the ProgID and CLSID are supported in Windows Mobile platforms. Windows CE embedded platforms, other than Windows Mobile with support for CE IE support all types including ProgID, CLSID, URL, reference to active document, and fragment of HTML.
195+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream. Only the ProgID and CLSID are supported in Windows Mobile platforms. Windows CE embedded platforms, other than Windows Mobile with support for CE IE support all types including ProgID, CLSID, URL, reference to active document, and fragment of HTML.
196196
197197
*pStream*<br/>
198198
[in] A pointer to a stream that is used to initialize the properties of the control. Can be NULL.

docs/atl/reference/composite-control-global-functions.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,18 @@ ATLAPI AtlAxCreateControl(
136136
*lpszName*<br/>
137137
A pointer to a string to be passed to the control. Must be formatted in one of the following ways:
138138

139-
- A ProgID such as "MSCAL.Calendar.7"
139+
- A ProgID such as `"MSCAL.Calendar.7"`
140140

141-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
141+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
142142

143-
- A URL such as "<http://www.microsoft.com>"
143+
- A URL such as `"<https://www.microsoft.com>"`
144144

145-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
145+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
146146

147-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
147+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
148148

149149
> [!NOTE]
150-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream.
150+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream.
151151
152152
*hWnd*<br/>
153153
[in] Handle to the window that the control will be attached to.
@@ -188,18 +188,18 @@ ATLAPI AtlAxCreateControlEx(
188188
*lpszName*<br/>
189189
A pointer to a string to be passed to the control. Must be formatted in one of the following ways:
190190

191-
- A ProgID such as "MSCAL.Calendar.7"
191+
- A ProgID such as `"MSCAL.Calendar.7"`
192192

193-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
193+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
194194

195-
- A URL such as "<http://www.microsoft.com>"
195+
- A URL such as `"<https://www.microsoft.com>"`
196196

197-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
197+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
198198

199-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
199+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
200200

201201
> [!NOTE]
202-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream.
202+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream.
203203
204204
*hWnd*<br/>
205205
[in] Handle to the window that the control will be attached to.
@@ -247,18 +247,18 @@ ATLAPI AtlAxCreateControlLic(
247247
*lpszName*<br/>
248248
A pointer to a string to be passed to the control. Must be formatted in one of the following ways:
249249

250-
- A ProgID such as "MSCAL.Calendar.7"
250+
- A ProgID such as `"MSCAL.Calendar.7"`
251251

252-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
252+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
253253

254-
- A URL such as "<http://www.microsoft.com>"
254+
- A URL such as `"<https://www.microsoft.com>"`
255255

256-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
256+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
257257

258-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
258+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
259259

260260
> [!NOTE]
261-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream.
261+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream.
262262
263263
*hWnd*<br/>
264264
Handle to the window that the control will be attached to.
@@ -301,18 +301,18 @@ ATLAPI AtlAxCreateControlLicEx(
301301
*lpszName*<br/>
302302
A pointer to a string to be passed to the control. Must be formatted in one of the following ways:
303303

304-
- A ProgID such as "MSCAL.Calendar.7"
304+
- A ProgID such as `"MSCAL.Calendar.7"`
305305

306-
- A CLSID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"
306+
- A CLSID such as `"{8E27C92B-1264-101C-8A2F-040224009C02}"`
307307

308-
- A URL such as "<http://www.microsoft.com>"
308+
- A URL such as `"<https://www.microsoft.com>"`
309309

310-
- A reference to an Active document such as "file://\\\Documents\MyDoc.doc"
310+
- A reference to an Active document such as `"file://\\\Documents\MyDoc.doc"`
311311

312-
- A fragment of HTML such as "MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"
312+
- A fragment of HTML such as `"MSHTML:\<HTML>\<BODY>This is a line of text\</BODY>\</HTML>"`
313313

314314
> [!NOTE]
315-
> "MSHTML:" must precede the HTML fragment so that it is designated as being an MSHTML stream.
315+
> `"MSHTML:"` must precede the HTML fragment so that it is designated as being an MSHTML stream.
316316
317317
*hWnd*<br/>
318318
Handle to the window that the control will be attached to.

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

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "fflush"
3-
ms.date: "11/04/2016"
3+
ms.date: "09/11/2019"
44
apiname: ["fflush"]
55
apilocation: ["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"]
66
apitype: "DLLExport"
@@ -56,44 +56,50 @@ For additional compatibility information, see [Compatibility](../../c-runtime-li
5656

5757
```C
5858
// crt_fflush.c
59+
// Compile with: cl /W4 crt_fflush.c
60+
// This sample gets a number from the user, then writes it to a file.
61+
// It ensures the write isn't lost on crash by calling fflush.
5962
#include <stdio.h>
60-
#include <conio.h>
6163

62-
int main( void )
64+
int * crash_the_program = 0;
65+
66+
int main(void)
6367
{
64-
int integer;
65-
char string[81];
66-
67-
// Read each word as a string.
68-
printf( "Enter a sentence of four words with scanf: " );
69-
for( integer = 0; integer < 4; integer++ )
70-
{
71-
scanf_s( "%s", string, sizeof(string) );
72-
printf( "%s\n", string );
73-
}
74-
75-
// You must flush the input buffer before using gets.
76-
// fflush on input stream is an extension to the C standard
77-
fflush( stdin );
78-
printf( "Enter the same sentence with gets: " );
79-
gets_s( string, sizeof(string) );
80-
printf( "%s\n", string );
68+
FILE * my_file;
69+
errno_t err = fopen_s(&my_file, "myfile.txt", "w");
70+
if (my_file && !err)
71+
{
72+
printf("Write a number: ");
73+
74+
int my_number = 0;
75+
scanf_s("%d", &my_number);
76+
77+
fprintf(my_file, "User selected %d\n", my_number);
78+
79+
// Write data to a file immediately instead of buffering.
80+
fflush(my_file);
81+
82+
if (my_number == 5)
83+
{
84+
// Without using fflush, no data was written to the file
85+
// prior to the crash, so the data is lost.
86+
*crash_the_program = 5;
87+
}
88+
89+
// Normally, fflush is not needed as closing the file will write the buffer.
90+
// Note that files are automatically closed and flushed during normal termination.
91+
fclose(my_file);
92+
}
93+
return 0;
8194
}
8295
```
8396
8497
```Input
85-
This is a test
86-
This is a test
98+
5
8799
```
88100

89-
```Output
90-
Enter a sentence of four words with scanf: This is a test
91-
This
92-
is
93-
a
94-
test
95-
Enter the same sentence with gets: This is a test
96-
This is a test
101+
```myfile.txt
102+
User selected 5
97103
```
98104

99105
## See also

docs/cpp/constructors-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ Derived d4 calls: Base()*/
629629

630630
::: moniker range=">=vs-2017"
631631

632-
**Visual Studio 2017 version 15.7 and later**: The **using** statement in **/std:C++17** mode brings into scope all constructors from the base class except those that have an identical signature to constructors in the derived class. In general, it is best to use inheriting constructors when the derived class declares no new data members or constructors. See also [Improvements in Visual Studio 2017 version 15.7](../overview/cpp-conformance-improvements.md#improvements_157).
632+
**Visual Studio 2017 version 15.7 and later**: The **using** statement in **/std:C++17** mode brings into scope all constructors from the base class except those that have an identical signature to constructors in the derived class. In general, it is best to use inheriting constructors when the derived class declares no new data members or constructors. See also [Improvements in Visual Studio 2017 version 15.7](https://docs.microsoft.com/cpp/overview/cpp-conformance-improvements?view=vs-2017#improvements_157).
633633

634634
::: moniker-end
635635

docs/cpp/spectre.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Tells the compiler not to insert Spectre variant 1 speculative execution barrier
1616
1717
## Remarks
1818

19-
The [/Qspectre](../build/reference/qspectre.md) compiler option causes the compiler to insert speculative execution barrier instructions where analysis indicates that a Spectre variant 1 security vulnerability exists. The specific instructions emitted depend on the processor. While these instructions should have a minimal impact on code size or performance, there may be cases where your code is not affected by the vulnerability, and requires maximum performance.
19+
The [/Qspectre](../build/reference/qspectre.md) compiler option causes the compiler to insert speculative execution barrier instructions. They're inserted where analysis indicates that a Spectre variant 1 security vulnerability exists. The specific instructions emitted depend on the processor. While these instructions should have a minimal impact on code size or performance, there may be cases where your code is not affected by the vulnerability, and requires maximum performance.
2020

2121
Expert analysis might determine that a function is safe from a Spectre variant 1 bounds check bypass defect. In that case, you can suppress the generation of mitigation code within a function by applying `__declspec(spectre(nomitigation))` to the function declaration.
2222

docs/cppcx/wrl/how-to-activate-and-use-a-windows-runtime-component-using-wrl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following steps use the `Windows::Foundation::IUriRuntimeClass` interface to
4242

4343
The Windows Runtime uses fully-qualified names to identify types. The `RuntimeClass_Windows_Foundation_Uri` parameter is a string that's provided by the Windows Runtime and contains the required runtime class name.
4444

45-
4. Initialize a [Microsoft::WRL::Wrappers::HString](hstring-class.md) variable that represents the URI `"http://www.microsoft.com"`.
45+
4. Initialize a [Microsoft::WRL::Wrappers::HString](hstring-class.md) variable that represents the URI `"https://www.microsoft.com"`.
4646

4747
[!code-cpp[wrl-consume-component#6](../codesnippet/CPP/how-to-activate-and-use-a-windows-runtime-component-using-wrl_4.cpp)]
4848

docs/mfc/reference/chtmlview-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ A pointer to a string that evaluates to the URL, UNC file name, or a PIDL (a poi
998998

999999
Not every frame will fire this event, but each frame that fires an [OnDownloadBegin](#ondownloadbegin) event will fire a corresponding `OnDocumentComplete` event.
10001000

1001-
The URL indicated by *lpszURL* can be different from the URL that the browser was told to navigate to, because this URL is the canonicalized and qualified URL. For example, if an application specifies a URL of "www.microsoft.com" in a call to [Navigate](#navigate) or [Navigate2](#navigate2), the URL passed by `OnNavigateComplete2` will be "<http://www.microsoft.com/>". Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.
1001+
The URL indicated by *lpszURL* can be different from the URL that the browser was told to navigate to, because this URL is the canonicalized and qualified URL. For example, if an application specifies a URL of `"www.microsoft.com"` in a call to [Navigate](#navigate) or [Navigate2](#navigate2), the URL passed by `OnNavigateComplete2` will be `"<https://www.microsoft.com/>"`. Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.
10021002

10031003
## <a name="ondocwindowactivate"></a> CHtmlView::OnDocWindowActivate
10041004

@@ -1262,7 +1262,7 @@ A string expression that evaluates to the URL, UNC file name, or PIDL (a pointer
12621262

12631263
The URL parameter can be a PIDL in the case of a shell name space entity for which there is no URL representation.
12641264

1265-
Note that the URL contained in *strURL* can be different from the URL that the browser was told to navigate to, because this URL is the canonicalized and qualified URL. For example, if an application specifies a URL of "www.microsoft.com" in a call to [Navigate](#navigate) or [Navigate2](#navigate2), the URL passed by `OnNavigateComplete2` will be "<http://www.microsoft.com/>". Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.
1265+
Note that the URL contained in *strURL* can be different from the URL that the browser was told to navigate to, because this URL is the canonicalized and qualified URL. For example, if an application specifies a URL of `"www.microsoft.com"` in a call to [Navigate](#navigate) or [Navigate2](#navigate2), the URL passed by `OnNavigateComplete2` will be `"<https://www.microsoft.com/>"`. Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.
12661266

12671267
## <a name="onnavigateerror"></a> CHtmlView::OnNavigateError
12681268

docs/mfc/reference/clistctrl-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ This method implements the behavior of the Win32 macro, [ListView_GetBkImage](/w
737737
if (m_myListCtrl.GetBkImage(&bki) && (bki.ulFlags == LVBKIF_SOURCE_NONE))
738738
{
739739
m_myListCtrl.SetBkImage(
740-
_T("http://www.microsoft.com/library/images/gifs/homepage/microsoft.gif"),
740+
_T("https://www.microsoft.com/library/images/gifs/homepage/microsoft.gif"),
741741
TRUE);
742742
}
743743
```

0 commit comments

Comments
 (0)