Skip to content

Commit 930d139

Browse files
author
Colin Robertson
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into cr-build-error
2 parents b551b1a + 8e3acea commit 930d139

File tree

422 files changed

+3102
-2595
lines changed

Some content is hidden

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

422 files changed

+3102
-2595
lines changed

docs/TOC.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# [Visual C++ in Visual Studio 2017 RC](top/visual-cpp-in-visual-studio.md)
2-
# [What's New for Visual C++ in Visual Studio 2017 RC](top/what-s-new-for-visual-cpp-in-visual-studio.md)
3-
# [Supported Platforms (Visual C++)](top/supported-platforms-visual-cpp.md)
1+
# [Visual C++ in Visual Studio 2017 RC](visual-cpp-in-visual-studio.md)
2+
# [What's New for Visual C++ in Visual Studio 2017 RC](what-s-new-for-visual-cpp-in-visual-studio.md)
3+
# [Supported Platforms (Visual C++)](supported-platforms-visual-cpp.md)
44
# [C Language](c-language/c-language-reference.md)
55
# [C++ Language](cpp/cpp-language-reference.md)
66
# [C/C++ Preprocessor](preprocessor/c-cpp-preprocessor-reference.md)
@@ -9,17 +9,17 @@
99
# [Windows Development](windows/overview-of-windows-programming-in-cpp.md)
1010
# [Linux Development](linux/download-install-and-setup-the-linux-development-workload.md)
1111
# [.NET Development with C++/CLI](dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md)
12-
# [Cloud and Web Programming in Visual C++](top/cloud-and-web-programming-in-visual-cpp.md)
13-
## [C++ REST SDK (Codename "Casablanca")](top/cpp-rest-sdk-codename-casablanca.md)
12+
# [Cloud and Web Programming in Visual C++](cloud/cloud-and-web-programming-in-visual-cpp.md)
13+
## [C++ REST SDK (Codename "Casablanca")](cloud/cpp-rest-sdk-codename-casablanca.md)
1414
# [Parallel Programming](parallel/parallel-programming-in-visual-cpp.md)
1515
# [Data Access](data/data-access-programming-mfc-atl.md)
1616
# [Text and Strings](text/text-and-strings-in-visual-cpp.md)
1717
# [Using the Visual Studio IDE for C++](ide/ide-and-tools-for-visual-cpp-development.md)
1818
# [Compilers and Build Tools](build/building-c-cpp-programs.md)
1919
# [Porting and Upgrading Visual C++ Code](porting/visual-cpp-porting-and-upgrading-guide.md)
20-
# [Security Best Practices for C++](top/security-best-practices-for-cpp.md)
21-
## [Running as a Member of the Users Group](top/running-as-a-member-of-the-users-group.md)
22-
## [How User Account Control (UAC) Affects Your Application](top/how-user-account-control-uac-affects-your-application.md)
23-
# [Visual C++ Samples](top/visual-cpp-samples.md)
24-
# [Visual C++ Help and Community](top/visual-cpp-help-and-community.md)
25-
# [How to Report a Problem with the Visual C++ Toolset](top/how-to-report-a-problem-with-the-visual-cpp-toolset.md)
20+
# [Security Best Practices for C++](security/security-best-practices-for-cpp.md)
21+
## [Running as a Member of the Users Group](security/running-as-a-member-of-the-users-group.md)
22+
## [How User Account Control (UAC) Affects Your Application](security/how-user-account-control-uac-affects-your-application.md)
23+
# [Visual C++ Samples](visual-cpp-samples.md)
24+
# [Visual C++ Help and Community](visual-cpp-help-and-community.md)
25+
# [How to Report a Problem with the Visual C++ Toolset](how-to-report-a-problem-with-the-visual-cpp-toolset.md)

docs/_breadcrumb/toc.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,10 @@
117117
topicHref: /cpp/porting/porting-and-upgrading-guide
118118
- name: Text and Strings
119119
tocHref: /cpp/text/
120-
topicHref: /cpp/text/text-and-strings
120+
topicHref: /cpp/text/text-and-strings
121+
- name: Security
122+
tocHref: /cpp/security
123+
topicHref: /cpp/security/security-best-practices-for-cpp
124+
- name: Cloud and Web
125+
tocHref: /cpp/cloud
126+
topicHref: /cpp/cloud/cloud-and-web-programming-in-visual-cpp

