Skip to content

Commit 0d93552

Browse files
Taojunshen3836425+corob-msft@users.noreply.github.comopbld16TylerMSFTTylerMSFT
authored
2/17/2021 AM Publish (MicrosoftDocs#4114)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (MicrosoftDocs#4085) * [17.2p1] Add /scanDependencies option to docs (MicrosoftDocs#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (MicrosoftDocs#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (MicrosoftDocs#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (MicrosoftDocs#4086) * Content for 17.1 release * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review * Address cpp-docs 3694, 3696 * Update what-s-new-for-visual-cpp-in-visual-studio.md fix typo * add links (#4094) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Address cpp-docs 3694, 3696 (#4091) * Updates for cpp-docs 3700 3703 * Add op= to example * Add 3448,3482,3483,3540,3683 updates * Use existing media for CMake Targets View * US1907300 - add md code escapes to code elements - PR11 (MicrosoftDocs#4095) * US1907300 - add md code escapes to code elements - PR11 * updates after review * fix table syntax * trying to fix table rendering error * trying to fix table rendering error * trying to fix table rendering error * update after review * Additional clean-up for DD 1462641 * Set ms.topic: faq where YamlMime:FAQ (MicrosoftDocs#4099) * Release notes and conformance for 17.1 * typo fix * Use ConcRT instead of ConCRT ConcRT is a more correct abbreviation for Concurrency Runtime Library. ConcRT also appears in the comment in the beginning of concrt.h. * cpp-docs 3590 in progress * US1907300 - add md code escapes to code elements - PR12 (MicrosoftDocs#4103) * US1907300 - add md code escapes to code elements - PR12 * changes afteer review * changes afteer review * changes afteer review * changes afteer review * Bulk fix: \&MicrosoftDocs#124; entity removal 1/n * Bulk fix: pipe entity removal 2 of n * clarify operators * Bulk fix: Pipe entity 3 of n * Fix grammar * Bulk fix pipe entities 4 of n * Bulk fix * Undo change * Fix pipe entities 5 of n * Fix more pipe entity issues Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> Co-authored-by: ishchukin <78567572+ishchukin@users.noreply.github.com> Co-authored-by: p4yl0ad <57832389+p4yl0ad@users.noreply.github.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Craig Casey <17149610+craigcaseyMSFT@users.noreply.github.com> Co-authored-by: PRMerger9 <prmrgr9@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Dennis Rea <v-denrea@microsoft.com> Co-authored-by: jason <drvoss@gmail.com> Co-authored-by: Linda Spiller <93278958+LJSpiller@users.noreply.github.com> Co-authored-by: Alex Buck <abuck@microsoft.com> Co-authored-by: myd7349 <myd7349@gmail.com> Co-authored-by: Kristine Toliver <ktoliver@users.noreply.github.com> Co-authored-by: PRMerger15 <prmrgr15@microsoft.com> Co-authored-by: PRMerger16 <prmrgr16@microsoft.com> Co-authored-by: PRMerger Service account 2 <PRMerger-2@users.noreply.github.com> Co-authored-by: PRMerger12 <prmrgr12@microsoft.com>
1 parent 766d87a commit 0d93552

File tree

59 files changed

+1187
-1184
lines changed

Some content is hidden

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

59 files changed

+1187
-1184
lines changed

docs/assembler/masm/ml-and-ml64-command-line-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The options listed in the following table:
3434
| **`/Cx`** | Preserves case in public and extern symbols. |
3535
| **`/D`** *`symbol`*⟦=*`value`*| Defines a text macro with the given name *`symbol`*. If *`value`* is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. |
3636
| **`/EP`** | Generates a preprocessed source listing (sent to `STDOUT`). See **`/Sf`**. |
37-
| **`/ERRORREPORT`** [ **`NONE`** &#124; **`PROMPT`** &#124; **`QUEUE`** &#124; **`SEND`** ] | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
37+
| **`/ERRORREPORT`** [ **`NONE`** \| **`PROMPT`** \| **`QUEUE`** \| **`SEND`** ] | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
3838
| **`/F`** *`hexnum`* | Sets stack size to *`hexnum`* bytes (the same as **`/link /STACK:<number>`**). The value must be expressed in hexadecimal notation. There must be a space between **`/F`** and *`hexnum`*. |
3939
| **`/Fe`** *`filename`* | Names the executable file. |
4040
| **`/Fl`***`filename`*| Generates an assembled code listing. See **/Sf**. |

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

Lines changed: 78 additions & 79 deletions
Large diffs are not rendered by default.

docs/atl-mfc-shared/string-data-management.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,41 @@ description: "Learn more about: String Data Management"
33
title: "String Data Management"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["Unicode, string objects"]
6-
ms.assetid: 0b53a542-eeb1-4108-9ada-6700645b6f8f
76
---
87
# String Data Management
98

109
Visual C++ provides several ways to manage string data:
1110

12-
- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style null-terminated strings
11+
- [String Manipulation](../c-runtime-library/string-manipulation-crt.md) for working with C-style `NULL` terminated strings
1312

1413
- Win32 API functions for managing strings
1514

16-
- MFC's class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects
15+
- MFC's class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides flexible, resizable string objects
1716

18-
- Class [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString`
17+
- Class [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md), which provides an MFC-independent string object with the same functionality as `CString`
1918

2019
Nearly all programs work with string data. MFC's `CString` class is often the best solution for flexible string handling. Starting with version 7.0, `CString` can be used in MFC or MFC-independent programs. Both the run-time library and `CString` support strings containing multibyte (wide) characters, as in Unicode or MBCS programming.
2120

2221
This article describes the general-purpose services that the class library provides related to string manipulation. Topics covered in this article include:
2322

2423
- [Unicode and MBCS Provide portability](#_core_unicode_and_mbcs_provide_portability)
2524

26-
- [CStrings and const char Pointers](#_core_cstrings_and_const_char_pointers)
25+
- [`CStrings` and `const char` Pointers](#_core_cstrings_and_const_char_pointers)
2726

28-
- [CString Reference Counting](#_core_cstring_reference_counting)
27+
- [`CString` Reference Counting](#_core_cstring_reference_counting)
2928

30-
The [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It is intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` is not derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC).
29+
The [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) class provides support for manipulating strings. It's intended to replace and extend the functionality normally provided by the C run-time library string package. The `CString` class supplies member functions and operators for simplified string handling, similar to those found in Basic. The class also provides constructors and operators for constructing, assigning, and comparing `CString`s and standard C++ string data types. Because `CString` isn't derived from `CObject`, you can use `CString` objects independently of most of the Microsoft Foundation Class Library (MFC).
3130

3231
`CString` objects follow "value semantics." A `CString` object represents a unique value. Think of a `CString` as an actual string, not as a pointer to a string.
3332

3433
A `CString` object represents a sequence of a variable number of characters. `CString` objects can be thought of as arrays of characters.
3534

3635
## <a name="_core_unicode_and_mbcs_provide_portability"></a> Unicode and MBCS Provide Portability
3736

38-
With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type TCHAR, which is defined as **`wchar_t`** if you define the symbol _UNICODE when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol _MBCS defined. MFC itself is built with either the _MBCS symbol (for the NAFX libraries) or the _UNICODE symbol (for the UAFX libraries) defined.
37+
With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Unicode and multibyte character sets (MBCS). This support makes it easier for you to write portable applications that you can build for either Unicode or ANSI characters. To enable this portability, each character in a `CString` object is of type `TCHAR`, which is defined as **`wchar_t`** if you define the symbol `_UNICODE` when you build your application, or as **`char`** if not. A **`wchar_t`** character is 16 bits wide. MBCS is enabled if you build with the symbol `_MBCS` defined. MFC itself is built with either the `_MBCS` symbol (for the NAFX libraries) or the `_UNICODE` symbol (for the UAFX libraries) defined.
3938

4039
> [!NOTE]
41-
> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the _T macro, which translates the literal string to the form:
40+
> The `CString` examples in this and the accompanying articles on strings show literal strings properly formatted for Unicode portability, using the `_T` macro, which translates the literal string to the form:
4241
4342
`L"literal string"`
4443

@@ -48,34 +47,34 @@ With MFC version 3.0 and later, MFC, including `CString`, is enabled for both Un
4847
[!code-cpp[NVC_ATLMFC_Utilities#187](../atl-mfc-shared/codesnippet/cpp/string-data-management_1.cpp)]
4948

5049
> [!NOTE]
51-
> is translated as a Unicode string if _UNICODE is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md).
50+
> is translated as a Unicode string if `_UNICODE` is defined or as an ANSI string if not. For more information, see the article [Unicode and Multibyte Character Set (MBCS) Support](../atl-mfc-shared/unicode-and-multibyte-character-set-mbcs-support.md).
5251
53-
A `CString` object can store up to INT_MAX (2,147,483,647) characters. The TCHAR data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you do not have to worry about growing a `CString` object to fit longer strings).
52+
A `CString` object can store up to `INT_MAX` (2,147,483,647) characters. The `TCHAR` data type is used to get or set individual characters inside a `CString` object. Unlike character arrays, the `CString` class has a built-in memory allocation capability. This allows `CString` objects to automatically grow as needed (that is, you don't have to worry about growing a `CString` object to fit longer strings).
5453

55-
## <a name="_core_cstrings_and_const_char_pointers"></a> CStrings and const char Pointers
54+
## <a name="_core_cstrings_and_const_char_pointers"></a> `CStrings` and `const char` Pointers
5655

57-
A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as **const char**<strong>\*</strong> if not under Unicode). The [CSimpleStringT::operator PCXSTR](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The **CString( LPCWSTR** `pszSrc` **)** constructor allows character pointers to be substituted for `CString` objects.
56+
A `CString` object also can act like a literal C-style string (an `PCXSTR`, which is the same as `const char*` if not under Unicode). The [`CSimpleStringT::operator PCXSTR`](../atl-mfc-shared/reference/csimplestringt-class.md#operator_pcxstr) conversion operator allows `CString` objects to be freely substituted for character pointers in function calls. The `CString(LPCWSTR pszSrc)` constructor allows character pointers to be substituted for `CString` objects.
5857

59-
No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you should not depend on it.)
58+
No attempt is made to fold `CString` objects. If you make two `CString` objects containing `Chicago`, for example, the characters in `Chicago` are stored in two places. (This may not be true of future versions of MFC, so you shouldn't depend on it.)
6059

6160
> [!NOTE]
62-
> Use the [CSimpleStringT::GetBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [CSimpleStringT::ReleaseBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character.
61+
> Use the [`CSimpleStringT::GetBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#getbuffer) and [`CSimpleStringT::ReleaseBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#releasebuffer) member functions when you need to directly access a `CString` as a nonconstant pointer to a character.
6362
6463
> [!NOTE]
65-
> Use the [CStringT::AllocSysString](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [CStringT::SetSysString](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set BSTR objects used in Automation (formerly known as OLE Automation).
64+
> Use the [`CStringT::AllocSysString`](../atl-mfc-shared/reference/cstringt-class.md#allocsysstring) and [`CStringT::SetSysString`](../atl-mfc-shared/reference/cstringt-class.md#setsysstring) member functions to allocate and set `BSTR` objects used in Automation (formerly known as OLE Automation).
6665
6766
> [!NOTE]
6867
> Where possible, allocate `CString` objects on the frame rather than on the heap. This saves memory and simplifies parameter passing.
6968
70-
The `CString` class is not implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections.
69+
The `CString` class isn't implemented as a Microsoft Foundation Class Library collection class, though `CString` objects can certainly be stored as elements in collections.
7170

72-
## <a name="_core_cstring_reference_counting"></a> CString Reference Counting
71+
## <a name="_core_cstring_reference_counting"></a> `CString` Reference Counting
7372

74-
As of MFC version 4.0, when [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option.
73+
As of MFC version 4.0, when [`CStringT` Class](../atl-mfc-shared/reference/cstringt-class.md) objects are copied, MFC increments a reference count rather than copying the data. This makes passing parameters by value and returning `CString` objects by value more efficient. These operations cause the copy constructor to be called, sometimes more than once. Incrementing a reference count reduces that overhead for these common operations and makes using `CString` a more attractive option.
7574

76-
As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object is not destroyed until its reference count is reduced to zero.
75+
As each copy is destroyed, the reference count in the original object is decremented. The original `CString` object isn't destroyed until its reference count is reduced to zero.
7776

78-
You can use the `CString` member functions [CSimpleStringT::LockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [CSimpleStringT::UnlockBuffer](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting.
77+
You can use the `CString` member functions [`CSimpleStringT::LockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#lockbuffer) and [`CSimpleStringT::UnlockBuffer`](../atl-mfc-shared/reference/csimplestringt-class.md#unlockbuffer) to disable or enable reference counting.
7978

8079
## See also
8180

0 commit comments

Comments
 (0)