Skip to content

Commit 1e513d4

Browse files
authored
Merge pull request #103 from Microsoft/master
Merge recent changes to live
2 parents 85a7205 + ca8d422 commit 1e513d4

File tree

243 files changed

+3509
-2794
lines changed

Some content is hidden

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

243 files changed

+3509
-2794
lines changed

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/build/reference/dot-lib-files-as-linker-input.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,36 @@ translation.priority.ht:
4545
# .Lib Files as Linker Input
4646
LINK accepts COFF standard libraries and COFF import libraries, both of which usually have the extension .lib. Standard libraries contain objects and are created by the LIB tool. Import libraries contain information about exports in other programs and are created either by LINK when it builds a program that contains exports or by the LIB tool. For information on using LIB to create standard or import libraries, see [LIB Reference](../../build/reference/lib-reference.md). For details on using LINK to create an import library, see the [/DLL](../../build/reference/dll-build-a-dll.md) option.
4747

48-
A library is specified to LINK as either a file name argument or a default library. LINK resolves external references by searching first in libraries specified on the command line, then in default libraries specified with the [/DEFAULTLIB](../../build/reference/defaultlib-specify-default-library.md) option, and then in default libraries named in .obj files. If a path is specified with the library name, LINK looks for the library in that directory. If no path is specified, LINK looks first in the directory that LINK is running from, and then in any directories specified in the LIB environment variable.
48+
A library is specified to LINK as either a file name argument or a default library. LINK resolves external references by searching first in libraries specified on the command line, then in default libraries specified with the [/DEFAULTLIB](../../build/reference/defaultlib-specify-default-library.md) option, and then in default libraries named in .obj files. If a path is specified with the library name, LINK looks for the library in that directory. If no path is specified, LINK looks first in the directory that LINK is running from, and then in any directories specified in the LIB environment variable.
4949

50-
### To add .lib files as linker input in the development environment
50+
## To add .lib files as linker input in the development environment
5151

5252
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
5353

54-
2. Click the **Linker** folder.
54+
2. Choose the **Input** property page in the **Linker** folder.
5555

56-
3. Click the **Input** property page.
56+
3. Modify the **Additional Dependencies** property to add the .lib files.
5757

58-
4. Modify the **Additional Dependencies** property.
58+
## To programmatically add .lib files as linker input
5959

60-
### To programmatically add .lib files as linker input
61-
62-
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalDependencies>.
60+
- See [AdditionalDependencies](https://msdn.microsoft.com/library/microsoft.visualstudio.vcprojectengine.vclinkertool.additionaldependencies.aspx).
6361

6462
## Example
65-
The following sample shows how to build and use a .lib file:
63+
The following sample shows how to build and use a .lib file. First, build a .lib file:
6664

67-
```
65+
```cpp
6866
// lib_link_input_1.cpp
69-
// compile with: /LD
67+
// compile by using: cl /LD lib_link_input_1.cpp
7068
__declspec(dllexport) int Test() {
7169
return 213;
7270
}
7371
```
7472
75-
## Example
76-
And then:
73+
And then, compile this sample by using the .lib file you just created:
7774
78-
```
75+
```cpp
7976
// lib_link_input_2.cpp
80-
// compile with: /EHsc lib_link_input_1.lib
77+
// compile by using: cl /EHsc lib_link_input_1.lib lib_link_input_2.cpp
8178
__declspec(dllimport) int Test();
8279
#include <iostream>
8380
int main() {

docs/cpp/support-for-cpp11-14-17-features-modern-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ template <typename T> struct Identity {
200200
```
201201
202202
> [!NOTE]
203-
> For other breaking changes, see [Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-20151.md).
203+
> For other breaking changes, see [Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md).
204204
205205
[[In This Article](#top)]
206206
@@ -271,4 +271,4 @@ template <typename T> struct Identity {
271271
[C++ Standard Library](../standard-library/cpp-standard-library-reference.md)
272272
[Visual C++ Team Blog](http://blogs.msdn.com/b/vcblog/)
273273
[What's New for Visual C++](../what-s-new-for-visual-cpp-in-visual-studio.md)
274-
[Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-20151.md)
274+
[Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md)

docs/ide/add-member-function-wizard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ This wizard adds a member function declaration to the header file and a stub mem
8080

8181
|Option|Description|
8282
|------------|-----------------|
83-
|[Static](../misc/static-cpp.md)|Specifies that the function acts like a global and can be called outside of the class, even with no class instantiation. The member function has no access to non-static members. A member function specified as `Static` cannot be virtual.|
83+
|[Static](../cpp/storage-classes-cpp.md)|Specifies that the function acts like a global and can be called outside of the class, even with no class instantiation. The member function has no access to non-static members. A member function specified as `Static` cannot be virtual.|
8484
|[Virtual](../cpp/virtual-cpp.md)|Ensures that the correct member function is called for an object, regardless of the expression used to make the member function call. A member function specified as `Virtual` cannot be static.|
85-
|**Pure**|Indicates that no implementation is supplied for the virtual member function being declared; therefore, **Pure** can be specified only on virtual member functions. See [Class-Member Declaration Syntax](../misc/class-member-declaration-syntax.md) for more information.<br /><br /> A class that contains at least one pure virtual member function is considered an abstract class. Classes derived from the abstract class must implement the pure virtual member function or they, too, are abstract classes.|
85+
|**Pure**|Indicates that no implementation is supplied for the virtual member function being declared; therefore, **Pure** can be specified only on virtual member functions. A class that contains at least one pure virtual member function is considered an abstract class. Classes derived from the abstract class must implement the pure virtual member function or they, too, are abstract classes.|
8686
|[Inline](../cpp/inline-functions-cpp.md)|Instructs the compiler to insert a copy of the member function body into each place the member function is called. A member function specified as **Inline** cannot be pure.|
8787

8888
**.cpp file**

0 commit comments

Comments
 (0)