docs/atl-mfc-shared/memory-management-with-cstringt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ Class [CStringT](../atl-mfc-shared/reference/cstringt-class.md) is a template cl
5454
- [CFixedStringT: An Example of a Custom String Manager](../atl-mfc-shared/cfixedstringt-example-of-a-custom-string-manager.md)
5555

5656
## See Also
57-
[CustomString sample](../top/visual-cpp-samples.md)
57+
[CustomString sample](../visual-cpp-samples.md)
5858

docs/atl-mfc-shared/reference/cimage-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,8 +1504,8 @@ BOOL TransparentBlt(CImage* pSrcImage, CImage* pDstImage, int xDest, int yDest,
15041504

15051505

15061506
## See Also
1507-
[MMXSwarm Sample](../../top/visual-cpp-samples.md)
1508-
[SimpleImage Sample](../../top/visual-cpp-samples.md)
1507+
[MMXSwarm Sample](../../visual-cpp-samples.md)
1508+
[SimpleImage Sample](../../visual-cpp-samples.md)
15091509
[Device-Independent Bitmaps](http://msdn.microsoft.com/library/windows/desktop/dd183562)
15101510
[CreateDIBSection](http://msdn.microsoft.com/library/windows/desktop/dd183494)
15111511
[ATL COM Desktop Components](../../atl/atl-com-desktop-components.md)

docs/atl-mfc-shared/reference/cpoint-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ CSize operator-(POINT point) const throw();
366366
[!code-cpp[NVC_ATLMFC_Utilities#34](../../atl-mfc-shared/codesnippet/cpp/cpoint-class_7.cpp)]
367367

368368
## See Also
369-
[MFC Sample MDI](../../top/visual-cpp-samples.md)
369+
[MFC Sample MDI](../../visual-cpp-samples.md)
370370
[Hierarchy Chart](../../mfc/hierarchy-chart.md)
371371
[POINT Structure](../../mfc/reference/point-structure1.md)
372372
[CRect Class](../../atl-mfc-shared/reference/crect-class.md)

docs/atl-mfc-shared/reference/csimplestringt-class.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void CopyCharsOverlapped(XCHAR* pchDest, const XCHAR* pchSrc, int nChars
268268
Call this method to copy characters from `pchSrc` to the `pchDest` string. Unlike `CopyChars`, `CopyCharsOverlapped` provides a safe method for copying from character buffers that might be overlapped.
269269

270270
## Example
271-
See the example for [CSimpleStringT::CopyChars](#csimplestringt__CopyChars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
271+
See the example for [CSimpleStringT::CopyChars](#csimplestringt__copychars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
272272

273273
### Requirements
274274
**Header:** atlsimpstr.h
@@ -356,7 +356,7 @@ Frees any extra memory previously allocated by the string but no longer needed.
356356
void FreeExtra();
357357
```
358358
### Remarks
359-
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__GetLength).
359+
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__getlength).
360360

361361
## Example
362362
```cpp
@@ -409,7 +409,7 @@ int GetAllocLength() const throw();
409409
The number of characters allocated for this object.
410410
411411
### Remarks
412-
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
412+
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
413413
414414
### Requirements
415415
**Header:** atlsimpstr.h
@@ -426,7 +426,7 @@ XCHAR GetAt(int iChar
426426
```
427427
#### Parameters
428428
`iChar`
429-
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength). Otherwise, `GetAt` will generate an exception.
429+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength). Otherwise, `GetAt` will generate an exception.
430430

431431
### Return Value
432432
An `XCHAR` that contains the character at the specified position in the string.
@@ -458,15 +458,15 @@ PXSTR GetBuffer();
458458
`nMinBufferLength`
459459
The minimum number of characters that the character buffer can hold. This value does not include space for a null terminator.
460460
461-
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__LockBuffer) on this buffer, you lose the buffer lock.
461+
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__lockbuffer) on this buffer, you lose the buffer lock.
462462
463463
### Return Value
464464
An `PXSTR` pointer to the object's (null-terminated) character buffer.
465465
466466
### Remarks
467467
Call this method to return the buffer contents of the `CSimpleStringT` object. The returned `PXSTR` is not a constant and therefore allows direct modification of `CSimpleStringT` contents.
468468
469-
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__ReleaseBuffer) before you use any other `CSimpleStringT` member methods.
469+
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__releasebuffer) before you use any other `CSimpleStringT` member methods.
470470
471471
The address returned by `GetBuffer` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reallocated if you do not change the length of the `CSimpleStringT`.
472472
@@ -511,7 +511,7 @@ PXSTR GetBufferSetLength(int nLength);
511511
### Remarks
512512
Call this method to retrieve a specified length of the internal buffer of the `CSimpleStringT` object. The returned `PXSTR` pointer is not `const` and thus allows direct modification of `CSimpleStringT` contents.
513513

514-
If you use the pointer returned by [GetBufferSetLength](#vclrfcsimplestringtgetbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
514+
If you use the pointer returned by [GetBufferSetLength](#csimplestringt__getbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
515515

516516
The address returned by `GetBufferSetLength` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reassigned if you do not change the length of the `CSimpleStringT`.
517517

@@ -563,7 +563,7 @@ int GetLength() const throw();
563563
### Remarks
564564
Call this method to return the number of characters in the object. The count does not include a null terminator.
565565
566-
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
566+
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
567567
568568
### Requirements
569569
**Header:** atlsimpstr.h
@@ -665,10 +665,10 @@ PXSTR LockBuffer();
665665
666666
By locking the string in the buffer, you ensure that the string's exclusive hold on the buffer will remain intact.
667667
668-
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__UnlockBuffer) to reset the reference count to 1.
668+
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__unlockbuffer) to reset the reference count to 1.
669669
670670
> [!NOTE]
671-
> If you call [GetBuffer](#csimplestringt__GetBuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
671+
> If you call [GetBuffer](#csimplestringt__getbuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
672672
673673
For more information about reference counting, see the following articles:
674674
@@ -708,7 +708,7 @@ XCHAR operator[](int iChar
708708
Zero-based index of a character in the string.
709709

710710
### Remarks
711-
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__GetAt) member function.
711+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
712712

713713
> [!NOTE]
714714
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
@@ -723,6 +723,27 @@ ASSERT(s[1] == _T('b'));
723723
724724
### Requirements
725725
**Header:** atlsimpstr.h
726+
727+
## <a name="csimplestringt__operator_at"></a> CSimpleStringT::operator \[\]
728+
Call this function to access a single character of the character array.
729+
730+
### Syntax
731+
732+
```
733+
734+
XCHAR operator[]( int iChar ) const;
735+
```
736+
737+
### Parameters
738+
`iChar`
739+
Zero-based index of a character in the string.
740+
741+
### Remarks
742+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
743+
744+
> [!NOTE]
745+
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
746+
726747
727748
## <a name="csimplestringt__operator_add_eq"></a> CSimpleStringT::operator +=
728749
Joins a new string or character to the end of an existing string.
@@ -916,7 +937,7 @@ typedef ChTraitsBase< BaseType >::PXSTR PXSTR;
916937
917938
918939
## <a name="csimplestringt__releasebuffer"></a> CSimpleStringT::ReleaseBuffer
919-
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__GetBuffer).
940+
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__getbuffer).
920941
921942
### Syntax
922943
@@ -928,7 +949,7 @@ void ReleaseBuffer(int nNewLength = -1);
928949
The new length of the string in characters, not counting a null terminator. If the string is null terminated, the -1 default value sets the `CSimpleStringT` size to the current length of the string.
929950
930951
### Remarks
931-
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__GetBuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
952+
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__getbuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
932953
933954
## Example
934955
The following example demonstrates the use of `CSimpleStringT::ReleaseBuffer`.
@@ -950,7 +971,7 @@ ASSERT(s.GetLength() == 3); // Length still 3
950971

951972
## <a name="csimplestringt__releasebuffersetlength"></a> CSimpleStringT::ReleaseBufferSetLength
952973

953-
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__GetBuffer).
974+
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__getbuffer).
954975

955976
### Syntax
956977

@@ -962,7 +983,7 @@ void ReleaseBufferSetLength(int nNewLength);
962983
The length of the string being released
963984

964985
### Remarks
965-
This function is functionally similar to [ReleaseBuffer](#csimplestringt__ReleaseBuffer) except that a valid length for the string object must be passed.
986+
This function is functionally similar to [ReleaseBuffer](#csimplestringt__releasebuffer) except that a valid length for the string object must be passed.
966987

967988
### Requirements
968989
**Header:** atlsimpstr.h
@@ -979,7 +1000,7 @@ void SetAt(int iChar, XCHAR ch);
9791000
```
9801001
#### Parameters
9811002
`iChar`
982-
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength).
1003+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength).
9831004

9841005
*ch*
9851006
The new character.
@@ -1116,7 +1137,7 @@ void Truncate(int nNewLength);
11161137
Call this method to truncate the contents of the string to the new length.
11171138

11181139
> [!NOTE]
1119-
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__FreeExtra) and [Preallocate](#csimplestringt__Preallocate).
1140+
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__freeextra) and [Preallocate](#csimplestringt__preallocate).
11201141
11211142
## Example
11221143
The following example demonstrates the use of `CSimpleStringT::Truncate`.
@@ -1146,7 +1167,7 @@ void UnlockBuffer() throw();
11461167
### Remarks
11471168
Call this method to reset the reference count of the string to 1.
11481169
1149-
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__LockBuffer).
1170+
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__lockbuffer).
11501171
11511172
### Requirements
11521173
**Header:** atlsimpstr.h

docs/atl-mfc-shared/reference/csize-class.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ CSize operator-() const throw();
262262
[!code-cpp[NVC_ATLMFC_Utilities#103](../../atl-mfc-shared/codesnippet/cpp/csize-class_7.cpp)]
263263

264264
## See Also
265-
[MFC Sample MDI](../../top/visual-cpp-samples.md)
265+
[MFC Sample MDI](../../visual-cpp-samples.md)
266266
[Hierarchy Chart](../../mfc/hierarchy-chart.md)
267267
[CRect Class](../../atl-mfc-shared/reference/crect-class.md)
268268
[CPoint Class](../../atl-mfc-shared/reference/cpoint-class.md)

docs/atl/active-template-library-atl-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The Active Template Library (ATL) is a set of template-based C++ classes that le
105105
Provides code for manipulating paths and URLs in the form of [CPathT](../atl/reference/cpatht-class.md) and [CUrl](../atl/reference/curl-class.md). A thread pool, [CThreadPool](../atl/reference/cthreadpool-class.md), can be used in your own applications. This code can be found in atlpath.h and atlutil.h.
106106

107107
## Related Sections
108-
[ATL Samples](../top/visual-cpp-samples.md)
108+
[ATL Samples](../visual-cpp-samples.md)
109109
Provides descriptions of and links to the ATL sample programs.
110110

111111
[Creating an ATL Project](../atl/reference/creating-an-atl-project.md)

docs/atl/adding-connection-points-to-an-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The [ATL Tutorial](../atl/active-template-library-atl-tutorial.md) demonstrates
5656

5757
[!code-cpp[NVC_ATL_Windowing#82](../atl/codesnippet/cpp/adding-connection-points-to-an-object_2.idl)]
5858

59-
See the .idl file in the [Circ](../top/visual-cpp-samples.md) ATL sample for an example.
59+
See the .idl file in the [Circ](../visual-cpp-samples.md) ATL sample for an example.
6060

6161
3. Use Class View to add methods and properties to the event interface. Right-click the class in Class View, point to **Add** on the shortcut menu, and click **Add Connection Point**.
6262

0 commit comments

Comments
 (0)