diff --git a/.acrolinx-config.edn b/.acrolinx-config.edn index f6076b5196..78cdd0e4df 100644 --- a/.acrolinx-config.edn +++ b/.acrolinx-config.edn @@ -21,7 +21,7 @@ " **More info about Acrolinx** -- [Install Acrolinx locally for VSCode](https://review.docs.microsoft.com/en-us/help/contribute/contribute-acrolinx-vscode) +- [Install Acrolinx locally for VS Code](https://review.docs.microsoft.com/en-us/help/contribute/contribute-acrolinx-vscode) - [Report false positives or issues](https://aka.ms/acrolinxbug) "} diff --git a/.github/ISSUE_TEMPLATE/new-c---2017-stl-library-documentation-topic-.md b/.github/ISSUE_TEMPLATE/new-c---2017-stl-library-documentation-topic-.md deleted file mode 100644 index d6a22e7b7e..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c---2017-stl-library-documentation-topic-.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: 'New C++ 2017 STL library documentation topic' -about: Create a C++ 2017 doc tracking work item -title: '' -labels: C++17, STL doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a feature area in the ISO C++17 standard library. Replace this text in curly braces with a description of the feature area to cover. Include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. Include a citation for the ISO standard feature area in your description.} - -ISO paper or location in the standard for this feature: {insert link or section here} -First implemented in: {VS 20YY major.minor} diff --git a/.github/ISSUE_TEMPLATE/new-c---2020-stl-library-documentation-topic-.md b/.github/ISSUE_TEMPLATE/new-c---2020-stl-library-documentation-topic-.md deleted file mode 100644 index 189349bd9a..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c---2020-stl-library-documentation-topic-.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: 'New C++ 2020 STL library documentation topic' -about: Create a C++ 2020 doc tracking work item -title: '' -labels: C++20, STL doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a feature area in the ISO C++20 standard library. Replace this text in curly braces with a description of the feature area to cover. Include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. Include a citation for the ISO standard feature area in your description.} - -ISO paper or location in the standard for this feature: {insert link or section here} -First implemented in: {VS 20YY major.minor} diff --git a/.github/ISSUE_TEMPLATE/new-c---2023-stl-library-documentation-topic.md b/.github/ISSUE_TEMPLATE/new-c---2023-stl-library-documentation-topic.md deleted file mode 100644 index 7231cf6266..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c---2023-stl-library-documentation-topic.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: 'New C++ 2023 STL library documentation topic' -about: Create an issue to track C++ 2023 STL doc work -title: '' -labels: C++23, STL doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a feature area proposed for the ISO C++23 standard library. Replace this text in curly braces with a description of the feature area to cover. Include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. Include a citation for the ISO standard feature area in your description.} - -ISO paper or location in the standard for this feature: {insert link or section here} -First implemented in: {VS 20YY major.minor} diff --git a/.github/ISSUE_TEMPLATE/new-c---stl-library-doc-topic-.md b/.github/ISSUE_TEMPLATE/new-c---stl-library-doc-topic-.md deleted file mode 100644 index 35de11091d..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c---stl-library-doc-topic-.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: 'New C++ STL library documentation topic' -about: Create a C++ doc tracking work item -title: '' -labels: STL doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a feature area in the ISO C++ standard library. Replace this text in curly braces with a description of the feature area to cover. Include a link to the tracking issue or PR in the [Microsoft/STL](https://github.com/microsoft/STL/pulls) repo that implements the feature area. If relevant, include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. If possible, include a citation for the ISO standard feature area in your description.} - -[Microsoft/STL](https://github.com/microsoft/STL/pulls) PR, ISO paper or location in the standard for this feature: {insert link or section here} -First implemented in: {VS 20YY major.minor} diff --git a/.github/ISSUE_TEMPLATE/new-c--20-compiler-doc-topic.md b/.github/ISSUE_TEMPLATE/new-c--20-compiler-doc-topic.md deleted file mode 100644 index b27ff51d56..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c--20-compiler-doc-topic.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: 'New C++20 compiler documentation topic' -about: Create a C++ doc tracking work item -title: '' -labels: C++20, Standard doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a compiler feature area in the ISO C++20 standard. Replace this text in curly braces with a description of the feature area to cover. Include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. If possible, include a citation for the ISO standard feature area in your description.} - -ISO paper or location in the standard for this feature: {insert link or section here} - -First implemented in: {VS 20YY major.minor} diff --git a/.github/ISSUE_TEMPLATE/new-c--23-compiler-doc-topic.md b/.github/ISSUE_TEMPLATE/new-c--23-compiler-doc-topic.md deleted file mode 100644 index 7f86f82da5..0000000000 --- a/.github/ISSUE_TEMPLATE/new-c--23-compiler-doc-topic.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: 'New C++23 compiler documentation topic' -about: Create a C++ doc tracking work item -title: '' -labels: C++23, Standard doc work -assignees: '' ---- -{Use this template to request **new** documentation to cover a compiler feature area in the ISO C++23 standard. Replace this text in curly braces with a description of the feature area to cover. Include a link to the proposal paper that introduced the issue (for example, `[N4086 Removing Trigraphs??!](https://wg21.link/n4086)`), or cite the chapter and section number or \[short.name] in the C++ standard that describes the feature. Add the Visual Studio version that first implements this feature. If you don't know or don't have these values, then this issue template probably isn't the right one to use. - -If documentation already exists on docs.microsoft.com for this feature area, and you're requesting an update, bug fix, or clarification, don't use this template. Go to the article on docs.microsoft.com and use the **This page** button in the **Feedback** section at the bottom of the document to create a GitHub issue. If possible, include a citation for the ISO standard feature area in your description.} - -ISO paper or location in the standard for this feature: {insert link or section here} - -First implemented in: {VS 20YY major.minor} diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..75dc5da1e0 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,118 @@ +When writing documentation, follow these guidelines: + +## General style tips + +* Get to the point fast. Be concise and clear. +* Talk like a person. +* Simpler is better. +* Be brief. Give customers just enough information to make decisions confidently. Prune excess words. +* Break up long sentences. +* Follow the style of the [Microsoft Writing Style Guide](https://learn.microsoft.com/style-guide/welcome/). If there's a conflict between the following guidelines and the Microsoft Writing Style Guide, ask how to resolve it. + +## Grammar + +* Use present tense verbs (is, open) instead of past tense (was, opened). For example, "The method returns a value" instead of "The method will return a value." +* Write factual statements and direct commands. Avoid hypotheticals. +* Use active voice where the subject performs the action. +* Write in second person (you) to speak directly to readers. +* Use gender-neutral language. +* Avoid multiple -ing words that could create ambiguity. +* Keep prepositional phrases simple and clear. +* Place modifiers close to what they modify. +* Use a conversational tone with contractions. +* Don't use "we" or "our" to refer to the authors of the documentation. +* Use the imperative mood for instructions. For example, "Call the method" instead of "You should call the method." +* Use "might" instead of "may" to indicate possibility. For example, "This method might throw an exception" instead of "This method may throw an exception." +* Use the Oxford comma in lists of three or more items. + +## Capitalization + +* Use sentence-style capitalization for everything except proper nouns. +* Always capitalize proper nouns. +* Don’t capitalize the spelled-out form of an acronym unless it's a proper noun. +* Use title-style capitalization for product and service names. +* Don't use all uppercase for emphasis. + +## Numbers + +* Spell out numbers for zero through nine, unless space is limited. Use numerals for 10 and above. +* Spell out numbers at the beginning of a sentence. +* Spell out ordinal numbers such as first, second, and third. Don't add -ly to form adverbs from ordinal numbers. +* Number ordered list items all as "1." instead of "1.", "2.", etc. Use bullets for unordered lists. + +## Punctuation + +* Use short, simple sentences. +* End all sentences with a period. +* Use one space after punctuation marks. +* After a colon, capitalize only proper nouns. +* Avoid semicolons - use separate sentences instead. +* Use question marks sparingly. +* Don't use slashes (/) - use "or" instead. + +## Text formatting + +* UI elements, like menu items, dialog names, and names of text boxes, should be in **bold** text. +* Use `code style` for: + * Code elements, like method names, property names, and language keywords. + * SQL commands. + * NuGet package names. + * Command-line commands. + * Database table and column names. + * Resource names (like virtual machine names) that shouldn't be localized. + * URLs that you don't want to be selectable. + * File names and folders, custom types, and other text that should never be localized. +* For code placeholders, if you want users to replace part of an input string with their own values, use angle brackets (less than < and greater than > characters) on that placeholder text. + +## Headings + +* Headings should be in sentence case, not title case. Don't use gerunds in titles. +* Don't apply an inline style like italic, or bold to headings. But do use inline code style for headings that are code elements, like method names or property names. + +## Alerts + +* Alerts are a Markdown extension to create block quotes that render with colors and icons that indicate the significance of the content. The following alert types are supported: + + * `[!NOTE]` Information the user should notice even if skimming. + * `[!TIP]` Optional information to help a user be more successful. + * `[!IMPORTANT]` Essential information required for user success. + * `[!CAUTION]` Negative potential consequences of an action. + * `[!WARNING]` Dangerous certain consequences of an action. + +## Adding links + +* Add links to related topics and resources where appropriate. +* Links to other documentation articles should be relative, not absolute. Start relative links with `/docs/` and include the `.md` suffix. If you add a link to another page on learn.microsoft.com that's not in this repo, remove https://learn.microsoft.com/en-us from the link. +* Links to bookmarks within the same article should be relative and start with `#`. +* Link descriptions should be descriptive and make sense on their own. Don't use "click here" or "this link" or "here". +* When you are going to refer to another file or an article on the web, use this format: "For more information, see [descriptive name of link](link path)." The exception to this is the See Also links at the end of an article. Those should be markdown links and contain the title of the article you link to as the descriptive portion of the link. + +## Adding new files + +* If you add a new Markdown file, it should be named in all lowercase with hyphens separating words. Also, omit any filler words such as "the" or "a" from the file name. +* If you're adding a new Markdown file, the following indicates where it should go the folder structure. If you aren't sure, ask. + If the new file is about Linux, put it in the docs/linux folder. + If the new file is about the C++ Standard Template Library (STL), put it in the docs/standard-library folder. + If the new file is about the C runtime, put it in the docs/c-runtime-library folder. + If the new file is about the C++ language, put it in the docs/cpp folder. + If the new file is about a C++ feature specific to the Visual Studio IDE, put it in the docs/ide folder. + If the new file is about the build process or modules, put it in the docs/build\reference folder. + If the new file is about Build Insights, put it in the docs/build-insights folder. + +## Images + +* Use images only when they add value. +* Images have a descriptive and meaningful alt text that starts with "Screenshot showing" and ends with ".". +* Videos have a descriptive and meaningful alt text or title that starts with "Video showing" and ends with ".". + +## Numbered steps + +* Write complete sentences with capitalization and periods +* Use imperative verbs +* Clearly indicate where actions take place (UI location) +* For single steps, use a bullet instead of a number +* When allowed, use angle brackets for menu sequences (File > Open) + +## Terminology + +* Use "Select" instead of "Click" for UI elements like buttons, menu items, links, dropdowns, and checkboxes. \ No newline at end of file diff --git a/.gitignore b/.gitignore index 50628e8f13..10b0192bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ _themes.MSDN.Modern/ _themes.VS.Modern/ # Ignore local configuration changes -.github/ +#.github/ .openpublishing.buildcore.ps1 .vscode/ diff --git a/.openpublishing.build.ps1 b/.openpublishing.build.ps1 deleted file mode 100644 index aadef76202..0000000000 --- a/.openpublishing.build.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -param( - [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", - [string]$parameters -) -# Main -$errorActionPreference = 'Stop' - -# Step-1: Download buildcore script to local -echo "download build core script to local with source url: $buildCorePowershellUrl" -$repositoryRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition -$buildCorePowershellDestination = "$repositoryRoot\.openpublishing.buildcore.ps1" -Invoke-WebRequest $buildCorePowershellUrl -OutFile "$buildCorePowershellDestination" - -# Step-2: Run build core -echo "run build core script with parameters: $parameters" -& "$buildCorePowershellDestination" "$parameters" -exit $LASTEXITCODE diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 5d83ccf79d..296bfe4f38 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -25,14 +25,11 @@ } ], "notification_subscribers": [], - "sync_notification_subscribers": null, + "sync_notification_subscribers": [], "branches_to_filter": [], "git_repository_url_open_to_public_contributors": "https://github.com/MicrosoftDocs/cpp-docs", "git_repository_branch_open_to_public_contributors": "main", - "skip_source_output_uploading": false, "need_preview_pull_request": true, - "enable_incremental_build": true, - "contribution_branch_mappings": null, "dependent_repositories": [ { "path_to_root": "_themes", @@ -57,15 +54,16 @@ "Pdf" ] }, - "need_generate_pdf_url_template": true, "targets": { "Pdf": { "template_folder": "_themes.pdf" } }, + "docs_build_engine": {}, + "skip_source_output_uploading": false, + "enable_incremental_build": true, + "contribution_branch_mappings": null, + "need_generate_pdf_url_template": true, "need_generate_pdf": false, - "need_generate_intellisense": false, - "docs_build_engine": { - "name": "docfx_v3" - } -} + "need_generate_intellisense": false +} \ No newline at end of file diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 5080a1951e..e6910b5922 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -13759,6 +13759,11 @@ "source_path": "docs/c-runtime-library/operator-new-crt.md", "redirect_url": "docs/c-runtime-library/new-operator-crt", "redirect_document_id": false + }, + { + "source_path": "docs/overview/whats-new-cpp-docs.md", + "redirect_url": "../../cpp/overview/what-s-new-for-visual-cpp-in-visual-studio", + "redirect_document_id": false } ] -} +} \ No newline at end of file diff --git a/.whatsnew.json b/.whatsnew.json index 697c37f99d..a5807f933e 100644 --- a/.whatsnew.json +++ b/.whatsnew.json @@ -1,5 +1,5 @@ { - "$schema": "https://whatsnewapi.azurewebsites.net/schema", + "$schema": "https://github.com/dotnet/docs-tools/blob/main/WhatsNew.Infrastructure/Configuration/reposettings.schema.json", "docSetProductName": "C++, C, and Assembler", "rootDirectory": "docs/", "docLinkSettings": { @@ -10,7 +10,8 @@ "minAdditionsToFile": 2, "pullRequestTitlesToIgnore": [ "^Confirm merge from FromPublicMasterBranch", - "^Repo sync for protected CLA branch" + "^Repo sync for protected CLA branch", + "^Repo sync for protected branch" ], "omitPullRequestTitles": false }, diff --git a/README.md b/README.md index e2a4e7c444..816a2293bf 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# Visual Studio documentation for Microsoft C++ +# Microsoft C++, C, and Assembler documentation -Welcome! This repository contains source files for the work-in-progress Microsoft C++ (MSVC or Visual C++) technical documentation. The articles are published on the [C++ in Visual Studio documentation site](https://learn.microsoft.com/cpp). +Welcome! This repository contains source files for the technical documentation published on [https://learn.microsoft.com/cpp](https://learn.microsoft.com/cpp). -The documentation for Visual Basic and Visual C# are located in a separate repository at [https://github.com/dotnet/core-docs](https://github.com/dotnet/core-docs), and the Visual Studio documentation is located in the repository located at [https://github.com/Microsoft/visualstudio-docs](https://github.com/Microsoft/visualstudio-docs). +The documentation for [.NET](https://github.com/dotnet/docs) and [Visual Studio](https://github.com/MicrosoftDocs/visualstudio-docs) are located in separate repositories. ## Contributing to the documentation We welcome your contributions to help us improve the MSVC docs. For a comprehensive guide to contributing, see the [Microsoft Docs contributor guide](https://learn.microsoft.com/contribute). For details on how to make a contribution to the MSVC documentation, see our [Contributing guidance](CONTRIBUTING.md). -Several feature areas of MSVC have their own folders in this repository, such as `standard-library` for articles on the C++ Standard Library, `ide` for C++-specific articles on the Visual Studio interactive development environment (IDE), and so forth. The `/media` subfolder in each folder contains art files for the articles. The [Contributing guide](CONTRIBUTING.md) has more information. +Several feature areas of MSVC have their own folders in this repository, such as `standard-library` for articles on the C++ Standard Library, `ide` for C++-specific articles on the Visual Studio integrated development environment (IDE), and so forth. The `/media` subfolder in each folder contains art files for the articles. The [Contributing guide](CONTRIBUTING.md) has more information. ## Microsoft Open Source Code of Conduct diff --git a/docs/assembler/arm/arm-assembler-command-line-reference.md b/docs/assembler/arm/arm-assembler-command-line-reference.md index daed637d1e..6c79ceaf15 100644 --- a/docs/assembler/arm/arm-assembler-command-line-reference.md +++ b/docs/assembler/arm/arm-assembler-command-line-reference.md @@ -2,7 +2,6 @@ title: "ARM Assembler command-line reference" description: "Reference guide to the Microsoft ARM assembler command-line options." ms.date: 05/09/2022 -ms.assetid: f7b89478-1ab5-4995-8cde-a805f0462c45 --- # ARM Assembler command-line reference @@ -98,7 +97,7 @@ A combination of zero or more of the following options: For more information, see the [ARM Compiler armasm Reference Guide](https://developer.arm.com/documentation/dui0802/latest/). - **`-sourcelink:`** *sourcelink_filename*\ - *sourcelink_filename* specifies a JSON-formatted configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger. For more information on the format of this file, see [Source Link JSON Schema](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md#source-link-json-schema). Source Link is a language- and source-control agnostic system for providing source debugging for binaries. Source Link is supported for native binaries starting in Visual Studio 2017 version 15.8. For an overview of Source Link, see [Source Link](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md). For information on how to use Source Link in your projects, and how to generate the SourceLink file as part of your project, see [Using Source Link](https://github.com/dotnet/sourcelink#using-source-link-in-c-projects). + *sourcelink_filename* specifies a JSON-formatted configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger. For more information on the format of this file, see [Source Link JSON Schema](https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/source-link.md#source-link-json-schema). Source Link is a language- and source-control agnostic system for providing source debugging for binaries. Source Link is supported for native binaries starting in Visual Studio 2017 version 15.8. For an overview of Source Link, see [Source Link](https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/source-link.md). For information on how to use Source Link in your projects, and how to generate the SourceLink file as part of your project, see [Using Source Link](https://github.com/dotnet/sourcelink#using-source-link-in-c-projects). - **`-via`** *filename*\ Read extra command-line arguments from *filename*. diff --git a/docs/assembler/inline/defining-asm-blocks-as-c-macros.md b/docs/assembler/inline/defining-asm-blocks-as-c-macros.md index 0a5d4df127..2e5305a93c 100644 --- a/docs/assembler/inline/defining-asm-blocks-as-c-macros.md +++ b/docs/assembler/inline/defining-asm-blocks-as-c-macros.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Defining __asm Blocks as C Macros" title: "Defining __asm Blocks as C Macros" -ms.date: "08/30/2018" +description: "Learn more about: Defining __asm Blocks as C Macros" +ms.date: 08/30/2018 helpviewer_keywords: ["macros, __asm blocks", "Visual C, macros", "__asm keyword [C++], as C macros"] -ms.assetid: 677ba11c-21c8-4609-bba7-cd47312243b0 --- # Defining __asm Blocks as C Macros @@ -15,7 +14,7 @@ C macros offer a convenient way to insert assembly code into your source code, b - Put the **`__asm`** keyword in front of each assembly instruction. -- Use old-style C comments ( `/* comment */`) instead of assembly-style comments ( `; comment`) or single-line C comments ( `// comment`). +- Use old-style C comments (`/* comment */`) instead of assembly-style comments (`; comment`) or single-line C comments (`// comment`). To illustrate, the following example defines a simple macro: @@ -39,7 +38,7 @@ The third and fourth **`__asm`** keywords are needed as statement separators. Th The braces are essential as well. If you omit them, the compiler can be confused by C or C++ statements on the same line to the right of the macro invocation. Without the closing brace, the compiler cannot tell where assembly code stops, and it sees C or C++ statements after the **`__asm`** block as assembly instructions. -Assembly-style comments that start with a semicolon (**;**) continue to the end of the line. This causes problems in macros because the compiler ignores everything after the comment, all the way to the end of the logical line. The same is true of single-line C or C++ comments ( `// comment`). To prevent errors, use old-style C comments ( `/* comment */`) in **`__asm`** blocks defined as macros. +Assembly-style comments that start with a semicolon (**;**) continue to the end of the line. This causes problems in macros because the compiler ignores everything after the comment, all the way to the end of the logical line. The same is true of single-line C or C++ comments (`// comment`). To prevent errors, use old-style C comments (`/* comment */`) in **`__asm`** blocks defined as macros. An **`__asm`** block written as a C macro can take arguments. Unlike an ordinary C macro, however, an **`__asm`** macro cannot return a value. So you cannot use such macros in C or C++ expressions. diff --git a/docs/assembler/masm/dot-code.md b/docs/assembler/masm/dot-code.md index c8167f89f3..9bf447e91b 100644 --- a/docs/assembler/masm/dot-code.md +++ b/docs/assembler/masm/dot-code.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: .CODE" title: ".CODE" +description: "Learn more about: .CODE" ms.date: "12/17/2019" f1_keywords: [".CODE"] helpviewer_keywords: [".CODE directive"] -ms.assetid: 2b8c882c-c0d2-4fa3-8335-e6b12717a4f4 --- # .CODE -(32-bit MASM only.) When used with [.MODEL](dot-model.md), indicates the start of a code segment. +Indicates the start of a code segment. + +When using 32-bit MASM, this should be used along with [.MODEL](dot-model.md). ## Syntax > **.CODE** ⟦*name*⟧\ > ⟦ *segmentItem* ⟧...\ -> ⟦ *codesegmentnameId* **ENDS**;;⟧\ +> ⟦ *codesegmentnameId* **ENDS**;;⟧ ### Parameters diff --git a/docs/assembler/masm/dot-data.md b/docs/assembler/masm/dot-data.md index cf080270da..c36eb3fee1 100644 --- a/docs/assembler/masm/dot-data.md +++ b/docs/assembler/masm/dot-data.md @@ -8,7 +8,9 @@ ms.assetid: 32797935-9c79-46e0-bf6f-07d0c2bf1dc1 --- # .DATA - (32-bit MASM only.) When used with [.MODEL](dot-model.md), starts a near data segment for initialized data (segment name _DATA). +Indicates the start of a data segment. + +When using 32-bit MASM, this starts a near data segment for initialized data (segment name _DATA) and should be used along with [.MODEL](dot-model.md). ## Syntax diff --git a/docs/assembler/masm/dot-nolistif.md b/docs/assembler/masm/dot-nolistif.md index bb4996f2ad..37703a53fb 100644 --- a/docs/assembler/masm/dot-nolistif.md +++ b/docs/assembler/masm/dot-nolistif.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: .NOLISTIF" title: ".NOLISTIF" +description: "Learn more about: .NOLISTIF" ms.date: "12/16/2019" f1_keywords: [".NOLISTIF"] helpviewer_keywords: [".NOLISTIF directive"] -ms.assetid: 9243af7a-7221-4531-bbc3-281b6b292bfd --- # .NOLISTIF @@ -20,5 +19,5 @@ This is the default. Same as [.SFCOND](dot-sfcond.md). ## See also -[Directives reference](directives-reference.md) +[Directives reference](directives-reference.md)\ [MASM BNF Grammar](masm-bnf-grammar.md) diff --git a/docs/assembler/masm/extern-masm.md b/docs/assembler/masm/extern-masm.md index dc0325534e..d261390d68 100644 --- a/docs/assembler/masm/extern-masm.md +++ b/docs/assembler/masm/extern-masm.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: EXTERN" +description: "Learn more about the MASM directive: EXTERN" title: "EXTERN (MASM)" -ms.date: "12/06/2019" +ms.date: 1/10/2025 helpviewer_keywords: ["EXTERN directive"] -ms.assetid: 667d703d-3aaf-4139-a586-29bc5dab1aff --- # EXTERN @@ -17,7 +16,9 @@ Defines one or more external variables, labels, or symbols called *name* whose t The *language-type* argument is valid in 32-bit MASM only. -The *type* can be [ABS](operator-abs.md), which imports *name* as a constant. Same as [EXTRN](extrn.md). +The *type* can be [`ABS`](operator-abs.md), which imports *name* as a constant. Same as [`EXTRN`](extrn.md). + +The *type* can also be [`PROC`](proc.md), in which case *name* is treated as an external procedure. ## See also diff --git a/docs/assembler/masm/masm-for-x64-ml64-exe.md b/docs/assembler/masm/masm-for-x64-ml64-exe.md index 95c7e53149..840b002083 100644 --- a/docs/assembler/masm/masm-for-x64-ml64-exe.md +++ b/docs/assembler/masm/masm-for-x64-ml64-exe.md @@ -3,11 +3,10 @@ description: "Learn more about: Microsoft Macro Assembler (MASM) for x64 (ml64.e title: "MASM for x64 (ml64.exe)" ms.date: 09/21/2021 helpviewer_keywords: ["ml64", "ml64.exe", "masm for x64"] -ms.assetid: 89059103-f372-4968-80ea-0c7f90bb9c91 --- # MASM for x64 (ml64.exe) -Visual Studio includes both 32-bit and 64-bit hosted versions of MASM (the Microsoft Macro Assembler) to target x64 code. Named ml64.exe, it's the assembler that accepts x64 assembler language. The MASM command-line tools are installed when you choose a C++ workload during Visual Studio installation. The MASM tools aren't available as a separate download. For instructions on how to download and install a copy of Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). If you only want the command-line tools, not the full IDE, download the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). +Visual Studio includes both 32-bit and 64-bit hosted versions of MASM (the Microsoft Macro Assembler) to target x64 code. Named ml64.exe, it's the assembler that accepts x64 assembly language. The MASM command-line tools are installed when you choose a C++ workload during Visual Studio installation. The MASM tools aren't available as a separate download. For instructions on how to download and install a copy of Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). If you only want the command-line tools, not the full IDE, download the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). To use ml64.exe on the command line, start a developer command prompt for x64 targets. A developer command prompt sets the required path and other environment variables. For information on how to start a developer command prompt, see [Build C/C++ code on the command line](../../build/building-on-the-command-line.md). diff --git a/docs/assembler/masm/microsoft-macro-assembler-reference.md b/docs/assembler/masm/microsoft-macro-assembler-reference.md index 5765386231..1cf7f09461 100644 --- a/docs/assembler/masm/microsoft-macro-assembler-reference.md +++ b/docs/assembler/masm/microsoft-macro-assembler-reference.md @@ -6,11 +6,11 @@ helpviewer_keywords: ["MASM (Microsoft Macro Assembler), reference", "MASM (Micr --- # Microsoft Macro Assembler reference -The Microsoft Macro Assembler (MASM) provides several advantages over inline assembly. MASM contains a macro language that has features such as looping, arithmetic, and text string processing. MASM gives you greater control over the hardware. By using MASM, you also can reduce time and memory overhead in your code. +The Microsoft Macro Assembler (MASM) provides several advantages over inline assembly. MASM contains a macro language that has features such as looping, arithmetic, and string processing. MASM gives you greater control over the hardware. By using MASM, you also can reduce time and memory overhead in your code. ## In This Section -[ML and ML64 command-line option](ml-and-ml64-command-line-reference.md)\ +[ML and ML64 command-line options](ml-and-ml64-command-line-reference.md)\ Describes the ML and ML64 command-line options. [MASM for x64 (ml64.exe)](masm-for-x64-ml64-exe.md)\ @@ -34,8 +34,7 @@ Describes fatal and nonfatal error messages and warnings. [Processor Manufacturer Programming Manuals](processor-manufacturer-programming-manuals.md)\ Provides links to programming information about processors not manufactured, sold, or supported by Microsoft. -[MASM BNF Grammar](masm-bnf-grammar.md) - +[MASM BNF Grammar](masm-bnf-grammar.md)\ Formal BNF description of MASM for x64. ## Related Sections diff --git a/docs/assembler/masm/ml-and-ml64-command-line-reference.md b/docs/assembler/masm/ml-and-ml64-command-line-reference.md index b68003e48e..e4ea469e36 100644 --- a/docs/assembler/masm/ml-and-ml64-command-line-reference.md +++ b/docs/assembler/masm/ml-and-ml64-command-line-reference.md @@ -3,7 +3,7 @@ title: "ML and ML64 command-line reference" description: "Reference guide to the Microsoft MASM ML and ML64 assembler command-line options." ms.date: 7/3/2023 f1_keywords: ["ML"] -helpviewer_keywords: ["/W* MASM compiler option", "/c MASM compiler option", "/EP MASM compiler option", "/Fe MASM compiler option", "/Zp MASM compiler option", "/AT MASM compiler option", "/Zm MASM compiler option", "/Sf MASM compiler option", "/Sp MASM compiler option", "/w MASM compiler option", "/Fl MASM compiler option", "/coff MASM compiler option", "/St MASM compiler option", "/Cx MASM compiler option", "/Sl MASM compiler option", "/Cu MASM compiler option", "MASM (Microsoft Macro Assembler), ML command-line reference", "/FPi MASM compiler option", "/Zf MASM compiler option", "ML environment variable", "/Fr MASM compiler option", "/help MASM compiler option", "/Sa MASM compiler option", "/Zd MASM compiler option", "/I MASM compiler option", "/? MASM compiler option", "/Bl MASM compiler option", "/Fm MASM compiler option", "/Fo MASM compiler option", "command-line reference [ML]", "/Sn MASM compiler option", "/Gd MASM compiler option", "/D* MASM compiler option", "environment variables, ML", "/Gc MASM compiler option", "/F* MASM compiler option", "/Sc MASM compiler option", "/H MASM compiler option", "/Zs MASM compiler option", "/omf MASM compiler option", "/Sg MASM compiler option", "/Cp MASM compiler option", "/Zi MASM compiler option", "/nologo MASM compiler option", "/Sx MASM compiler option", "/WX MASM compiler option", "/Ss MASM compiler option", "command line, reference [ML]", "/Ta MASM compiler option"] +helpviewer_keywords: ["/W* MASM compiler option", "/c MASM compiler option", "/EP MASM compiler option", "/Fe MASM compiler option", "/Zp MASM compiler option", "/AT MASM compiler option", "/Zm MASM compiler option", "/Sf MASM compiler option", "/Sp MASM compiler option", "/w MASM compiler option", "/Fl MASM compiler option", "/coff MASM compiler option", "/St MASM compiler option", "/Cx MASM compiler option", "/Sl MASM compiler option", "/Cu MASM compiler option", "MASM (Microsoft Macro Assembler), ML command-line reference", "/FPi MASM compiler option", "/Zf MASM compiler option", "ML environment variable", "/Fr MASM compiler option", "/help MASM compiler option", "/Sa MASM compiler option", "/Zd MASM compiler option", "/I MASM compiler option", "/? MASM compiler option", "/Bl MASM compiler option", "/Fm MASM compiler option", "/Fo MASM compiler option", "command-line reference [ML]", "/Sn MASM compiler option", "/Gd MASM compiler option", "/D* MASM compiler option", "environment variables, ML", "/Gc MASM compiler option", "/F* MASM compiler option", "/Sc MASM compiler option", "/H MASM compiler option", "/Zs MASM compiler option", "/omf MASM compiler option", "/quiet MASM compiler option", "/Sg MASM compiler option", "/Cp MASM compiler option", "/Zi MASM compiler option", "/nologo MASM compiler option", "/Sx MASM compiler option", "/WX MASM compiler option", "/Ss MASM compiler option", "command line, reference [ML]", "/Ta MASM compiler option"] --- # ML and ML64 command-line reference @@ -50,6 +50,7 @@ The options listed in the following table: | **`/I`** *`pathname`* | Sets path for include file. A maximum of 10 **`/I`** options is allowed. | | **`/nologo`** | Suppresses messages for successful assembly. | | **`/omf`** | Generates object module file format (OMF) type of object module. **`/omf`** implies **`/c`**. ML.exe doesn't support linking OMF objects.
Not available in ml64.exe. | +| **`/quiet`** | Suppresses 'Assembling' message. Available in Visual Studio 17.6 and later. | | **`/Sa`** | Turns on listing of all available information. | | **`/safeseh`** | Marks the object file: either it contains no exception handlers, or it contains exception handlers that are all declared with [`.SAFESEH`](dot-safeseh.md).
Not available in ml64.exe. | | **`/Sf`** | Adds the first-pass listing to the listing file. | diff --git a/docs/assembler/masm/option-avxencoding-masm.md b/docs/assembler/masm/option-avxencoding-masm.md index c019dc5f8c..806b205a3b 100644 --- a/docs/assembler/masm/option-avxencoding-masm.md +++ b/docs/assembler/masm/option-avxencoding-masm.md @@ -1,9 +1,9 @@ --- title: "OPTION AVXENCODING" +description: Describes how to select the preferred encoding of AVX instructions when more than one possibility will work ms.date: "10/06/2020" f1_keywords: ["avxencoding"] helpviewer_keywords: ["OPTION AVXENCODING directive"] -description: Describes how to select the preferred encoding of AVX instructions when more than one possibility will work --- # OPTION AVXENCODING @@ -47,7 +47,7 @@ The **`OPTION AVXENCODING`** directive is available in Visual Studio 2019 versio ### Example -This example uses `VPDPBUSD` and `VPMADDWD` instructions to illustrate how the **`AVXENCODING`** option works. `VPDPBUSD` was first defined to be encoded only with `EVEX`, and was later extended with a VEX-encoded form for platforms without AVX-512 support, while `VPMADDWD` was AVX and extended to AVX-512. The listing output from assembling the example shows how changing the **`AVXENCODING`** mode affects the object code generated for each instruction. The prefix for each instruction ends at the '/". +This example uses `VPDPBUSD` and `VPMADDWD` instructions to illustrate how the **`AVXENCODING`** option works. `VPDPBUSD` was first defined to be encoded only with `EVEX`, and was later extended with a VEX-encoded form for platforms without AVX-512 support, while `VPMADDWD` was AVX and extended to AVX-512. The listing output from assembling the example shows how changing the **`AVXENCODING`** mode affects the object code generated for each instruction. The prefix for each instruction ends at the "/". ```asm 00000000 62 F2 6D 08/ 50 vpdpbusd xmm1, xmm2, xmm3 diff --git a/docs/assembler/masm/processor-manufacturer-programming-manuals.md b/docs/assembler/masm/processor-manufacturer-programming-manuals.md index 1414153abd..4774fdeeb7 100644 --- a/docs/assembler/masm/processor-manufacturer-programming-manuals.md +++ b/docs/assembler/masm/processor-manufacturer-programming-manuals.md @@ -1,22 +1,18 @@ --- description: "Learn more about: Processor manufacturer programming manuals" title: "Processor manufacturer programming manuals" -ms.date: "05/28/2020" -ms.assetid: 61844163-de2f-419a-808e-04de39dfdddf +ms.date: "12/6/2024" --- # Processor manufacturer programming manuals -This article provides links to websites that may contain programming info about processors that aren't made, sold, or supported by Microsoft. Microsoft doesn't control the websites or their content. +This article provides links to websites that may contain programming info about processors that Microsoft doesn't make, sell, or support. Microsoft doesn't control the websites or their content. ## Processor manufacturer websites -- [AMD Developer Guides, Manuals & ISA Documents](https://developer.amd.com/resources/developer-guides-manuals/) - +- [AMD Documentation Hub](https://www.amd.com/en/search/documentation/hub.html) - [ARM Architecture Reference Manual](https://developer.arm.com/documentation/ddi0487/latest/) - -- [Intel 64 and IA-32 Architectures Software Developer Manuals](https://software.intel.com/articles/intel-sdm) - -- [Introduction to Intel Advanced Vector Extensions](https://software.intel.com/articles/introduction-to-intel-advanced-vector-extensions) +- [Intel 64 and IA-32 Architectures Software Developer Manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html) +- [Introducing Intel® Advanced Performance Extensions (Intel APX)](https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html) ## Remarks diff --git a/docs/assembler/masm/purge.md b/docs/assembler/masm/purge.md index 2e19584edd..9051b7fae9 100644 --- a/docs/assembler/masm/purge.md +++ b/docs/assembler/masm/purge.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: PURGE" title: "PURGE" +description: "Learn more about: PURGE" ms.date: "12/16/2019" f1_keywords: ["PURGE"] helpviewer_keywords: ["PURGE directive"] -ms.assetid: 1e7ec2bf-f123-4ff9-97de-28b512ade2f9 --- # PURGE @@ -16,5 +15,5 @@ Deletes the specified macros from memory. ## See also -[Directives reference](directives-reference.md) +[Directives reference](directives-reference.md)\ [MASM BNF Grammar](masm-bnf-grammar.md) diff --git a/docs/assembler/masm/subttl.md b/docs/assembler/masm/subttl.md index b59e41f224..a119b8eb14 100644 --- a/docs/assembler/masm/subttl.md +++ b/docs/assembler/masm/subttl.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: SUBTTL" title: "SUBTTL" +description: "Learn more about: SUBTTL" ms.date: "12/16/2019" f1_keywords: ["SUBTTL"] helpviewer_keywords: ["SUBTTL directive"] -ms.assetid: 927efadd-ec99-4de9-b64d-229bb2df3bf4 --- # SUBTTL @@ -16,5 +15,5 @@ See [SUBTITLE](subtitle.md). ## See also -[Directives reference](directives-reference.md) +[Directives reference](directives-reference.md)\ [MASM BNF Grammar](masm-bnf-grammar.md) diff --git a/docs/atl-mfc-shared/basic-cstring-operations.md b/docs/atl-mfc-shared/basic-cstring-operations.md index 41926fe05b..047bd978b2 100644 --- a/docs/atl-mfc-shared/basic-cstring-operations.md +++ b/docs/atl-mfc-shared/basic-cstring-operations.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Basic CString Operations" title: "Basic CString Operations" -ms.date: "11/04/2016" +description: "Learn more about: Basic CString Operations" +ms.date: 11/04/2016 helpviewer_keywords: ["CString objects, basic operations", "string literals, CString operations", "literal strings, CString operations", "CString objects", "string comparison, CString operations", "characters, accessing in CStrings"] -ms.assetid: 41db66b2-9427-4bb3-845a-9b6869159a6c --- # Basic CString Operations @@ -19,7 +18,7 @@ This topic explains the following basic [CString](../atl-mfc-shared/reference/cs - [Converting CString objects](#_core_converting_cstring_objects) -`Class CString` is based on class template [CStringT Class](../atl-mfc-shared/reference/cstringt-class.md). `CString` is a **`typedef`** of `CStringT`. More exactly, `CString` is a **`typedef`** of an *explicit specialization* of `CStringT`, which is a common way to use a class template to define a class. Similarly defined classes are `CStringA` and `CStringW`. +`Class CString` is based on class template [`CStringT`](../atl-mfc-shared/reference/cstringt-class.md). `CString` is a **`typedef`** of `CStringT`. More exactly, `CString` is a **`typedef`** of an *explicit specialization* of `CStringT`, which is a common way to use a class template to define a class. Similarly defined classes are `CStringA` and `CStringW`. `CString`, `CStringA`, and `CStringW` are defined in atlstr.h. `CStringT` is defined in cstringt.h. diff --git a/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_37.cpp b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_37.cpp index e9d808179a..2dd71b8650 100644 --- a/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_37.cpp +++ b/docs/atl-mfc-shared/codesnippet/CPP/cstringt-class_37.cpp @@ -3,6 +3,6 @@ // or an apostrophe('). // typedef CStringT>> CAtlString; - CAtlString src(_T("World Cup '98")); + CAtlString src(_T("abcdef")); _tprintf_s(_T("%s"),src.SpanExcluding(_T(";,.-'"))); \ No newline at end of file diff --git a/docs/atl-mfc-shared/reference/codesnippet/CPP/cfiledialog-class_3.cpp b/docs/atl-mfc-shared/reference/codesnippet/CPP/cfiledialog-class_3.cpp index 69b8fc155d..9c7f028ed7 100644 --- a/docs/atl-mfc-shared/reference/codesnippet/CPP/cfiledialog-class_3.cpp +++ b/docs/atl-mfc-shared/reference/codesnippet/CPP/cfiledialog-class_3.cpp @@ -1,7 +1,7 @@ void CMyClass::OnFileOpen() { // szFilters is a text string that includes two file name filters: - // "*.my" for "MyType Files" and "*.*' for "All Files." + // "*.my" for "MyType Files" and "*.*" for "All Files." TCHAR szFilters[]= _T("MyType Files (*.my)|*.my|All Files (*.*)|*.*||"); // Create an Open dialog; the default file name extension is ".my". diff --git a/docs/atl-mfc-shared/reference/coledatetime-class.md b/docs/atl-mfc-shared/reference/coledatetime-class.md index b92a1c4353..5da193d9b9 100644 --- a/docs/atl-mfc-shared/reference/coledatetime-class.md +++ b/docs/atl-mfc-shared/reference/coledatetime-class.md @@ -1,10 +1,9 @@ --- title: "COleDateTime Class" description: "API reference for the MFC COleDateTime class which Encapsulates the `DATE` data type used in OLE automation." -ms.date: "08/27/2020" +ms.date: 08/27/2020 f1_keywords: ["COleDateTime", "ATLCOMTIME/ATL::COleDateTime", "ATLCOMTIME/ATL::COleDateTime::COleDateTime", "ATLCOMTIME/ATL::COleDateTime::Format", "ATLCOMTIME/ATL::COleDateTime::GetAsDBTIMESTAMP", "ATLCOMTIME/ATL::COleDateTime::GetAsSystemTime", "ATLCOMTIME/ATL::COleDateTime::GetAsUDATE", "ATLCOMTIME/ATL::COleDateTime::GetCurrentTime", "ATLCOMTIME/ATL::COleDateTime::GetDay", "ATLCOMTIME/ATL::COleDateTime::GetDayOfWeek", "ATLCOMTIME/ATL::COleDateTime::GetDayOfYear", "ATLCOMTIME/ATL::COleDateTime::GetHour", "ATLCOMTIME/ATL::COleDateTime::GetMinute", "ATLCOMTIME/ATL::COleDateTime::GetMonth", "ATLCOMTIME/ATL::COleDateTime::GetSecond", "ATLCOMTIME/ATL::COleDateTime::GetStatus", "ATLCOMTIME/ATL::COleDateTime::GetYear", "ATLCOMTIME/ATL::COleDateTime::ParseDateTime", "ATLCOMTIME/ATL::COleDateTime::SetDate", "ATLCOMTIME/ATL::COleDateTime::SetDateTime", "ATLCOMTIME/ATL::COleDateTime::SetStatus", "ATLCOMTIME/ATL::COleDateTime::SetTime", "ATLCOMTIME/ATL::COleDateTime::m_dt", "ATLCOMTIME/ATL::COleDateTime::m_status"] helpviewer_keywords: ["shared classes, COleDateTime", "time-only values", "Date data type, MFC encapsulation of", "COleDateTime class", "dates, handling in MFC", "time, handling in MFC"] -ms.assetid: e718f294-16ec-4649-88b6-a4dbae5178fb --- # COleDateTime Class @@ -211,7 +210,7 @@ Following is a brief description of each constructor: - `COleDateTime(` `dateSrc` **)** Constructs a `COleDateTime` object from an existing `COleDateTime` object. -- `COleDateTime(` *varSrc* **)** Constructs a `COleDateTime` object. Attempts to convert a `VARIANT` structure or [COleVariant](../../mfc/reference/colevariant-class.md) object to a date/time ( `VT_DATE`) value. If this conversion is successful, the converted value is copied into the new `COleDateTime` object. If it is not, the value of the `COleDateTime` object is set to 0 (midnight, 30 December 1899) and its status to invalid. +- `COleDateTime(` *varSrc* **)** Constructs a `COleDateTime` object. Attempts to convert a `VARIANT` structure or [COleVariant](../../mfc/reference/colevariant-class.md) object to a date/time (`VT_DATE`) value. If this conversion is successful, the converted value is copied into the new `COleDateTime` object. If it is not, the value of the `COleDateTime` object is set to 0 (midnight, 30 December 1899) and its status to invalid. - `COleDateTime(` `dtSrc` **)** Constructs a `COleDateTime` object from a `DATE` value. @@ -263,7 +262,7 @@ Indicates one of the following locale flags: Indicates locale ID to use for the conversion. For more information about language identifiers, see [Language Identifiers](/windows/win32/Intl/language-identifiers). *lpszFormat*
-A formatting string similar to the `printf` formatting string. Each formatting code, preceded by a percent ( `%`) sign, is replaced by the corresponding `COleDateTime` component. Other characters in the formatting string are copied unchanged to the returned string. For more information, see the run-time function [strftime](../../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md). The value and meaning of the formatting codes for `Format` are: +A formatting string similar to the `printf` formatting string. Each formatting code, preceded by a percent (`%`) sign, is replaced by the corresponding `COleDateTime` component. Other characters in the formatting string are copied unchanged to the returned string. For more information, see the run-time function [strftime](../../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md). The value and meaning of the formatting codes for `Format` are: - `%H` Hours in the current day diff --git a/docs/atl-mfc-shared/reference/csimplestringt-class.md b/docs/atl-mfc-shared/reference/csimplestringt-class.md index 6681333410..b62a850efa 100644 --- a/docs/atl-mfc-shared/reference/csimplestringt-class.md +++ b/docs/atl-mfc-shared/reference/csimplestringt-class.md @@ -716,28 +716,6 @@ CSimpleString s(_T("abc"), pMgr); ASSERT(s[1] == _T('b')); ``` -## `CSimpleStringT::operator []` - -Call this function to access a single character of the character array. - -### Syntax - -```cpp -XCHAR operator[](int iChar) const; -``` - -### Parameters - -*`iChar`*
-Zero-based index of a character in the string. - -### Remarks - -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`](#getat) member function. - -> [!NOTE] -> 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`. - ## `CSimpleStringT::operator +=` Joins a new string or character to the end of an existing string. diff --git a/docs/atl-mfc-shared/reference/csize-class.md b/docs/atl-mfc-shared/reference/csize-class.md index c6fc7033fd..f398b5055d 100644 --- a/docs/atl-mfc-shared/reference/csize-class.md +++ b/docs/atl-mfc-shared/reference/csize-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CSize Class" title: "CSize Class" -ms.date: "10/18/2018" +description: "Learn more about: CSize Class" +ms.date: 10/18/2018 f1_keywords: ["CSize", "ATLTYPES/ATL::CSize", "ATLTYPES/ATL::CSize::CSize"] helpviewer_keywords: ["SIZE", "dimensions, MFC", "dimensions", "CSize class"] -ms.assetid: fb2cf85a-0bc1-46f8-892b-309c108b52ae --- # CSize Class @@ -101,7 +100,7 @@ BOOL operator==(SIZE size) const throw(); ### Remarks -Returns nonzero if the sizes are equal, otherwize 0. +Returns nonzero if the sizes are equal, otherwise 0. ### Example diff --git a/docs/atl-mfc-shared/reference/cstringt-class.md b/docs/atl-mfc-shared/reference/cstringt-class.md index ffff1211a4..a47c9ad9a6 100644 --- a/docs/atl-mfc-shared/reference/cstringt-class.md +++ b/docs/atl-mfc-shared/reference/cstringt-class.md @@ -486,11 +486,11 @@ A handle for a **`CStringT`** object. Because the constructors copy the input data into new allocated storage, memory exceptions may result. Some of these constructors act as conversion functions. This allows you to substitute, for example, an **`LPTSTR`** where a **`CStringT`** object is expected. -- **`CStringT`**( `LPCSTR` `lpsz` ): Constructs a Unicode **`CStringT`** from an ANSI string. You can also use this constructor to load a string resource as shown in the example below. +- **`CStringT`**(`LPCSTR` `lpsz`): Constructs a Unicode **`CStringT`** from an ANSI string. You can also use this constructor to load a string resource as shown in the example below. -- `CStringT(` `LPCWSTR` `lpsz` ): Constructs a **`CStringT`** from a Unicode string. +- **`CStringT`**(`LPCWSTR` `lpsz`): Constructs a **`CStringT`** from a Unicode string. -- **`CStringT`**( `const unsigned char*` `psz` ): Allows you to construct a **`CStringT`** from a pointer to **`unsigned char`**. +- **`CStringT`**(`const unsigned char*` `psz`): Allows you to construct a **`CStringT`** from a pointer to **`unsigned char`**. > [!NOTE] > Define the `_CSTRING_DISABLE_NARROW_WIDE_CONVERSION` macro to turn off implicit string conversion between ANSI and Unicode strings. The macro excludes from compilation constructors that support conversion. @@ -998,11 +998,11 @@ Concatenates two strings or a character and a string. ```cpp friend CStringT operator+(const CStringT& str1, const CStringT& str2); friend CStringT operator+(const CStringT& str1, PCXSTR psz2); -friend CStringT operator+(PCXSTR psz1, const CStringT& str2,); -friend CStringT operator+(char ch1, const CStringT& str2,); +friend CStringT operator+(PCXSTR psz1, const CStringT& str2); +friend CStringT operator+(char ch1, const CStringT& str2); friend CStringT operator+(const CStringT& str1, char ch2); friend CStringT operator+(const CStringT& str1, wchar_t ch2); -friend CStringT operator+(wchar_t ch1, const CStringT& str2,); +friend CStringT operator+(wchar_t ch1, const CStringT& str2); ``` ### Parameters @@ -1102,8 +1102,8 @@ friend bool operator==(const CStringT& str1, PCXSTR psz2) throw(); friend bool operator==(const CStringT& str1, PCYSTR psz2) throw(); friend bool operator==(const CStringT& str1, XCHAR ch2) throw(); friend bool operator==(PCXSTR psz1, const CStringT& str2) throw(); -friend bool operator==(PCYSTR psz1, const CStringT& str2,) throw(); -friend bool operator==(XCHAR ch1, const CStringT& str2,) throw(); +friend bool operator==(PCYSTR psz1, const CStringT& str2) throw(); +friend bool operator==(XCHAR ch1, const CStringT& str2) throw(); ``` ### Parameters @@ -1144,8 +1144,8 @@ friend bool operator!=(const CStringT& str1, PCXSTR psz2) throw(); friend bool operator!=(const CStringT& str1, PCYSTR psz2) throw(); friend bool operator!=(const CStringT& str1, XCHAR ch2) throw(); friend bool operator!=(PCXSTR psz1, const CStringT& str2) throw(); -friend bool operator!=(PCYSTR psz1, const CStringT& str2,) throw(); -friend bool operator!=(XCHAR ch1, const CStringT& str2,) throw(); +friend bool operator!=(PCYSTR psz1, const CStringT& str2) throw(); +friend bool operator!=(XCHAR ch1, const CStringT& str2) throw(); ``` ### Parameters diff --git a/docs/atl/atl-utilities-reference.md b/docs/atl/atl-utilities-reference.md index 1fe2da4303..b332716189 100644 --- a/docs/atl/atl-utilities-reference.md +++ b/docs/atl/atl-utilities-reference.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: ATL utilities reference" title: "ATL utilities reference" +description: "Learn more about: ATL utilities reference" ms.date: "11/04/2016" -ms.assetid: dd8a2888-34f4-461e-9bf4-834218f9b95b --- # ATL utilities reference @@ -47,8 +46,7 @@ ATL provides code for manipulating paths and URLs in the form of [CPathT](../atl | [AtlIsUnsafeUrlChar](../atl/reference/atl-http-utility-functions.md#atlisunsafeurlchar) | Call this function to find out whether a character is safe for use in a URL. | | [AtlUnescapeUrl](../atl/reference/atl-http-utility-functions.md#atlunescapeurl) | Call this function to convert escaped characters back to their original values. | | [SystemTimeToHttpDate](../atl/reference/atl-http-utility-functions.md#systemtimetohttpdate) | Call this function to convert a system time to a string in a format suitable for using in HTTP headers. | -| [ATLPath::AddBackslash](../atl/reference/atl-path-functions.md#addbackslash) | This function is an overloaded wrapper for [PathAddBackslash](/windows/desktop/api/shlwapi/nf-shlwapi-pathaddbackslasha | -| ). | +| [ATLPath::AddBackslash](../atl/reference/atl-path-functions.md#addbackslash) | This function is an overloaded wrapper for [PathAddBackslash](/windows/win32/api/shlwapi/nf-shlwapi-pathaddbackslasha). | | [ATLPath::AddExtension](../atl/reference/atl-path-functions.md#addextension) | This function is an overloaded wrapper for [PathAddExtension](/windows/win32/api/shlwapi/nf-shlwapi-pathaddextensionw). | | [ATLPath::Append](../atl/reference/atl-path-functions.md#append) | This function is an overloaded wrapper for [PathAppend](/windows/win32/api/shlwapi/nf-shlwapi-pathappendw). | | [ATLPath::BuildRoot](../atl/reference/atl-path-functions.md#buildroot) | This function is an overloaded wrapper for [PathBuildRoot](/windows/win32/api/shlwapi/nf-shlwapi-pathbuildrootw). | @@ -87,5 +85,5 @@ ATL provides code for manipulating paths and URLs in the form of [CPathT](../atl ## See also -[Concepts](../atl/active-template-library-atl-concepts.md)
+[Concepts](../atl/active-template-library-atl-concepts.md)\ [ATL COM desktop components](../atl/atl-com-desktop-components.md) diff --git a/docs/atl/reference/catltemporaryfile-class.md b/docs/atl/reference/catltemporaryfile-class.md index ac4ae6210e..9878d4a0d9 100644 --- a/docs/atl/reference/catltemporaryfile-class.md +++ b/docs/atl/reference/catltemporaryfile-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CAtlTemporaryFile Class" title: "CAtlTemporaryFile Class" -ms.date: "11/04/2016" +description: "Learn more about: CAtlTemporaryFile Class" +ms.date: 11/04/2016 f1_keywords: ["CAtlTemporaryFile", "ATLFILE/ATL::CAtlTemporaryFile", "ATLFILE/ATL::CAtlTemporaryFile::CAtlTemporaryFile", "ATLFILE/ATL::CAtlTemporaryFile::Close", "ATLFILE/ATL::CAtlTemporaryFile::Create", "ATLFILE/ATL::CAtlTemporaryFile::Flush", "ATLFILE/ATL::CAtlTemporaryFile::GetPosition", "ATLFILE/ATL::CAtlTemporaryFile::GetSize", "ATLFILE/ATL::CAtlTemporaryFile::HandsOff", "ATLFILE/ATL::CAtlTemporaryFile::HandsOn", "ATLFILE/ATL::CAtlTemporaryFile::LockRange", "ATLFILE/ATL::CAtlTemporaryFile::Read", "ATLFILE/ATL::CAtlTemporaryFile::Seek", "ATLFILE/ATL::CAtlTemporaryFile::SetSize", "ATLFILE/ATL::CAtlTemporaryFile::TempFileName", "ATLFILE/ATL::CAtlTemporaryFile::UnlockRange", "ATLFILE/ATL::CAtlTemporaryFile::Write"] helpviewer_keywords: ["CAtlTemporaryFile class"] -ms.assetid: 05f0f2a5-94f6-4594-8dae-b114292ff5f9 --- # CAtlTemporaryFile Class @@ -357,7 +356,7 @@ Returns the LPCTSTR pointing to the file name. ### Remarks -The file name is generated in [CAtlTemporaryFile::CAtlTemporaryFile](#catltemporaryfile) with a call to the [GetTempFile](/windows/win32/api/fileapi/nf-fileapi-gettempfilenamew)Windows SDK function. The file extension will always be "TFR" for the temporary file. +The file name is generated in [CAtlTemporaryFile::CAtlTemporaryFile](#catltemporaryfile) with a call to the [GetTempFile](/windows/win32/api/fileapi/nf-fileapi-gettempfilenamew) Windows SDK function. The file extension will always be "TFR" for the temporary file. ## CAtlTemporaryFile::UnlockRange diff --git a/docs/atl/reference/ccomcoclass-class.md b/docs/atl/reference/ccomcoclass-class.md index 58e766c120..2101a31f89 100644 --- a/docs/atl/reference/ccomcoclass-class.md +++ b/docs/atl/reference/ccomcoclass-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CComCoClass Class" title: "CComCoClass Class" +description: "Learn more about: CComCoClass Class" ms.date: "11/04/2016" f1_keywords: ["CComCoClass", "ATLCOM/ATL::CComCoClass", "ATLCOM/ATL::CComCoClass::CreateInstance", "ATLCOM/ATL::CComCoClass::Error", "ATLCOM/ATL::CComCoClass::GetObjectCLSID", "ATLCOM/ATL::CComCoClass::GetObjectDescription"] helpviewer_keywords: ["CComCoClass class", "aggregation [C++], aggregation models"] -ms.assetid: 67cfefa4-8df9-47fa-ad58-2d1a1ae25762 --- # CComCoClass Class @@ -12,29 +11,29 @@ This class provides methods for creating instances of a class, and obtaining its ## Syntax -``` +```cpp template class CComCoClass ``` #### Parameters -*T*
+*T*\ Your class, derived from `CComCoClass`. -*pclsid*
+*pclsid*\ A pointer to the CLSID of the object. ## Members ### Public Methods -|Name|Description| -|----------|-----------------| -|[CComCoClass::CreateInstance](#createinstance)|(Static) Creates an instance of the class and queries for an interface.| -|[CComCoClass::Error](#error)|(Static) Returns rich error information to the client.| -|[CComCoClass::GetObjectCLSID](#getobjectclsid)|(Static) Returns the object's class identifier.| -|[CComCoClass::GetObjectDescription](#getobjectdescription)|(Static) Override to return the object's description.| +| Name | Description | +| ---------------------------------------------------------- | ----------------------------------------------------------------------- | +| [CComCoClass::CreateInstance](#createinstance) | (Static) Creates an instance of the class and queries for an interface. | +| [CComCoClass::Error](#error) | (Static) Returns rich error information to the client. | +| [CComCoClass::GetObjectCLSID](#getobjectclsid) | (Static) Returns the object's class identifier. | +| [CComCoClass::GetObjectDescription](#getobjectdescription) | (Static) Override to return the object's description. | ## Remarks @@ -58,23 +57,23 @@ You can override either of these defaults by specifying another macro in your cl Use these `CreateInstance` functions to create an instance of a COM object and retrieve an interface pointer without using the COM API. -``` -template -static HRESULT CreateInstance( Q** pp); +```cpp +template +static HRESULT CreateInstance(Q** pp); -template +template static HRESULT CreateInstance(IUnknown* punkOuter, Q** pp); ``` ### Parameters -*Q*
+*Q*\ The COM interface that should be returned via *pp*. -*punkOuter*
+*punkOuter*\ [in] The outer unknown or controlling unknown of the aggregate. -*pp*
+*pp*\ [out] The address of a pointer variable that receives the requested interface pointer if creation succeeds. ### Return Value @@ -101,7 +100,7 @@ In the following example, `CDocument` is a wizard-generated ATL class derived fr This static function sets up the `IErrorInfo` interface to provide error information to the client. -``` +```cpp static HRESULT WINAPI Error( LPCOLESTR lpszDesc, const IID& iid = GUID_NULL, @@ -130,7 +129,7 @@ static HRESULT WINAPI Error( UINT nID, const IID& iid = GUID_NULL, HRESULT hRes = 0, - HINSTANCE hInst = _AtlBaseModule.GetResourceInstance ()); + HINSTANCE hInst = _AtlBaseModule.GetResourceInstance()); static HRESULT Error( UINT nID, @@ -143,25 +142,25 @@ static HRESULT Error( ### Parameters -*lpszDesc*
+*lpszDesc*\ [in] The string describing the error. The Unicode version of `Error` specifies that *lpszDesc* is of type LPCOLESTR; the ANSI version specifies a type of LPCSTR. -*iid*
+*iid*\ [in] The IID of the interface defining the error or GUID_NULL (the default value) if the error is defined by the operating system. -*hRes*
+*hRes*\ [in] The HRESULT you want returned to the caller. The default value is 0. For more details about *hRes*, see Remarks. -*nID*
+*nID*\ [in] The resource identifier where the error description string is stored. This value should lie between 0x0200 and 0xFFFF, inclusively. In debug builds, an **ASSERT** will result if *nID* does not index a valid string. In release builds, the error description string will be set to "Unknown Error." -*dwHelpID*
+*dwHelpID*\ [in] The help context identifier for the error. -*lpszHelpFile*
+*lpszHelpFile*\ [in] The path and name of the help file describing the error. -*hInst*
+*hInst*\ [in] The handle to the resource. By default, this parameter is `_AtlModule::GetResourceInstance`, where `_AtlModule` is the global instance of [CAtlModule](../../atl/reference/catlmodule-class.md). ### Return Value @@ -178,7 +177,7 @@ If the *hRes* parameter is nonzero, then `Error` returns the value of *hRes*. If Provides a consistent way of retrieving the object's CLSID. -``` +```cpp static const CLSID& WINAPI GetObjectCLSID(); ``` @@ -190,7 +189,7 @@ The object's class identifier. This static function retrieves the text description for your class object. -``` +```cpp static LPCTSTR WINAPI GetObjectDescription(); ``` diff --git a/docs/atl/reference/ccomcurrency-class.md b/docs/atl/reference/ccomcurrency-class.md index b51cb2e04a..cee7bfd016 100644 --- a/docs/atl/reference/ccomcurrency-class.md +++ b/docs/atl/reference/ccomcurrency-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CComCurrency Class" title: "CComCurrency Class" -ms.date: "11/04/2016" +description: "Learn more about: CComCurrency Class" +ms.date: 11/04/2016 f1_keywords: ["CComCurrency", "ATLCUR/ATL::CComCurrency", "ATLCUR/ATL::CComCurrency::CComCurrency", "ATLCUR/ATL::CComCurrency::GetCurrencyPtr", "ATLCUR/ATL::CComCurrency::GetFraction", "ATLCUR/ATL::CComCurrency::GetInteger", "ATLCUR/ATL::CComCurrency::Round", "ATLCUR/ATL::CComCurrency::SetFraction", "ATLCUR/ATL::CComCurrency::SetInteger", "ATLCUR/ATL::CComCurrency::m_currency"] helpviewer_keywords: ["CComCurrency class"] -ms.assetid: a1c3d10a-bba6-40cc-8bcf-aed9023c8a9e --- # `CComCurrency` Class @@ -563,7 +562,7 @@ Returns a reference to a `CURRENCY` object. Call this method to round the currency to a specified number of decimal places. ```cpp -HRESULT Roundint nDecimals); +HRESULT Round(int nDecimals); ``` ### Parameters diff --git a/docs/atl/reference/ccommultithreadmodel-class.md b/docs/atl/reference/ccommultithreadmodel-class.md index 167fe9c3c7..651aa91f66 100644 --- a/docs/atl/reference/ccommultithreadmodel-class.md +++ b/docs/atl/reference/ccommultithreadmodel-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CComMultiThreadModel Class" title: "CComMultiThreadModel Class" +description: "Learn more about: CComMultiThreadModel Class" ms.date: "11/04/2016" f1_keywords: ["CComMultiThreadModel", "ATLBASE/ATL::CComMultiThreadModel", "ATLBASE/ATL::CComMultiThreadModel::AutoCriticalSection", "ATLBASE/ATL::CComMultiThreadModel::CriticalSection", "ATLBASE/ATL::CComMultiThreadModel::ThreadModelNoCS", "ATLBASE/ATL::CComMultiThreadModel::Decrement", "ATLBASE/ATL::CComMultiThreadModel::Increment"] helpviewer_keywords: ["ATL, multithreading", "CComMultiThreadModel class", "threading [ATL]"] -ms.assetid: db8f1662-2f7a-44b3-b341-ffbfb6e422a3 --- # CComMultiThreadModel Class @@ -12,7 +11,7 @@ ms.assetid: db8f1662-2f7a-44b3-b341-ffbfb6e422a3 ## Syntax -``` +```cpp class CComMultiThreadModel ``` @@ -35,7 +34,7 @@ class CComMultiThreadModel ## Remarks -Typically, you use `CComMultiThreadModel` through one of two **`typedef`** names, either [CComObjectThreadModel](atl-typedefs.md#ccomobjectthreadmodel or [CComGlobalsThreadModel](atl-typedefs.md#ccomglobalsthreadmodel. The class referenced by each **`typedef`** depends on the threading model used, as shown in the following table: +Typically, you use `CComMultiThreadModel` through one of two **`typedef`** names, either [CComObjectThreadModel](atl-typedefs.md#ccomobjectthreadmodel) or [CComGlobalsThreadModel](atl-typedefs.md#ccomglobalsthreadmodel). The class referenced by each **`typedef`** depends on the threading model used, as shown in the following table: |typedef|Single threading|Apartment threading|Free threading| |-------------|----------------------|-------------------------|--------------------| @@ -54,7 +53,7 @@ S= `CComSingleThreadModel`; M= `CComMultiThreadModel` When using `CComMultiThreadModel`, the **`typedef`** name `AutoCriticalSection` references class [CComAutoCriticalSection](ccomautocriticalsection-class.md), which provides methods for obtaining and releasing ownership of a critical section object. -``` +```cpp typedef CComAutoCriticalSection AutoCriticalSection; ``` @@ -120,7 +119,7 @@ The following tables show the results of the `InternalAddRef` and `Lock` methods When using `CComMultiThreadModel`, the **`typedef`** name `CriticalSection` references class [CComCriticalSection](ccomcriticalsection-class.md), which provides methods for obtaining and releasing ownership of a critical section object. -``` +```cpp typedef CComCriticalSection CriticalSection; ``` @@ -144,13 +143,13 @@ See [CComMultiThreadModel::AutoCriticalSection](#autocriticalsection). This static function calls the Win32 function [InterlockedDecrement](/windows/win32/api/winnt/nf-winnt-interlockeddecrement), which decrements the value of the variable pointed to by *p*. -``` +```cpp static ULONG WINAPI Decrement(LPLONG p) throw (); ``` ### Parameters -*p*
+*p*\ [in] Pointer to the variable to be decremented. ### Return Value @@ -165,13 +164,13 @@ If the result of the decrement is 0, then `Decrement` returns 0. If the result o This static function calls the Win32 function [InterlockedIncrement](/windows/win32/api/winnt/nf-winnt-interlockedincrement), which increments the value of the variable pointed to by *p*. -``` +```cpp static ULONG WINAPI Increment(LPLONG p) throw (); ``` ### Parameters -*p*
+*p*\ [in] Pointer to the variable to be incremented. ### Return Value @@ -186,7 +185,7 @@ If the result of the increment is 0, then `Increment` returns 0. If the result o When using `CComMultiThreadModel`, the **`typedef`** name `ThreadModelNoCS` references class [CComMultiThreadModelNoCS](ccommultithreadmodelnocs-class.md). -``` +```cpp typedef CComMultiThreadModelNoCS ThreadModelNoCS; ``` @@ -208,7 +207,7 @@ See [CComMultiThreadModel::AutoCriticalSection](#autocriticalsection). ## See also -[CComSingleThreadModel Class](ccomsinglethreadmodel-class.md)
-[CComAutoCriticalSection Class](ccomautocriticalsection-class.md)
-[CComCriticalSection Class](ccomcriticalsection-class.md)
+[CComSingleThreadModel Class](ccomsinglethreadmodel-class.md)\ +[CComAutoCriticalSection Class](ccomautocriticalsection-class.md)\ +[CComCriticalSection Class](ccomcriticalsection-class.md)\ [Class Overview](../atl-class-overview.md) diff --git a/docs/atl/reference/ccomsafearray-class.md b/docs/atl/reference/ccomsafearray-class.md index a1f79d65d6..d9c6729e91 100644 --- a/docs/atl/reference/ccomsafearray-class.md +++ b/docs/atl/reference/ccomsafearray-class.md @@ -526,7 +526,7 @@ Retrieves an element from the array. ```cpp T& operator[](long lindex) const; -T& operator[]int nindex) const; +T& operator[](int nindex) const; ``` ### Parameters diff --git a/docs/atl/reference/csimplearray-class.md b/docs/atl/reference/csimplearray-class.md index b79b7e57ab..12a7cd1332 100644 --- a/docs/atl/reference/csimplearray-class.md +++ b/docs/atl/reference/csimplearray-class.md @@ -252,7 +252,7 @@ Removes all elements currently stored in the array. Removes the specified element from the array. ``` -BOOL RemoveAtint nIndex); +BOOL RemoveAt(int nIndex); ``` ### Parameters diff --git a/docs/atl/reference/cstockpropimpl-class.md b/docs/atl/reference/cstockpropimpl-class.md index 29b1619156..1f4959941f 100644 --- a/docs/atl/reference/cstockpropimpl-class.md +++ b/docs/atl/reference/cstockpropimpl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CStockPropImpl Class" title: "CStockPropImpl Class" +description: "Learn more about: CStockPropImpl Class" ms.date: "05/06/2019" f1_keywords: ["CStockPropImpl", "ATLCTL/ATL::CStockPropImpl", "ATLCTL/ATL::get_Appearance", "ATLCTL/ATL::get_AutoSize", "ATLCTL/ATL::get_BackColor", "ATLCTL/ATL::get_BackStyle", "ATLCTL/ATL::get_BorderColor", "ATLCTL/ATL::get_BorderStyle", "ATLCTL/ATL::get_BorderVisible", "ATLCTL/ATL::get_BorderWidth", "ATLCTL/ATL::get_Caption", "ATLCTL/ATL::get_DrawMode", "ATLCTL/ATL::get_DrawStyle", "ATLCTL/ATL::get_DrawWidth", "ATLCTL/ATL::get_Enabled", "ATLCTL/ATL::get_FillColor", "ATLCTL/ATL::get_FillStyle", "ATLCTL/ATL::get_Font", "ATLCTL/ATL::get_ForeColor", "ATLCTL/ATL::get_HWND", "ATLCTL/ATL::get_MouseIcon", "ATLCTL/ATL::get_MousePointer", "ATLCTL/ATL::get_Picture", "ATLCTL/ATL::get_ReadyState", "ATLCTL/ATL::get_TabStop", "ATLCTL/ATL::get_Text", "ATLCTL/ATL::getvalid", "ATLCTL/ATL::get_Window", "ATLCTL/ATL::put_Appearance", "ATLCTL/ATL::put_AutoSize", "ATLCTL/ATL::put_BackColor", "ATLCTL/ATL::put_BackStyle", "ATLCTL/ATL::put_BorderColor", "ATLCTL/ATL::put_BorderStyle", "ATLCTL/ATL::put_BorderVisible", "ATLCTL/ATL::put_BorderWidth", "ATLCTL/ATL::put_Caption", "ATLCTL/ATL::put_DrawMode", "ATLCTL/ATL::put_DrawStyle", "ATLCTL/ATL::put_DrawWidth", "ATLCTL/ATL::put_Enabled", "ATLCTL/ATL::put_FillColor", "ATLCTL/ATL::put_FillStyle", "ATLCTL/ATL::put_Font", "ATLCTL/ATL::put_ForeColor", "ATLCTL/ATL::put_HWND", "ATLCTL/ATL::put_MouseIcon", "ATLCTL/ATL::put_MousePointer", "ATLCTL/ATL::put_Picture", "ATLCTL/ATL::put_ReadyState", "ATLCTL/ATL::put_TabStop", "ATLCTL/ATL::put_Text", "ATLCTL/ATL::putvalid", "ATLCTL/ATL::put_Window", "ATLCTL/ATL::putref_Font", "ATLCTL/ATL::putref_MouseIcon", "ATLCTL/ATL::putref_Picture"] helpviewer_keywords: ["CStockPropImpl class", "controls [ATL], stock properties", "stock properties, ATL controls"] -ms.assetid: 45f11d7d-6580-4a0e-872d-3bc8b836cfda --- # CStockPropImpl Class @@ -607,7 +606,7 @@ Returns S_OK on success, or an error HRESULT on failure. Call this method to set the value of flag that indicates if the control cannot be any other size. ``` -HRESULT STDMETHODCALLTYPE put_AutoSize(VARIANT_BOOL bAutoSize,); +HRESULT STDMETHODCALLTYPE put_AutoSize(VARIANT_BOOL bAutoSize); ``` ### Parameters @@ -1100,5 +1099,5 @@ The same as [CStockPropImpl::put_Picture](#put_picture), but with a reference co ## See also -[Class Overview](../../atl/atl-class-overview.md)
+[Class Overview](../../atl/atl-class-overview.md)\ [IDispatchImpl Class](../../atl/reference/idispatchimpl-class.md) diff --git a/docs/atl/reference/cthreadpool-class.md b/docs/atl/reference/cthreadpool-class.md index e5834d8409..0cca6b473f 100644 --- a/docs/atl/reference/cthreadpool-class.md +++ b/docs/atl/reference/cthreadpool-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CThreadPool Class" title: "CThreadPool Class" -ms.date: "11/04/2016" +description: "Learn more about: CThreadPool Class" +ms.date: 11/04/2016 f1_keywords: ["CThreadPool", "ATLUTIL/ATL::CThreadPool", "ATLUTIL/ATL::CThreadPool::CThreadPool", "ATLUTIL/ATL::CThreadPool::AddRef", "ATLUTIL/ATL::CThreadPool::GetNumThreads", "ATLUTIL/ATL::CThreadPool::GetQueueHandle", "ATLUTIL/ATL::CThreadPool::GetSize", "ATLUTIL/ATL::CThreadPool::GetTimeout", "ATLUTIL/ATL::CThreadPool::Initialize", "ATLUTIL/ATL::CThreadPool::QueryInterface", "ATLUTIL/ATL::CThreadPool::QueueRequest", "ATLUTIL/ATL::CThreadPool::Release", "ATLUTIL/ATL::CThreadPool::SetSize", "ATLUTIL/ATL::CThreadPool::SetTimeout", "ATLUTIL/ATL::CThreadPool::Shutdown"] helpviewer_keywords: ["CThreadPool class"] -ms.assetid: 06683718-01b9-413c-9481-2dc1734ec70f --- # CThreadPool Class @@ -265,7 +264,7 @@ This class does not implement lifetime control using reference counting. Call this method to set the number of threads in the pool. ``` -HRESULT STDMETHODCALLTYPE SetSizeint nNumThreads) throw(); +HRESULT STDMETHODCALLTYPE SetSize(int nNumThreads) throw(); ``` ### Parameters diff --git a/docs/atl/reference/cw2wex-class.md b/docs/atl/reference/cw2wex-class.md index 3c0cfb0946..d5c15f69f2 100644 --- a/docs/atl/reference/cw2wex-class.md +++ b/docs/atl/reference/cw2wex-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CW2WEX Class" title: "CW2WEX Class" +description: "Learn more about: CW2WEX Class" ms.date: "11/04/2016" f1_keywords: ["CW2WEX", "ATLCONV/ATL::CW2WEX", "ATLCONV/ATL::CW2WEX::CW2WEX", "ATLCONV/ATL::CW2WEX::m_psz", "ATLCONV/ATL::CW2WEX::m_szBuffer"] helpviewer_keywords: ["CW2WEX class"] -ms.assetid: 46262e56-e0d2-41fe-855b-0b67ecc8fcd7 --- # CW2WEX Class @@ -100,7 +99,7 @@ Creates the buffer required for the translation. ## CW2WEX::~CW2WEX -The destructor.. +The destructor. ``` ~CW2WEX() throw(); @@ -140,9 +139,9 @@ Returns the text string as type LPWSTR. ## See also -[CA2AEX Class](../../atl/reference/ca2aex-class.md)
-[CA2CAEX Class](../../atl/reference/ca2caex-class.md)
-[CA2WEX Class](../../atl/reference/ca2wex-class.md)
-[CW2AEX Class](../../atl/reference/cw2aex-class.md)
-[CW2CWEX Class](../../atl/reference/cw2cwex-class.md)
+[CA2AEX Class](../../atl/reference/ca2aex-class.md)\ +[CA2CAEX Class](../../atl/reference/ca2caex-class.md)\ +[CA2WEX Class](../../atl/reference/ca2wex-class.md)\ +[CW2AEX Class](../../atl/reference/cw2aex-class.md)\ +[CW2CWEX Class](../../atl/reference/cw2cwex-class.md)\ [Class Overview](../../atl/atl-class-overview.md) diff --git a/docs/atl/reference/idispeventimpl-class.md b/docs/atl/reference/idispeventimpl-class.md index 74fd3e72c2..ef54c3c7b5 100644 --- a/docs/atl/reference/idispeventimpl-class.md +++ b/docs/atl/reference/idispeventimpl-class.md @@ -1,12 +1,11 @@ --- -description: "Learn more about: IDispEventImpl Class" title: "IDispEventImpl Class" -ms.date: "11/04/2016" +description: "Learn more about: IDispEventImpl Class" +ms.date: 11/04/2016 f1_keywords: ["IDispEventImpl", "ATLCOM/ATL::IDispEventImpl", "ATLCOM/ATL::IDispEventImpl::IDispEventImpl", "ATLCOM/ATL::IDispEventImpl::GetFuncInfoFromId", "ATLCOM/ATL::IDispEventImpl::GetIDsOfNames", "ATLCOM/ATL::IDispEventImpl::GetTypeInfo", "ATLCOM/ATL::IDispEventImpl::GetTypeInfoCount", "ATLCOM/ATL::IDispEventImpl::GetUserDefinedType"] helpviewer_keywords: ["IDispEventImpl class"] -ms.assetid: a64b5288-35cb-4638-aad6-2d15b1c7cf7b --- -# IDispEventImpl Class +# `IDispEventImpl` Class This class provides implementations of the `IDispatch` methods. @@ -15,7 +14,7 @@ This class provides implementations of the `IDispatch` methods. ## Syntax -``` +```cpp template #### Parameters -*nID*
+*`nID`*\ A unique identifier for the source object. When `IDispEventImpl` is the base class for a composite control, use the resource ID of the desired contained control for this parameter. In other cases, use an arbitrary positive integer. -*T*
+*`T`*\ The user's class, which is derived from `IDispEventImpl`. -*pdiid*
-The pointer to the IID of the event dispinterface implemented by this class. This interface must be defined in the type library denoted by *plibid*, *wMajor*, and *wMinor*. +*`pdiid`*\ +The pointer to the IID of the event dispinterface implemented by this class. This interface must be defined in the type library denoted by *`plibid`*, *`wMajor`*, and *`wMinor`*. -*plibid*
-A pointer to the type library that defines the dispatch interface pointed to by *pdiid*. If **&GUID_NULL**, the type library will be loaded from the object sourcing the events. +*`plibid`*\ +A pointer to the type library that defines the dispatch interface pointed to by *`pdiid`*. If **`&GUID_NULL`**, the type library will be loaded from the object sourcing the events. -*wMajor*
+*`wMajor`*\ The major version of the type library. The default value is 0. -*wMinor*
+*`wMinor`*\ The minor version of the type library. The default value is 0. -*tihclass*
-The class used to manage the type information for *T*. The default value is a class of type `CComTypeInfoHolder`; however, you can override this template parameter by providing a class of a type other than `CComTypeInfoHolder`. +*`tihclass`*\ +The class used to manage the type information for *`T`*. The default value is a class of type `CComTypeInfoHolder`; however, you can override this template parameter by providing a class of a type other than `CComTypeInfoHolder`. ## Members @@ -54,23 +53,23 @@ The class used to manage the type information for *T*. The default value is a cl |Name|Description| |----------|-----------------| -|[IDispEventImpl::_tihclass](../../atl/reference/idispeventimpl-class.md)|The class used to manage the type information. By default, `CComTypeInfoHolder`.| +|[`IDispEventImpl::_tihclass`](#_tihclass)|The class used to manage the type information. By default, `CComTypeInfoHolder`.| ### Public Constructors |Name|Description| |----------|-----------------| -|[IDispEventImpl::IDispEventImpl](#idispeventimpl)|The constructor.| +|[`IDispEventImpl::IDispEventImpl`](#idispeventimpl)|The constructor.| ### Public Methods |Name|Description| |----------|-----------------| -|[IDispEventImpl::GetFuncInfoFromId](#getfuncinfofromid)|Locates the function index for the specified dispatch identifier.| -|[IDispEventImpl::GetIDsOfNames](#getidsofnames)|Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs.| -|[IDispEventImpl::GetTypeInfo](#gettypeinfo)|Retrieves the type information for an object.| -|[IDispEventImpl::GetTypeInfoCount](#gettypeinfocount)|Retrieves the number of type information interfaces.| -|[IDispEventImpl::GetUserDefinedType](#getuserdefinedtype)|Retrieves the basic type of a user-defined type.| +|[`IDispEventImpl::GetFuncInfoFromId`](#getfuncinfofromid)|Locates the function index for the specified dispatch identifier.| +|[`IDispEventImpl::GetIDsOfNames`](#getidsofnames)|Maps a single member and an optional set of argument names to a corresponding set of integer `DISPID`s.| +|[`IDispEventImpl::GetTypeInfo`](#gettypeinfo)|Retrieves the type information for an object.| +|[`IDispEventImpl::GetTypeInfoCount`](#gettypeinfocount)|Retrieves the number of type information interfaces.| +|[`IDispEventImpl::GetUserDefinedType`](#getuserdefinedtype)|Retrieves the basic type of a user-defined type.| ## Remarks @@ -78,18 +77,18 @@ The class used to manage the type information for *T*. The default value is a cl `IDispEventImpl` works in conjunction with the event sink map in your class to route events to the appropriate handler function. To use this class: -Add a [SINK_ENTRY](composite-control-macros.md#sink_entry) or [SINK_ENTRY_EX](composite-control-macros.md#sink_entry_ex) macro to the event sink map for each event on each object that you want to handle. When using `IDispEventImpl` as a base class of a composite control, you can call [AtlAdviseSinkMap](connection-point-global-functions.md#atladvisesinkmap) to establish and break the connection with the event sources for all entries in the event sink map. In other cases, or for greater control, call [DispEventAdvise](idispeventsimpleimpl-class.md#dispeventadvise) to establish the connection between the source object and the base class. Call [DispEventUnadvise](idispeventsimpleimpl-class.md#dispeventunadvise) to break the connection. +Add a [`SINK_ENTRY`](composite-control-macros.md#sink_entry) or [`SINK_ENTRY_EX`](composite-control-macros.md#sink_entry_ex) macro to the event sink map for each event on each object that you want to handle. When using `IDispEventImpl` as a base class of a composite control, you can call [`AtlAdviseSinkMap`](connection-point-global-functions.md#atladvisesinkmap) to establish and break the connection with the event sources for all entries in the event sink map. In other cases, or for greater control, call [`DispEventAdvise`](idispeventsimpleimpl-class.md#dispeventadvise) to establish the connection between the source object and the base class. Call [`DispEventUnadvise`](idispeventsimpleimpl-class.md#dispeventunadvise) to break the connection. -You must derive from `IDispEventImpl` (using a unique value for *nID*) for each object for which you need to handle events. You can reuse the base class by unadvising against one source object then advising against a different source object, but the maximum number of source objects that can be handled by a single object at one time is limited by the number of `IDispEventImpl` base classes. +You must derive from `IDispEventImpl` (using a unique value for *`nID`*) for each object for which you need to handle events. You can reuse the base class by unadvising against one source object then advising against a different source object, but the maximum number of source objects that can be handled by a single object at one time is limited by the number of `IDispEventImpl` base classes. -`IDispEventImpl` provides the same functionality as [IDispEventSimpleImpl](../../atl/reference/idispeventsimpleimpl-class.md), except it gets type information about the interface from a type library rather than having it supplied as a pointer to an [_ATL_FUNC_INFO](../../atl/reference/atl-func-info-structure.md) structure. Use `IDispEventSimpleImpl` when you do not have a type library describing the event interface or want to avoid the overhead associated with using the type library. +`IDispEventImpl` provides the same functionality as [`IDispEventSimpleImpl`](idispeventsimpleimpl-class.md), except it gets type information about the interface from a type library rather than having it supplied as a pointer to an [`_ATL_FUNC_INFO`](atl-func-info-structure.md) structure. Use `IDispEventSimpleImpl` when you do not have a type library describing the event interface or want to avoid the overhead associated with using the type library. > [!NOTE] > `IDispEventImpl` and `IDispEventSimpleImpl` provide their own implementation of `IUnknown::QueryInterface` enabling each `IDispEventImpl` and `IDispEventSimpleImpl` base class to act as a separate COM identity while still allowing direct access to class members in your main COM object. -CE ATL implementation of ActiveX event sinks only supports return values of type HRESULT or void from your event handler methods; any other return value is unsupported and its behavior is undefined. +CE ATL implementation of ActiveX event sinks only supports return values of type `HRESULT` or `void` from your event handler methods; any other return value is unsupported and its behavior is undefined. -For more information, see [Supporting IDispEventImpl](../../atl/supporting-idispeventimpl.md). +For more information, see [Supporting `IDispEventImpl`](../supporting-idispeventimpl.md). ## Inheritance Hierarchy @@ -97,19 +96,19 @@ For more information, see [Supporting IDispEventImpl](../../atl/supporting-idisp `_IDispEventLocator` -[IDispEventSimpleImpl](../../atl/reference/idispeventsimpleimpl-class.md) +[`IDispEventSimpleImpl`](idispeventsimpleimpl-class.md) `IDispEventImpl` ## Requirements -**Header:** atlcom.h +**Header:** `atlcom.h` -## IDispEventImpl::GetFuncInfoFromId +## `IDispEventImpl::GetFuncInfoFromId` Locates the function index for the specified dispatch identifier. -``` +```cpp HRESULT GetFuncInfoFromId( const IID& iid, DISPID dispidMember, @@ -119,27 +118,27 @@ HRESULT GetFuncInfoFromId( ### Parameters -*iid*
+*`iid`*\ [in] A reference to the ID of the function. -*dispidMember*
+*`dispidMember`*\ [in] The dispatch ID of the function. -*lcid*
+*`lcid`*\ [in] The locale context of the function ID. -*info*
+*`info`*\ [in] The structure indicating how the function is called. ### Return Value -A standard HRESULT value. +A standard `HRESULT` value. -## IDispEventImpl::GetIDsOfNames +## `IDispEventImpl::GetIDsOfNames` -Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on subsequent calls to [IDispatch::Invoke](/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke). +Maps a single member and an optional set of argument names to a corresponding set of integer `DISPID`s, which can be used on subsequent calls to [`IDispatch::Invoke`](/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke). -``` +```cpp STDMETHOD(GetIDsOfNames)( REFIID riid, LPOLESTR* rgszNames, @@ -150,38 +149,36 @@ STDMETHOD(GetIDsOfNames)( ### Remarks -See [IDispatch::GetIDsOfNames](/windows/win32/api/oaidl/nf-oaidl-idispatch-getidsofnames) in the Windows SDK. +See [`IDispatch::GetIDsOfNames`](/windows/win32/api/oaidl/nf-oaidl-idispatch-getidsofnames) in the Windows SDK. -## IDispEventImpl::GetTypeInfo +## `IDispEventImpl::GetTypeInfo` Retrieves the type information for an object, which can then be used to get the type information for an interface. -``` +```cpp STDMETHOD(GetTypeInfo)( UINT itinfo, LCID lcid, ITypeInfo** pptinfo); ``` -### Remarks - -## IDispEventImpl::GetTypeInfoCount +## `IDispEventImpl::GetTypeInfoCount` Retrieves the number of type information interfaces that an object provides (either 0 or 1). -``` +```cpp STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); ``` ### Remarks -See [IDispatch::GetTypeInfoCount](/windows/win32/api/oaidl/nf-oaidl-idispatch-gettypeinfocount) in the Windows SDK. +See [`IDispatch::GetTypeInfoCount`](/windows/win32/api/oaidl/nf-oaidl-idispatch-gettypeinfocount) in the Windows SDK. -## IDispEventImpl::GetUserDefinedType +## `IDispEventImpl::GetUserDefinedType` Retrieves the basic type of a user-defined type. -``` +```cpp VARTYPE GetUserDefinedType( ITypeInfo* pTI, HREFTYPE hrt); @@ -189,10 +186,10 @@ VARTYPE GetUserDefinedType( ### Parameters -*pTI*
-[in] A pointer to the [ITypeInfo](/windows/win32/api/oaidl/nn-oaidl-itypeinfo) interface containing the user-defined type. +*`pTI`*\ +[in] A pointer to the [`ITypeInfo`](/windows/win32/api/oaidl/nn-oaidl-itypeinfo) interface containing the user-defined type. -*hrt*
+*`hrt`*\ [in] A handle to the type description to be retrieved. ### Return Value @@ -201,21 +198,21 @@ The type of variant. ### Remarks -See [ITypeInfo::GetRefTypeInfo](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getreftypeinfo). +See [`ITypeInfo::GetRefTypeInfo`](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getreftypeinfo). -## IDispEventImpl::IDispEventImpl +## `IDispEventImpl::IDispEventImpl` -The constructor. Stores the values of the class template parameters *plibid*, *pdiid*, *wMajor*, and *wMinor*. +The constructor. Stores the values of the class template parameters *`plibid`*, *`pdiid`*, *`wMajor`*, and *`wMinor`*. -``` +```cpp IDispEventImpl(); ``` -## IDispEventImpl::tihclass +## `IDispEventImpl::_tihclass` -This typedef is an instance of the class template parameter *tihclass*. +This typedef is an instance of the class template parameter *`tihclass`*. -``` +```cpp typedef tihclass _tihclass; ``` @@ -225,10 +222,10 @@ By default, the class is `CComTypeInfoHolder`. `CComTypeInfoHolder` manages the ## See also -[_ATL_FUNC_INFO Structure](../../atl/reference/atl-func-info-structure.md)
-[IDispatchImpl Class](../../atl/reference/idispatchimpl-class.md)
-[IDispEventSimpleImpl Class](../../atl/reference/idispeventsimpleimpl-class.md)
-[SINK_ENTRY](composite-control-macros.md#sink_entry)
-[SINK_ENTRY_EX](composite-control-macros.md#sink_entry_ex)
-[SINK_ENTRY_INFO](composite-control-macros.md#sink_entry_info)
-[Class Overview](../../atl/atl-class-overview.md) +[`_ATL_FUNC_INFO` Structure](atl-func-info-structure.md)\ +[`IDispatchImpl` Class](idispatchimpl-class.md)\ +[`IDispEventSimpleImpl` Class](idispeventsimpleimpl-class.md)\ +[`SINK_ENTRY`](composite-control-macros.md#sink_entry)\ +[`SINK_ENTRY_EX`](composite-control-macros.md#sink_entry_ex)\ +[`SINK_ENTRY_INFO`](composite-control-macros.md#sink_entry_info)\ +[Class Overview](../atl-class-overview.md) diff --git a/docs/atl/reference/iolecontrolimpl-class.md b/docs/atl/reference/iolecontrolimpl-class.md index 6dc7d0f8a8..6c3430e9ce 100644 --- a/docs/atl/reference/iolecontrolimpl-class.md +++ b/docs/atl/reference/iolecontrolimpl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: IOleControlImpl Class" title: "IOleControlImpl Class" +description: "Learn more about: IOleControlImpl Class" ms.date: "11/04/2016" f1_keywords: ["IOleControlImpl", "ATLCTL/ATL::IOleControlImpl", "ATLCTL/ATL::IOleControlImpl::FreezeEvents", "ATLCTL/ATL::IOleControlImpl::GetControlInfo", "ATLCTL/ATL::IOleControlImpl::OnAmbientPropertyChange", "ATLCTL/ATL::IOleControlImpl::OnMnemonic"] helpviewer_keywords: ["IOleControlImpl class"] -ms.assetid: 5a4255ad-ede4-49ca-ba9a-07c2e919fa85 --- # IOleControlImpl Class @@ -22,7 +21,7 @@ class IOleControlImpl #### Parameters -*T*
+*T*\ Your class, derived from `IOleControlImpl`. ## Members @@ -76,7 +75,7 @@ HRESULT GetControlInfo(LPCONTROLINFO pCI); ### Remarks -See [IOleControl:GetControlInfo](/windows/win32/api/ocidl/nf-ocidl-iolecontrol-getcontrolinfo) in the Windows SDK. +See [IOleControl::GetControlInfo](/windows/win32/api/ocidl/nf-ocidl-iolecontrol-getcontrolinfo) in the Windows SDK. ### Return Value @@ -116,6 +115,6 @@ See [IOleControl::OnMnemonic](/windows/win32/api/ocidl/nf-ocidl-iolecontrol-onmn ## See also -[IOleObjectImpl Class](../../atl/reference/ioleobjectimpl-class.md)
-[ActiveX Controls Interfaces](/windows/win32/com/activex-controls-interfaces)
+[IOleObjectImpl Class](../../atl/reference/ioleobjectimpl-class.md)\ +[ActiveX Controls Interfaces](/windows/win32/com/activex-controls-interfaces)\ [Class Overview](../../atl/atl-class-overview.md) diff --git a/docs/atl/reference/ipersiststorageimpl-class.md b/docs/atl/reference/ipersiststorageimpl-class.md index 9b8e3de985..a5396bee53 100644 --- a/docs/atl/reference/ipersiststorageimpl-class.md +++ b/docs/atl/reference/ipersiststorageimpl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: IPersistStorageImpl Class" title: "IPersistStorageImpl Class" +description: "Learn more about: IPersistStorageImpl Class" ms.date: "11/04/2016" f1_keywords: ["IPersistStorageImpl", "ATLCOM/ATL::IPersistStorageImpl", "ATLCOM/ATL::IPersistStorageImpl::GetClassID", "ATLCOM/ATL::IPersistStorageImpl::HandsOffStorage", "ATLCOM/ATL::IPersistStorageImpl::InitNew", "ATLCOM/ATL::IPersistStorageImpl::IsDirty", "ATLCOM/ATL::IPersistStorageImpl::Load", "ATLCOM/ATL::IPersistStorageImpl::Save", "ATLCOM/ATL::IPersistStorageImpl::SaveCompleted"] helpviewer_keywords: ["storage, ATL", "IPersistStorageImpl class"] -ms.assetid: d652f02c-239c-47c7-9a50-3e9fc3014fff --- # IPersistStorageImpl Class @@ -22,7 +21,7 @@ class ATL_NO_VTABLE IPersistStorageImpl : public IPersistStorage #### Parameters -*T*
+*T*\ Your class, derived from `IPersistStorageImpl`. ## Members @@ -97,7 +96,7 @@ STDMETHOD(InitNew)(IStorage*); The ATL implementation delegates to the [IPersistStreamInit](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface. -See [IPersistStorage:InitNew](/windows/win32/api/objidl/nf-objidl-ipersiststorage-initnew) in the Windows SDK. +See [IPersistStorage::InitNew](/windows/win32/api/objidl/nf-objidl-ipersiststorage-initnew) in the Windows SDK. ## IPersistStorageImpl::IsDirty @@ -111,7 +110,7 @@ STDMETHOD(IsDirty)(void); The ATL implementation delegates to the [IPersistStreamInit](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface. -See [IPersistStorage:IsDirty](/windows/win32/api/objidl/nf-objidl-ipersiststorage-isdirty) in the Windows SDK. +See [IPersistStorage::IsDirty](/windows/win32/api/objidl/nf-objidl-ipersiststorage-isdirty) in the Windows SDK. ## IPersistStorageImpl::Load @@ -125,7 +124,7 @@ STDMETHOD(Load)(IStorage* pStorage); The ATL implementation delegates to the [IPersistStreamInit](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface. `Load` uses a stream named "Contents" to retrieve the object's data. The [Save](#save) method originally creates this stream. -See [IPersistStorage:Load](/windows/win32/api/objidl/nf-objidl-ipersiststorage-load) in the Windows SDK. +See [IPersistStorage::Load](/windows/win32/api/objidl/nf-objidl-ipersiststorage-load) in the Windows SDK. ## IPersistStorageImpl::Save @@ -139,7 +138,7 @@ STDMETHOD(Save)(IStorage* pStorage, BOOL fSameAsLoad); The ATL implementation delegates to the [IPersistStreamInit](/windows/win32/api/ocidl/nn-ocidl-ipersiststreaminit) interface. When `Save` is first called, it creates a stream named "Contents" on the specified storage. This stream is then used in later calls to `Save` and in calls to [Load](#load). -See [IPersistStorage:Save](/windows/win32/api/objidl/nf-objidl-ipersiststorage-save) in the Windows SDK. +See [IPersistStorage::Save](/windows/win32/api/objidl/nf-objidl-ipersiststorage-save) in the Windows SDK. ## IPersistStorageImpl::SaveCompleted @@ -155,11 +154,11 @@ Returns S_OK. ### Remarks -See [IPersistStorage:SaveCompleted](/windows/win32/api/objidl/nf-objidl-ipersiststorage-savecompleted) in the Windows SDK. +See [IPersistStorage::SaveCompleted](/windows/win32/api/objidl/nf-objidl-ipersiststorage-savecompleted) in the Windows SDK. ## See also -[Storages and Streams](/windows/win32/Stg/storages-and-streams)
-[IPersistStreamInitImpl Class](../../atl/reference/ipersiststreaminitimpl-class.md)
-[IPersistPropertyBagImpl Class](../../atl/reference/ipersistpropertybagimpl-class.md)
+[Storages and Streams](/windows/win32/Stg/storages-and-streams)\ +[IPersistStreamInitImpl Class](../../atl/reference/ipersiststreaminitimpl-class.md)\ +[IPersistPropertyBagImpl Class](../../atl/reference/ipersistpropertybagimpl-class.md)\ [Class Overview](../../atl/atl-class-overview.md) diff --git a/docs/build-insights/get-started-with-cpp-build-insights.md b/docs/build-insights/get-started-with-cpp-build-insights.md index 038b948e19..0ee6e8c583 100644 --- a/docs/build-insights/get-started-with-cpp-build-insights.md +++ b/docs/build-insights/get-started-with-cpp-build-insights.md @@ -14,7 +14,7 @@ The C++ Build Insights tools are available in Visual Studio 2019 and later. To s ::: moniker-end ::: moniker range=">=msvc-160" -C++ Build Insights is a collection of tools that provides increased visibility into the Microsoft Visual C++ (MSVC) tool chain. The tools collect data about your C++ builds, and present it in a format that can help you answer common questions, like: +C++ Build Insights is a collection of tools that collect data about your C++ builds, and present it in a format that can help you answer common questions such as: - Are my builds sufficiently parallelized? - What should I include in my pre-compiled header (PCH)? @@ -22,16 +22,16 @@ C++ Build Insights is a collection of tools that provides increased visibility i The main components of this technology are: -- *vcperf.exe*, a command-line utility that you can use to collect traces for your builds, -- a Windows Performance Analyzer (WPA) extension that allows you to view build traces in WPA, and -- the C++ Build Insights SDK, a software development kit for creating your own tools that consume C++ Build Insights data. +- `vcperf.exe`, a command-line utility that you can use to collect traces for your builds +- A Windows Performance Analyzer (WPA) extension that allows you to view build traces in WPA, and +- The C++ Build Insights software development kit for creating your own tools that consume C++ Build Insights data. ## Documentation sections -[Tutorial: vcperf and Windows Performance Analyzer](tutorials/vcperf-and-wpa.md)\ +[vcperf and Windows Performance Analyzer](tutorials/vcperf-and-wpa.md)\ Learn how to collect build traces for your C++ projects and how to view them in WPA. -[Tutorial: Windows Performance Basics](tutorials/wpa-basics.md)\ +[Windows Performance Basics](tutorials/wpa-basics.md)\ Discover useful WPA tips for analyzing your build traces. [C++ Build Insights SDK](reference/sdk/overview.md)\ @@ -41,20 +41,13 @@ An overview of the C++ Build Insights SDK. Read these articles from the official C++ team blog for more information on C++ Build Insights: -[Introducing C++ Build Insights](https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/) - -[Analyze your builds programmatically with the C++ Build Insights SDK](https://devblogs.microsoft.com/cppblog/analyze-your-builds-programmatically-with-the-c-build-insights-sdk/) - -[Finding build bottlenecks with C++ Build Insights](https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/) - -[Faster builds with PCH suggestions from C++ Build Insights](https://devblogs.microsoft.com/cppblog/faster-builds-with-pch-suggestions-from-c-build-insights/) - -[Profiling template metaprograms with C++ Build Insights](https://devblogs.microsoft.com/cppblog/profiling-template-metaprograms-with-cpp-build-insights/) - -[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights/) - -[Introducing vcperf /timetrace for C++ build time analysis](https://devblogs.microsoft.com/cppblog/introducing-vcperf-timetrace-for-cpp-build-time-analysis/) - +[Introducing C++ Build Insights](https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/)\ +[Analyze your builds programmatically with the C++ Build Insights SDK](https://devblogs.microsoft.com/cppblog/analyze-your-builds-programmatically-with-the-c-build-insights-sdk/)\ +[Finding build bottlenecks with C++ Build Insights](https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/)\ +[Faster builds with PCH suggestions from C++ Build Insights](https://devblogs.microsoft.com/cppblog/faster-builds-with-pch-suggestions-from-c-build-insights/)\ +[Profiling template metaprograms with C++ Build Insights](https://devblogs.microsoft.com/cppblog/profiling-template-metaprograms-with-cpp-build-insights/)\ +[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights/)\ +[Introducing vcperf /timetrace for C++ build time analysis](https://devblogs.microsoft.com/cppblog/introducing-vcperf-timetrace-for-cpp-build-time-analysis/)\ [Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/) ::: moniker-end diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/environment-variable.md b/docs/build-insights/reference/sdk/cpp-event-data-types/environment-variable.md index 7265d140e1..133484cb32 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/environment-variable.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/environment-variable.md @@ -38,7 +38,7 @@ Along with the inherited members from its [SimpleEvent](simple-event.md) base cl ### Functions -[Name](#name) +[Name](#name)\ [Value](#value) ## EnvironmentVariable diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/event-group.md b/docs/build-insights/reference/sdk/cpp-event-data-types/event-group.md index 0329689f4c..6eeabda6f4 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/event-group.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/event-group.md @@ -42,11 +42,11 @@ The activity type contained in the group. ### Functions -[Back](#back) -[begin](#begin) -[end](#end) -[Front](#front) -[operator[]](#subscript-operator) +[Back](#back)\ +[begin](#begin)\ +[end](#end)\ +[Front](#front)\ +[operator[]](#subscript-operator)\ [Size](#size) ## Back diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/event-stack.md b/docs/build-insights/reference/sdk/cpp-event-data-types/event-stack.md index 7b64275549..e206d537cf 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/event-stack.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/event-stack.md @@ -37,8 +37,8 @@ public: ### Functions -[Back](#back) -[operator[]](#subscript-operator) +[Back](#back)\ +[operator[]](#subscript-operator)\ [Size](#size) ## Back diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/event.md b/docs/build-insights/reference/sdk/cpp-event-data-types/event.md index f8f8926917..e4518cef9e 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/event.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/event.md @@ -43,7 +43,7 @@ public: ### Functions -[Data](#data) +[Data](#data)\ [EventId](#event-id)\ [EventInstanceId](#event-instance-id)\ [EventName](#event-name)\ diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/file-input.md b/docs/build-insights/reference/sdk/cpp-event-data-types/file-input.md index 74ba8fc4ce..1607802410 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/file-input.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/file-input.md @@ -48,7 +48,7 @@ Along with the inherited members from its [SimpleEvent](simple-event.md) base cl ### Functions -[Path](#path) +[Path](#path)\ [Type](#type) ## FileInput diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/file-output.md b/docs/build-insights/reference/sdk/cpp-event-data-types/file-output.md index 6772fe813e..f339588c6e 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/file-output.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/file-output.md @@ -48,7 +48,7 @@ Along with the inherited members from its [SimpleEvent](simple-event.md) base cl ### Functions -[Path](#path) +[Path](#path)\ [Type](#type) ## FileOutput diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/force-inlinee.md b/docs/build-insights/reference/sdk/cpp-event-data-types/force-inlinee.md index edd2ae4ddf..ee9bac8bc6 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/force-inlinee.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/force-inlinee.md @@ -38,7 +38,7 @@ Along with the inherited members from its [SimpleEvent](simple-event.md) base cl ### Functions -[Name](#name) +[Name](#name)\ [Size](#size) ## ForceInlinee diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/invocation.md b/docs/build-insights/reference/sdk/cpp-event-data-types/invocation.md index 0006c06a83..3dc40659f7 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/invocation.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/invocation.md @@ -50,10 +50,10 @@ Along with the inherited members from its [Activity](activity.md) base class, th ### Functions -[ToolPath](#tool-path) -[ToolVersion](#tool-version) -[ToolVersionString](#tool-version-string) -[Type](#type) +[ToolPath](#tool-path)\ +[ToolVersion](#tool-version)\ +[ToolVersionString](#tool-version-string)\ +[Type](#type)\ [WorkingDirectory](#working-directory) ## Invocation diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/raw-event.md b/docs/build-insights/reference/sdk/cpp-event-data-types/raw-event.md index 2d767ed280..ef78df1ffc 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/raw-event.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/raw-event.md @@ -67,8 +67,8 @@ If you don't want to convert ticks yourself, the `RawEvent` class provides membe [CPUTime](#cpu-time)\ [Data](#data)\ [Duration](#duration)\ -[EventId](#event-id) -[EventInstanceId](#event-instance-id) +[EventId](#event-id)\ +[EventInstanceId](#event-instance-id)\ [EventName](#event-name)\ [EventWideName](#event-wide-name)\ [ExclusiveCPUTicks](#exclusive-cpu-ticks)\ diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/symbol-name.md b/docs/build-insights/reference/sdk/cpp-event-data-types/symbol-name.md index 98b10ece5b..a172bccaea 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/symbol-name.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/symbol-name.md @@ -38,7 +38,7 @@ Along with the inherited members from its [SimpleEvent](simple-event.md) base cl ### Functions -[Key](#key) +[Key](#key)\ [Name](#name) ## Key diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation.md b/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation.md index 3729c2bebd..b73bc7f4fb 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/template-instantiation.md @@ -48,8 +48,8 @@ Along with the inherited members from its [Activity](activity.md) base class, th ### Functions -[Kind](#kind) -[PrimaryTemplateSymbolKey](#primary-template-symbol-key) +[Kind](#kind)\ +[PrimaryTemplateSymbolKey](#primary-template-symbol-key)\ [SpecializationSymbolKey](#specialization-symbol-key) ## Kind diff --git a/docs/build-insights/reference/sdk/cpp-event-data-types/trace-info.md b/docs/build-insights/reference/sdk/cpp-event-data-types/trace-info.md index 918f0ecba9..0d7d0284f4 100644 --- a/docs/build-insights/reference/sdk/cpp-event-data-types/trace-info.md +++ b/docs/build-insights/reference/sdk/cpp-event-data-types/trace-info.md @@ -47,10 +47,10 @@ If you don't want to convert ticks yourself, the `TraceInfo` class provides a me ### Functions -[Duration](#duration) -[LogicalProcessorCount](#logical-processor-count) -[StartTimestamp](#start-timestamp) -[StopTimestamp](#stop-timestamp) +[Duration](#duration)\ +[LogicalProcessorCount](#logical-processor-count)\ +[StartTimestamp](#start-timestamp)\ +[StopTimestamp](#stop-timestamp)\ [TickFrequency](#tick-frequency) ## Duration diff --git a/docs/build-insights/reference/sdk/functions/stop-tracing-session-a.md b/docs/build-insights/reference/sdk/functions/stop-tracing-session-a.md index 46dedc00da..39ac969bab 100644 --- a/docs/build-insights/reference/sdk/functions/stop-tracing-session-a.md +++ b/docs/build-insights/reference/sdk/functions/stop-tracing-session-a.md @@ -13,7 +13,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s ::: moniker-end ::: moniker range=">=msvc-150" -The `StopTracingSessionA` function stops an ongoing tracing session and produces a raw trace file. Raw trace files can be passed to the [Analyze](analyze.md), [AnalzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. Raw trace files can also be passed to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start relogging session. Executables calling `StopTracingSessionA` must have administrator privileges. +The `StopTracingSessionA` function stops an ongoing tracing session and produces a raw trace file. Raw trace files can be passed to the [Analyze](analyze.md), [AnalyzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. Raw trace files can also be passed to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start relogging session. Executables calling `StopTracingSessionA` must have administrator privileges. ## Syntax diff --git a/docs/build-insights/reference/sdk/functions/stop-tracing-session-w.md b/docs/build-insights/reference/sdk/functions/stop-tracing-session-w.md index a050b60ed3..32e05f8ce8 100644 --- a/docs/build-insights/reference/sdk/functions/stop-tracing-session-w.md +++ b/docs/build-insights/reference/sdk/functions/stop-tracing-session-w.md @@ -13,7 +13,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s ::: moniker-end ::: moniker range=">=msvc-150" -The `StopTracingSessionW` function stops an ongoing tracing session and produces a raw trace file. Raw trace files can be passed to the [Analyze](analyze.md), [AnalzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. Raw trace files can also be passed to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start relogging session. Executables calling `StopTracingSessionW` must have administrator privileges. +The `StopTracingSessionW` function stops an ongoing tracing session and produces a raw trace file. Raw trace files can be passed to the [Analyze](analyze.md), [AnalyzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. Raw trace files can also be passed to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start relogging session. Executables calling `StopTracingSessionW` must have administrator privileges. ## Syntax diff --git a/docs/build-insights/reference/sdk/functions/stop-tracing-session.md b/docs/build-insights/reference/sdk/functions/stop-tracing-session.md index ca9bea6c23..9e52425ed8 100644 --- a/docs/build-insights/reference/sdk/functions/stop-tracing-session.md +++ b/docs/build-insights/reference/sdk/functions/stop-tracing-session.md @@ -15,7 +15,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s ::: moniker-end ::: moniker range=">=msvc-150" -The `StopTracingSession` function stops an ongoing tracing session and produces a raw trace file. You can pass raw trace files to the [Analyze](analyze.md), [AnalzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. You can pass raw trace files to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start a relogging session. +The `StopTracingSession` function stops an ongoing tracing session and produces a raw trace file. You can pass raw trace files to the [Analyze](analyze.md), [AnalyzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. You can pass raw trace files to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start a relogging session. The caller must have administrator permissions to use `StopTracingSession`. @@ -28,7 +28,7 @@ inline RESULT_CODE StopTracingSession( TRACING_SESSION_STATISTICS* statistics); inline RESULT_CODE StopTracingSession( - const wchar_t* sessionName + const wchar_t* sessionName, const wchar_t* outputLogFile, TRACING_SESSION_STATISTICS* statistics); ``` diff --git a/docs/build-insights/toc.yml b/docs/build-insights/toc.yml index 9845654422..99cea23e5b 100644 --- a/docs/build-insights/toc.yml +++ b/docs/build-insights/toc.yml @@ -6,10 +6,12 @@ items: - name: "Tutorials" expanded: true items: - - name: "Tutorial: Troubleshoot function inlining on build time" + - name: "Troubleshoot function inlining on build time" href: ../build-insights/tutorials/build-insights-function-view.md - - name: "Tutorial: Troubleshoot header file impact on build time" + - name: "Troubleshoot header file impact on build time" href: ../build-insights/tutorials/build-insights-included-files-view.md + - name: "Build Insights tips and tricks" + href: ../build-insights/tutorials/build-insights-tips.md - name: "vcperf and Windows Performance Analyzer" href: ../build-insights/tutorials/vcperf-and-wpa.md - name: "Windows Performance Analyzer basics" diff --git a/docs/build-insights/tutorials/build-insights-function-view.md b/docs/build-insights/tutorials/build-insights-function-view.md index 612e5c3fd6..598ea77cf2 100644 --- a/docs/build-insights/tutorials/build-insights-function-view.md +++ b/docs/build-insights/tutorials/build-insights-function-view.md @@ -1,10 +1,10 @@ --- -title: "Tutorial: Troubleshoot function inlining on build time" -description: "Tutorial on how to use Build Insights function view to troubleshoot the impact of function inlining on build time in your C++ projects." +title: "Troubleshoot function inlining on build time" +description: "Tutorial for how to use Build Insights function view to troubleshoot the impact of function inlining on build time in your C++ projects." ms.date: 5/30/2024 helpviewer_keywords: ["C++ Build Insights", "inline function analysis", "build time analysis", "__forceinline analysis", "inlines analysis"] --- -# Tutorial: Troubleshoot function inlining on build time +# Troubleshoot function inlining on build time Use Build Insights **Functions** view to troubleshoot the impact of function inlining on build time in your C++ projects. @@ -63,10 +63,10 @@ When the build finishes, an Event Trace Log (ETL) file opens. It's saved in the In the window for the ETL file, choose the **Functions** tab. It shows the functions that were compiled and the time it took to generate the code for each function. If the amount of code generated for a function is negligible, it won't appear in the list to avoid degrading build event collection performance. :::image type="complex" source="./media/functions-view-before-fix.png" alt-text="Screenshot of the Build Insights Functions view file."::: -In the Function Name column, performPhysicsCalculations() is highlighted and marked with a fire icon.::: +In the Function Name column, performPhysicsCalculations() is highlighted and marked with a fire icon. :::image-end::: -The **Time [sec, %]** column shows how long it took to compile each function in [wall clock responsibility time (WCTR)](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/#:~:text=Today%2C%20we%E2%80%99d%20like%20to%20teach%20you%20about%20a,your%20build%2C%20even%20in%20the%20presence%20of%20parallelism). This metric distributes the wall clock time among functions based on their use of parallel compiler threads. For example, if two different threads are compiling two different functions simultaneously within a one-second period, each function’s WCTR is recorded as 0.5 seconds. This reflects each function’s proportional share of the total compilation time, taking into account the resources each consumed during parallel execution. Thus, WCTR provides a better measure of the impact each function has on the overall build time in environments where multiple compilation activities occur simultaneously. +The **Time [sec, %]** column shows how long it took to compile each function in [wall clock responsibility time (WCTR)](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/#:~:text=Today%2C%20we%E2%80%99d%20like%20to%20teach%20you%20about%20a,your%20build%2C%20even%20in%20the%20presence%20of%20parallelism). This metric distributes the wall clock time among functions based on their use of parallel compiler threads. For example, if two different threads are compiling two different functions simultaneously within a one-second period, each function's WCTR is recorded as 0.5 seconds. This reflects each function's proportional share of the total compilation time, taking into account the resources each consumed during parallel execution. Thus, WCTR provides a better measure of the impact each function has on the overall build time in environments where multiple compilation activities occur simultaneously. The **Forceinline Size** column shows roughly how many instructions were generated for the function. Click the chevron before the function name to see the individual inlined functions that were expanded in that function how roughly how many instructions were generated for each. @@ -112,7 +112,7 @@ We rerun Build Insights from the main menu by choosing **Build** > **Run Build I The build time goes from 25.181 seconds to 13.376 seconds and the `performPhysicsCalculations` function doesn't show up anymore in the **Functions** view because it doesn't contribute enough to the build time to be counted. :::image type="complex" source="./media/functions-view-after-fix.png" alt-text="Screenshot of the 2D vector header file."::: -In the Function Name column, performPhysicsCalculations() is highlighted and marked with a fire icon.::: +In the Function Name column, performPhysicsCalculations() is highlighted and marked with a fire icon. :::image-end::: The Diagnostics Session time is the overall time it took do the build plus any overhead for gathering the Build Insights data. @@ -141,6 +141,7 @@ Double-click, right-click, or press **Enter** while on a file in the **Functions ## See also +[Build Insights tips and tricks](build-insights-tips.md)\ [Inline functions (C++)](../../cpp/inline-functions-cpp.md)\ [Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time)\ [Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\ diff --git a/docs/build-insights/tutorials/build-insights-included-files-view.md b/docs/build-insights/tutorials/build-insights-included-files-view.md index b74f0384c8..3563f96d71 100644 --- a/docs/build-insights/tutorials/build-insights-included-files-view.md +++ b/docs/build-insights/tutorials/build-insights-included-files-view.md @@ -1,10 +1,10 @@ --- -title: "Tutorial: Troubleshoot header file impact on build time" +title: "Troubleshoot header file impact on build time" description: "Tutorial on how to use Build Insights Includes Files and Includes Tree views to troubleshoot the impact of #include files on build time." ms.date: 5/30/2024 helpviewer_keywords: ["C++ Build Insights", "header file build time", "included files view", "include tree view", "#include analysis", "build time analysis"] --- -# Tutorial: Troubleshoot header file impact on build time +# Troubleshoot header file impact on build time Use Build Insights **Included Files** and **Include Tree** views to troubleshoot the impact of `#include` files on C and C++ build times. @@ -44,7 +44,7 @@ Before gathering Build Insights data, set the build options for the type of buil ## Run Build Insights -On a project of your choosing, and using the **Debug** build options set in the previous section, run Build Insights by choosing from the main menu **Build** > **Run Build Insights on Selection** > **Rebuild**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Rebuild**. Choose **Rebuild** instead of **Build** to measure the build time for the entire project and not for just the few files may be dirty right now. +On a project of your choosing, and using the **Debug** build options set in the previous section, run Build Insights by choosing from the main menu **Build** > **Run Build Insights on \** > **Rebuild**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Rebuild**. Choose **Rebuild** instead of **Build** to measure the build time for the entire project and not for just the few files may be dirty right now. :::image type="content" source="./media/build-insights-rebuild-project.png" alt-text="Screenshot of the main menu with Run Build Insights on Selection > Rebuild selected."::: @@ -171,7 +171,7 @@ Or, you can right-click a file in the **Include Tree** view to jump to it in the - The **Included Files** and **Include Tree** views provide a filter box to find a header file that you're interested in. It does partial matches on the name you provide. - Sometimes the parse time reported for a header file is different depending on which file includes it. This can be due to the interplay of different `#define`s that affect which parts of the header are expanded, file caching, and other system factors. - If you forget what the **Included Files** or **Include Tree** view is trying to show you, hover over the tab to see a tooltip that describes the view. For example, if you hover over the **Include Tree** tab, the tooltip says: "View that shows include statistics for every file where the children nodes are the files included by the parent node." -- You may see cases (like `Windows.h`) where the aggregated duration of all the times for a header file is longer than the duration of the entire build. What’s happening is that headers are being parsed on multiple threads at the same time. If two threads simultaneously spend one second parsing a header file, that's 2 seconds of build time even though only one second of wall clock time has gone by. For more information, see [wall clock responsibility time (WCTR)](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/#:~:text=Today%2C%20we%E2%80%99d%20like%20to%20teach%20you%20about%20a,your%20build%2C%20even%20in%20the%20presence%20of%20parallelism). +- You may see cases (like `Windows.h`) where the aggregated duration of all the times for a header file is longer than the duration of the entire build. What's happening is that headers are being parsed on multiple threads at the same time. If two threads simultaneously spend one second parsing a header file, that's 2 seconds of build time even though only one second of wall clock time has gone by. For more information, see [wall clock responsibility time (WCTR)](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/#:~:text=Today%2C%20we%E2%80%99d%20like%20to%20teach%20you%20about%20a,your%20build%2C%20even%20in%20the%20presence%20of%20parallelism). ## Troubleshooting @@ -180,8 +180,9 @@ Or, you can right-click a file in the **Include Tree** view to jump to it in the ## See also +[Build Insights tips and tricks](build-insights-tips.md)\ [Compare header units, modules, and precompiled headers](../../build/compare-inclusion-methods.md)\ [Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\ [Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time)\ -[Tutorial: Troubleshoot function inlining on build time](build-insights-function-view.md)\ -[Tutorial: vcperf and Windows Performance Analyzer](vcperf-and-wpa.md) \ No newline at end of file +[Troubleshoot function inlining on build time](build-insights-function-view.md)\ +[vcperf and Windows Performance Analyzer](vcperf-and-wpa.md) \ No newline at end of file diff --git a/docs/build-insights/tutorials/build-insights-tips.md b/docs/build-insights/tutorials/build-insights-tips.md new file mode 100644 index 0000000000..d071aaddda --- /dev/null +++ b/docs/build-insights/tutorials/build-insights-tips.md @@ -0,0 +1,79 @@ +--- +title: "Build Insights tips and tricks" +description: "Learn time-saving tips for using Build Insights." +ms.date: 1/8/2025 +author: tylermsft +ms.author: twhitney +ms.topic: article +helpviewer_keywords: ["C++ Build Insights tips and tricks"] +--- +# Build Insights tips and tricks + +Learn time-saving tips for using Build Insights. + +## Run Build Insights on selected files + +This feature requires Visual Studio 2022 17.12 or later. + +If you're working on a specific file or files, and want to see how they impact your build time, you can run Build Insights on just those files. This feature is useful when you want to focus on a subset of files in your project. + +To try it, in **Solution Explorer** select the files in your project you want to profile, right-click, and choose **Run Build Insights on Selected Files**: + + :::image type="content" source="./media/build-insights-run-on-selected-files.png" alt-text="A screenshot of files in the Solution Explorer. The context menu is open and the option to Run Build Insights on Selected Files is highlighted."::: + +## Filter Build Insights results + +This feature requires Visual Studio 2022 17.12 or later. + +If you have a large solution with many projects, you can filter the Build Insights results to see files only the projects you're interested in. This feature is useful when you want to focus on a subset of projects in your solution. + +To try it, click the filter button on the filter column header and select the projects you want to see results for: + + :::image type="complex" source="./media/build-insights-filter-by-project.png" alt-text="A screenshot of the Build Insights window with the Included Files tab open."::: + The filter button is selected and a list of projects appears. Checkboxes next to two projects are checked. + :::image-end::: + +You can also use file wildcards to filter results. The search is case-insensitive and you should use forward slashes (`/`) as path separators: + + :::image type="content" source="./media/build-insights-glob-filter.png" alt-text="A screenshot of the build insights filter dialog. There's a files to include text box and a files to exclude text box."::: + +This allows you to exclude files from a specific folder or only include files from a specific folder. For example, if your source is located at `C:\src\`, you could include files only from the renderer directory and its subdirectories by putting `C:/src/dev/renderer/**` into the **files to include** text box. Use forward slashes (`/`) as path separators. + +Here are some other examples: + +- All files in the renderer directory: `C:/src/dev/renderer/*` +- All files in the `C:/src/dev/renderer/` directory *and all its subdirectories*: `C:/src/dev/renderer/**` +- All header files in the `C:/src/dev/renderer/` directory *and all its subdirectories*: `C:/src/dev/renderer/**/*.h` + +For more examples, see the [online glob pattern tester](https://globster.xyz/). + +The filter you enter into either text box persists per solution. Filtering by wildcards isn't supported for CMAKE projects. + +## Save Build Insights reports to a designated folder + +This feature requires Visual Studio 2022 17.12 or later. + +Now you can designate a folder to automatically save Build Insight reports to so you can easily access them. + +To set the designated folder, go to **Tools** > **Options** > **C++ Build Insights** > **Trace Collection**. Set a path in the **Store Build Insights reports in this directory** textbox: + + :::image type="complex" source="./media/build-insights-reports-directory.png" alt-text="A screenshot of the options window."::: + In the left pane, Build Insights > Trace Collection is selected. In the collection settings, the checkbox for Store Build Insights reports in this directory is selected, and the directory text box contains the path c:\users\contoso\workspace as an example. + :::image-end::: + +Reports are automatically saved to this folder when you run Build Insights. If a path isn't set, the `TEMP` folder is used. + +## Get help about the Build Insight window + +This feature requires Visual Studio 2022 17.12 or later. + +To see a short description for the tabs in the Build Insights window, along with a link to the documentation for a detailed explanation, click the question mark icon in the Build Insights window: + + :::image type="content" source="./media/build-insights-view-explanations.png" alt-text="A screenshot of the Build Insights window with the view explanations button (a question mark in a circle) highlighted."::: + +## See also + +[Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\ +[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights)\ +[Troubleshoot header file impact on build time](build-insights-included-files-view.md)\ +[Tutorial: Troubleshoot function inlining on build time](build-insights-function-view.md) diff --git a/docs/build-insights/tutorials/media/build-insights-filter-by-project.png b/docs/build-insights/tutorials/media/build-insights-filter-by-project.png new file mode 100644 index 0000000000..4a2f902081 Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-filter-by-project.png differ diff --git a/docs/build-insights/tutorials/media/build-insights-glob-filter.png b/docs/build-insights/tutorials/media/build-insights-glob-filter.png new file mode 100644 index 0000000000..98395c240f Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-glob-filter.png differ diff --git a/docs/build-insights/tutorials/media/build-insights-reports-directory.png b/docs/build-insights/tutorials/media/build-insights-reports-directory.png new file mode 100644 index 0000000000..e9c751814f Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-reports-directory.png differ diff --git a/docs/build-insights/tutorials/media/build-insights-run-on-selected-files.png b/docs/build-insights/tutorials/media/build-insights-run-on-selected-files.png new file mode 100644 index 0000000000..1a5c0f8556 Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-run-on-selected-files.png differ diff --git a/docs/build-insights/tutorials/media/build-insights-view-explanations.png b/docs/build-insights/tutorials/media/build-insights-view-explanations.png new file mode 100644 index 0000000000..3b33e677bc Binary files /dev/null and b/docs/build-insights/tutorials/media/build-insights-view-explanations.png differ diff --git a/docs/build/adding-references-in-visual-cpp-projects.md b/docs/build/adding-references-in-visual-cpp-projects.md index 5d8a5208f7..17676d6d6b 100644 --- a/docs/build/adding-references-in-visual-cpp-projects.md +++ b/docs/build/adding-references-in-visual-cpp-projects.md @@ -21,13 +21,13 @@ To consume a library that you have downloaded by using the **vcpkg** package man If your static library project gets built in the same solution: -1. #include the header file(s) for the static library using quotation marks. In a typical solution, the path starts with `../`. IntelliSense will help you find it. +1. `#include` the header file(s) for the static library using quotation marks. In a typical solution, the path starts with `../`. IntelliSense will help you find it. 2. Add a reference to the static library project. Right-click on **References** under the application project node in **Solution Explorer** and choose **Add Reference**. If the static library isn't part of the solution: 1. Right-click on the application project node in **Solution Explorer** and then choose **Properties**. -2. In the **VC++ Directories** property page, add the path to the directory that contains the LIB file to **Library Paths**. Then, add the path to the library header file(s) to **Include Directories**. +2. In the **VC++ Directories** property page, add the path to the directory that contains the LIB file to **Library Directories**. Then, add the path to the library header file(s) to **Include Directories**. 3. In the **Linker > Input** property page, add the name of the LIB file to **Additional Dependencies**. ## Dynamic link libraries @@ -161,5 +161,5 @@ The following properties exist on COM and .NET assembly references, and aren't m ## See also -[C++ project property page reference](reference/property-pages-visual-cpp.md)
+[C++ project property page reference](reference/property-pages-visual-cpp.md)\ [Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md) diff --git a/docs/build/arm64-exception-handling.md b/docs/build/arm64-exception-handling.md index 9706164bda..9bad5d2883 100644 --- a/docs/build/arm64-exception-handling.md +++ b/docs/build/arm64-exception-handling.md @@ -299,14 +299,20 @@ The unwind codes are encoded according to the table below. All unwind codes are | `save_fregp_x` | 1101101x'xxzzzzzz: save pair `d(8+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -512 | | `save_freg` | 1101110x'xxzzzzzz: save reg `d(8+#X)` at `[sp+#Z*8]`, offset \<= 504 | | `save_freg_x` | 11011110'xxxzzzzz: save reg `d(8+#X)` at `[sp-(#Z+1)*8]!`, pre-indexed offset >= -256 | +| `alloc_z` | 11011111'zzzzzzzz: allocate stack with size `z * SVE-VL` | | `alloc_l` | 11100000'xxxxxxxx'xxxxxxxx'xxxxxxxx: allocate large stack with size \< 256M (2^24 * 16) | | `set_fp` | 11100001: set up `x29` with `mov x29,sp` | | `add_fp` | 11100010'xxxxxxxx: set up `x29` with `add x29,sp,#x*8` | | `nop` | 11100011: no unwind operation is required. | | `end` | 11100100: end of unwind code. Implies `ret` in epilog. | | `end_c` | 11100101: end of unwind code in current chained scope. | -| `save_next` | 11100110: save next non-volatile Int or FP register pair. | -| | 11100111: reserved | +| `save_next` | 11100110: save next register pair. | +| `save_any_xreg` | 11100111'0pxrrrrr'00oooooo: save register(s)
  • `p`: 0/1 => single `X(#r)` vs pair `X(#r)` + `X(#r+1)`
  • `x`: 0/1 => positive vs negative pre-indexed stack offset
  • `o`: offset = `o` * 16, if x=1 or p=1, else `o` * 8
(Windows >= 11 required) | +| `save_any_dreg` | 11100111'0pxrrrrr'01oooooo: save register(s)
  • `p`: 0/1 => single `D(#r)` vs pair `D(#r)` + `D(#r+1)`
  • `x`: 0/1 => positive vs negative pre-indexed stack offset
  • `o`: offset = `o` * 16, if x=1 or p=1, else `o` * 8
(Windows >= 11 required) | +| `save_any_qreg` | 11100111'0pxrrrrr'10oooooo: save register(s)
  • `p`: 0/1 => single `Q(#r)` vs pair `Q(#r)` + `Q(#r+1)`
  • `x`: 0/1 => positive vs negative pre-indexed stack offset
  • `o`: offset = `o` * 16
(Windows >= 11 required) | +| `save_zreg` | 11100111'0oo0rrrr'11oooooo: save reg `Z(#r+8)` at `[sp + #o * VL]`, (`Z8` through `Z23`) +| `save_preg` | 11100111'0oo1rrrr'11oooooo: save reg `P(#r)` at `[sp + #o * (VL / 8)]`, (`P4` through `P15`; `r` values `[0, 3]` are reserved) +| | 11100111'1yyyyyyy': reserved | | | 11101xxx: reserved for custom stack cases below only generated for asm routines | | | 11101000: Custom stack for `MSFT_OP_TRAP_FRAME` | | | 11101001: Custom stack for `MSFT_OP_MACHINE_FRAME` | @@ -330,7 +336,7 @@ In instructions with large values covering multiple bytes, the most significant Post-indexed offset addressing isn't allowed in a prolog. All offset ranges (#Z) match the encoding of `stp`/`str` addressing except `save_r19r20_x`, in which 248 is sufficient for all save areas (10 Int registers + 8 FP registers + 8 input registers). -`save_next` must follow a save for Int or FP volatile register pair: `save_regp`, `save_regp_x`, `save_fregp`, `save_fregp_x`, `save_r19r20_x`, or another `save_next`. It saves the next register pair at the next 16-byte slot in "growing up" order. A `save_next` refers to the first FP register pair when it follows the `save-next` that denotes the last Int register pair. +`save_next` must follow a save for a register pair: `save_regp`, `save_regp_x`, `save_fregp`, `save_fregp_x`, `save_r19r20_x`, or another `save_next`. It can also be used in conjunction with `save_any_xreg`, `save_any_dreg` or `save_any_qreg` but only when `p = 1`. It saves the next register pair in numerically increasing order to the next stack space. `save_next` must not be used beyond the last register of the same kind. Since the sizes of regular return and jump instructions are the same, there's no need for a separated `end` unwind code in tail-call scenarios. @@ -393,7 +399,7 @@ Step 6: Allocate remaining stack, including local area, `` pair, and out | 6d | (**CR** == 00 \|\| **CR** == 01) &&
`#locsz` <= 4080 | 1 | `sub sp,sp,#locsz` | `alloc_s`/`alloc_m` | | 6e | (**CR** == 00 \|\| **CR** == 01) &&
`#locsz` > 4080 | 2 | `sub sp,sp,4080`
`sub sp,sp,#(locsz-4080)` | `alloc_m`
`alloc_s`/`alloc_m` | -\* If **CR** == 01 and **RegI** is an odd number, Step 2 and the last `save_rep` in step 1 are merged into one `save_regp`. +\* If **CR** == 01 and **RegI** is an odd number, step 3 and the last `save_reg` in step 2 are merged into one `save_regp`. \*\* If **RegI** == **CR** == 0, and **RegF** != 0, the first `stp` for the floating-point does the predecrement. diff --git a/docs/build/arm64-windows-abi-conventions.md b/docs/build/arm64-windows-abi-conventions.md index 7d65ba7985..db01bfefe2 100644 --- a/docs/build/arm64-windows-abi-conventions.md +++ b/docs/build/arm64-windows-abi-conventions.md @@ -1,15 +1,15 @@ --- description: "Learn more about: Overview of ARM64 ABI conventions" title: "Overview of ARM64 ABI conventions" -ms.date: "03/27/2019" +ms.date: 04/08/2025 --- # Overview of ARM64 ABI conventions -The basic application binary interface (ABI) for Windows when compiled and run on ARM processors in 64-bit mode (ARMv8 or later architectures), for the most part, follows ARM's standard AArch64 EABI. This article highlights some of the key assumptions and changes from what is documented in the EABI. For information about the 32-bit ABI, see [Overview of ARM ABI conventions](overview-of-arm-abi-conventions.md). For more information about the standard ARM EABI, see [Application Binary Interface (ABI) for the ARM Architecture](https://github.com/ARM-software/abi-aa) (external link). +The basic application binary interface (ABI) for Windows when compiled and run on ARM processors in 64-bit mode (ARMv8 or later architectures), usually follows ARM's standard AArch64 EABI. This article highlights some of the key assumptions and changes from what is documented in the EABI. For information about the 32-bit ABI, see [Overview of ARM ABI conventions](overview-of-arm-abi-conventions.md). For more information about the standard ARM EABI, see [Application Binary Interface (ABI) for the ARM Architecture](https://github.com/ARM-software/abi-aa) (external link). ## Definitions -With the introduction of 64-bit support, ARM has defined several terms: +With the introduction of 64-bit support, ARM defined several terms: - **AArch32** – the legacy 32-bit instruction set architecture (ISA) defined by ARM, including Thumb mode execution. - **AArch64** – the new 64-bit instruction set architecture (ISA) defined by ARM. @@ -19,8 +19,9 @@ With the introduction of 64-bit support, ARM has defined several terms: Windows also uses these terms: - **ARM** – refers to the 32-bit ARM architecture (AArch32), sometimes referred to as WoA (Windows on ARM). -- **ARM32** – same as ARM, above; used in this document for clarity. +- **ARM32** – same as **ARM**. Used in this document for clarity. - **ARM64** – refers to the 64-bit ARM architecture (AArch64). There's no such thing as WoA64. +- **ARM64EC** - code built as ARM64EC can interoperate with x64 code running under emulation in the same process. The Arm64EC code in the process runs with native performance, while the x64 code runs using emulation. Finally, when referring to data types, the following definitions from ARM are referenced: @@ -30,7 +31,7 @@ Finally, when referring to data types, the following definitions from ARM are re ## Base requirements -The ARM64 version of Windows presupposes that it's running on an ARMv8 or later architecture at all times. Both floating-point and NEON support are presumed to be present in hardware. +The ARM64 version of Windows always presupposes that it's running on an ARMv8 or later architecture. Both floating-point and NEON support are presumed to be present in hardware. The ARMv8 specification describes new optional crypto and CRC helper opcodes for both AArch32 and AArch64. Support for them is currently optional, but recommended. To take advantage of these opcodes, apps should first make runtime checks for their existence. @@ -74,7 +75,7 @@ The AArch64 architecture supports 32 integer registers: | x18 | N/A | Reserved platform register: in kernel mode, points to KPCR for the current processor; In user mode, points to TEB | | x19-x28 | Non-volatile | Scratch registers | | x29/fp | Non-volatile | Frame pointer | -| x30/lr | Both | Link Register: Callee function must preserve it for its own return, but caller's value will be lost. | +| x30/lr | Both | Link Register: Callee function must preserve it for its own return, but caller's value is lost. | Each register may be accessed as a full 64-bit value (via x0-x30) or as a 32-bit value (via w0-w30). 32-bit operations zero-extend their results up to 64 bits. @@ -86,7 +87,7 @@ The frame pointer (x29) is required for compatibility with fast stack walking us ## Floating-point/SIMD registers -The AArch64 architecture also supports 32 floating-point/SIMD registers, summarized below: +The AArch64 architecture also supports these 32 floating-point/SIMD registers: | Register | Volatility | Role | | - | - | - | @@ -118,7 +119,11 @@ Like AArch32, the AArch64 specification provides three system-controlled "thread ## Floating-point exceptions -Support for IEEE floating-point exceptions is optional on AArch64 systems. For processor variants that do have hardware floating-point exceptions, the Windows kernel silently catches the exceptions and implicitly disables them in the FPCR register. This trap ensures normalized behavior across processor variants. Otherwise, code developed on a platform without exception support may find itself taking unexpected exceptions when running on a platform with support. +To determine if an ARM CPU supports exceptions, write a value that enables exceptions to the FPCR register and then read it back. If the CPU supports floating-point exceptions, the bits corresponding to supported exceptions remain set, while the CPU resets the bits for unsupported exceptions. + +On ARM64, Windows delivers exceptions for processors that support hardware floating-point exceptions. + +The [`_set_controlfp`](/cpp/c-runtime-library/reference/controlfp-s) function on ARM platforms correctly changes the FPCR register when unmasking floating-point exceptions. However, instead of raising an unmasked exception, Windows resets the FPCR register to its defaults every time an FP exception is about to be raised. ## Parameter passing @@ -148,7 +153,7 @@ For each argument in the list, the first matching rule from the following list i ### Stage C – Assignment of arguments to registers and stack -For each argument in the list, the following rules are applied in turn until the argument has been allocated. When an argument is assigned to a register, any unused bits in the register have unspecified value. If an argument is assigned to a stack slot, any unused padding bytes have unspecified value. +For each argument in the list, the following rules are applied in turn until the argument is allocated. When an argument is assigned to a register, any unused bits in the register have unspecified value. If an argument is assigned to a stack slot, any unused padding bytes have unspecified value. 1. If the argument is a Half-, Single-, Double- or Quad-precision Floating-point or Short Vector Type, and the NSRN is less than 8, then the argument is allocated to the least significant bits of register v\[NSRN]. The NSRN is incremented by one. The argument has now been allocated. @@ -158,7 +163,7 @@ For each argument in the list, the following rules are applied in turn until the 1. If the argument is an HFA, an HVA, a Quad-precision Floating-point or Short Vector Type, then the NSAA is rounded up to the larger of 8 or the Natural Alignment of the argument's type. -1. If the argument is a Half- or Single-precision Floating Point type, then the size of the argument is set to 8 bytes. The effect is as if the argument had been copied to the least significant bits of a 64-bit register, and the remaining bits filled with unspecified values. +1. If the argument is a Half- or Single-precision Floating Point type, then the size of the argument is set to 8 bytes. The effect is as if the argument were copied to the least significant bits of a 64-bit register, and the remaining bits filled with unspecified values. 1. If the argument is an HFA, an HVA, a Half-, Single-, Double-, or Quad-precision Floating-point or Short Vector Type, then the argument is copied to memory at the adjusted NSAA. The NSAA is incremented by the size of the argument. The argument has now been allocated. @@ -199,7 +204,7 @@ Floating-point values are returned in s0, d0, or v0, as appropriate. A type is considered to be an HFA or HVA if all of the following hold: - It's non-empty, -- It doesn't have any non-trivial default or copy constructors, destructors, or assignment operators, +- It doesn't have any nontrivial default or copy constructors, destructors, or assignment operators, - All of its members have the same HFA or HVA type, or are float, double, or neon types that match the other members' HFA or HVA types. HVA values with four or fewer elements are returned in s0-s3, d0-d3, or v0-v3, as appropriate. @@ -210,12 +215,12 @@ Types returned by value are handled differently depending on whether they have c - they have a trivial copy-assignment operator, and - they have a trivial destructor, -and are returned by non-member functions or static member functions, use the following return style: +and are returned by nonmember functions or static member functions, use the following return style: - Types that are HFAs with four or fewer elements are returned in s0-s3, d0-d3, or v0-v3, as appropriate. - Types less than or equal to 8 bytes are returned in x0. - Types less than or equal to 16 bytes are returned in x0 and x1, with x0 containing the lower-order 8 bytes. -- For other aggregate types, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x8. The callee may modify the result memory block at any point during the execution of the subroutine. The callee isn't required to preserve the value stored in x8. +- For other aggregate types, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as another argument to the function in x8. The callee may modify the result memory block at any point during the execution of the subroutine. The callee isn't required to preserve the value stored in x8. All other types use this convention: @@ -223,9 +228,9 @@ All other types use this convention: ## Stack -Following the ABI put forth by ARM, the stack must remain 16-byte aligned at all times. AArch64 contains a hardware feature that generates stack alignment faults whenever the SP isn't 16-byte aligned and an SP-relative load or store is done. Windows runs with this feature enabled at all times. +Following the ABI put forth by ARM, the stack must always remain 16-byte aligned. AArch64 contains a hardware feature that generates stack alignment faults whenever the SP isn't 16-byte aligned and an SP-relative load or store is done. Windows always runs with this feature enabled. -Functions that allocate 4k or more worth of stack must ensure that each page prior to the final page is touched in order. This action ensures no code can "leap over" the guard pages that Windows uses to expand the stack. Typically the touching is done by the `__chkstk` helper, which has a custom calling convention that passes the total stack allocation divided by 16 in x15. +Functions that allocate 4k or more worth of stack must ensure that each page before the final page is touched in order. This action ensures no code can "leap over" the guard pages that Windows uses to expand the stack. Typically the touching is done by the `__chkstk` helper, which has a custom calling convention that passes the total stack allocation divided by 16 in x15. ## Red zone @@ -241,7 +246,7 @@ Code within Windows is compiled with frame pointers enabled ([/Oy-](reference/oy ## Exception unwinding -Unwinding during exception handling is assisted through the use of unwind codes. The unwind codes are a sequence of bytes stored in the .xdata section of the executable. They describe the operation of the prologue and epilogue in an abstract manner, such that the effects of a function's prologue can be undone in preparation for backing up to the caller's stack frame. For more information on the unwind codes, see [ARM64 exception handling](arm64-exception-handling.md). +Unwinding during exception handling is assisted by using unwind codes. The unwind codes are a sequence of bytes stored in the .xdata section of the executable. They describe the operation of the prologue and epilogue in an abstract manner, such that the effects of a function's prologue can be undone in preparation for backing up to the caller's stack frame. For more information on the unwind codes, see [ARM64 exception handling](arm64-exception-handling.md). The ARM EABI also specifies an exception unwinding model that uses unwind codes. However, the specification as presented is insufficient for unwinding in Windows, which must handle cases where the PC is in the middle of a function prologue or epilogue. @@ -251,7 +256,7 @@ Code that is dynamically generated should be described with dynamic function tab All ARMv8 CPUs are required to support a cycle counter register, a 64-bit register that Windows configures to be readable at any exception level, including user mode. It can be accessed via the special PMCCNTR_EL0 register, using the MSR opcode in assembly code, or the `_ReadStatusReg` intrinsic in C/C++ code. -The cycle counter here is a true cycle counter, not a wall clock. The counting frequency will vary with the processor frequency. If you feel you must know the frequency of the cycle counter, you shouldn't be using the cycle counter. Instead, you want to measure wall clock time, for which you should use `QueryPerformanceCounter`. +The cycle counter here is a true cycle counter, not a wall clock. The counting frequency varies with the processor frequency. If you feel you must know the frequency of the cycle counter, you shouldn't be using the cycle counter. Instead, you want to measure wall clock time, for which you should use `QueryPerformanceCounter`. ## See also diff --git a/docs/build/arm64ec-windows-abi-conventions.md b/docs/build/arm64ec-windows-abi-conventions.md index b512a0e41c..9c78bc39f5 100644 --- a/docs/build/arm64ec-windows-abi-conventions.md +++ b/docs/build/arm64ec-windows-abi-conventions.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Overview of ARM64EC ABI conventions" title: "Overview of ARM64EC ABI conventions" +description: "Learn more about: Overview of ARM64EC ABI conventions" ms.date: "06/03/2022" --- # Overview of ARM64EC ABI conventions @@ -73,7 +73,7 @@ Special helper routines like `__chkstk_arm64ec` use custom calling conventions a 2 The ARM64EC carry flag `C` is the inverse of the x64 carry flag `CF` for subtraction operations. There's no special handling, because the flag is volatile and is therefore trashed when transitioning between (ARM64EC and x64) functions. -## Register mapping for vector registers +## Register mapping for vector registers | ARM64EC register | x64 register | ARM64EC calling convention | ARM64 calling convention | x64 calling convention | |--|--|--|--|--| @@ -92,6 +92,12 @@ Special helper routines like `__chkstk_arm64ec` use custom calling conventions a ARM64EC follows the same struct packing rules used for x64 to ensure interoperability between ARM64EC code and x64 code. For more information and examples of x64 struct packing, see [Overview of x64 ABI conventions](x64-software-conventions.md). +## Floating-point exceptions + +To determine if an ARM CPU supports exceptions, write a value that enables exceptions to the FPCR register and then read it back. If the CPU supports floating-point exceptions, the bits corresponding to supported exceptions remain set, while the CPU resets the bits for unsupported exceptions. + +On ARM64EC, Windows catches processor floating-point exceptions and disables them in the FPCR register. This ensures consistent behavior across different processor variants. + ## Emulation helper ABI routines ARM64EC code and [thunks](#thunks) use emulation helper routines to transition between x64 and ARM64EC functions. diff --git a/docs/build/clang-support-msbuild.md b/docs/build/clang-support-msbuild.md index 08c9adec55..6e44fbb42a 100644 --- a/docs/build/clang-support-msbuild.md +++ b/docs/build/clang-support-msbuild.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Clang/LLVM support in Visual Studio projects" title: "Clang/LLVM support in Visual Studio projects" +description: "Learn more about: Clang/LLVM support in Visual Studio projects" ms.date: 03/13/2024 ms.description: "Configure a Visual Studio MSBuild project to use the Clang/LLVM toolchain." helpviewer_keywords: ["Clang support for C++ MSBuild projects"] @@ -57,7 +57,7 @@ To configure a Visual Studio project to use Clang, right-click on the project no The project properties page is open to the Configuration Properties > General page. The Platform Toolset dropdown is selected, on which LLVM (clang-cl) is selected. :::image-end::: -If you're using the Clang tools that are bundled with Visual Studio, no extra steps are required. For Windows projects, Visual Studio by default invokes Clang in [clang-cl](https://llvm.org/devmtg/2014-04/PDFs/Talks/clang-cl.pdf) mode. It links with the Microsoft implementation of the Standard Library. By default, **clang-cl.exe** is located in `*%VCINSTALLDIR%\Tools\Llvm\bin\*` and `*%VCINSTALLDIR%\Tools\Llvm\x64\bin\*`. +If you're using the Clang tools that are bundled with Visual Studio, no extra steps are required. For Windows projects, Visual Studio by default invokes Clang in [clang-cl](https://llvm.org/devmtg/2014-04/PDFs/Talks/clang-cl.pdf) mode. It links with the Microsoft implementation of the Standard Library. By default, **clang-cl.exe** is located in *`%VCINSTALLDIR%\Tools\Llvm\bin\`* and *`%VCINSTALLDIR%\Tools\Llvm\x64\bin\`*. If you're using a custom Clang installation, you can change the value of the `LLVMInstallDir` property. For more information, see [Set a custom LLVM location](#custom_llvm_location). @@ -116,5 +116,7 @@ After you have set up a Clang configuration, right-click again on the project no When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. :::image type="complex" source="media/clang-debug-msbuild.png" alt-text="Screenshot of Visual Studio debugging a sample app"::: -The portion of the app that is visible creates a string vector and adds some strings to it. Execution has stopped on a breakpoint for the code: v.push_back("Clang/LLVM");." +The portion of the app that is visible creates a string vector and adds some strings to it. Execution has stopped on a breakpoint for the code: v.push_back("Clang/LLVM");. +:::image-end::: + ::: moniker-end diff --git a/docs/build/cmake-projects-in-visual-studio.md b/docs/build/cmake-projects-in-visual-studio.md index 40b56f6bb8..a164d943fe 100644 --- a/docs/build/cmake-projects-in-visual-studio.md +++ b/docs/build/cmake-projects-in-visual-studio.md @@ -1,7 +1,8 @@ --- title: "CMake projects in Visual Studio" -description: "How to create and build C++ projects using CMake in Visual Studio." -ms.date: 02/14/2022 +description: "Learn how to create and build C++ projects using CMake in Visual Studio." +ms.date: 03/18/2025 +ms.topic: concept-article f1_keywords: ["VS.ToolsOptionsPages.CMake.General", "VS.ToolsOptionsPages.CMake.LanguageServices"] --- # CMake projects in Visual Studio @@ -9,17 +10,17 @@ f1_keywords: ["VS.ToolsOptionsPages.CMake.General", "VS.ToolsOptionsPages.CMake. [CMake](https://cmake.org) is a cross-platform, open-source tool for defining build processes that run on multiple platforms. This article assumes you're familiar with CMake. For more information about CMake, see the [CMake documentation](https://cmake.org/cmake/help/latest/index.html#). The [CMake tutorial](https://cmake.org/cmake/help/latest/guide/tutorial/index.html#guide:CMake%20Tutorial) is a good starting point to learn more. > [!NOTE] -> CMake has become more and more integrated with Visual Studio over the past few releases. To see the documentation for your preferred version of Visual Studio, use the **Version** selector control. It's found at the top of the table of contents on this page. +> CMake has become more and more integrated with Visual Studio over the past few releases. To see the documentation for your preferred version of Visual Studio, use the **Version** selector located at the top of the table of contents on this page. ::: moniker range=">=msvc-160" -Visual Studio's native support for CMake enables you to edit, build, and debug CMake projects on Windows, the Windows Subsystem for Linux (WSL), and remote systems from the same instance of Visual Studio. CMake project files (such as *`CMakeLists.txt`*) are consumed directly by Visual Studio for the purposes of IntelliSense and browsing. `cmake.exe` is invoked directly by Visual Studio for CMake configuration and build. +Visual Studio's native support for CMake allows you to edit, build, and debug CMake projects on Windows, the Windows Subsystem for Linux (WSL), and remote systems from the same instance of Visual Studio. CMake project files (such as *`CMakeLists.txt`*) are consumed directly by Visual Studio for the purposes of IntelliSense and browsing. Visual Studio invokes `cmake.exe` directly for CMake configuration and build. ## Installation **C++ CMake tools for Windows** is installed as part of the **Desktop development with C++** and **Linux Development with C++** workloads. Both **C++ CMake tools for Windows** and **Linux Development with C++** are required for cross-platform CMake development. -:::image type="complex" source="media/cmake-install-2019.png" alt-text="Screenshot of the Visual Studio installer."::: +:::image type="complex" source="media/cmake-install-2022.png" alt-text="Screenshot of the Visual Studio installer."::: In the installer, the Desktop development with C plus plus dropdown is selected and C plus plus C Make tools for Windows is selected." :::image-end::: @@ -42,7 +43,7 @@ The dialog offers these options: clone a repository, open a project or solution, - In the background, Visual Studio starts to index the source files to enable IntelliSense, browsing information, refactoring, and so on. As you work, Visual Studio monitors changes in the editor and also on disk to keep its index in sync with the sources. > [!NOTE] -> Starting in Visual Studio 2022 version 17.1 Preview 2, if your top-level `CMakeLists.txt` exists in a subfolder and not at the root of the workspace, you'll be prompted whether you'd like to enable CMake integration or not. For more information, see [CMake partial activation](#cmake-partial-activation). +> Starting in Visual Studio 2022 version 17.1 Preview 2, if your top-level *`CMakeLists.txt`* exists in a subfolder and not at the root of the workspace, you're prompted whether you'd like to enable CMake integration or not. For more information, see [CMake partial activation](#cmake-partial-activation). Once CMake cache generation has succeeded, you can also view your projects organized logically by targets. Choose the **Select View** button on the **Solution Explorer** toolbar. From the list in **Solution Explorer - Views**, select **CMake Targets View** and press **Enter** to open the targets view: @@ -64,18 +65,18 @@ Most Visual Studio and C++ language features are supported by CMake projects in - [Clang/LLVM support](https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/) > [!NOTE] -> For other kinds of Open Folder projects, an additional JSON file *`CppProperties.json`* is used. This file is not relevant for CMake projects. +> For other kinds of Open Folder projects, an additional JSON file *`CppProperties.json`* is used. This file isn't relevant for CMake projects. ## Configuring CMake projects -The CMake configure step generates the project build system. It's equivalent to invoking `cmake.exe` from the command line. For more information on the CMake configure step, see the [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html#generate-a-project-buildsystem). +The CMake configure step generates the project build system. It's equivalent to invoking *`cmake.exe`* from the command line. For more information on the CMake configure step, see the [CMake documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html#generate-a-project-buildsystem). -Visual Studio uses a CMake configuration file to drive CMake generation and build. *`CMakePresets.json`* is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. *`CMakePresets.json`* is supported directly by CMake and can be used to drive CMake generation and build from Visual Studio, from VS Code, in a Continuous Integration pipeline, and from the command line on Windows, Linux, and Mac. For more information on *`CMakePresets.json`*, see [Configure and build with CMake Presets](cmake-presets-vs.md). *`CMakeSettings.json`* is available for customers using an earlier version of Visual Studio. For more information on *`CMakeSettings.json`*, see [Customize CMake build settings](customize-cmake-settings.md). +Visual Studio uses a CMake configuration file to drive CMake generation and build. *`CMakePresets.json`* is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. *`CMakePresets.json`* is supported directly by CMake and can be used to drive CMake generation and build from Visual Studio, from VS Code, in a continuous integration pipeline, and from the command line on Windows, Linux, and Mac. For more information on *`CMakePresets.json`*, see [Configure and build with CMake Presets](cmake-presets-vs.md). *`CMakeSettings.json`* is available for customers using an earlier version of Visual Studio. For more information on *`CMakeSettings.json`*, see [Customize CMake build settings](customize-cmake-settings.md). -When you make significant changes to your CMake configuration file or a *`CMakeLists.txt`* file, Visual Studio will automatically run the CMake configure step. You can invoke the configure step manually: Select **Project > Configure Cache** from the toolbar. You can also change your configuration preferences in **Tools** > **Options** > **CMake** > **General**. +When you make significant changes to your CMake configuration file or a *`CMakeLists.txt`* file, Visual Studio automatically runs the CMake configure step. You can invoke the configure step manually: Select **Project > Configure Cache** from the toolbar. You can also change your configuration preferences in **Tools** > **Options** > **CMake** > **General**. -:::image type="complex" source="media/cmake-configure-options.png" alt-text="Screenshot of the CMake configuration options in the Visual Studio settings window."::: -The CMake configure settings are called out. Show C Make cache notifications is selected. Under 'When cache is out of date:', the option 'Never run configure step automatically' is selected. +:::image type="complex" source="media/cmake-configure-options.png" alt-text="Screenshot of the C Make configuration options in the Visual Studio settings window."::: +The C Make configure settings are called out. Show C Make cache notifications is selected. Under 'When cache is out of date', the option 'Never run configure step automatically' is selected. :::image-end::: If the configure step finishes without errors, then the information that's available drives C++ IntelliSense and language services. It's also used in build and debug operations. @@ -88,6 +89,12 @@ By default, most configuration messages are suppressed unless there's an error. You can also disable all CMake cache notifications (gold bars) by deselecting **Show CMake cache notification**. +### Customize Targets View source groups + +By default, the CMake Targets View ignores the following source groups: *Source Files*, *Header Files*, *Resources*, *Object Files*. These groups are included by default in most CMake projects and would unnecessarily increase the number of clicks required to navigate the Targets View. + +You can enable the use of these source groups by selecting **Tools** > **Options** > **CMake** > **Enable the use of ignored source groups in CMake Targets View**. + ### Troubleshooting CMake cache errors If you need more information about the state of the CMake cache to diagnose a problem, open the **Project** main menu or the *`CMakeLists.txt`* context menu in **Solution Explorer** to run one of these commands: @@ -112,8 +119,8 @@ To build a CMake project, you have these choices: As you would expect, build results are shown in the **Output Window** and **Error List**. -:::image type="content" source="media/cmake-build-errors.png" alt-text="Screenshot of the Visual Studio Error List window"::: -CMake build warnings about conversions that may result in data loss such as converting from a float to an integer, are visible. +:::image type="complex" source="media/cmake-build-errors.png" alt-text="Screenshot of the Visual Studio Error List window"::: +C Make build warnings about conversions that might result in data loss such as converting from a float to an integer, are visible. :::image-end::: ### Edit build settings @@ -122,7 +129,7 @@ Visual Studio uses a CMake configuration file to drive CMake builds. CMake confi ## Debugging CMake projects -All executable CMake targets are shown in the **Startup Item** dropdown in the toolbar. To start debugging, select one and press the **Debug > Start Debugging** button in the toolbar. In a CMake project, the "Current document" option is only valid for .cpp files. +All executable CMake targets are shown in the **Startup Item** dropdown in the toolbar. To start debugging, select one and press the **Debug > Start Debugging** button in the toolbar. In a CMake project, the **Current document** option is only valid for .cpp files. :::image type="complex" source="media/debug-target.png" alt-text="Screenshot of the Visual Studio debug dropdown."::: The dropdown has these options: Show / Hide debug targets, current document, samples (which is highlighted), box2d_tests, and samples-noGUI. @@ -130,7 +137,7 @@ The dropdown has these options: Show / Hide debug targets, current document, sam The **Debug** or **F5** commands first build the project if changes have been made since the previous build. Changes to the CMake configuration file (*`CMakePresets.json`* or *`CMakeSettings.json`*) or a *`CMakeLists.txt`* causes the CMake cache to be regenerated. -You can customize a CMake debugging session by setting properties in the *`launch.vs.json`* file. To customize debug settings for a specific target, select the target in the **Startup Item** dropdown and press **Debug > Debug and Launch Settings for \**. For more information on CMake debugging sessions, see [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md). +You can customize a CMake debugging session by setting properties in the *`launch.vs.json`* file. To customize debug settings for a specific target, select the target in the **Startup Item** dropdown and choose **Debug > Debug and Launch Settings for \**. For more information on CMake debugging sessions, see [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md). ### Just My Code for CMake projects @@ -138,7 +145,7 @@ When you build for Windows using the MSVC compiler, CMake projects have support ### Edit and Continue for CMake projects -When you build for Windows with the MSVC compiler, CMake projects have support for Edit and Continue. Add the following code to your *`CMakeLists.txt`* file to enable Edit and Continue. For more information on Edit and Continue, see [Configure Edit and Continue (C#, VB, C++)](/visualstudio/debugger/how-to-enable-and-disable-edit-and-continue). +When you build for Windows with the MSVC compiler, CMake projects have support for Edit and Continue. Add the following code to your *`CMakeLists.txt`* file to enable Edit and Continue. ``` if(MSVC) @@ -147,6 +154,8 @@ if(MSVC) endif() ``` +For more information on Edit and Continue, see [Configure Edit and Continue (C#, VB, C++)](/visualstudio/debugger/how-to-enable-and-disable-edit-and-continue). + ### Attach to a CMake project running on Linux Visual Studio allows you to debug a process running on a remote Linux system or WSL and debug it with the GDB debugger. To get started, select **Debug** > **Attach to Process...**, set the **Connection type** to **SSH**, and select your **Connection target** from the list of connections in the Connection Manager. Select a process from the list of available processes and press **Attach**. GDB must be installed on your Linux machine. For more information on SSH connections, see the [Connection Manager](../linux/connect-to-your-remote-linux-computer.md) @@ -157,16 +166,16 @@ The following options are available on the dialog: Connection type (set to SSH), ## CMake partial activation -In Visual Studio 2022 version 17.1 and later, CMake functionality won't be enabled automatically if your root folder doesn't contain a `CMakeLists.txt` file. Instead, a dialog will prompt you on whether you'd like to enable CMake functionality for your project. If you decline, CMake cache generation won't start and CMake configurations (from `CMakeSettings.json` or `CMakePresets.json`) won't appear in the configuration dropdown. If you accept, you'll be taken to a workspace-level configuration file, `CMakeWorkspaceSettings.json` (stored in the `.vs` directory), to specify the folders you'd like to enable CMake for. (These folders contain your root `CMakeLists.txt` files). +In Visual Studio 2022 version 17.1 and later, CMake functionality isn't enabled automatically if your root folder doesn't contain a *`CMakeLists.txt`* file. Instead, a dialog prompts you on whether you'd like to enable CMake functionality for your project. If you decline, CMake cache generation doesn't start and CMake configurations (from *`CMakeSettings.json`* or *`CMakePresets.json`*) doesn't appear in the configuration dropdown. If you accept, you're taken to a workspace-level configuration file, *`CMakeWorkspaceSettings.json`* (stored in the *`.vs`* directory), to specify the folders you'd like to enable CMake for. (These folders contain your root *`CMakeLists.txt`* files). The accepted properties are: | Property | Description | |--|--| | `enableCMake` | Enable Visual Studio's integration for this workspace. | -| `sourceDirectory` | A string or array of strings specifying the directory or directories with `CMakeLists.txt`. Macros (such as `${workspaceRoot}`) are allowed. Relative paths are based on the workspace root. Directories outside of the current workspace will be ignored. | +| `sourceDirectory` | A string or array of strings specifying the directory or directories with *`CMakeLists.txt`*. Macros (such as `${workspaceRoot}`) are allowed. Relative paths are based on the workspace root. Directories outside of the current workspace are ignored. | -You can reach `CMakeWorkspaceSettings.json` through the **Project** > **CMake Workspace Settings** menu command at any time, even if CMake functionality is currently disabled. +You can reach *`CMakeWorkspaceSettings.json`* through the **Project** > **CMake Workspace Settings** menu command at any time, even if CMake functionality is currently disabled. ## Open an existing cache @@ -197,7 +206,7 @@ When your custom or preferred tools generate your cache, CMake places files unde To edit a *`CMakeLists.txt`* file, right-click on the file in **Solution Explorer** and choose **Open**. If you make changes to the file, a yellow status bar appears and informs you that IntelliSense will update. It gives you a chance to cancel the update operation. For information about *`CMakeLists.txt`*, see the [CMake documentation](https://cmake.org/documentation/). -:::image type="complex" source="media/cmake-cmakelists.png" alt-text="Screenshot of a C Make Lists .txt file being edited in Visual Studio." +:::image type="complex" source="media/cmake-cmakelists.png" alt-text="Screenshot of a C Make Lists TXT file being edited in Visual Studio." It contains the lines project (hello-cmake), add_subdirectory (tests), add_executable (hello hello.cpp), and install (TARGETS hello DESTINATION hello/bin). A message at the top of the window says that c plus plus IntelliSense info will refresh after C Make finishes generating the cache. :::image-end::: @@ -209,7 +218,7 @@ A C Make error message on line 3 of CMakeLists.txt is highlighted. The details a ### Language services for CMake -Language services for CMake are available in Visual Studio 2019 version 16.5 or later. It supports code navigation features like Go To Definition, Peek Definition, and Find All References for CMake variables, functions, and targets in CMake script files. For more information, see [Code Navigation for CMake Scripts](https://devblogs.microsoft.com/cppblog/code-navigation-for-cmake-scripts/). +Language services for CMake are available in Visual Studio 2019 version 16.5 or later. Language services support code navigation features like *Go To Definition*, *Peek Definition*, and *Find All References* for CMake variables, functions, and targets in CMake script files. For more information, see [Code Navigation for CMake Scripts](https://devblogs.microsoft.com/cppblog/code-navigation-for-cmake-scripts/). :::image type="complex" source="media/cmake-find-all-refs.png" alt-text="Screenshot of the Visual Studio Find All References window."::: Results of where SUPERTUX_SOURCES_CXX are found are shown. For example, in list(SORT SSUPERTUX_SOURCES_CXX), file(GLOB SUPERTUX_SOURCES_CXX) and so on. @@ -217,10 +226,10 @@ Results of where SUPERTUX_SOURCES_CXX are found are shown. For example, in list( ### CMake project manipulation -CMake project manipulation is available in Visual Studio 2019 version 16.5 or later. Project manipulation enables you to add, remove, and rename source files and targets in your CMake project without manually editing your CMake scripts. When you add or remove files from the Solution Explorer, Visual Studio automatically edits your CMake project. There could be more than one place where it makes sense to add or remove a reference to a CMake script. If so, Visual Studio asks you where you want to make the change and displays a preview of the proposed changes. For step-by-step instructions, see [Add, Remove, and Rename Files and Targets in CMake Projects](https://devblogs.microsoft.com/cppblog/easily-add-remove-and-rename-files-and-targets-in-cmake-projects/). +CMake project manipulation is available in Visual Studio 2019 version 16.5 or later. Project manipulation lets you add, remove, and rename source files and targets in your CMake project without manually editing your CMake scripts. When you add or remove files from the Solution Explorer, Visual Studio automatically edits your CMake project. There could be more than one place where it makes sense to add or remove a reference to a CMake script. If so, Visual Studio asks you where you want to make the change and displays a preview of the proposed changes. For step-by-step instructions, see [Add, Remove, and Rename Files and Targets in CMake Projects](https://devblogs.microsoft.com/cppblog/easily-add-remove-and-rename-files-and-targets-in-cmake-projects/). :::image type="complex" source="media/cmake-project-manipulation.png" alt-text="Screenshot of the Visual Studio Preview Changes dialog box."::: -A tree view shows CMakeLists.txt, under which are two items: add_executable and set. Set is checked. The preview window shows where changes will be made. The line set (PROJECT_SRC "CmakeProject4.cpp" "CMakeProject4.h" shows "Demo.cpp" highlighted before the closing parenthesis. The apply button accepts the change, or you can press cancel. +A tree view shows CMakeLists.txt, under which are two items: add_executable and set. Set is checked. The preview window shows where changes will be made. The line set PROJECT_SRC "CmakeProject4.cpp" "CMakeProject4.h" shows "Demo.cpp" highlighted before the closing parenthesis. The apply button accepts the change, or you can press cancel. :::image-end::: ## IntelliSense for CMake projects @@ -244,15 +253,15 @@ CMake projects opened in Visual Studio integrate with vcpkg, a cross-platform C/ If *`CMakeSettings.json`* is your active configuration file, Visual Studio automatically passes the vcpkg toolchain file (`vcpkg.cmake`) to CMake. This behavior is disabled automatically when you specify any other toolchain in your CMake Settings configuration. -If *`CMakePresets.json`* is your active configuration file, you'll need to set the path to `vcpkg.cmake` in *`CMakePresets.json`*. We recommend using the `VCPKG_ROOT` environment variable instead of an absolute path to keep the file shareable. For more information, see [Enable vcpkg integration with CMake Presets](cmake-presets-vs.md#enable-vcpkg-integration). *`CMakePresets.json`* is available in Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. +If *`CMakePresets.json`* is your active configuration file, you need to set the path to `vcpkg.cmake` in *`CMakePresets.json`*. We recommend using the `VCPKG_ROOT` environment variable instead of an absolute path to keep the file shareable. For more information, see [Enable vcpkg integration with CMake Presets](cmake-presets-vs.md#enable-vcpkg-integration). *`CMakePresets.json`* is available in Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. ## Run CMake from the command line If *`CMakePresets.json`* is your active CMake configuration file, then you can easily reproduce your local builds outside of Visual Studio. For more information, see [Run CMake from the command line or a CI pipeline](cmake-presets-vs.md#run-cmake-from-the-command-line-or-a-ci-pipeline). *`CMakePresets.json`* is supported in Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. -If *`CMakeSettings.json`* is your active CMake configuration file, then you'll need to manually pass the arguments that are encoded in your *`CMakeSettings.json`* file to CMake. If you have installed CMake from the Visual Studio Installer, you can run it from the command line by following these steps: +If *`CMakeSettings.json`* is your active CMake configuration file, then you need to manually pass the arguments that are encoded in your *`CMakeSettings.json`* file to CMake. If you installed CMake from the Visual Studio Installer, you can run it from the command line by following these steps: -1. Run the appropriate *`vsdevcmd.bat`* file (x86/x64). For more information, see [Building on the command line](building-on-the-command-line.md) . +1. Run the appropriate *`vsdevcmd.bat`* file (x86/x64). For more information, see [Use the Microsoft C++ toolset from the command line](building-on-the-command-line.md) . 1. Switch to your output folder. @@ -268,7 +277,7 @@ Visual Studio 2017 has rich support for CMake, including [cross-platform CMake p **Visual C++ Tools for CMake** is installed as part of the **Desktop development with C++** and **Linux Development with C++** workloads. -:::image type="content" source="media/cmake-install.png" alt-text="Screenshot of the Visual Studio Installer. The Individual components tab is selected on which Visual C plus plus tools for CMake is selected."::: +:::image type="content" source="media/cmake-install.png" alt-text="Screenshot of the Visual Studio Installer. The Individual components tab is selected on which Visual C plus plus tools for C Make is selected."::: For more information, see [Install the C++ Linux workload in Visual Studio](../linux/download-install-and-setup-the-linux-development-workload.md). @@ -284,17 +293,17 @@ When you choose **File > Open > Folder** to open a folder containing a *`CMakeLi - In the background, Visual Studio starts to index the source files to enable IntelliSense, browsing information, refactoring, and so on. As you work, Visual Studio monitors changes in the editor and also on disk to keep its index in sync with the sources. -You can open folders containing any number of CMake projects. Visual Studio detects and configures all the "root" *`CMakeLists.txt`* files in your workspace. CMake operations (configure, build, debug), C++ IntelliSense, and browsing are available to all CMake projects in your workspace. +You can open folders containing any number of CMake projects. Visual Studio detects and configures all the top-level *`CMakeLists.txt`* files in your workspace. CMake operations (configure, build, debug), C++ IntelliSense, and browsing are available to all CMake projects in your workspace. :::image type="complex" source="media/cmake-multiple-roots.png" alt-text="Screenshot of the Visual Studio Solution Explorer."::: -The files and folders of a CMake project are visible. There's a tests subdirectory, CMakeLists.txt, and hello.cpp. There's a hello-cmake-vcpkg folder that contains CMakeLists.txt, CMakeSettings.json, and hello.cpp. +The files and folders of a C Make project are visible. There's a tests subdirectory, CMakeLists.txt, and hello.cpp. There's a hello-cmake-vcpkg folder that contains CMakeLists.txt, CMakeSettings.json, and hello.cpp. :::image-end::: You can also view your projects organized logically by targets. Choose **Targets view** from the dropdown in the **Solution Explorer** toolbar: :::image type="content" source="media/cmake-targets-view.png" alt-text="Screenshot of the dropdown button in the Visual Studio Solution Explorer that offers the CMake targets view option. Which is selected."::: -Visual Studio uses a file called *`CMakeSettings.json`* to store environment variables or command-line options for CMake. *`CMakeSettings.json`* also enables you to define and store multiple CMake build configurations. You can conveniently switch between them in the IDE. +Visual Studio uses a file called *`CMakeSettings.json`* to store environment variables or command-line options for CMake. *`CMakeSettings.json`* also lets you define and store multiple CMake build configurations. You can conveniently switch between them in the IDE. Otherwise, use the *`CMakeLists.txt`* just as you would in any CMake project to specify source files, find libraries, set compiler and linker options, and specify other build system-related information. @@ -305,7 +314,7 @@ If you need to pass arguments to an executable at debug time, you can use anothe ## Import an existing cache -When you import an existing *`CMakeCache.txt`* file, Visual Studio automatically extracts customized variables and creates a pre-populated *`CMakeSettings.json`* file based on them. The original cache isn't modified in any way. It can still be used from the command line, or with whatever tool or IDE used to generate it. The new *`CMakeSettings.json`* file is placed alongside the project's root *`CMakeLists.txt`*. Visual Studio generates a new cache based the settings file. You can override automatic cache generation in the **Tools > Options > CMake > General** dialog. +When you import an existing *`CMakeCache.txt`* file, Visual Studio automatically extracts customized variables and creates a prepopulated *`CMakeSettings.json`* file based on them. The original cache isn't modified in any way. It can still be used from the command line, or with whatever tool or IDE used to generate it. The new *`CMakeSettings.json`* file is placed alongside the project's root *`CMakeLists.txt`*. Visual Studio generates a new cache based the settings file. You can override automatic cache generation in the **Tools > Options > CMake > General** dialog. Not everything in the cache is imported. Properties such as the generator and the location of the compilers are replaced with defaults that are known to work well with the IDE. @@ -313,45 +322,45 @@ Not everything in the cache is imported. Properties such as the generator and th 1. From the main menu, choose **File > Open > CMake**: - :::image type="content" source="media/cmake-file-open.png" alt-text="Screenshot of the Visual Studio main menu. File > Open > C Make is selected."::: + :::image type="content" source="media/cmake-file-open.png" alt-text="Screenshot of the Visual Studio main menu with C Make selected."::: This command brings up the **Import CMake from Cache** wizard. 2. Navigate to the *`CMakeCache.txt`* file that you want to import, and then choose **OK**. The **Import CMake Project from Cache** wizard appears: - :::image type="content" source="media/cmake-import-wizard.png" alt-text="Screenshot of the Import CMake Project from Cache wizard. The directory path of the CMake project to import goes in the `folder` textbox."::: + :::image type="content" source="media/cmake-import-wizard.png" alt-text="Screenshot of the Import C Make Project from Cache wizard. The directory path of the C Make project to import goes in the folder textbox."::: - When the wizard completes, you can see the new *`CMakeCache.txt`* file in **Solution Explorer** next to the root *`CMakeLists.txt`* file in your project. + When the wizard completes, you can see the new *`CMakeCache.txt`* file in **Solution Explorer** next to the root *`CMakeLists.txt*` file in your project. ## Building CMake projects To build a CMake project, you have these choices: -1. In the General toolbar, find the **Configurations** dropdown. It's probably showing "Linux-Debug" or "x64-Debug" by default. Select the preferred configuration and press **F5**, or choose the **Run** (green triangle) button on the toolbar. The project automatically builds first, just like a Visual Studio solution. +1. In the General toolbar, find the **Configurations** dropdown. It's probably showing **Linux-Debug** or **x64-Debug** by default. Select the preferred configuration and press **F5**, or choose the **Run** (green triangle) button on the toolbar. The project automatically builds first, just like a Visual Studio solution. 1. Right-click on *`CMakeLists.txt`* in **Solution Explorer** and select **Build** from the context menu. If you have multiple targets in your folder structure, you can choose to build all or only one specific target. 1. From the main menu, select **Build > Build Solution** (**F7** or **Ctrl+Shift+B**). Make sure that a CMake target is already selected in the **Startup Item** dropdown in the **General** toolbar. -:::image type="complex" source="media/cmake-build-menu.png" alt-text="Screenshot of the Visual Studio Solution Explorer after right-clicking CMakeLists.txt."::: +:::image type="complex" source="media/cmake-build-menu.png" alt-text="Screenshot of the Visual Studio Solution Explorer after right-clicking C Make Lists dot t x t."::: The menu has options such as Add, Open, Configure tasks, Build, Clean all, and so on. :::image-end::: -You can customize build configurations, environment variables, command-line arguments, and other settings in the *`CMakeSettings.json`* file. It lets you make changes without modifying the *`CMakeLists.txt`* file. For more information, see [Customize CMake settings](customize-cmake-settings.md). +You can customize build configurations, environment variables, command-line arguments, and other settings in the *`CMakeSettings.json`* file. It lets you make changes without modifying the *`CMakeLists.txt`* file. For more information, see [Customize CMake build settings](customize-cmake-settings.md). As you would expect, build results are shown in the **Output Window** and **Error List**. :::image type="complex" source="media/cmake-build-errors.png" alt-text="Screenshot of the Visual Studio Error List window."::: -CMake build warnings about conversions that may result in data loss such as converting from a float to an integer are visible. +C Make build warnings about conversions that might result in data loss such as converting from a float to an integer are visible. :::image-end::: In a folder with multiple build targets, you can specify which CMake target to build: Choose the **Build** item on the **CMake** menu or the *`CMakeLists.txt`* context menu to specify the target. If you enter **Ctrl+Shift+B** in a CMake project, it builds the current active document. ## Debugging CMake projects -To debug a CMake project, choose the preferred configuration and press **F5**. Or, press the **Run** button in the toolbar. If the **Run** button says "Select Startup Item", select the dropdown arrow and choose the target that you want to run. (In a CMake project, the "Current document" option is only valid for .cpp files.) +To debug a CMake project, choose the preferred configuration and press **F5**. Or, press the **Run** button in the toolbar. If the **Run** button says **Select Startup Item**, select the dropdown arrow and choose the target that you want to run. (In a CMake project, the **Current document** option is only valid for .cpp files.) -:::image type="content" source="media/cmake-run-button.png" alt-text="Screenshot of the Select Startup Item dropdown for a CMake project. You can select current document or hello-cmake.exe"::: +:::image type="content" source="media/cmake-run-button.png" alt-text="Screenshot of the Select Startup Item dropdown for a C Make project. You can select current document or hello-cmake."::: The **Run** or **F5** commands first build the project if changes have been made since the previous build. @@ -361,8 +370,8 @@ You can customize a CMake debugging session by setting properties in the *`launc To edit a *`CMakeLists.txt`* file, right-click on the file in **Solution Explorer** and choose **Open**. If you make changes to the file, a yellow status bar appears and informs you that IntelliSense will update. It gives you a chance to cancel the update operation. For information about *`CMakeLists.txt`*, see the [CMake documentation](https://cmake.org/documentation/). - :::image type="complex" source="media/cmake-cmakelists.png" alt-text="Screenshot of a C Make Lists .txt file being edited in Visual Studio."::: - The file contains: project (hello-cmake), add_subdirectory (tests), add_executable (hello hello.cpp), and install (TARGETS hello DESTINATION hello/bin). A message at the top of the window says that c plus plus IntelliSense info will refresh after C Make finishes generating the cache. + :::image type="complex" source="media/cmake-cmakelists.png" alt-text="Screenshot of a C Make Lists file being edited in Visual Studio."::: + The file contains project (hello-cmake), add_subdirectory (tests), add_executable (hello hello.cpp), and install (TARGETS hello DESTINATION hello/bin). A message at the top of the window says that c plus plus IntelliSense info will refresh after C Make finishes generating the cache. :::image-end::: As soon as you save the file, the configuration step automatically runs again and displays information in the **Output** window. Errors and warnings are shown in the **Error List** or **Output** window. Double-click on an error in the **Error List** to navigate to the offending line in *`CMakeLists.txt`*. @@ -373,12 +382,12 @@ As soon as you save the file, the configuration step automatically runs again an ## CMake configure step -When significant changes are made to the *`CMakeSettings.json`* or to *`CMakeLists.txt`* files, Visual Studio automatically reruns the CMake configure step. If the configure step finishes without errors, the information that's collected is available in C++ IntelliSense and language services. It's also used in build and debug operations. +When significant changes are made to the *`CMakeSettings.json`* or to *`CMakeLists.txt`* files, Visual Studio automatically reruns the CMake configure step. If the configure step finishes without errors, the information that's collected is available in C++ IntelliSense and language services. It's also used in build and debug operations. -Multiple CMake projects might use the same CMake configuration name (for example, x86-Debug). All of them are configured and built (in their own build root folder) when that configuration is selected. You can debug the targets from all of the CMake projects that participate in that CMake configuration. +Multiple CMake projects might use the same CMake configuration name (for example, *x86-Debug*). All of them are configured and built (in their own build root folder) when that configuration is selected. You can debug the targets from all of the CMake projects that participate in that CMake configuration. - :::image type="complex" source="media/cmake-build-only.png" alt-text="Screenshot of Visual Studio's main menu, open to CMake > Build Only."::: - The context menu shows what can be built--in this case hello-cmake-a \ hello-cmake.exe (Project hello-cmake) and hello-cmake-b\hello-cmake.exe (Project hello-cmake). The latter is highlighted. + :::image type="complex" source="media/cmake-build-only.png" alt-text="Screenshot of Visual Studio's main menu, open to C Make Build Only."::: + The context menu shows what can be built. In this case hello-cmake-a \ hello-cmake.exe (Project hello-cmake) and hello-cmake-b\hello-cmake.exe (Project hello-cmake). The latter is highlighted. :::image-end::: You can limit builds and debug sessions to a subset of the projects in the workspace. Create a new configuration with a unique name in the *`CMakeSettings.json`* file. Then, apply the configuration to those projects only. When that configuration is selected, IntelliSense and the build and debug commands only apply to those specified projects. @@ -387,7 +396,7 @@ You can limit builds and debug sessions to a subset of the projects in the works If you need more information about the state of the CMake cache to diagnose a problem, open the **CMake** main menu or the *`CMakeLists.txt`* context menu in **Solution Explorer** to run one of these commands: -- **View Cache** opens the *`CMakeCache.txt`* file from the build root folder in the editor. (Any edits you make here to *`CMakeCache.txt`* are wiped out if you clean the cache. To make changes that persist after the cache is cleaned, see [Customize CMake settings](customize-cmake-settings.md).) +- **View Cache** opens the *`CMakeCache.txt`* file from the build root folder in the editor. Any edits you make here to *`CMakeCache.txt`* are wiped out if you clean the cache. To make changes that persist after the cache is cleaned, see [Customize CMake settings](customize-cmake-settings.md). - **Open Cache Folder** opens an Explorer window to the build root folder. @@ -401,11 +410,11 @@ Automatic cache generation can be disabled in the **Tools > Options > CMake > Ge To build a single file in a CMake project, right-click on the file in **Solution Explorer**. Choose **Compile** from the pop-up menu. You can also build the currently open file in the editor by using the main **CMake** menu: -:::image type="content" source="media/cmake-single-file-compile.png" alt-text="Screenshot of the CMake > Compile context menu. It contains one entry: Bullet3Collision."::: +:::image type="content" source="media/cmake-single-file-compile.png" alt-text="Screenshot of the C Make Compile context menu. It contains one entry, Bullet 3 Collision."::: ## Run CMake from the command line -If you have installed CMake from the Visual Studio Installer, you can run it from the command line by following these steps: +If you installed CMake from the Visual Studio Installer, you can run it from the command line by following these steps: 1. Run the appropriate *`vsdevcmd.bat`* file (x86/x64). For more information, see [Building on the Command Line](building-on-the-command-line.md). @@ -421,15 +430,15 @@ In Visual Studio 2015, Visual Studio users can use a [CMake generator](https://c ::: moniker-end -## See also - -[Tutorial: Create C++ cross-platform projects in Visual Studio](get-started-linux-cmake.md)\ -[Configure a Linux CMake project](../linux/cmake-linux-project.md)\ -[Connect to your remote Linux computer](../linux/connect-to-your-remote-linux-computer.md)\ -[Customize CMake build settings](customize-cmake-settings.md)\ -[`CMakeSettings.json` schema reference](cmakesettings-reference.md)\ -[Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)\ -[Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)\ -[CMake predefined configuration reference](cmake-predefined-configuration-reference.md)\ -[vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)\ -[Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs) +## Related content + +- [Tutorial: Create C++ cross-platform projects in Visual Studio](get-started-linux-cmake.md) +- [Configure a Linux CMake project](../linux/cmake-linux-project.md) +- [Connect to your remote Linux computer](../linux/connect-to-your-remote-linux-computer.md) +- [Customize CMake build settings](customize-cmake-settings.md) +- [*`CMakeSettings.json`* schema reference](cmakesettings-reference.md) +- [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md) +- [Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md) +- [CMake predefined configuration reference](cmake-predefined-configuration-reference.md) +- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration) +- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs) diff --git a/docs/build/cmake-remote-debugging.md b/docs/build/cmake-remote-debugging.md index da1c2c7774..41645840b3 100644 --- a/docs/build/cmake-remote-debugging.md +++ b/docs/build/cmake-remote-debugging.md @@ -1,8 +1,8 @@ --- title: "Tutorial: Debug a CMake project on a remote Windows machine" +description: "How to use Visual Studio C++ on Windows to create and build a CMake project. You'll then deploy and debug it on a remote Windows machine." ms.date: "12/4/2020" ms.topic: tutorial -description: "How to use Visual Studio C++ on Windows to create and build a CMake project. You'll then deploy and debug it on a remote Windows machine." --- # Tutorial: Debug a CMake project on a remote Windows machine @@ -115,7 +115,7 @@ For example, on the remote machine, from the Visual Studio Remote Debugger menu Then, in Visual Studio on the host machine, update the *`launch.vs.json`* file to match. For example, if you choose **No Authentication** on the remote debugger, update the *`launch.vs.json`* file in your project by adding `"authenticationType": "none"` to the `configurations` section *`launch.vs.json`*. Otherwise, `"authenticationType"` defaults to `"windows"` and doesn't need to be explicitly stated. This example shows a *`launch.vs.json`* file configured for no authentication: -``` XAML +```XAML { "version": "0.2.1", "defaults": {}, diff --git a/docs/build/common-visual-cpp-arm-migration-issues.md b/docs/build/common-visual-cpp-arm-migration-issues.md index 93805a8ab7..36035c044b 100644 --- a/docs/build/common-visual-cpp-arm-migration-issues.md +++ b/docs/build/common-visual-cpp-arm-migration-issues.md @@ -2,28 +2,30 @@ description: "Learn more about: Common Visual C++ ARM Migration Issues" title: "Common Visual C++ ARM Migration Issues" ms.date: "05/06/2019" -ms.assetid: 0f4c434e-0679-4331-ba0a-cc15dd435a46 --- -# Common Visual C++ ARM Migration Issues +# Common Visual C++ ARM migration issues -When using the Microsoft C++ compiler (MSVC), the same C++ source code might produce different results on the ARM architecture than it does on x86 or x64 architectures. +This document describes some of the common issues that you might encounter when you migrate code from x86 or x64 architectures to the ARM architecture. It also describes how to avoid these issues, and how to use the compiler to help identify them. + +> [!NOTE] +> When this article refers to the ARM architecture, it applies to both ARM32 and ARM64. ## Sources of migration issues Many issues that you might encounter when you migrate code from the x86 or x64 architectures to the ARM architecture are related to source-code constructs that might invoke undefined, implementation-defined, or unspecified behavior. -*Undefined behavior* is behavior that the C++ standard does not define, and that's caused by an operation that has no reasonable result: for example, converting a floating-point value to an unsigned integer, or shifting a value by a number of positions that is negative or exceeds the number of bits in its promoted type. +*Undefined behavior* is behavior that the C++ standard doesn't define, and that's caused by an operation that has no reasonable result: for example, converting a floating-point value to an unsigned integer, or shifting a value by a number of positions that is negative or exceeds the number of bits in its promoted type. *Implementation-defined behavior* is behavior that the C++ standard requires the compiler vendor to define and document. A program can safely rely on implementation-defined behavior, even though doing so might not be portable. Examples of implementation-defined behavior include the sizes of built-in data types and their alignment requirements. An example of an operation that might be affected by implementation-defined behavior is accessing the variable arguments list. -*Unspecified behavior* is behavior that the C++ standard leaves intentionally non-deterministic. Although the behavior is considered non-deterministic, particular invocations of unspecified behavior are determined by the compiler implementation. However, there is no requirement for a compiler vendor to predetermine the result or guarantee consistent behavior between comparable invocations, and there is no requirement for documentation. An example of unspecified behavior is the order in which sub-expressions, which include arguments to a function call, are evaluated. +*Unspecified behavior* is behavior that the C++ standard leaves intentionally nondeterministic. Although the behavior is considered nondeterministic, particular invocations of unspecified behavior are determined by the compiler implementation. However, there's no requirement for a compiler vendor to predetermine the result or guarantee consistent behavior between comparable invocations, and there's no requirement for documentation. An example of unspecified behavior is the order in which sub-expressions, which include arguments to a function call, are evaluated. -Other migration issues can be attributed to hardware differences between ARM and x86 or x64 architectures that interact with the C++ standard differently. For example, the strong memory model of the x86 and x64 architecture gives **`volatile`**-qualified variables some additional properties that have been used to facilitate certain kinds of inter-thread communication in the past. But the ARM architecture's weak memory model doesn't support this use, nor does the C++ standard require it. +Other migration issues can be attributed to hardware differences between ARM and x86 or x64 architectures that interact with the C++ standard differently. For example, the strong memory model of the x86 and x64 architecture gives **`volatile`**-qualified variables some extra properties that have been used to facilitate certain kinds of inter-thread communication in the past. But the ARM architecture's weak memory model doesn't support this use, nor does the C++ standard require it. > [!IMPORTANT] -> Although **`volatile`** gains some properties that can be used to implement limited forms of inter-thread communication on x86 and x64, these additional properties are not sufficient to implement inter-thread communication in general. The C++ standard recommends that such communication be implemented by using appropriate synchronization primitives instead. +> Although **`volatile`** gains some properties that can be used to implement limited forms of inter-thread communication on x86 and x64, these properties aren't sufficient to implement inter-thread communication in general. The C++ standard recommends that such communication be implemented by using appropriate synchronization primitives instead. -Because different platforms might express these kinds of behavior differently, porting software between platforms can be difficult and bug-prone if it depends on the behavior of a specific platform. Although many of these kinds of behavior can be observed and might appear stable, relying on them is at least non-portable, and in the cases of undefined or unspecified behavior, is also an error. Even the behavior that's cited in this document should not be relied on, and could change in future compilers or CPU implementations. +Because different platforms might express these kinds of behavior differently, porting software between platforms can be difficult and bug-prone if it depends on the behavior of a specific platform. Although many of these kinds of behavior can be observed and might appear stable, relying on them is at least non-portable, and in the cases of undefined or unspecified behavior, is also an error. Even the behavior cited in this document shouldn't be relied on, and could change in future compilers or CPU implementations. ## Example migration issues @@ -41,15 +43,15 @@ These platforms also differ in how they handle conversion of NaN (Not-a-Number) Floating-point conversion can only be relied on if you know that the value is within the range of the integer type that it's being converted to. -### Shift operator (\<\< >>) behavior +### Shift operator (`<<` `>>`) behavior -On the ARM architecture, a value can be shifted left or right up to 255 bits before the pattern begins to repeat. On x86 and x64 architectures, the pattern is repeated at every multiple of 32 unless the source of the pattern is a 64-bit variable; in that case, the pattern repeats at every multiple of 64 on x64, and every multiple of 256 on x86, where a software implementation is employed. For example, for a 32-bit variable that has a value of 1 shifted left by 32 positions, on ARM the result is 0, on x86 the result is 1, and on x64 the result is also 1. However, if the source of the value is a 64-bit variable, then the result on all three platforms is 4294967296, and the value doesn't "wrap around" until it's shifted 64 positions on x64, or 256 positions on ARM and x86. +On the ARM architecture, a value can be shifted left or right up to 255 bits before the pattern begins to repeat. On x86 and x64 architectures, the pattern is repeated at every multiple of 32 unless the source of the pattern is a 64-bit variable. In that case, the pattern repeats at every multiple of 64 on x64, and every multiple of 256 on x86, where a software implementation is employed. For example, for a 32-bit variable that has a value of 1 shifted left by 32 positions, on ARM the result is 0, on x86 the result is 1, and on x64 the result is also 1. However, if the source of the value is a 64-bit variable, then the result on all three platforms is 4294967296, and the value doesn't "wrap around" until it's shifted 64 positions on x64, or 256 positions on ARM and x86. -Because the result of a shift operation that exceeds the number of bits in the source type is undefined, the compiler is not required to have consistent behavior in all situations. For example, if both operands of a shift are known at compile time, the compiler may optimize the program by using an internal routine to precompute the result of the shift and then substituting the result in place of the shift operation. If the shift amount is too large, or negative, the result of the internal routine might be different than the result of the same shift expression as executed by the CPU. +Because the result of a shift operation that exceeds the number of bits in the source type is undefined, the compiler isn't required to have consistent behavior in all situations. For example, if both operands of a shift are known at compile time, the compiler may optimize the program by using an internal routine to precompute the result of the shift and then substituting the result in place of the shift operation. If the shift amount is too large, or negative, the result of the internal routine might be different than the result of the same shift expression as executed by the CPU. ### Variable arguments (varargs) behavior -On the ARM architecture, parameters from the variable arguments list that are passed on the stack are subject to alignment. For example, a 64-bit parameter is aligned on a 64-bit boundary. On x86 and x64, arguments that are passed on the stack are not subject to alignment and pack tightly. This difference can cause a variadic function like `printf` to read memory addresses that were intended as padding on ARM if the expected layout of the variable arguments list is not matched exactly, even though it might work for a subset of some values on the x86 or x64 architectures. Consider this example: +On the ARM architecture, parameters from the variable arguments list that are passed on the stack are subject to alignment. For example, a 64-bit parameter is aligned on a 64-bit boundary. On x86 and x64, arguments that are passed on the stack aren't subject to alignment and pack tightly. This difference can cause a variadic function like `printf` to read memory addresses that were intended as padding on ARM if the expected layout of the variable arguments list isn't matched exactly, even though it might work for a subset of some values on the x86 or x64 architectures. Consider this example: ```C // notice that a 64-bit integer is passed to the function, but '%d' is used to read it. @@ -69,7 +71,7 @@ printf("%I64d\n", 1LL); Because ARM, x86, and x64 processors are so different, they can present different requirements to compiler implementations, and also different opportunities for optimizations. Because of this, together with other factors like calling-convention and optimization settings, a compiler might evaluate function arguments in a different order on different architectures or when the other factors are changed. This can cause the behavior of an app that relies on a specific evaluation order to change unexpectedly. -This kind of error can occur when arguments to a function have side effects that impact other arguments to the function in the same call. Usually this kind of dependency is easy to avoid, but it can sometimes be obscured by dependencies that are difficult to discern, or by operator overloading. Consider this code example: +This kind of error can occur when arguments to a function have side effects that impact other arguments to the function in the same call. Usually this kind of dependency is easy to avoid but can be obscured by dependencies that are difficult to discern or by operator overloading. Consider this code example: ```cpp handle memory_handle; @@ -83,15 +85,15 @@ This appears well-defined, but if `->` and `*` are overloaded operators, then th Handle::acquire(operator->(memory_handle), operator*(p)); ``` -And if there's a dependency between `operator->(memory_handle)` and `operator*(p)`, the code might rely on a specific evaluation order, even though the original code looks like there is no possible dependency. +And if there's a dependency between `operator->(memory_handle)` and `operator*(p)`, the code might rely on a specific evaluation order, even though the original code looks like there's no possible dependency. -### volatile keyword default behavior +### `volatile` keyword default behavior The MSVC compiler supports two different interpretations of the **`volatile`** storage qualifier that you can specify by using compiler switches. The [/volatile:ms](reference/volatile-volatile-keyword-interpretation.md) switch selects the Microsoft extended volatile semantics that guarantee strong ordering, as has been the traditional case for x86 and x64 because of the strong memory model on those architectures. The [/volatile:iso](reference/volatile-volatile-keyword-interpretation.md) switch selects the strict C++ standard volatile semantics that don't guarantee strong ordering. On the ARM architecture (except ARM64EC), the default is **/volatile:iso** because ARM processors have a weakly ordered memory model, and because ARM software doesn't have a legacy of relying on the extended semantics of **/volatile:ms** and doesn't usually have to interface with software that does. However, it's still sometimes convenient or even required to compile an ARM program to use the extended semantics. For example, it may be too costly to port a program to use the ISO C++ semantics, or driver software might have to adhere to the traditional semantics to function correctly. In these cases, you can use the **/volatile:ms** switch; however, to recreate the traditional volatile semantics on ARM targets, the compiler must insert memory barriers around each read or write of a **`volatile`** variable to enforce strong ordering, which can have a negative impact on performance. -On the x86, x64 and ARM64EC architectures, the default is **/volatile:ms** because much of the software that has already been created for these architectures by using MSVC relies on them. When you compile x86, x64 and ARM64EC programs, you can specify the **/volatile:iso** switch to help avoid unnecessary reliance on the traditional volatile semantics, and to promote portability. +On the x86, x64, and ARM64EC architectures, the default is **/volatile:ms** because much of the software that has already been created for these architectures by using MSVC relies on them. When you compile x86, x64 and ARM64EC programs, you can specify the **/volatile:iso** switch to help avoid unnecessary reliance on the traditional volatile semantics, and to promote portability. ## See also diff --git a/docs/build/configure-cmake-debugging-sessions.md b/docs/build/configure-cmake-debugging-sessions.md index 514af5f62d..896d5a3bf4 100644 --- a/docs/build/configure-cmake-debugging-sessions.md +++ b/docs/build/configure-cmake-debugging-sessions.md @@ -125,7 +125,8 @@ In Visual Studio 2019 version 16.6, we added a new debug configuration of `type: - `remoteMachineName`: Defaults to `"${debugInfo.remoteMachineName}"`. Name of the remote system that hosts the program to debug. Only required if different than the build system. Must have an existing entry in the [Connection Manager](../linux/connect-to-your-remote-linux-computer.md). Press **Ctrl+Space** to view a list of all existing remote connections. - `cwd`: Defaults to `"${debugInfo.defaultWorkingDirectory}"`. Full Unix path to the directory on the remote system where `program` is run. The directory must exist. -- `gdbPath`: Defaults to `${debugInfo.vsInstalledGdb}`. Full Windows path to the `gdb` used to debug. Defaults to the `gdb` installed with the Linux development with C/C++ workload. +- `gdbPath`: Full Windows path to the `gdb` used to debug. + - `gdbserverPath`: Defaults to `usr/bin/gdbserver`. Full Unix path to the `gdbserver` used to debug. - `preDebugCommand`: A Linux command to run immediately before starting `gdbserver`. `gdbserver` doesn't start until the command completes. diff --git a/docs/build/creating-and-managing-visual-cpp-projects.md b/docs/build/creating-and-managing-visual-cpp-projects.md index 35125a7b22..2441a8b327 100644 --- a/docs/build/creating-and-managing-visual-cpp-projects.md +++ b/docs/build/creating-and-managing-visual-cpp-projects.md @@ -1,27 +1,30 @@ --- -description: "Learn more about: creating and configuring Visual Studio C++ projects" -title: "Visual Studio Projects - C++" -ms.date: 10/4/2023 +title: "Create and Configure Visual Studio C++ Projects" +description: "Learn how to create a Visual Studio C++ project, and then add code and build your project." +ms.date: 03/24/2025 +ms.topic: concept-article helpviewer_keywords: ["Visual Studio C++ projects, creating", "projects [C++], creating", "Visual Studio C++ projects"] --- -# Visual Studio projects - C++ +# Visual Studio C++ projects -A *Visual Studio project* is a collection of code files and assets such as icons, images, and so on, that are built together using the MSBuild build system. MSBuild is the native build system for Visual Studio and is generally the best build system to use for Windows-specific programs. MSBuild is tightly integrated with Visual Studio, but you can also use it from the command line. +A *Visual Studio project* is a collection of code files and assets such as icons, images, and so on, that are built together using the MSBuild system. MSBuild is the native build system for Visual Studio and is generally the best build system to use for Windows-specific programs. MSBuild is tightly integrated with Visual Studio, but you can also use it from the command line. -For information about upgrading MSBuild projects from older versions of Visual Studio, see the [Microsoft C++ Porting and Upgrading Guide](../porting/visual-cpp-porting-and-upgrading-guide.md). +For information about upgrading MSBuild projects from older versions of Visual Studio, see the [Microsoft C++ porting and upgrading guide](../porting/visual-cpp-porting-and-upgrading-guide.md). -For cross-platform projects, or projects that use open-source libraries, we recommend using [CMake projects in Visual Studio](cmake-projects-in-visual-studio.md) in Visual Studio 2017 and later. +For cross-platform projects, or projects that use open-source libraries, we recommend using [CMake projects in Visual Studio](cmake-projects-in-visual-studio.md). ## Create a Visual Studio C++ project ::: moniker range=">=msvc-160" 1. Create a C++ project by choosing **File** > **New** > **Project**. + 1. In the **Create a new project** dialog, set the **Language** dropdown to **C++**. This filters the list of project templates to C++ projects. You can filter the templates by setting the **Platform**, **Project Type**, or by entering keywords in the search box. - ![Screenshot of the Create a new project wizard. The Console App project template is selected.](../build/media/vs2019-choose-console-app.png) + :::image type="content" source="../build/media/vs2019-choose-console-app.png" alt-text="Screenshot of the Create a new project wizard. The Console App project template is selected."::: 1. Select a project template, then choose **Next**. + 1. On the **Configure your new project page**, enter project-specific settings such as the project name or location and then choose **Create** to create your project. ::: moniker-end @@ -29,21 +32,22 @@ For cross-platform projects, or projects that use open-source libraries, we reco ::: moniker range="msvc-150" 1. Create a C++ project by choosing **File** > **New** > **Project**. + 1. Choose **Visual C++** in the left pane. In the center pane, a list of project templates appears: - ![Screenshot of the New Project dialog, showing available project templates for C++ such as Windows Console Application.](../overview/media/vs2017-new-project.png "Visual Studio 2017 New Project Dialog") + :::image type="content" source="../overview/media/vs2017-new-project.png" alt-text="Screenshot of the New Project dialog, showing available project templates for C++ such as Windows Console Application."::: ::: moniker-end For more information about the default project templates included in Visual Studio, see [C++ project templates in Visual Studio](reference/visual-cpp-project-types.md). -You can create your own project templates. For more information, see [How to: Create project templates](/visualstudio/ide/how-to-create-project-templates). +You can create your own project templates. For more information, see [Create project templates](/visualstudio/ide/how-to-create-project-templates). After you create a project, it appears in the [Solution Explorer](/visualstudio/ide/solutions-and-projects-in-visual-studio) window: - ![Screenshot of the Solution Explorer window, showing source files, header files, and resource files.](media/mathlibrary-solution-explorer-153.png) +:::image type="content" source="media/mathlibrary-solution-explorer-153.png" alt-text="Screenshot of the Solution Explorer window, showing source files, header files, and resource files."::: -When you create a new project, a solution file (.sln) is also created. A *Visual Studio solution* is a collection of one or more projects. You can add another project to the solution by right-clicking the solution name in **Solution Explorer** > **Add** > **New project**. +When you create a new project, a solution file (*`.sln`*) is also created. A *Visual Studio solution* is a collection of one or more projects. You can add another project to the solution by right-clicking the solution name in **Solution Explorer** > **Add** > **New project**. The solution file coordinates build dependencies when you have multiple related projects. Compiler options are set at the project level. @@ -61,28 +65,28 @@ For more information about consuming a library that you have downloaded by using - [vcpkg in MSBuild projects](/vcpkg/users/buildsystems/msbuild-integration) - [Tutorial: Install and use packages with MSBuild in Visual Studio](/vcpkg/get_started/get-started-msbuild) -They're also commercial third-party libraries that you can install. Follow their installation instructions. +There are also commercial third-party libraries that you can install. Follow their installation instructions. ## Set compiler options and build properties -To configure build settings for a project, right-click on the project in **Solution Explorer** and choose **Properties**. For more information, see [Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md). +To configure build settings for a project, right-click on the project in **Solution Explorer** and choose **Properties**. For more information, see [Set compiler and build properties](working-with-project-properties.md). ## Compile and run a project -To compile and run the new project, press **F5** or click the *debug dropdown* with the green arrow on the main toolbar. The *configuration dropdown* is where you choose whether to perform a *Debug* or *Release* build (or some other custom configuration). +To compile and run the new project, press **F5** or select the *debug dropdown* with the green arrow on the main toolbar. The *configuration dropdown* is where you choose whether to perform a *Debug* or *Release* build (or some other custom configuration). A new project compiles without errors. When adding your own code, you might occasionally introduce an error or trigger a warning. An error prevents the build from completing; a warning doesn't. All errors and warnings appear both in the Output Window and in the Error List when you build the project. - ![Screenshot of the Output window and Error list, showing a syntax error for a misplaced colon.](../overview/media/vs2017-output-error-list.png) +:::image type="content" source="../overview/media/vs2017-output-error-list.png" alt-text="Screenshot of the Output window and Error list, showing a syntax error for a misplaced colon."::: In the **Error List**, you can press **F1** on the highlighted error to go to its documentation topic. -## See also +## Related content -[Create a project from existing code](how-to-create-a-cpp-project-from-existing-code.md)\ -[Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md)\ -[Custom build steps and build events](understanding-custom-build-steps-and-build-events.md)\ -[Reference libraries and components at build time](adding-references-in-visual-cpp-projects.md)\ -[Organize project output files](how-to-organize-project-output-files-for-builds.md)\ -[Projects and build systems](projects-and-build-systems-cpp.md)\ -[Microsoft C++ porting and upgrade guide](../porting/visual-cpp-porting-and-upgrading-guide.md) +- [Create a project from existing code](how-to-create-a-cpp-project-from-existing-code.md) +- [Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md) +- [Custom build steps and build events](understanding-custom-build-steps-and-build-events.md) +- [Reference libraries and components at build time](adding-references-in-visual-cpp-projects.md) +- [Organize project output files](how-to-organize-project-output-files-for-builds.md) +- [Projects and build systems](projects-and-build-systems-cpp.md) +- [Microsoft C++ porting and upgrade guide](../porting/visual-cpp-porting-and-upgrading-guide.md) diff --git a/docs/build/creating-precompiled-header-files.md b/docs/build/creating-precompiled-header-files.md index 1c8cb52ddc..2b0f1f5ebe 100644 --- a/docs/build/creating-precompiled-header-files.md +++ b/docs/build/creating-precompiled-header-files.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Precompiled header files" title: "Precompiled Header Files" +description: "Learn more about: Precompiled header files" ms.date: 06/29/2022 helpviewer_keywords: ["precompiled header files, creating", "PCH files, creating", "cl.exe compiler, precompiling code", ".pch files, creating"] --- @@ -140,7 +140,7 @@ This table lists compiler options that might trigger an inconsistency warning wh | Option | Name | Rule | |--|--|--| -| **`/D `**| Define constants and macros | Must be the same between the compilation that created the precompiled header and the current compilation. The state of defined constants isn't checked. However, unpredictable results can occur if your files depend on the values of the changed constants. | +| **`/D`**| Define constants and macros | Must be the same between the compilation that created the precompiled header and the current compilation. The state of defined constants isn't checked. However, unpredictable results can occur if your files depend on the values of the changed constants. | | **`/E`** or **`/EP`** | Copy preprocessor output to standard output | Precompiled headers don't work with the **`/E`** or **`/EP`** option. | | **`/Fr`** or **`/FR`** | Generate Microsoft Source Browser information | For the **`/Fr`** and **`/FR`** options to be valid with the **`/Yu`** option, they must also have been in effect when the precompiled header was created. Subsequent compilations that use the precompiled header also generate Source Browser information. Browser information is placed in a single *`.sbr`* file and is referenced by other files in the same manner as CodeView information. You can't override the placement of Source Browser information. | | **`/GA`**, **`/GD`**, **`/GE`**, **`/Gw`**, or **`/GW`** | Windows protocol options | Must be the same between the compilation that created the precompiled header and the current compilation. The compiler emits a warning if these options differ. | @@ -161,7 +161,6 @@ The code base of a software project is often contained in multiple C or C++ sour The figure uses three diagrammatic devices to show the flow of the build process. Named rectangles represent each file or macro; the three macros represent one or more files. Shaded areas represent each compile or link action. Arrows show which files and macros are combined during the compilation or linking process. -![ The diagram is described in the text following the diagram.]()\ Structure of a makefile that uses a precompiled header file: :::image type="complex" source="media/vc30ow1.gif" alt-text="Diagram showing example inputs and outputs of a makefile that uses a precompiled header file."::: @@ -259,7 +258,7 @@ Source file `ANOTHER.H`: // #ifndef __ANOTHER_H #define __ANOTHER_H -#include +#include void savemoretime( void ); #endif // __ANOTHER_H ``` @@ -273,7 +272,7 @@ Source file `STABLE.H`: // #ifndef __STABLE_H #define __STABLE_H -#include +#include void savetime( void ); #endif // __STABLE_H ``` @@ -289,7 +288,7 @@ Source file `UNSTABLE.H`: // #ifndef __UNSTABLE_H #define __UNSTABLE_H -#include +#include void notstable( void ); #endif // __UNSTABLE_H ``` @@ -301,9 +300,9 @@ Source file `APPLIB.CPP`: // the interface code declared in the header // files STABLE.H, ANOTHER.H, and UNSTABLE.H. // -#include"another.h" -#include"stable.h" -#include"unstable.h" +#include "another.h" +#include "stable.h" +#include "unstable.h" using namespace std; // The following code represents code that is deemed stable and // not likely to change. The associated interface code is @@ -331,9 +330,9 @@ Source file `MYAPP.CPP`: // listed in the BOUNDRY macro. Unstable code must // be included after the precompiled code. // -#include"another.h" -#include"stable.h" -#include"unstable.h" +#include "another.h" +#include "stable.h" +#include "unstable.h" int main( void ) { savetime(); @@ -346,7 +345,7 @@ int main( void ) [Compare header units, modules, and precompiled headers](compare-inclusion-methods.md)\ [C/C++ building reference](reference/c-cpp-building-reference.md)\ -[MSVC compiler options](reference/compiler-options.md) +[MSVC compiler options](reference/compiler-options.md)\ [Overview of modules in C++](../cpp/modules-cpp.md)\ [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\ [Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)\ diff --git a/docs/build/customize-cmake-settings.md b/docs/build/customize-cmake-settings.md index 0df13f3b3f..3ccdd13da6 100644 --- a/docs/build/customize-cmake-settings.md +++ b/docs/build/customize-cmake-settings.md @@ -44,7 +44,7 @@ Corresponds to the **inheritedEnvironments** setting. Defines the compiler envir ### CMake toolchain file -Path to the [CMake toolchain file](https://cmake.org/cmake/help/latest/variable/CMAKE_TOOLCHAIN_FILE.html). This path is passed to CMake as "-DCMAKE_TOOLCHAIN_FILE = \". Toolchain files specify locations of compilers and toolchain utilities, and other target platform and compiler-related information. By default, Visual Studio uses the [vcpkg toolchain file](https://github.com/microsoft/vcpkg/blob/master/docs/examples/installing-and-using-packages.md#cmake) if this setting is unspecified. +Path to the [CMake toolchain file](https://cmake.org/cmake/help/latest/variable/CMAKE_TOOLCHAIN_FILE.html). This path is passed to CMake as `"-DCMAKE_TOOLCHAIN_FILE = `. Toolchain files specify locations of compilers and toolchain utilities, and other target platform and compiler-related information. By default, Visual Studio uses the [vcpkg toolchain file](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/installing-and-using-packages.md#cmake) if this setting is unspecified. ### Build root @@ -72,7 +72,7 @@ For configurations such as Linux that use remote builds, the following settings ### `rsync` command arguments -Extra command-line options passed to [`rsync`](https://download.samba.org/pub/rsync/rsync.html), a fast, versatile file-copying tool. +Extra command-line options passed to [`rsync`](https://download.samba.org/pub/rsync/), a fast, versatile file-copying tool. ## CMake variables and cache diff --git a/docs/build/get-started-linux-cmake.md b/docs/build/get-started-linux-cmake.md index 44cc20cf60..1ffb0fb6d2 100644 --- a/docs/build/get-started-linux-cmake.md +++ b/docs/build/get-started-linux-cmake.md @@ -187,7 +187,7 @@ Because it's a desktop application, you need to provide some more configuration 1. Look at the Call Stack window and view the Calls to `x11OpenGLWindow` since Visual Studio launched the application on Linux. - :::image type="complex" source="media/cmake-bullet3-linux-console.png" alt-text="The Visual Studio Call Stack window, showing Linux call stack."::: + :::image type="complex" source="media/cmake-bullet3-linux-callstack.png" alt-text="The Visual Studio Call Stack window, showing Linux call stack."::: The callstack shows the breakpoint on CommonRigidBodyBase::mouseMoveCallback, and the calls that precede it such as OnMouseMove, X11OpenGLWindow::pumpMessage, and so on. :::image-end::: diff --git a/docs/build/how-to-create-a-cpp-project-from-existing-code.md b/docs/build/how-to-create-a-cpp-project-from-existing-code.md index 338beeacb2..7d4b11a4b2 100644 --- a/docs/build/how-to-create-a-cpp-project-from-existing-code.md +++ b/docs/build/how-to-create-a-cpp-project-from-existing-code.md @@ -1,21 +1,26 @@ --- description: "Learn more about: How to: Create a C++ Project from Existing Code" title: "How to: Create a C++ Project from Existing Code" -ms.date: "05/06/2019" +ms.date: 08/12/2024 helpviewer_keywords: ["C++, creating projects from existing code", "Create New Project From Existing Code Files Wizard, project settings"] f1_keywords: ["vc.appwiz.importwiz.location", "vc.appwiz.importwiz.appsettings", "vc.appwiz.importwiz.debugsettings", "vc.appwiz.importwiz.releasesettings"] -ms.assetid: e328a938-395c-48ea-9e35-dd433de12b31 --- # How to: Create a C++ Project from Existing Code -In Visual Studio, you can port existing code files into a C++ project using the **Create New Project From Existing Code Files** wizard. This wizard creates a project solution that uses the MSBuild system to manage source files and build configuration. It works best with relatively simple projects that do not have complex folder hierarchies. The wizard isn't available in older Express editions of Visual Studio. +In Visual Studio, you can port existing code files into a C++ project using the **Create New Project From Existing Code Files** wizard. This wizard creates a project solution that uses the MSBuild system to manage source files and build configuration. It works best with relatively simple projects that don't have complex folder hierarchies. The wizard isn't available in older Express editions of Visual Studio. Porting existing code files into a C++ project enables the use of native MSBuild project management features built into the IDE. If you prefer to use your existing build system, such as nmake makefiles, CMake, or alternatives, you can use the Open Folder or CMake options instead. For more information, see [Open Folder projects for C++](open-folder-projects-cpp.md) or [CMake projects in Visual Studio](cmake-projects-in-visual-studio.md). Both options let you use IDE features such as [IntelliSense](/visualstudio/ide/using-intellisense) and [Project Properties](working-with-project-properties.md). ### To create a C++ project from existing code +The following instructions assume that Visual Studio is running and is past the start page. If you are on the Visual Studio start page, choose **Continue without code** to open the IDE. + 1. On the **File** menu, select **New** > **Project From Existing Code**. +1. The **Create New Project from Existing Code Files** wizard opens. Choose what type of project to create from the dropdown: **Visual C++**, **Visual Basic**, or **C#**. Then choose **Next** to continue. + :::image type="complex" source="./media/create-from-existing-code-wizard.png" alt-text="Screenshot showing the Create New Project from Existing Code dialog."::: + The project type dropdown shows the options Visual C++ (which is selected), Visual Basic, and C#. + :::image-end::: 1. Specify your project location, the directory for your source files, and the kinds of files the wizard imports into the new project. Choose **Next** to continue. | Setting | Description | @@ -58,7 +63,8 @@ Porting existing code files into a C++ project enables the use of native MSBuild > [!NOTE] > The **Build**, **Rebuild**, **Clean** command line, and **Output (for debugging)** settings are only enabled if the **Use external build system** option is selected on the **Specify Project Settings** page. -1. Specify the Release configuration settings to use, these settings are the same as the Debug configuration settings. Choose **Finish** to generate the new project. +1. Specify the Release configuration settings to use, these settings are the same as the Debug configuration settings. +1. Choose **Finish** to generate the new project. > [!NOTE] > Here you can check **Same as Debug configuration** to specify that the wizard will generate Release configuration project settings identical to Debug configuration project settings. This option is checked by default. All other options on this page are inactive unless you uncheck this box. diff --git a/docs/build/how-to-debug-a-release-build.md b/docs/build/how-to-debug-a-release-build.md index bb260ccf93..3063cfc32b 100644 --- a/docs/build/how-to-debug-a-release-build.md +++ b/docs/build/how-to-debug-a-release-build.md @@ -1,31 +1,27 @@ --- description: "Learn more about: How to: Debug a Release Build" title: "How to: Debug a Release Build" -ms.date: "11/04/2016" +ms.date: 03/14/2025 helpviewer_keywords: ["debugging [C++], release builds", "release builds, debugging"] -ms.assetid: d333e4d1-4e6c-4384-84a9-cb549702da25 --- # How to: Debug a Release Build -You can debug a release build of an application. +This article explains which compiler and linker switches to set to enable you to debug a release build of an application. -### To debug a release build +A better experience is available starting in Visual Studio 2022 version 17.14 that allows you to debug optimized code as if it were compiled unoptimized, while retaining the speed of optimized code. For more information, see [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging). -1. Open the **Property Pages** dialog box for the project. For details, see [Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md). +## To debug a release build +1. Open the **Property Pages** dialog box for the project. For details, see [Set C++ compiler and build properties in Visual Studio](working-with-project-properties.md). 1. Click the **C/C++** node. Set **Debug Information Format** to [C7 compatible (/Z7)](reference/z7-zi-zi-debug-information-format.md) or **Program Database (/Zi)**. - 1. Expand **Linker** and click the **General** node. Set **Enable Incremental Linking** to [No (/INCREMENTAL:NO)](reference/incremental-link-incrementally.md). - -1. Select the **Debugging** node. Set **Generate Debug Info** to [Yes (/DEBUG)](reference/debug-generate-debug-info.md). - -1. Select the **Optimization** node. Set **References** to [/OPT:REF](reference/opt-optimizations.md) and **Enable COMDAT Folding** to [/OPT:ICF](reference/opt-optimizations.md). - +1. Under **Linker**, select the **Debugging** node. Set **Generate Debug Info** to [Yes (/DEBUG)](reference/debug-generate-debug-info.md). +1. Under **Linker**, select the **Optimization** node. Set **References** to [No (/OPT:NOREF)](reference/opt-optimizations.md) and **Enable COMDAT Folding** to [No (/OPT:NOICF)](reference/opt-optimizations.md). 1. You can now debug your release build application. To find a problem, step through the code (or use Just-In-Time debugging) until you find where the failure occurs, and then determine the incorrect parameters or code. If an application works in a debug build, but fails in a release build, one of the compiler optimizations may be exposing a defect in the source code. To isolate the problem, disable selected optimizations for each source code file until you locate the file and the optimization that is causing the problem. (To expedite the process, you can divide the files into two groups, disable optimization on one group, and when you find a problem in a group, continue dividing until you isolate the problem file.) - You can use [/RTC](reference/rtc-run-time-error-checks.md) to try to expose such bugs in your debug builds. + Use [/RTC](reference/rtc-run-time-error-checks.md) to try to expose such bugs in your debug builds. For more information, see [Optimizing Your Code](optimizing-your-code.md). diff --git a/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md b/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md index 8bf4c68302..a91d9d9158 100644 --- a/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md +++ b/docs/build/how-to-modify-the-target-framework-and-platform-toolset.md @@ -23,7 +23,7 @@ Visual Studio also supports multitargeting for C++ projects. You can use the lat ## Target framework (C++/CLI project only) -When you change the target Framework, also change the platform toolset to a version that supports that Framework. For example, to target the .NET Framework 4.5, you must use a compatible platform toolset. These toolsets include Visual Studio 2015 (v140), Visual Studio 2013 (v120), or Visual Studio 2012 (v110). You can use the [Windows 7.1 SDK](https://www.microsoft.com/download/details.aspx?id=8279) to target .NET Framework 2.0, 3.0, 3.5, and 4. +When you change the target Framework, also change the platform toolset to a version that supports that Framework. For example, to target the .NET Framework 4.5, you must use a compatible platform toolset. These toolsets include Visual Studio 2015 (v140), Visual Studio 2013 (v120), or Visual Studio 2012 (v110). You can use the [Windows 7.1 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=8442) to target .NET Framework 2.0, 3.0, 3.5, and 4. You can extend the target platform further by creating a custom platform toolset. For more information, see [C++ Native Multi-Targeting](https://devblogs.microsoft.com/cppblog/c-native-multi-targeting/) on the Visual C++ blog. diff --git a/docs/build/how-to-use-build-events-in-msbuild-projects.md b/docs/build/how-to-use-build-events-in-msbuild-projects.md index c747397334..72aea3d96a 100644 --- a/docs/build/how-to-use-build-events-in-msbuild-projects.md +++ b/docs/build/how-to-use-build-events-in-msbuild-projects.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: How to: Use Build Events in MSBuild Projects" title: "How to: Use Build Events in MSBuild Projects" +description: "Learn more about: How to: Use Build Events in MSBuild Projects" ms.date: "11/04/2016" helpviewer_keywords: ["msbuild (c++), howto: use build events in projects"] -ms.assetid: 2a58dc9d-3d50-4e49-97c1-86c5a05ce218 --- # How to: Use Build Events in MSBuild Projects @@ -33,7 +32,7 @@ The following table lists each *use-in-build* element: The following example can be added inside of the Project element of the myproject.vcxproj file created in [Walkthrough: Using MSBuild to Create a C++ Project](walkthrough-using-msbuild-to-create-a-visual-cpp-project.md). A *pre-build* event makes a copy of main.cpp; a *pre-link* event makes a copy of main.obj; and a *post-build* event makes a copy of myproject.exe. If the project is built using a release configuration, the build events are executed. If the project is built using a debug configuration, the build events are not executed. -``` xml +```xml copy $(ProjectDir)main.cpp $(ProjectDir)copyOfMain.cpp @@ -64,5 +63,5 @@ The following example can be added inside of the Project element of the myprojec ## See also -[MSBuild on the command line - C++](msbuild-visual-cpp.md)
+[MSBuild on the command line - C++](msbuild-visual-cpp.md)\ [Walkthrough: Using MSBuild to Create a C++ Project](walkthrough-using-msbuild-to-create-a-visual-cpp-project.md) diff --git a/docs/build/launch-vs-schema-reference-cpp.md b/docs/build/launch-vs-schema-reference-cpp.md index 1140ae533d..290cc1a1ce 100644 --- a/docs/build/launch-vs-schema-reference-cpp.md +++ b/docs/build/launch-vs-schema-reference-cpp.md @@ -55,7 +55,7 @@ To create the file, right-click on an executable file in **Solution Explorer** a | `debugServerArgs` | string | Optional debug server args. Defaults to null. | | `filterStderr` | boolean | Search stderr stream for server-started pattern and log stderr to debug output. Defaults to **`false`**. | | `coreDumpPath` | string | Optional full path to a core dump file for the specified program. Defaults to null. | -| externalConsole | boolean | If true, a console is launched for the debuggee. If **`false`**, no console is launched. The default for this setting is **`false`**. This option is ignored in some cases for technical reasons. | +| `externalConsole` | boolean | If true, a console is launched for the debuggee. If **`false`**, no console is launched. The default for this setting is **`false`**. This option is ignored in some cases for technical reasons. | | `pipeTransport` | string | When present, this value tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between Visual Studio and the MI-enabled debugger (such as gdb). Allowed values: one or more [Pipe Transport Options](#pipe_transport_options). | ## debugInfo macros diff --git a/docs/build/media/cmake-build-errors.png b/docs/build/media/cmake-build-errors.png index 089db013a3..80127fdebd 100644 Binary files a/docs/build/media/cmake-build-errors.png and b/docs/build/media/cmake-build-errors.png differ diff --git a/docs/build/media/cmake-cmakelists-error.png b/docs/build/media/cmake-cmakelists-error.png index 6601ecbed3..5c0877845b 100644 Binary files a/docs/build/media/cmake-cmakelists-error.png and b/docs/build/media/cmake-cmakelists-error.png differ diff --git a/docs/build/media/cmake-cmakelists.png b/docs/build/media/cmake-cmakelists.png index f957bb6c1d..58f4729779 100644 Binary files a/docs/build/media/cmake-cmakelists.png and b/docs/build/media/cmake-cmakelists.png differ diff --git a/docs/build/media/cmake-install-2022.png b/docs/build/media/cmake-install-2022.png new file mode 100644 index 0000000000..870db48e1c Binary files /dev/null and b/docs/build/media/cmake-install-2022.png differ diff --git a/docs/build/media/cmake-targets-view2.png b/docs/build/media/cmake-targets-view2.png index 04ae1e2a13..673ddd555b 100644 Binary files a/docs/build/media/cmake-targets-view2.png and b/docs/build/media/cmake-targets-view2.png differ diff --git a/docs/build/media/create-from-existing-code-wizard.png b/docs/build/media/create-from-existing-code-wizard.png new file mode 100644 index 0000000000..881cbe8a36 Binary files /dev/null and b/docs/build/media/create-from-existing-code-wizard.png differ diff --git a/docs/build/media/desktop-app-project-run-150.gif b/docs/build/media/desktop-app-project-run-150.gif deleted file mode 100644 index a46faeb947..0000000000 Binary files a/docs/build/media/desktop-app-project-run-150.gif and /dev/null differ diff --git a/docs/build/media/visual-c---project-defaults.png b/docs/build/media/visual-c---project-defaults.png index 3b3db949ce..659946ac9c 100644 Binary files a/docs/build/media/visual-c---project-defaults.png and b/docs/build/media/visual-c---project-defaults.png differ diff --git a/docs/build/media/visual-c---property-pages-showing-active-configuration.png b/docs/build/media/visual-c---property-pages-showing-active-configuration.png index 57e12a4419..521ba2fec9 100644 Binary files a/docs/build/media/visual-c---property-pages-showing-active-configuration.png and b/docs/build/media/visual-c---property-pages-showing-active-configuration.png differ diff --git a/docs/build/media/visual-c---property-pages-showing-release-config.png b/docs/build/media/visual-c---property-pages-showing-release-config.png index 763a22945a..39ff39170d 100644 Binary files a/docs/build/media/visual-c---property-pages-showing-release-config.png and b/docs/build/media/visual-c---property-pages-showing-release-config.png differ diff --git a/docs/build/media/vscpp-quickstart-first-run.gif b/docs/build/media/vscpp-quickstart-first-run.gif deleted file mode 100644 index 10d887cbcb..0000000000 Binary files a/docs/build/media/vscpp-quickstart-first-run.gif and /dev/null differ diff --git a/docs/build/reference/analyze-code-analysis.md b/docs/build/reference/analyze-code-analysis.md index c283067977..8064dc9e98 100644 --- a/docs/build/reference/analyze-code-analysis.md +++ b/docs/build/reference/analyze-code-analysis.md @@ -4,7 +4,6 @@ description: "The Microsoft C++ compiler /analyze option syntax and usage." ms.date: 02/17/2022 f1_keywords: ["VC.Project.VCCLCompilerTool.EnablePREfast", "/analyze", "VC.Project.VCCLCompilerTool.PREfastAdditionalOptions", "VC.Project.VCCLCompilerTool.PREfastAdditionalPlugins", "VC.Project.VCCLCompilerTool.DisableAnalyzeExternal", "VC.Project.VCCLCompilerTool.AnalyzeExternalRuleset"] helpviewer_keywords: ["/analyze compiler option [C++]", "-analyze compiler option [C++]", "analyze compiler option [C++]"] -ms.assetid: 81da536a-e030-4bd4-be18-383927597d08 --- # `/analyze` (Code analysis) @@ -135,7 +134,7 @@ Then, use compiler option `/analyze:plugin EspXEngine.dll` to use the EspXEngine #### External file analysis options -Starting in Visual Studio 2019 version 16.10, you can specify different analysis rules and behavior for external headers. Use the **`/external:I`**, **`/external:env`**, or **`/external:anglebrackets`** options to specify directories as "external" directories. Any files that are included by using `#include`from an external directory or its subdirectories are considered as external headers. For more information, see [`/external` (External headers diagnostics)](external-external-headers-diagnostics.md). +Starting in Visual Studio 2019 version 16.10, you can specify different analysis rules and behavior for external headers. Use the **`/external:I`**, **`/external:env`**, or **`/external:anglebrackets`** options to specify directories as "external" directories. Any files that are included by using `#include` from an external directory or its subdirectories are considered as external headers. For more information, see [`/external` (External headers diagnostics)](external-external-headers-diagnostics.md). Code analysis provides these options to control analysis of external files: diff --git a/docs/build/reference/arch-arm.md b/docs/build/reference/arch-arm.md index f7495756f0..8d7ebd3293 100644 --- a/docs/build/reference/arch-arm.md +++ b/docs/build/reference/arch-arm.md @@ -5,7 +5,7 @@ ms.date: 07/01/2022 --- # `/arch` (ARM) -Specifies the architecture for code generation on ARM. For more information on **`/arch`** for other target architectures, see [`/arch` (ARM64)](arch-arm64.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (x86)](arch-x86.md) +Specifies the architecture for code generation on ARM. These switches apply to the ARM targeting version of the compiler. For more information on **`/arch`** for other target architectures, see [`/arch` (ARM64)](arch-arm64.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (x86)](arch-x86.md) ## Syntax diff --git a/docs/build/reference/arch-arm64.md b/docs/build/reference/arch-arm64.md index dd54dee205..7b432961ec 100644 --- a/docs/build/reference/arch-arm64.md +++ b/docs/build/reference/arch-arm64.md @@ -1,11 +1,11 @@ --- -description: "Learn more about: /arch (ARM64)" title: "/arch (ARM64)" +description: "Learn more about: /arch (ARM64)" ms.date: 05/24/2024 --- # `/arch` (ARM64) -Specifies the Arm A-Profile architecture extension for code generation on ARM64. For more information about **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md). +Specifies the Arm A-Profile architecture extension for code generation on ARM64. These switches apply to the ARM64 targeting version of the compiler. For more information about **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md). ## Syntax @@ -25,9 +25,9 @@ Specifies the Armv9-A architecture, where **`x`** is a required extension value You can specify an ARM64 extension from Armv8.0-A through Armv8.9-A, and Armv9.0-A through Armv9.4-A. Optionally, enable one or more architecture features by appending a feature argument to the option3. For example, to target Armv8.0-A and enable feature `FEAT_LSE`, append feature argument **`lse`** so that the option becomes **`/arch:armv8.0+lse`**. For more information about available features and their requirements, see [`/feature` (ARM64)](feature-arm64.md)3. > [!NOTE] -> Depending on your version of Visual Studio, the compiler may not yet generate instructions from all feature sets required by the extension level you specify. For example, **`/arch:armv8.1`** allows the `*Interlocked*` intrinsic functions to use the appropriate atomic instruction introduced with the Armv8.1-A extension feature `FEAT_LSE`, but compiler support requires Visual Studio 2022 version 17.2 or later. +> Depending on your version of Visual Studio, the compiler may not yet generate instructions from all feature sets required by the extension level you specify. For example, **`/arch:armv8.1`** allows the *`Interlocked`* intrinsic functions to use the appropriate atomic instruction introduced with the Armv8.1-A extension feature `FEAT_LSE`, but compiler support requires Visual Studio 2022 version 17.2 or later. -The `_M_ARM64` macro is defined by default when compiling for an ARM64 target. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md)\ +The `_M_ARM64` macro is defined by default when compiling for an ARM64 target. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). The `__ARM_ARCH` macro is defined for `/arch:ARMv8.0` and higher. It indicates the ARM architecture extension level that the compiler is targeting. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). diff --git a/docs/build/reference/arch-x64.md b/docs/build/reference/arch-x64.md index 6c944400a6..0bcf4ff202 100644 --- a/docs/build/reference/arch-x64.md +++ b/docs/build/reference/arch-x64.md @@ -2,30 +2,40 @@ description: "Learn more about: /arch (x64)" title: "/arch (x64)" ms.date: 06/30/2022 -ms.assetid: ecda22bf-5bed-43f4-99fb-88aedd83d9d8 +f1_keywords: ["/arch:SSE2", "/arch:SSE4.2", "/arch:AVX", "/arch:AVX2", "/arch:AVX512", "/arch:AVX10.1"] +helpviewer_keywords: ["/arch:SSE2 compiler option [C++]", "/arch:SSE4.2 compiler option [C++]", "/arch:AVX compiler option [C++]", "/arch:AVX2 compiler option [C++]", "/arch:AVX512 compiler option [C++]", "/arch:AVX10.1 compiler option [C++]"] --- # `/arch` (x64) -Specifies the architecture for code generation on x64. For more information on **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (ARM64)](arch-arm64.md), and [`/arch` (ARM)](arch-arm.md). +Specifies the architecture for code generation on x64. These switches apply to the x64 targeting version of the compiler. For more information on **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (ARM64)](arch-arm64.md), and [`/arch` (ARM)](arch-arm.md). ## Syntax -> **`/arch:`**\[**`AVX`**|**`AVX2`**|**`AVX512`**] +> **`/arch:`**\[**`SSE2`**|**`SSE4.2`**|**`AVX`**|**`AVX2`**|**`AVX512`**|**`AVX10.1`**] ## Arguments +**`/arch:SSE2`**\ +Enables Intel Streaming SIMD Extensions 2. The default instruction set is SSE2 if no **`/arch`** option is specified. + +**`/arch:SSE4.2`**\ +Enables Intel Streaming SIMD Extensions 4.2. + **`/arch:AVX`**\ -Enables the use of Intel Advanced Vector Extensions instructions. +Enables Intel Advanced Vector Extensions. **`/arch:AVX2`**\ -Enables the use of Intel Advanced Vector Extensions 2 instructions. +Enables Intel Advanced Vector Extensions 2. **`/arch:AVX512`**\ -Enables the use of Intel Advanced Vector Extensions 512 instructions. +Enables Intel Advanced Vector Extensions 512. + +**`/arch:AVX10.1`**\ +Enables Intel Advanced Vector Extensions 10 version 1. ## Remarks -The **`/arch`** option enables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support extensions beyond the ones supported by older processors, although you should consult the documentation for a particular processor or test for instruction set extension support using [`__cpuid`](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension. +The **`/arch`** option enables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support extensions beyond the ones supported by older processors, although you should consult the documentation for a particular processor or test for instruction set extension support using [`__cpuid`](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension. You can also use the [`__check_isa_support`](../../intrinsics/check-isa-arch-support.md) intrinsic to check for more frequently used CPU features. **`/arch`** only affects code generation for native functions. When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions. @@ -33,23 +43,33 @@ The processor extensions have the following characteristics: - The default mode uses SSE2 instructions for scalar floating-point and vector calculations. These instructions allow calculation with 128-bit vectors of single-precision, double-precision and 1, 2, 4 or 8-byte integer values, as well as single-precision and double-precision scalar floating-point values. +- **`SSE4.2`** uses the full set of SSE instructions for floating-point scalar, vector, and integer vector calculations. + - **`AVX`** introduced an alternative instruction encoding for vector and floating-point scalar instructions. It allows vectors of either 128 bits or 256 bits, and zero-extends all vector results to the full vector size. (For legacy compatibility, SSE-style vector instructions preserve all bits beyond bit 127.) Most floating-point operations are extended to 256 bits. - **`AVX2`** extends most integer operations to 256-bit vectors and enables use of Fused Multiply-Add (FMA) instructions. -- **`AVX-512`** introduced another instruction encoding form that allows 512-bit vectors, plus certain other optional features. Instructions for other operations were also added. +- **`AVX-512`** introduced another instruction encoding form that allows 512-bit vectors, masking, embedded rounding/broadcast, and new instructions. The default vector length for **`AVX-512`** is 512 bits and can be changed to 256 bits using the [`/vlen`](vlen.md) flag. + +- **`AVX10.1`** adds more instructions on top of **`AVX-512`**. The default vector length for **`AVX10.1`** is 256 bits and can be changed to 512 bits using the [`/vlen`](vlen.md) flag. Each **`/arch`** option may also enable the use of other non-vector instructions that are associated with that option. An example is the use of certain BMI instructions when **`/arch:AVX2`** is specified. -The `__AVX__` preprocessor symbol is defined when the **`/arch:AVX`**, **`/arch:AVX2`** or **`/arch:AVX512`** compiler option is specified. The `__AVX2__` preprocessor symbol is defined when the **`/arch:AVX2`** or **`/arch:AVX512`** compiler option is specified. The `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__` and `__AVX512VL__` preprocessor symbols are defined when the **`/arch:AVX512`** compiler option is specified. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). The **`/arch:AVX2`** option was introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. Limited support for **`/arch:AVX512`** was added in Visual Studio 2017, and expanded in Visual Studio 2019. +The `__AVX__` preprocessor symbol is defined when the **`/arch:AVX`**, **`/arch:AVX2`**, **`/arch:AVX512`**, or **`/arch:AVX10.1`** compiler option is specified. +The `__AVX2__` preprocessor symbol is defined when the **`/arch:AVX2`**, **`/arch:AVX512`**, or **`/arch:AVX10.1`** compiler option is specified. +The `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__`, and `__AVX512VL__` preprocessor symbols are defined when the **`/arch:AVX512`**, or **`/arch:AVX10.1`** compiler option is specified. +The `__AVX10_VER__` preprocessor symbol is defined when the **`/arch:AVX10.1`** compiler option is specified. It indicates the AVX10 version the compiler is targeting. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). +The **`/arch:AVX2`** option was introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. +Limited support for **`/arch:AVX512`** was added in Visual Studio 2017, and expanded in Visual Studio 2019. +Support for **`/arch:AVX10.1`** was added in Visual Studio 2022. -### To set the `/arch:AVX`, `/arch:AVX2` or `/arch:AVX512` compiler option in Visual Studio +### To set the `/arch` compiler option in Visual Studio 1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). 1. Select the **Configuration Properties** > **C/C++** > **Code Generation** property page. -1. In the **Enable Enhanced Instruction Set** drop-down box, choose **Advanced Vector Extensions (/arch:AVX)**, **Advanced Vector Extensions 2 (/arch:AVX2)** or **Advanced Vector Extensions 512 (/arch:AVX512)**. +1. Modify the **Enable Enhanced Instruction Set** property. ### To set this compiler option programmatically diff --git a/docs/build/reference/arch-x86.md b/docs/build/reference/arch-x86.md index 1c5ae3c178..cb71ce0716 100644 --- a/docs/build/reference/arch-x86.md +++ b/docs/build/reference/arch-x86.md @@ -2,14 +2,16 @@ description: "Learn more about: /arch (x86)" title: "/arch (x86)" ms.date: 06/30/2022 +f1_keywords: ["/arch:IA32", "/arch:SSE", "/arch:SSE2", "/arch:AVX", "/arch:AVX2", "/arch:AVX512", "/arch:AVX10.1"] +helpviewer_keywords: ["/arch:IA32 compiler option [C++]", "/arch:SSE compiler option [C++]", "/arch:SSE2 compiler option [C++]", "/arch:AVX compiler option [C++]", "/arch:AVX2 compiler option [C++]", "/arch:AVX512 compiler option [C++]", "/arch:AVX10.1 compiler option [C++]"] --- # `/arch` (x86) -Specifies the architecture for code generation on x86. For more information on **`/arch`** for other target architectures, see [`/arch` (ARM64)](arch-arm64.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md). +Specifies the architecture for code generation on x86. These switches apply to the x86 (32-bit) targeting version of the compiler. For more information on **`/arch`** for other target architectures, see [`/arch` (ARM64)](arch-arm64.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md). ## Syntax -> **`/arch:`**\[**`IA32`**|**`SSE`**|**`SSE2`**|**`AVX`**|**`AVX2`**|**`AVX512`**] +> **`/arch:`**\[**`IA32`**|**`SSE`**|**`SSE2`**|**`AVX`**|**`AVX2`**|**`AVX512`**|**`AVX10.1`**] ## Arguments @@ -17,23 +19,26 @@ Specifies the architecture for code generation on x86. For more information on * Specifies no enhanced instructions and also specifies x87 for floating-point calculations. **`/arch:SSE`**\ -Enables the use of SSE instructions. +Enables Intel Streaming SIMD Extensions. **`/arch:SSE2`**\ -Enables the use of SSE2 instructions. This option is the default instruction set on x86 platforms if no **`/arch`** option is specified. +Enables Intel Streaming SIMD Extensions 2. The default instruction set is SSE2 if no **`/arch`** option is specified. **`/arch:AVX`**\ -Enables the use of Intel Advanced Vector Extensions instructions. +Enables Intel Advanced Vector Extensions. **`/arch:AVX2`**\ -Enables the use of Intel Advanced Vector Extensions 2 instructions. +Enables Intel Advanced Vector Extensions 2. **`/arch:AVX512`**\ -Enables the use of Intel Advanced Vector Extensions 512 instructions. +Enables Intel Advanced Vector Extensions 512. + +**`/arch:AVX10.1`**\ +Enables Intel Advanced Vector Extensions 10 version 1. ## Remarks -The **`/arch`** option enables or disables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support extensions beyond the ones supported by older processors. You should consult the documentation for a particular processor or test for instruction set extension support using [`__cpuid`](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension. +The **`/arch`** option enables or disables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support extensions beyond the ones supported by older processors. You should consult the documentation for a particular processor or test for instruction set extension support using [`__cpuid`](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension. You can also use the [`__check_isa_support`](../../intrinsics/check-isa-arch-support.md) intrinsic to check for more frequently used CPU features. **`/arch`** only affects code generation for native functions. When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions. @@ -49,9 +54,11 @@ The **`/arch`** options refer to instruction set extensions with the following c - **`AVX2`** extends most integer operations to 256-bit vectors, and enables use of Fused Multiply-Add (FMA) instructions. -- **`AVX512`** introduced another instruction encoding form that allows 512-bit vectors, plus certain other optional features. Instructions for other operations were also added. +- **`AVX512`** introduced another instruction encoding form that allows 512-bit vectors, masking, embedded rounding/broadcast, and new instructions. The default vector length for **`AVX512`** is 512 bits and can be changed to 256 bits using the [`/vlen`](vlen.md) flag. + +- **`AVX10.1`** adds more instructions on top of **`AVX-512`**. The default vector length for **`AVX10.1`** is 256 bits and can be changed to 512 bits using the [`/vlen`](vlen.md) flag. -The optimizer chooses when and how to use vector instructions depending on which **`/arch`** is specified. Scalar floating-point computations are performed with SSE or AVX instructions when available. Some calling conventions specify passing floating-point arguments on the x87 stack, and as a result, your code may use a mixture of both x87 and SSE/AVX instructions for floating-point computations. Integer vector instructions can also be used for some 64-bit integer operations when available. +The optimizer chooses when and how to use vector instructions depending on which **`/arch`** is specified. Scalar floating-point computations are usually performed with SSE or AVX instructions when available. Some calling conventions specify passing floating-point arguments on the x87 stack, and as a result, your code may use a mixture of both x87 and SSE/AVX instructions for floating-point computations. Integer vector instructions can also be used for some 64-bit integer operations when available. In addition to the vector and floating-point scalar instructions, each **`/arch`** option may also enable the use of other non-vector instructions that are associated with that option. An example is the CMOVcc instruction family that first appeared on the Intel Pentium Pro processors. Because SSE instructions were introduced with the subsequent Intel Pentium III processor, CMOVcc instructions may be generated except when **`/arch:IA32`** is specified. @@ -69,7 +76,7 @@ r = t + d; // This should produce the same overall result // whether x87 stack is used or SSE/SSE2 is used. ``` -**`/arch`** and [`/QIfist`](qifist-suppress-ftol.md) can't be used on the same compiland. The **`/QIfist`** option changes the rounding behavior of floating-point to integer conversion. The default behavior is to truncate (round toward zero), whereas the **`/QIfist`** option specifies use of the floating-point environment rounding mode. Because the option changes the behavior of all floating-point to integer conversions, **`/QIfist`** has been deprecated. When compiling for SSE or AVX, you can round a floating-point value to an integer using the floating-point environment rounding mode by using an intrinsic function sequence: +**`/arch`** and [`/QIfist`](qifist-suppress-ftol.md) can't be used together. The **`/QIfist`** option changes the rounding behavior of floating-point to integer conversion. The default behavior is to truncate (round toward zero), whereas the **`/QIfist`** option specifies use of the [floating-point environment](fp-specify-floating-point-behavior.md) rounding mode. Because the option changes the behavior of all floating-point to integer conversions, **`/QIfist`** is deprecated. When compiling for SSE or AVX, you can round a floating-point value to an integer using the floating-point environment rounding mode by using an intrinsic function sequence: ```cpp int convert_float_to_int(float x) { @@ -81,9 +88,9 @@ int convert_double_to_int(double x) { } ``` -The `_M_IX86_FP`, `__AVX__`, `__AVX2__`, `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__` and `__AVX512VL__` macros indicate which, if any, **`/arch`** compiler option was used. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). The **`/arch:AVX2`** option and `__AVX2__` macro were introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. Limited support for **`/arch:AVX512`** was added in Visual Studio 2017, and expanded in Visual Studio 2019. +The `_M_IX86_FP`, `__AVX__`, `__AVX2__`, `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__`, `__AVX512VL__`, and `__AVX10_VER__` macros indicate which, if any, **`/arch`** compiler option was used. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). The **`/arch:AVX2`** option, and `__AVX2__` macro were introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. Limited support for **`/arch:AVX512`** was added in Visual Studio 2017, and expanded in Visual Studio 2019. Support for **`/arch:AVX10.1`** was added in Visual Studio 2022. -### To set this compiler option for AVX, AVX2, AVX512, IA32, SSE, or SSE2 in Visual Studio +### To set the `/arch` compiler option in Visual Studio 1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). diff --git a/docs/build/reference/base-base-address.md b/docs/build/reference/base-base-address.md index a78fb4117b..1728032bac 100644 --- a/docs/build/reference/base-base-address.md +++ b/docs/build/reference/base-base-address.md @@ -1,10 +1,9 @@ --- description: "Learn more about: /BASE (Base address)" title: "/BASE (Base address)" -ms.date: 05/11/2022 +ms.date: 03/27/2025 f1_keywords: ["/base", "VC.Project.VCLinkerTool.BaseAddress"] helpviewer_keywords: ["base addresses [C++]", "programs [C++], preventing relocation", "semicolon [C++], specifier", "-BASE linker option", "key address size", "environment variables [C++], LIB", "programs [C++], base address", "LIB environment variable", "BASE linker option", "DLLs [C++], linking", "/BASE linker option", "@ symbol for base address", "executable files [C++], base address", "at sign symbol for base address"] -ms.assetid: 00b9f6fe-0bd2-4772-a69c-7365eb199069 --- # `/BASE` (Base address) @@ -23,7 +22,7 @@ The **`/BASE`** linker option sets a base address for the program. It overrides The linker issues an error if *`address`* isn't a multiple of 64K. You can optionally specify the size of the program. The linker issues a warning if the program can't fit in the size you specified. -On the command line, another way to specify the base address is by using a *base address response file*. A base address response file is a text file that contains the base addresses and optional sizes of all the DLLs your program uses, and a unique text key for each base address. To specify a base address by using a response file, use an at sign (**`@`**) followed by the name of the response file, *`filename`*, followed by a comma, then the *`key`* value for the base address to use in the file. The linker looks for *`filename`* in either the specified path, or if no path is specified, in the directories specified in the `LIB` environment variable. Each line in *`filename`* represents one DLL and has the following syntax: +On the command line, another way to specify the base address is by using a *base address response file*. A base address response file is a text file that contains the base addresses and optional sizes of all the DLLs your program uses, and a unique text key for each base address. To specify a base address by using a response file, use an at sign (**`@`**) followed by the name of the response file, *`filename`*, followed by a comma, then the *`key`* value for the base address to use in the file. The linker looks for *`filename`* in either the specified path, or if no path is specified, in the directories specified in the `LIB` environment variable. The fully qualified *`filename`* must not exceed `MAX_PATH` (260 characters). Each line in *`filename`* represents one DLL and has the following syntax: > *`key`* *`address`* \[*`size`*] **`;`** *`comment`* @@ -35,7 +34,7 @@ one 0x28000000 0x00100000 ; for DLLONE.DLL two 0x28100000 0x00300000 ; for DLLTWO.DLL ``` -If the file that contains these lines is called DLLS.txt, the following example command applies this information: +If the file that contains these lines is called `DLLS.txt`, the following example command applies this information: ```cmd link dlltwo.obj /dll /base:@dlls.txt,two @@ -46,9 +45,7 @@ Another way to set the base address is by using the *`BASE`* argument in a [`NAM ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Advanced** property page. - 1. Modify the **Base Address** property. ### To set this linker option programmatically diff --git a/docs/build/reference/c-compile-without-linking.md b/docs/build/reference/c-compile-without-linking.md index 4a881375b4..e552d6a30e 100644 --- a/docs/build/reference/c-compile-without-linking.md +++ b/docs/build/reference/c-compile-without-linking.md @@ -41,7 +41,7 @@ CL /c FIRST.C SECOND.C THIRD.OBJ To create an executable file, you must invoke LINK: ``` -LINK firsti.obj second.obj third.obj /OUT:filename.exe +LINK first.obj second.obj third.obj /OUT:filename.exe ``` ## See also diff --git a/docs/build/reference/commands-in-a-makefile.md b/docs/build/reference/commands-in-a-makefile.md index 69635c932b..9929e2f05b 100644 --- a/docs/build/reference/commands-in-a-makefile.md +++ b/docs/build/reference/commands-in-a-makefile.md @@ -18,7 +18,7 @@ A command preceded by a semicolon (**`;`**) can appear on a dependency line or i project.obj : project.c project.h ; cl /c project.c ``` -## Command modifiers +## Command modifiers You can specify one or more command modifiers preceding a command, optionally separated by spaces or tabs. As with commands, modifiers must be indented. @@ -28,7 +28,7 @@ You can specify one or more command modifiers preceding a command, optionally se | **`-`**\[*number*] *command* | Turns off error checking for *command*. By default, NMAKE halts when a command returns a nonzero exit code. If *-number* is used, NMAKE stops if the exit code exceeds *number*. Spaces or tabs can't appear between the dash and *number.* At least one space or tab must appear between *number* and *command*. Use **`/I`** to turn off error checking for the entire makefile; use **`.IGNORE`** to turn off error checking for part of the makefile. | | **`!`** *command* | Executes *command* for each dependent file if *command* uses **`$**`** (all dependent files in the dependency) or **`$?`** (all dependent files in the dependency with a later timestamp than the target). | -## Filename-parts syntax +## Filename-parts syntax Filename-parts syntax in commands represents components of the first dependent filename (which may be an implied dependent). Filename components are the file's drive, path, base name, and extension as specified, not as it exists on disk. Use **`%s`** to represent the complete filename. Use **`%|`**\[*parts*]**`F`** (a vertical bar character follows the percent symbol) to represent parts of the filename, where *parts* can be zero or more of the following letters, in any order. diff --git a/docs/build/reference/compiler-command-line-syntax.md b/docs/build/reference/compiler-command-line-syntax.md index 6936391ed2..0f56baaed5 100644 --- a/docs/build/reference/compiler-command-line-syntax.md +++ b/docs/build/reference/compiler-command-line-syntax.md @@ -17,7 +17,7 @@ The following table describes input to the CL command. |Entry|Meaning| |-----------|-------------| -|*option*|One or more [CL options](compiler-options.md). Note that all options apply to all specified source files. Options are specified by either a forward slash (/) or a dash (-). If an option takes an argument, the option's description documents whether a space is allowed between the option and the arguments. Option names (except for the /HELP option) are case sensitive. For more information, see [Order of CL Options](order-of-cl-options.md).| +|*option*|One or more [CL options](compiler-options.md). All options apply to all specified source files. Specify options using either a forward slash (/) or a dash (-). Generally, there can't be a space between the option and argument. The option's description states when a space is allowed. Options are case-sensitive--except for `/HELP`. For more information, see [Order of CL Options](order-of-cl-options.md).| |`file`|The name of one or more source files, .obj files, or libraries. CL compiles source files and passes the names of the .obj files and libraries to the linker. For more information, see [CL Filename Syntax](cl-filename-syntax.md).| |*lib*|One or more library names. CL passes these names to the linker.| |*command-file*|A file that contains multiple options and filenames. For more information, see [CL Command Files](cl-command-files.md).| diff --git a/docs/build/reference/compiler-options-listed-alphabetically.md b/docs/build/reference/compiler-options-listed-alphabetically.md index 06734f1131..686023b214 100644 --- a/docs/build/reference/compiler-options-listed-alphabetically.md +++ b/docs/build/reference/compiler-options-listed-alphabetically.md @@ -1,7 +1,7 @@ --- title: "Compiler options listed alphabetically" description: "Reference listing in alphabetical order of the Microsoft C/C++ compiler command-line options." -ms.date: 11/13/2023 +ms.date: 2/5/2025 helpviewer_keywords: ["compiler options, C++"] --- # Compiler options listed alphabetically @@ -37,6 +37,7 @@ This table contains an alphabetical list of compiler options. For a list of comp | [`/constexpr:depth`](constexpr-control-constexpr-evaluation.md) | Recursion depth limit for `constexpr` evaluation (default: 512). | | [`/constexpr:steps`](constexpr-control-constexpr-evaluation.md) | Terminate `constexpr` evaluation after N steps (default: 100000) | | [`/D{=|#}`](d-preprocessor-definitions.md) | Defines constants and macros. | +| [`/dynamicdeopt`](dynamic-deopt.md) | Enable [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging) and step in anywhere with on-demand function deoptimization. | | [`/diagnostics`](diagnostics-compiler-diagnostic-options.md) | Diagnostics format: prints column information. | | [`/diagnostics:caret[-]`](diagnostics-compiler-diagnostic-options.md) | Diagnostics format: prints column and the indicated line of source. | | [`/diagnostics:classic`](diagnostics-compiler-diagnostic-options.md) | Use legacy diagnostics format. | @@ -66,6 +67,7 @@ This table contains an alphabetical list of compiler options. For a list of comp | [`/Fd`](fd-program-database-file-name.md) | Renames program database file. | | [`/Fe`](fe-name-exe-file.md) | Renames the executable file. | | [`/feature`](feature-arm64.md) | Enable architecture features.17.10 | +| [`/forceInterlockedFunctions`](force-interlocked-functions.md) | Dynamically selects between Armv8.0 load, store exclusive instructions or Armv8.1 LSE atomic instructions based on target CPU.17.14 | | [`/FI`](fi-name-forced-include-file.md) | Preprocesses the specified include file. | | [`/Fi`](fi-preprocess-output-file-name.md) | Specifies the preprocessed output file name. | | [`/Fm`](fm-name-mapfile.md) | Creates a mapfile. | @@ -83,7 +85,7 @@ This table contains an alphabetical list of compiler options. For a list of comp | [`/fsanitize`](fsanitize.md) | Enables compilation of sanitizer instrumentation such as AddressSanitizer. | | [`/fsanitize-coverage`](fsanitize-coverage.md) | Enables compilation of code coverage instrumentation for libraries such as LibFuzzer. | | `/Ft` | Location of the header files generated for `#import`. | -| [`/FU`](fu-name-forced-hash-using-file.md) | Forces the use of a file name, as if it had been passed to the [`#using`](../../preprocessor/hash-using-directive-cpp.md) directive. | +| [`/FU`](fu-name-forced-hash-using-file.md) | Forces the use of a file name, as if it were passed to the [`#using`](../../preprocessor/hash-using-directive-cpp.md) directive. | | [`/Fx`](fx-merge-injected-code.md) | Merges injected code with the source file. | | [`/GA`](ga-optimize-for-windows-application.md) | Optimizes for Windows applications. | | [`/Gd`](gd-gr-gv-gz-calling-convention.md) | Uses the **`__cdecl`** calling convention. (x86 only) | @@ -190,6 +192,7 @@ This table contains an alphabetical list of compiler options. For a list of comp | [`/V`](v-version-number.md) | Deprecated. Sets the version string. | | [`/validate-charset`](validate-charset-validate-for-compatible-characters.md) | Validate UTF-8 files for only compatible characters. | | [`/vd{0|1|2}`](vd-disable-construction-displacements.md) | Suppresses or enables hidden `vtordisp` class members. | +| [`/vlen`](vlen.md) | Specifies vector length. | | [`/vmb`](vmb-vmg-representation-method.md) | Uses best base for pointers to members. | | [`/vmg`](vmb-vmg-representation-method.md) | Uses full generality for pointers to members. | | [`/vmm`](vmm-vms-vmv-general-purpose-representation.md) | Declares multiple inheritance. | @@ -258,7 +261,8 @@ This table contains an alphabetical list of compiler options. For a list of comp | [`/Zs`](zs-syntax-check-only.md) | Checks syntax only. | | [`/ZW`](zw-windows-runtime-compilation.md) | Produces an output file to run on the Windows Runtime. | -17.10 This option is available starting in Visual Studio 2022 version 17.10. +17.10 This option is available starting in Visual Studio 2022 version 17.10.\ +17.14 This option is available starting in Visual Studio 2022 version 17.14. ## See also diff --git a/docs/build/reference/compiler-options-listed-by-category.md b/docs/build/reference/compiler-options-listed-by-category.md index 56667705f3..2fbfbc1357 100644 --- a/docs/build/reference/compiler-options-listed-by-category.md +++ b/docs/build/reference/compiler-options-listed-by-category.md @@ -1,7 +1,7 @@ --- title: "Compiler Options Listed by Category" description: "Reference listing by category of the Microsoft C/C++ compiler command-line options." -ms.date: 11/13/2023 +ms.date: 2/5/2025 helpviewer_keywords: ["compiler options, C++"] --- # Compiler options listed by category @@ -12,6 +12,7 @@ This article contains a categorical list of compiler options. For an alphabetica | Option | Purpose | |--|--| +| [`/dynamicdeopt`](dynamic-deopt.md) | Enable [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging) to debug optimized code as if it had been compiled deoptimized. | | [`/favor:`](favor-optimize-for-architecture-specifics.md) | Produces code that is optimized for a specified architecture, or for a range of architectures. | | [`/O1`](o1-o2-minimize-size-maximize-speed.md) | Creates small code. | | [`/O2`](o1-o2-minimize-size-maximize-speed.md) | Creates fast code. | @@ -43,6 +44,7 @@ This article contains a categorical list of compiler options. For an alphabetica | [`/EHr`](eh-exception-handling-model.md) | Always generate `noexcept` runtime termination checks. | | [`/EHs`](eh-exception-handling-model.md) | Enable C++ exception handling (no SEH exceptions). | | [`/feature`](feature-arm64.md) | Enable architecture features.17.10 | +| [`/forceInterlockedFunctions`](force-interlocked-functions.md) | Dynamically selects between Armv8.0 load, store exclusive instructions or Armv8.1 LSE atomic instructions based on target CPU.17.14 | | [`/fp:contract`](fp-specify-floating-point-behavior.md) | Consider floating-point contractions when generating code. | | [`/fp:except[-]`](fp-specify-floating-point-behavior.md) | Consider floating-point exceptions when generating code. | | [`/fp:fast`](fp-specify-floating-point-behavior.md) | "fast" floating-point model; results are less predictable. | @@ -92,6 +94,7 @@ This article contains a categorical list of compiler options. For an alphabetica | [`/RTCc`](rtc-run-time-error-checks.md) | Convert to smaller type checks at run-time. | | [`/RTCs`](rtc-run-time-error-checks.md) | Enable stack frame runtime checks. | | [`/RTCu`](rtc-run-time-error-checks.md) | Enables uninitialized local usage checks. | +| [`/vlen`](vlen.md) | Specifies vector length. | | [`/volatile:iso`](volatile-volatile-keyword-interpretation.md) | Acquire/release semantics not guaranteed on volatile accesses. | | [`/volatile:ms`](volatile-volatile-keyword-interpretation.md) | Acquire/release semantics guaranteed on volatile accesses. | @@ -207,7 +210,7 @@ This article contains a categorical list of compiler options. For an alphabetica | [`/Zc:zeroSizeArrayNew[-]`](zc-zerosizearraynew.md) | Call member `new`/`delete` for 0-size arrays of objects (on by default). | | [`/Ze`](za-ze-disable-language-extensions.md) | Deprecated. Enables C89 language extensions. | | [`/Zf`](zf.md) | Improves PDB generation time in parallel builds. | -| [`/ZH:[MD5|SHA1|SHA_256]`](zh.md) | Specifies MD5, SHA-1, or SHA-256 for checksums in debug info. | +| [`/ZH`:[MD5|SHA1|SHA_256]](zh.md) | Specifies MD5, SHA-1, or SHA-256 for checksums in debug info. | | [`/ZI`](z7-zi-zi-debug-information-format.md) | Includes debug information in a program database compatible with Edit and Continue. (x86 only) | | [`/Zi`](z7-zi-zi-debug-information-format.md) | Generates complete debugging information. | | [`/Zl`](zl-omit-default-library-name.md) | Removes the default library name from the *`.obj`* file. | @@ -326,7 +329,8 @@ Experimental options may only be supported by certain versions of the compiler. | [`/Ze`](za-ze-disable-language-extensions.md) | Deprecated. Enables language extensions. | | [`/Zg`](zg-generate-function-prototypes.md) | Removed in Visual Studio 2015. Generates function prototypes. | -17.10 This option is available starting in Visual Studio 2022 version 17.10. +17.10 This option is available starting in Visual Studio 2022 version 17.10.\ +17.14 This option is available starting in Visual Studio 2022 version 17.14. ## See also diff --git a/docs/build/reference/constexpr-control-constexpr-evaluation.md b/docs/build/reference/constexpr-control-constexpr-evaluation.md index 6bee6fa00a..9052345e64 100644 --- a/docs/build/reference/constexpr-control-constexpr-evaluation.md +++ b/docs/build/reference/constexpr-control-constexpr-evaluation.md @@ -1,45 +1,42 @@ --- description: "Learn more about: /constexpr (Control constexpr evaluation)" title: "/constexpr (Control constexpr evaluation)" -ms.date: "08/15/2017" +ms.date: 04/14/2025 f1_keywords: ["/constexpr", "-constexpr"] helpviewer_keywords: ["/constexpr control constexpr evaluation [C++]", "-constexpr control constexpr evaluation [C++]", "constexpr control constexpr evaluation [C++]"] -ms.assetid: 76d56784-f5ad-401d-841d-09d1059e8b8c --- # /constexpr (Control constexpr evaluation) -Use the **/constexpr** compiler options to control parameters for **`constexpr`** evaluation at compile time. +Use the **`/constexpr`** compiler options to control parameters for **`constexpr`** evaluation at compile time. ## Syntax -> **/constexpr:depth**N\ -> **/constexpr:backtrace**N\ -> **/constexpr:steps**N +> `/constexpr:depth`N\ +> `/constexpr:backtrace`N\ +> `/constexpr:steps`N ## Arguments -**depth**N +**`depth`**N\ Limit the depth of recursive **`constexpr`** function invocation to *N* levels. The default is 512. -**backtrace**N +**`backtrace`**N\ Show up to *N* **`constexpr`** evaluations in diagnostics. The default is 10. -**steps**N -Terminate **`constexpr`** evaluation after *N* steps. The default is 100,000. +**`steps`**N\ +Terminate **`constexpr`** evaluation after *N* steps. The default is 100,000. A step refers to an individual computation taken towards evaluating the constant expression. Increasing the maximum number of steps might cause compilation to take longer in cases where compilation would otherwise fail. ## Remarks -The **/constexpr** compiler options control compile-time evaluation of **`constexpr`** expressions. Evaluation steps, recursion levels, and backtrace depth are controlled to prevent the compiler from spending too much time on **`constexpr`** evaluation. For more information on the **`constexpr`** language element, see [constexpr (C++)](../../cpp/constexpr-cpp.md). +The **`/constexpr`** compiler options control compile-time evaluation of **`constexpr`** expressions. Evaluation steps, recursion levels, and backtrace depth are controlled to prevent the compiler from spending too much time on **`constexpr`** evaluation. For more information on the **`constexpr`** language element, see [`constexpr` (C++)](../../cpp/constexpr-cpp.md). -The **/constexpr** options are available beginning in Visual Studio 2015. +The **`/constexpr`** flag is available beginning in Visual Studio 2015. ### To set this compiler option in the Visual Studio development environment 1. Open your project's **Property Pages** dialog box. - 1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page. - -1. Enter any **/constexpr** compiler options in the **Additional Options** box. Choose **OK** or **Apply** to save your changes. +1. Enter **/constexpr** compiler options in the **Additional Options** box. Choose **OK** to save your changes. ### To set this compiler option programmatically @@ -47,5 +44,5 @@ The **/constexpr** options are available beginning in Visual Studio 2015. ## See also -[MSVC Compiler Options](compiler-options.md)
+[MSVC Compiler Options](compiler-options.md)\ [MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md) diff --git a/docs/build/reference/contents-of-a-makefile.md b/docs/build/reference/contents-of-a-makefile.md index 7a5ba46077..8883cd8cc7 100644 --- a/docs/build/reference/contents-of-a-makefile.md +++ b/docs/build/reference/contents-of-a-makefile.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: NMAKE makefile contents and features" title: "NMAKE makefile contents and features" +description: "Learn more about: NMAKE makefile contents and features" ms.date: 09/30/2021 helpviewer_keywords: ["makefiles", "makefiles, contents", "NMAKE program, special characters", "makefiles, special characters", "special characters, in NMAKE macros", "macros, special characters", "NMAKE program, long filenames", "makefiles, comments", "NMAKE program, wildcards", "wildcards, expanding"] --- @@ -24,11 +24,11 @@ For a sample, see [Sample makefile](sample-makefile.md). NMAKE supports other features, such as wildcards, long filenames, comments, and escapes for special characters. -## Wildcards and NMAKE +## Wildcards and NMAKE NMAKE expands filename wildcards (**`*`** and **`?`**) in dependency lines. A wildcard specified in a command is passed to the command; NMAKE doesn't expand it. -## Long filenames in a makefile +## Long filenames in a makefile Enclose long filenames in double quotation marks, as follows: @@ -36,7 +36,7 @@ Enclose long filenames in double quotation marks, as follows: all : "VeryLongFileName.exe" ``` -## Comments in a makefile +## Comments in a makefile Precede a comment with a number sign (**`#`**). NMAKE ignores text from the number sign to the next newline character. @@ -66,7 +66,7 @@ To specify a literal number sign, precede it with a caret (**`^`**), as follows: DEF = ^#define #Macro for a C preprocessing directive ``` -## Special characters in a makefile +## Special characters in a makefile To use an NMAKE special character as a literal character, place a caret (**`^`**) in front of it as an escape. NMAKE ignores carets that precede other characters. The special characters are: diff --git a/docs/build/reference/creating-a-makefile-project.md b/docs/build/reference/creating-a-makefile-project.md index 0f66d0307f..1f88156dfd 100644 --- a/docs/build/reference/creating-a-makefile-project.md +++ b/docs/build/reference/creating-a-makefile-project.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Create a makefile project" title: "Create a C++ makefile project in Visual Studio" +description: "Learn more about: Create a makefile project" ms.date: 09/30/2021 f1_keywords: ["vc.appwiz.makefile.project"] helpviewer_keywords: ["Makefile projects [C++]"] @@ -16,7 +16,7 @@ If you have an existing makefile project, you have these choices if you want to - **Visual Studio 2017 and later**: Use the **Open Folder** feature to edit and build a makefile project as-is without any involvement of the MSBuild system. For more information, see [Open Folder projects for C++](../open-folder-projects-cpp.md). - **Visual Studio 2019 and later**: Create a UNIX makefile project for Linux. -## To create a makefile project with the makefile project template +## To create a makefile project with the makefile project template In Visual Studio 2017 and later, the Makefile project template is available when the C++ Desktop Development workload is installed. diff --git a/docs/build/reference/def-specify-module-definition-file.md b/docs/build/reference/def-specify-module-definition-file.md index 5d6c186f61..42e938c3ff 100644 --- a/docs/build/reference/def-specify-module-definition-file.md +++ b/docs/build/reference/def-specify-module-definition-file.md @@ -1,10 +1,9 @@ --- description: "Learn more about: /DEF (Specify module-definition file)" title: "/DEF (Specify module-definition file)" -ms.date: 09/09/2022 +ms.date: 03/27/2025 f1_keywords: ["VC.Project.VCLinkerTool.ModuleDefinitionFile", "/def"] helpviewer_keywords: ["module definition files, specifying", "DEF linker option", "-DEF linker option", "module definition files", "/DEF linker option"] -ms.assetid: 6497fa68-65f0-48ca-8f66-b87166fc631a --- # `/DEF` (Specify module-definition file) @@ -17,7 +16,7 @@ Specifies a module-definition file to the linker. ## Arguments *`filename`*\ -The name of a module-definition file (*`.def`*) to be passed to the linker. +The name of a module-definition file (*`.def`*) to be passed to the linker. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks @@ -28,9 +27,7 @@ To specify a *`.def`* file from within the development environment, add it to th ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Input** property page. - 1. Modify the **Module Definition File** property. Choose **OK** or **Apply** to save your changes. ### To set this linker option programmatically diff --git a/docs/build/reference/defining-an-nmake-macro.md b/docs/build/reference/defining-an-nmake-macro.md index 3cfdc2a17c..dd09538893 100644 --- a/docs/build/reference/defining-an-nmake-macro.md +++ b/docs/build/reference/defining-an-nmake-macro.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Defining an NMAKE Macro" title: "Define an NMAKE Macro" +description: "Learn more about: Defining an NMAKE Macro" ms.date: 09/30/2021 helpviewer_keywords: ["macros, NMAKE", "defining NMAKE macros", "NMAKE macros, defining", "defining macros", "NMAKE program, defining macros", "NMAKE program, undefined macros", "Null macros in NMAKE", "macros, null and undefined", "undefined macros and NMAKE", "NMAKE program, null macros", "special characters, in NMAKE macros"] --- @@ -16,7 +16,7 @@ The *macro_name* is a case-sensitive combination of letters, digits, and undersc The *string* can be any sequence of zero or more characters. A *null* string contains zero characters or only spaces or tabs. The *string* can contain a macro invocation. -## Special characters in macros +## Special characters in macros A number sign (**`#`**) after a definition specifies a comment. To specify a literal number sign in a macro, use a caret (**`^`**) to escape it, as in **`^#`**. @@ -31,11 +31,11 @@ CMDS = cls^ dir ``` -## Null and undefined macros +## Null and undefined macros Both null and undefined macros expand to null strings, but a macro defined as a null string is considered defined in preprocessing expressions. To define a macro as a null string, specify no characters except spaces or tabs after the equal sign (**`=`**) in a command line or command file, and enclose the null string or definition in double quotation marks (**`" "`**). To undefine a macro, use **`!UNDEF`**. For more information, see [Makefile preprocessing directives](makefile-preprocessing.md#makefile-preprocessing-directives). -## Where to define macros +## Where to define macros Define macros in a command line, command file, makefile, or the *`Tools.ini`* file. @@ -43,7 +43,7 @@ In a makefile or the *`Tools.ini`* file, each macro definition must appear on a In a command line or command file, spaces and tabs delimit arguments and can't surround the equal sign. If *string* has embedded spaces or tabs, enclose either the string itself or the entire macro in double quotation marks (**`" "`**). -## Precedence in macro definitions +## Precedence in macro definitions If a macro has multiple definitions, NMAKE uses the highest-precedence definition. The following list shows the order of precedence, from highest to lowest: diff --git a/docs/build/reference/dumpbin-options.md b/docs/build/reference/dumpbin-options.md index 2bedc34b9e..71bd3a9c66 100644 --- a/docs/build/reference/dumpbin-options.md +++ b/docs/build/reference/dumpbin-options.md @@ -1,9 +1,8 @@ --- title: "DUMPBIN options" description: "Reference guide to the Microsoft DUMPBIN utility command-line options." -ms.date: "02/09/2020" +ms.date: 02/09/2020 helpviewer_keywords: ["DUMPBIN program, options"] -ms.assetid: 563b696e-7599-4480-94b9-014776289ec8 --- # DUMPBIN options @@ -49,7 +48,7 @@ DUMPBIN has the following options: - [/PDBPATH\[:VERBOSE\]](pdbpath.md) -- [/RANGEE:vaMin\[,vaMax\]](range.md) +- [/RANGE:vaMin\[,vaMax\]](range.md) - [/RAWDATA\[:{NONE\|1\|2\|4\|8}\[,#\]\]](rawdata.md) diff --git a/docs/build/reference/dynamic-deopt-linker.md b/docs/build/reference/dynamic-deopt-linker.md new file mode 100644 index 0000000000..6d4602acfc --- /dev/null +++ b/docs/build/reference/dynamic-deopt-linker.md @@ -0,0 +1,53 @@ +--- +title: "/DYNAMICDEOPT (Support C++ Dynamic Debugging) (Preview)" +description: "Learn more about: /DYNAMICDEOPT (Support C++ Dynamic Debugging)." +ms.date: 03/14/2025 +f1_keywords: ["VC.Project.VCLinkerTool.GenerateDynamicDeoptInformation", "/dynamicdeopt"] +helpviewer_keywords: ["DYNAMICDEOPT linker option", "/DYNAMICDEOPT linker option", "-DYNAMICDEOPT linker option", "c++ dynamic debugging"] +--- +# `/DYNAMICDEOPT` (Support C++ Dynamic Debugging) (Preview) + +> [!IMPORTANT] +> The `/DYNAMICDEOPT` linker switch is currently in PREVIEW. +> This information relates to a prerelease feature that might be substantially modified before release. Microsoft makes no warranties, expressed or implied, with respect to the information provided here. + +The **`/DYNAMICDEOPT`** linker option, when used with the compiler switch [`/dynamicdeopt`](dynamic-deopt.md), enables [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging), which allows you to debug optimized code as if it were compiled deoptimized and step in anywhere with on-demand function deoptimization. + +## Syntax + +> **`/DYNAMICDEOPT`**\ +> **`/DYNAMICDEOPT:SUFFIX=`**\ +> **`/DYNAMICDEOPT:SYNC`** + +## Arguments + +*`suffix`*\ +Specify the file extension for the deoptimized output. + +With no options and given `test.cpp` as input, the compiler output includes `test.obj`, `test.exe`, and `test.pdb`, as well as `test.alt.obj`, `test.alt.exe`, and `test.alt.pdb`. This switch allows you to change the suffix for the unoptimized binary build artifacts from `.alt` to something else. If you change the suffix, all files must use the new suffix, and it needs to match the name passed to the compiler using [`/dynamicdeopt:suffix` (Preview)](dynamic-deopt.md). You typically don't use this switch unless you need to avoid filename collisions with other files that you have. + +*`SYNC`*\ +Builds the deoptimized output after building the optimized output instead of in parallel. By default, the compiler spawns a parallel linker to link the unoptimized binary. This switch makes the second link run serially after the first one. This switch is provided in case this better suits your build environment. + +## Remarks + +This preview flag, available starting with Visual Studio 2022 Version 17.14 Preview 2, applies only to x64 projects. + +IncrediBuild 10.24 supports C++ Dynamic Debugging builds.\ +FastBuild v1.15 supports C++ Dynamic Debugging builds. + +### Set this linker option in the Visual Studio development environment + +1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). +1. Select the **Linker** > **Debugging** property page. + +### Set this linker option programmatically + +- See . + +## See also + +[`/dynamicdeopt` (Enable C++ Dynamic Debugging) (Preview)](dynamic-deopt.md)\ +[C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging)\ +[MSVC linker reference](linking.md)\ +[MSVC linker options](linker-options.md) diff --git a/docs/build/reference/dynamic-deopt.md b/docs/build/reference/dynamic-deopt.md new file mode 100644 index 0000000000..33edd942e3 --- /dev/null +++ b/docs/build/reference/dynamic-deopt.md @@ -0,0 +1,78 @@ +--- +title: "/dynamicdeopt (Enable C++ Dynamic Debugging (Preview))" +description: "Enable the Microsoft C++ compiler option /dynamicdeopt to use C++ Dynamic Debugging." +ms.date: 04/01/2025 +f1_keywords: ["/dynamicdeopt"] +helpviewer_keywords: ["-dynamicdeopt compiler option [C++]", "dynamicdeopt compiler option [C++]"] +--- +# `/dynamicdeopt` (Enable C++ Dynamic Debugging) (Preview) + +> [!IMPORTANT] +> The `/dynamicdeopt` compiler switch is currently in PREVIEW. +> This information relates to a prerelease feature that might be substantially modified before release. Microsoft makes no warranties, expressed or implied, with respect to the information provided here. + +Enable [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging) so you can debug optimized code as if it were compiled deoptimized and step in anywhere with on-demand function deoptimization. + +## Syntax + +> **`/dynamicdeopt`**\ +> **`/dynamicdeopt:suffix `**\ +> **`/dynamicdeopt:sync`** + +## Arguments + +*`suffix`*\ +Specify the file extension for the deoptimized output. + +With no options and given `test.cpp` as input, your output includes `test.obj`, `test.exe`, and `test.pdb`, as well as `test.alt.obj`, `test.alt.exe`, and `test.alt.pdb`. This switch allows you to change the suffix of the unoptimized binary build artifacts from `.alt` to something else. If you change the suffix, all files must use the new suffix, and it needs to match the name passed to the linker using [`/dynamicdeopt:suffix` (Preview)](dynamic-deopt-linker.md). You typically don't use this switch unless you need to avoid filename collisions with other files that you have. + +*`sync`*\ +Builds the deoptimized output after building the optimized output instead of in parallel. By default, the compiler spawns a parallel instance of the code generator. This switch makes them run serially instead. This switch is provided in case this better suits your build environment. + +## Remarks + +This preview flag, available starting with Visual Studio 2022 Version 17.14 Preview 2, applies only to x64 projects and must be used with the corresponding linker flag, [`/DYNAMICDEOPT`](dynamic-deopt-linker.md). + +Compiling with `/dynamicdeopt` generates other binaries that are used for debugging. When you debug an optimized function in an optimized file, the debugger steps into the alternate binary instead. This allows you to debug as if you're debugging unoptimized code while still getting the performance advantages of optimized code. + +`/dynamicdeopt` requires: + +`/DEBUG` or `/DEBUG:FULL`. If you don't specify `/DEBUG`, or if you specify `/DEBUG:FASTLINK`, the linker gives a fatal error. +If you specify `/INCREMENTAL`, the compiler generates a warning and automatically turns off `/INCREMENTAL`. +If you specify `/OPT:ICF`, the compiler generates a warning that the debug experience isn't as good. This is because ICF can cause functions to be removed from the alt file, which means you can't step into them. + +IncrediBuild 10.24 supports C++ Dynamic Debugging builds.\ +FastBuild v1.15 supports C++ Dynamic Debugging builds. + +`/dynamicdeopt` is incompatible with edit-and-continue and the following compiler switches: + +```cpp +/GL +/ZI +/RTC1 +/RTCs +/RTCc +/RTCu +/GH +/Gh +/fastcap +/callcap +/ZW +/fsanitize=address +/fsanitize=kernel-address +All of the CLR flags +``` + +### Set this linker option in the Visual Studio development environment + +You can set this switch inside Visual Studio. For more information, see [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging#build-system-integration). There are advantages to setting the switch in Visual Studio because MSBuild automatically suppresses some of the incompatible switches such as `/GL` and `/OPT:ICF`. It also sets the corresponding linker option (`/DYNAMICDEOPT`). You can also set the switch in the command line. + +### Set this compiler option programmatically + +- See . + +## See also + +[C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging)\ +[MSVC Compiler Options](compiler-options.md)\ +[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md) diff --git a/docs/build/reference/experimental-log.md b/docs/build/reference/experimental-log.md index e6af3965a2..413151fd86 100644 --- a/docs/build/reference/experimental-log.md +++ b/docs/build/reference/experimental-log.md @@ -1,23 +1,28 @@ --- title: "/experimental:log (Structured SARIF diagnostics)" -description: "Use the /experimental:log compiler option to output experimental structured SARIF output for diagnostics." -ms.date: 10/26/2023 +description: "The /experimental:log compiler option outputs experimental structured SARIF output for diagnostics." +ms.date: 06/05/2025 f1_keywords: ["/experimental:log"] helpviewer_keywords: ["/experimental:log", "SARIF", "structured diagnostics"] --- # `/experimental:log` (Structured SARIF diagnostics) -Output [SARIF](https://sarifweb.azurewebsites.net/) diagnostics to the specified file. For more information, see [Structured SARIF Diagnostics](sarif-output.md). +Output [SARIF](https://sarifweb.azurewebsites.net/) diagnostics to the specified file or directory. For more information, see [Structured SARIF Diagnostics](sarif-output.md). ## Syntax -> **`/experimental:log`** *filename* +> **`/experimental:log`** *filename*\ +> **`/experimental:log`** *directoryname\\* ## Arguments *filename* -Where to output SARIF diagnostics. The `.sarif` suffix is added to *filename* to produce the final filename at which to store the resulting SARIF diagnostics. The space between `/experimental:log` and *filename* is optional. Paths that include spaces must be enclosed in double quotes. *filename* may name a relative or absolute path. +The output file for SARIF diagnostics. The compiler automatically adds the `.sarif` extension to *filename*. The space between `/experimental:log` and *filename* is optional. Use double quotes around paths containing spaces. Both relative and absolute paths are supported. + +*directoryname\\* + +The output directory for SARIF diagnostics (for example, `/experimental:log sarif_output\`). Remember to add the trailing backslash (`\`) to indicate it's a directory. Each source file name forms the base name for each SARIF file saved in the directory. The compiler automatically adds the `.sarif` extension to each file name. The space between `/experimental:log` and *directoryname\\* is optional. Use double quotes around paths containing spaces. Both relative and absolute paths are supported. ## Remarks @@ -28,19 +33,22 @@ Diagnostics are also output as text to the console as usual. ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the specific project **Configuration** and **Platform** for which you want to change the property. You can also choose **"All Configurations"** and **"All Platforms"**. - 1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page. - 1. Modify the **Additional Options** property, and then choose **OK**. -## Example +## Examples + +The following command produces SARIF information for the compilation of `main.cpp` and saves it in the file `mySarifInfo.sarif`: + +```cmd +cl /experimental:log mySarifInfo main.cpp +``` -The following command produces SARIF information for the entire compilation in the `diags.sarif` file in the current directory: +The following command produces SARIF information for the entire compilation and saves it in the `sarif_output` directory in the files `main.sarif` and `other.sarif`: ```cmd -CL /experimental:logdiags main.cpp other.cpp +cl /experimental:log sarif_output\ main.cpp other.cpp ``` ## See also diff --git a/docs/build/reference/experimental-module.md b/docs/build/reference/experimental-module.md index bd1c16ed79..bfbcec74a8 100644 --- a/docs/build/reference/experimental-module.md +++ b/docs/build/reference/experimental-module.md @@ -1,13 +1,13 @@ --- title: "/experimental:module (Enable module support)" description: "Use the /experimental:module compiler option to enable experimental compiler support for named modules." -ms.date: 01/27/2022 +ms.date: 02/12/2025 f1_keywords: ["module", "/experimental:module"] helpviewer_keywords: ["module", "/experimental:module", "Enable module support"] --- -# `/experimental:module` (Enable module support) +# `/experimental:module` (Enable experimental module support) -Enables experimental compiler support for C++ Standard modules. This option is obsolete for C++20 standard modules in Visual Studio version 16.11 and later. It's still required (along with [`/std:c++latest`](std-specify-language-standard-version.md)) for the experimental Standard library modules. +Enables compiler support for Microsoft's experimental form of C++ Standard modules. This option is obsolete in Visual Studio 2019 version 16.11 and later. ## Syntax @@ -15,24 +15,46 @@ Enables experimental compiler support for C++ Standard modules. This option is o ## Remarks -In versions of Visual Studio before Visual Studio 2019 version 16.11, you can enable experimental modules support by use of the **`/experimental:module`** compiler option along with the [`/std:c++latest`](std-specify-language-standard-version.md) option. In Visual Studio 2019 version 16.11, module support is enabled automatically by either **`/std:c++20`** or **`/std:c++latest`**. Use **`/experimental:module-`** to disable module support explicitly. + This switch applies to the time before the new, standardized, way of consuming the C++ Standard Library as modules was available. Although you can use this switch to use the older experimental named modules, we recommend that you use the new, standardized, way of consuming the C++ Standard Library as modules described in [Import the C++ standard library using modules](../../cpp/tutorial-import-stl-named-module.md). -This option is available starting in Visual Studio 2015 Update 1. As of Visual Studio 2019 version 16.2, C++20 Standard modules aren't fully implemented in the Microsoft C++ compiler. Modules support is feature complete in Visual Studio 2019 version 16.10. You can use the modules feature import the Standard Library modules provided by Microsoft. A module and the code that consumes it must be compiled with the same compiler options. +This compiler switch is available starting in Visual Studio 2015 Update 1. In the VS Installer under the **Individual components** tab, ensure that **C++ Modules for v143 build tools (x64/x86 - experimental)** is selected. You can use the search box with **experimental** to find it. For more information, see [Install C and C++ support in Visual Studio](../vscpp-step-0-installation.md). -For more information on modules and how to use and create them, see [Overview of modules in C++](../../cpp/modules-cpp.md). +| Version | Status | +|---|---| +| Visual Studio 2015 Update 1 | `/experimental:module` introduced. | +| Visual Studio 2019 version 16.10 | C++20 modules support is feature complete. | +| Visual Studio 2019 16.11 and earlier | Enable experimental modules support using **`/experimental:module`** along with [`/std:c++latest`](std-specify-language-standard-version.md). | +| Visual Studio 2019 version 16.11 and later | Modules support is enabled automatically with **`/std:c++20`** or later, or **`/std:c++latest`**. Use **`/experimental:module-`** to disable experimental module support. | + +The experimental library consists of the following named modules: + +- `std.regex` provides the content of header `` +- `std.filesystem` provides the content of header `` +- `std.memory` provides the content of header `` +- `std.threading` provides the contents of headers ``, ``, ``, ``, ``, and `` +- `std.core` provides everything else in the C++ Standard Library + +To consume these modules, add an import declaration to the top of the source code file. For example: + +```cpp +import std.core; +import std.regex; +``` + +To consume the experimental Microsoft Standard Library modules, compile your program with the [`/EHsc`](eh-exception-handling-model.md) and [`/MD`](md-mt-ld-use-run-time-library.md) options. ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Set the **Configuration** drop-down to **All Configurations**. - 1. Select the **Configuration Properties** > **C/C++** > **Language** property page. - 1. Modify the **Enable C++ Modules (experimental)** property, and then choose **OK**. +For more information about how to use and create modules, see [Overview of modules in C++](../../cpp/modules-cpp.md). + ## See also +[Import the C++ standard library using modules](../../cpp/tutorial-import-stl-named-module.md)\ [`/headerUnit` (Use header unit IFC)](headerunit.md)\ [`/exportHeader` (Create header units)](module-exportheader.md)\ [`/reference` (Use named module IFC)](module-reference.md)\ diff --git a/docs/build/reference/feature-arm64.md b/docs/build/reference/feature-arm64.md index 0cff61d52c..2954b4fed1 100644 --- a/docs/build/reference/feature-arm64.md +++ b/docs/build/reference/feature-arm64.md @@ -14,10 +14,11 @@ Enable one or more Arm A-Profile architecture features for an ARM64 extension as ## Arguments To enable one or more features the targeted ARM64 extension supports, specify one or more of the following feature arguments: -| Feature argument | Feature identifier | Optional from | Enabled by default | Description | -|--|--|--|--|--| -|**`lse`** | `FEAT_LSE` | Armv8.0 | Armv8.1 | Large System Extensions. | -|**`rcpc`** | `FEAT_LRCPC` | Armv8.2 | Armv8.3 | Load-Acquire RCpc instructions. | +| Feature argument | Feature identifier | Optional from | Enabled by default | Description | Supported in version +|--|--|--|--|--|--| +|**`lse`** | `FEAT_LSE` | Armv8.0 | Armv8.1 | Large System Extensions. | Visual Studio 2022 17.10 +|**`rcpc`** | `FEAT_LRCPC` | Armv8.2 | Armv8.3 | Load-Acquire RCpc instructions. | Visual Studio 2022 17.10 +|**`rcpc2`** | `FEAT_LRCPC2` | Armv8.2 | Armv8.4 | Load-Acquire RCpc instructions v2. | Visual Studio 2022 17.11 ## Remarks diff --git a/docs/build/reference/force-interlocked-functions.md b/docs/build/reference/force-interlocked-functions.md new file mode 100644 index 0000000000..b0fb4df6fa --- /dev/null +++ b/docs/build/reference/force-interlocked-functions.md @@ -0,0 +1,55 @@ +--- +title: "/forceInterlockedFunctions" +description: "Learn more about /forceInterlockedFunctions" +ms.date: 03/07/2025 +--- +# `/forceInterlockedFunctions` + +Dynamically selects between Armv8.0 load, store exclusive instructions or Armv8.1 Large System Extension (LSE) atomic instructions based on CPU capability at runtime. + +## Syntax + +> **`/forceInterlockedFunctions`**[**`-`**] + +## Remarks +When possible, this flag avoids using Armv8.0 load and store exclusive instructions, as these instructions can result in livelocks. +This flag forces the following interlocked intrinsics to be generated as out-of-line functions: + +|Operation|8|16|32|64|128|Pointer| +|-|-------|--------|--------|--------|-------|-------| +|Add|None|None|Full|Full|None|None| +|And|Full|Full|Full|Full|None|None| +|CompareExchange|Full|Full|Full|Full|Full|Full| +|Decrement|None|Full|Full|Full|None|None| +|Exchange|Full|Full|Full|Full|None|Full| +|ExchangeAdd|Full|Full|Full|Full|None|None| +|Increment|None|Full|Full|Full|None|None| +|Or|Full|Full|Full|Full|None|None| +|Xor|Full|Full|Full|Full|None|None| +|bittestandreset|None|None|Full|Full|None|None| +|bittestandset|None|None|Full|Full|None|None| + +Key: + +- **Full**: supports plain, `_acq`, `_rel`, and `_nf` forms. + +- **None**: Not supported + +For more information about interlocked intrinsics, see the "Interlocked intrinsics" section in [Arm64 Intrinsics](../../intrinsics/arm64-intrinsics.md). + +### To set the `/forceInterlockedFunctions` compiler option in Visual Studio + +1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). + +1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page. + +1. In the **Additional options** box, add *`/forceInterlockedFunctions`* to enable. Choose **OK** to save your changes. + +### To set this compiler option programmatically + +- See . + +## See also +[Arm64 Intrinsics](../../intrinsics/arm64-intrinsics.md)\ +[MSVC compiler options](compiler-options.md)\ +[MSVC compiler command-line syntax](compiler-command-line-syntax.md) diff --git a/docs/build/reference/fsanitize.md b/docs/build/reference/fsanitize.md index 7fd5128bb7..6e9e8c9439 100644 --- a/docs/build/reference/fsanitize.md +++ b/docs/build/reference/fsanitize.md @@ -12,19 +12,24 @@ Use the **`/fsanitize`** compiler options to enable sanitizers. ## Syntax > **`/fsanitize=address`**\ +> **`/fsanitize=kernel-address`**\ > **`/fsanitize=fuzzer`**\ > **`/fsanitize-address-use-after-return`**\ > **`/fno-sanitize-address-vcasan-lib`** +> **`/fsanitize-address-asan-compat-lib`** +> **`/fno-sanitize-address-asan-compat-lib`** ## Remarks The **`/fsanitize=address`** compiler option enables [AddressSanitizer](../../sanitizers/asan.md), a powerful compiler and runtime technology to uncover [hard-to-find bugs](../../sanitizers/asan.md#error-types). Support for the **`/fsanitize=address`** option is available starting in Visual Studio 2019 version 16.9. +The **`/fsanitize=kernel-address`** compiler option enables [Kernel AddressSanitizer (KASan)](/windows-hardware/drivers/devtest/kasan). KASan is the kernel-mode variant of AddressSanitizer, available starting in Visual Studio 2022 version 17.11. KASan is only supported on Windows 11 24H2 or Windows Server 2025 and higher, and requires building using a Windows SDK 10.0.26100.2161 and higher. Building with KASan also implies the **`/fsanitize-address-asan-compat-lib`** compiler option. + The **`/fsanitize=fuzzer`** compiler option enables experimental support for [LibFuzzer](https://llvm.org/docs/LibFuzzer.html). LibFuzzer is a coverage-guided fuzzing library that can be used to find bugs and crashes caused by user-provided input. We recommended you use **`/fsanitize=address`** with LibFuzzer. This option is useful for fuzzing tools such as OneFuzz. For more information, see the [OneFuzz documentation](https://www.microsoft.com/research/project/project-onefuzz/) and [OneFuzz GitHub project](https://github.com/microsoft/onefuzz). Support for the **`/fsanitize=fuzzer`** option is available starting in Visual Studio 2022 version 17.0. The **`/fsanitize`** option doesn't allow comma-separated syntax, for example: **`/fsanitize=address,fuzzer`**. These options must be specified individually. -The **`/fsanitize-address-use-after-return`** and **`/fno-sanitize-address-vcasan-lib`** compiler options, and the [`/INFERASANLIBS` (Use inferred sanitizer libs)](./inferasanlibs.md) and **`/INFERASANLIBS:NO`** linker options offer support for advanced users. For more information, see [AddressSanitizer build and language reference](../../sanitizers/asan-building.md). +The **`/fsanitize-address-use-after-return`**, **`/fno-sanitize-address-vcasan-lib`**, **`/fsanitize-address-asan-compat-lib`**, and **`/fno-sanitize-address-asan-compat-lib`** compiler options, and the [`/INFERASANLIBS` (Use inferred sanitizer libs)](./inferasanlibs.md) and **`/INFERASANLIBS:NO`** linker options offer support for advanced users. For more information, see [AddressSanitizer build and language reference](../../sanitizers/asan-building.md). ### To set the **`/fsanitize=address`** compiler option in the Visual Studio development environment diff --git a/docs/build/reference/gd-gr-gv-gz-calling-convention.md b/docs/build/reference/gd-gr-gv-gz-calling-convention.md index 834a53189c..50380ebb09 100644 --- a/docs/build/reference/gd-gr-gv-gz-calling-convention.md +++ b/docs/build/reference/gd-gr-gv-gz-calling-convention.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: /Gd, /Gr, /Gv, /Gz (Calling Convention)" title: "/Gd, /Gr, /Gv, /Gz (Calling Convention)" -ms.date: "09/05/2018" +description: "Learn more about: /Gd, /Gr, /Gv, /Gz (Calling Convention)" +ms.date: 09/05/2018 f1_keywords: ["/Gr", "/Gv", "/Gd", "VC.Project.VCCLCompilerTool.CallingConvention"] helpviewer_keywords: ["-Gd compiler option [C++]", "-Gv compiler option [C++]", "/Gv compiler option [C++]", "-Gr compiler option [C++]", "Gd compiler option [C++]", "Gr compiler option [C++]", "/Gz compiler option [C++]", "-Gz compiler option [C++]", "/Gd compiler option [C++]", "Gz compiler option [C++]", "Gv compiler option [C++]", "/Gr compiler option [C++]"] -ms.assetid: fd3110cb-2d77-49f2-99cf-a03f9ead00a3 --- # /Gd, /Gr, /Gv, /Gz (Calling Convention) @@ -44,7 +43,7 @@ For more information about calling conventions, see [Calling Conventions](../../ On x86 processors, all function arguments are passed on the stack from right to left. On ARM and x64 architectures, some arguments are passed by register and the rest are passed on the stack from right to left. The calling routine pops the arguments from the stack. -For C, the **`__cdecl`** naming convention uses the function name preceded by an underscore ( `_` ); no case translation is performed. Unless declared as `extern "C"`, C++ functions use a different name-decorating scheme. For more information, see [Decorated Names](decorated-names.md). +For C, the **`__cdecl`** naming convention uses the function name preceded by an underscore (`_`); no case translation is performed. Unless declared as `extern "C"`, C++ functions use a different name-decorating scheme. For more information, see [Decorated Names](decorated-names.md). ## __fastcall Specifics diff --git a/docs/build/reference/genprofile-fastgenprofile-generate-profiling-instrumented-build.md b/docs/build/reference/genprofile-fastgenprofile-generate-profiling-instrumented-build.md index e77bc2bfd9..37657efee2 100644 --- a/docs/build/reference/genprofile-fastgenprofile-generate-profiling-instrumented-build.md +++ b/docs/build/reference/genprofile-fastgenprofile-generate-profiling-instrumented-build.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: /GENPROFILE, /FASTGENPROFILE (Generate Profiling Instrumented Build)" title: "/GENPROFILE, /FASTGENPROFILE (Generate Profiling Instrumented Build)" -ms.date: 04/14/2021 +description: "Learn more about: /GENPROFILE, /FASTGENPROFILE (Generate Profiling Instrumented Build)" +ms.date: 03/27/2025 f1_keywords: ["GENPROFILE", "FASTGENPROFILE", "/GENPROFILE", "/FASTGENPROFILE"] helpviewer_keywords: ["GENPROFILE", "FASTGENPROFILE"] --- @@ -12,7 +12,7 @@ Specifies generation of a *`.pgd`* file by the linker to support profile-guided ## Syntax > **`/GENPROFILE`**\[**`:`**_`profile-argument`_\[**`,`**_`profile-argument`_ ...]]\ -> **`/FASTGENPROFILE`**\[**`:`**_`profile-argument`_\[**`,`**_`profile-argument`_ ...]]\ +> **`/FASTGENPROFILE`**\[**`:`**_`profile-argument`_\[**`,`**_`profile-argument`_ ...]] > *`profile-argument`*\ >  { **`COUNTER32`** | **`COUNTER64`** }\ @@ -43,7 +43,7 @@ Use **`PATH`** to specify a separate set of PGO counters for each unique path t Specifies whether to use extra counters to keep an accurate count when exceptions are thrown during training. Use **`TRACKEH`** to specify extra counters for an exact count. Use **`NOTRACKEH`** to specify single counters for code that doesn't use exception handling or that doesn't run into exceptions in your training scenarios. When you specify **`/GENPROFILE`**, the default is **`TRACKEH`** . When you specify **`/FASTGENPROFILE`**, the default is **`NOTRACKEH`** . **`PGD`**=*filename*\ -Specifies a base file name for the *`.pgd`* file. By default, the linker uses the base executable image file name with a *`.pgd`* extension. +Specifies a base filename for the *`.pgd`* file. By default, the linker uses the base executable image filename with a *`.pgd`* extension. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks diff --git a/docs/build/reference/gs-buffer-security-check.md b/docs/build/reference/gs-buffer-security-check.md index 227124b814..41fe1b082c 100644 --- a/docs/build/reference/gs-buffer-security-check.md +++ b/docs/build/reference/gs-buffer-security-check.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: /GS (Buffer Security Check)" title: "/GS (Buffer Security Check)" -ms.date: "11/04/2016" +description: "Learn more about: /GS (Buffer Security Check)" +ms.date: 11/04/2016 f1_keywords: ["VC.Project.VCCLWCECompilerTool.BufferSecurityCheck", "VC.Project.VCCLCompilerTool.BufferSecurityCheck"] helpviewer_keywords: ["buffers [C++], buffer overruns", "buffer overruns, compiler /GS switch", "GS compiler option [C++]", "/GS compiler option [C++]", "security check compiler option [C++]", "-GS compiler option [C++]", "buffers [C++], avoiding overruns"] -ms.assetid: 8d8a5ea1-cd5e-42e1-bc36-66e1cd7e731e --- # /GS (Buffer Security Check) @@ -29,11 +28,8 @@ On functions that the compiler recognizes as subject to buffer overrun problems, A buffer overrun security check is performed on a *GS buffer*. A GS buffer can be one of these: - An array that is larger than 4 bytes, has more than two elements, and has an element type that is not a pointer type. - - A data structure whose size is more than 8 bytes and contains no pointers. - -- A buffer allocated by using the [_alloca](../../c-runtime-library/reference/alloca.md) function. - +- A buffer allocated by using the [`_alloca`](../../c-runtime-library/reference/alloca.md) function. - Any class or structure that contains a GS buffer. For example, the following statements declare GS buffers. @@ -57,16 +53,14 @@ struct { int a; int b; }; ## Initialize the Security Cookie -The **/GS** compiler option requires that the security cookie be initialized before any function that uses the cookie is run. The security cookie must be initialized immediately on entry to an EXE or DLL. This is done automatically if you use the default VCRuntime entry points: mainCRTStartup, wmainCRTStartup, WinMainCRTStartup, wWinMainCRTStartup, or _DllMainCRTStartup. If you use an alternate entry point, you must manually initialize the security cookie by calling [__security_init_cookie](../../c-runtime-library/reference/security-init-cookie.md). +The **/GS** compiler option requires that the security cookie be initialized before any function that uses the cookie is run. The security cookie must be initialized immediately on entry to an EXE or DLL. This is done automatically if you use the default VCRuntime entry points: `mainCRTStartup`, `wmainCRTStartup`, `WinMainCRTStartup`, `wWinMainCRTStartup`, or `_DllMainCRTStartup`. If you use an alternate entry point, you must manually initialize the security cookie by calling [`__security_init_cookie`](../../c-runtime-library/reference/security-init-cookie.md). ## What Is Protected The **/GS** compiler option protects the following items: - The return address of a function call. - - The address of an exception handler for a function. - - Vulnerable function parameters. On all platforms, **/GS** attempts to detect buffer overruns into the return address. Buffer overruns are more easily exploited on platforms such as x86 and x64, which use calling conventions that store the return address of a function call on the stack. @@ -80,15 +74,10 @@ A vulnerable parameter is allocated before the cookie and local variables. A buf The compiler does not make copies of vulnerable parameters in the following situations: - Functions that do not contain a GS buffer. - -- Optimizations ([/O options](o-options-optimize-code.md)) are not enabled. - +- Optimizations ([`/O` options](o-options-optimize-code.md)) are not enabled. - Functions that have a variable argument list (...). - - Functions that are marked with [naked](../../cpp/naked-cpp.md). - - Functions that contain inline assembly code in the first statement. - - A parameter is used only in ways that are less likely to be exploitable in the event of a buffer overrun. ## What Is Not Protected @@ -100,9 +89,7 @@ Even if you use **/GS**, always try to write secure code that has no buffer over ### To set this compiler option in Visual Studio 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **C/C++** > **Code Generation** property page. - 1. Modify the **Buffer Security Check** property. ### To set this compiler option programmatically @@ -138,5 +125,5 @@ int main() { ## See also -[MSVC Compiler Options](compiler-options.md)
+[MSVC Compiler Options](compiler-options.md)\ [MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md) diff --git a/docs/build/reference/guard-enable-control-flow-guard.md b/docs/build/reference/guard-enable-control-flow-guard.md index 9114479252..61a24b9f5a 100644 --- a/docs/build/reference/guard-enable-control-flow-guard.md +++ b/docs/build/reference/guard-enable-control-flow-guard.md @@ -1,9 +1,8 @@ --- description: "Learn more about: /guard (Enable Control Flow Guard)" title: "/guard (Enable Control Flow Guard)" -ms.date: 09/19/2022 +ms.date: 2/24/2025 f1_keywords: ["/guard", "VC.Project.VCCLCompilerTool.ControlFlowGuard"] -ms.assetid: be495323-f59f-4cf3-a6b6-8ee69e6a19dd --- # `/guard` (Enable Control Flow Guard) @@ -16,7 +15,7 @@ Enable compiler generation of Control Flow Guard security checks. ## Remarks -The **`/guard:cf`** option causes the compiler to analyze control flow for indirect call targets at compile time, and then to insert code to verify the targets at runtime. By default, **`/guard:cf`** is off and must be explicitly enabled. To explicitly disable this option, use **`/guard:cf-`**. +The **`/guard:cf`** option causes the compiler to analyze control flow for indirect call targets at compile time, and inserts code at runtime to verify the targets. By default, **`/guard:cf`** is off and must be explicitly enabled. To explicitly disable this option, use **`/guard:cf-`**. **Visual Studio 2017 and later**: This option adds guards for **`switch`** statements that generate jump tables. @@ -24,7 +23,13 @@ When the **`/guard:cf`** Control Flow Guard (CFG) option is specified, the compi A common attack on software takes advantage of bugs in handling extreme or unexpected inputs. Carefully crafted input to the application may overwrite a location that contains a pointer to executable code. This technique can be used to redirect control flow to code controlled by the attacker. The CFG runtime checks don't fix the data corruption bugs in your executable. They instead make it more difficult for an attacker to use them to execute arbitrary code. CFG is a mitigation tool that prevents calls to locations other than function entry points in your code. It's similar to how Data Execution Prevention (DEP), [/GS](gs-buffer-security-check.md) stack checks, and [`/DYNAMICBASE`](dynamicbase-use-address-space-layout-randomization.md) and [/HIGHENTROPYVA](highentropyva-support-64-bit-aslr.md) address space layout randomization (ASLR) lower the chances that your code becomes an exploit vector. -The **`/guard:cf`** option must be passed to both the compiler and linker to build code that uses the CFG exploit mitigation technique. If your binary is built by using a single `cl` command, the compiler passes the option to the linker. If you compile and link separately, the option must be set on both the compiler and linker commands. The /DYNAMICBASE linker option is also required. To verify that your binary has CFG data, use the `dumpbin /headers /loadconfig` command. CFG-enabled binaries have `Guard` in the list of EXE or DLL characteristics, and Guard Flags include `CF Instrumented` and `FID table present`. +To use the CFG exploit mitigation technique, pass **`/guard:cf`** to the compiler and **`/GUARD:CF`** to the linker. + +To disable the CFG exploit mitigation technique, pass **`/guard:cf-`** to the compiler **`/GUARD:NO`** to the linker. + +If you build using a single `cl` command, the compiler passes the option to the linker. If you compile and link separately, set the option for both the compiler and linker commands. The `/DYNAMICBASE` linker option is also required. + +To verify that your binary has CFG data, use the `dumpbin /headers /loadconfig` command. CFG-enabled binaries have `Guard` in the list of EXE or DLL characteristics, and Guard Flags include `CF Instrumented` and `FID table present`. The **`/guard:cf`** option is incompatible with [`/ZI`](z7-zi-zi-debug-information-format.md) (Edit and Continue debug information) or [`/clr`](clr-common-language-runtime-compilation.md) (Common Language Runtime Compilation). @@ -33,11 +38,8 @@ Code compiled by using **`/guard:cf`** can be linked to libraries and object fil ### To set this compiler option in the Visual Studio development environment 1. Open the **Property Pages** dialog box for the project. For more information, see [Set compiler and build properties](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **C/C++** > **Code Generation** property page. - 1. Select the **Control Flow Guard** property. - 1. In the dropdown control, choose **Yes** to enable Control Flow Guard, or **No** to disable it. ## See also diff --git a/docs/build/reference/idlout-name-midl-output-files.md b/docs/build/reference/idlout-name-midl-output-files.md index 38b277f76d..3c18293306 100644 --- a/docs/build/reference/idlout-name-midl-output-files.md +++ b/docs/build/reference/idlout-name-midl-output-files.md @@ -1,51 +1,45 @@ --- -description: "Learn more about: /IDLOUT (Name MIDL Output Files)" title: "/IDLOUT (Name MIDL Output Files)" -ms.date: "11/04/2016" +description: "Learn more about: /IDLOUT (Name MIDL Output Files)" +ms.date: 03/27/2025 f1_keywords: ["/idlout", "VC.Project.VCLinkerTool.MergedIDLBaseFileName"] helpviewer_keywords: ["MIDL, output file names", ".idl files, path", "MIDL", "/IDLOUT linker option", "IDL files, path", "-IDLOUT linker option", "IDLOUT linker option"] -ms.assetid: 10d00a6a-85b4-4de1-8732-e422c6931509 --- # /IDLOUT (Name MIDL Output Files) -``` -/IDLOUT:[path\]filename -``` +## Syntax -## Parameters +> /IDLOUT:[path\]filename -*path*
-An absolute or relative path specification. By specifying a path, you affect only the location of an .idl file; all other files are placed in the project directory. +## Argument -*filename*
-Specifies the name of the .idl file created by the MIDL compiler. No file extension is assumed; specify *filename*.idl if you want an .idl extension. +*`path`*\ +An absolute or relative path specification. By specifying a path, you affect only the location of an `.idl` file; all other files are placed in the project directory. + +*`filename`*\ +Specifies the name of the `.idl` file created by the MIDL compiler. No file extension is assumed; specify *`filename.idl` if you want an `.idl` extension. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The /IDLOUT option specifies the name and extension of the .idl file. +The `/IDLOUT` option specifies the name and extension of the `.idl` file. -The MIDL compiler is called by the MSVC linker when linking projects that have the [module](../../windows/attributes/module-cpp.md) attribute. +The MIDL compiler is called by the MSVC linker when linking projects that have the [`module`](../../windows/attributes/module-cpp.md) attribute. -/IDLOUT also specifies the file names of the other output files associated with the MIDL compiler: +`/IDLOUT` also specifies the file names of the other output files associated with the MIDL compiler: - *filename*.tlb - - *filename*_p.c - - *filename*_i.c - - *filename*.h -*filename* is the parameter that you pass to /IDLOUT. If [/TLBOUT](tlbout-name-dot-tlb-file.md) is specified, the .tlb file will get its name from /TLBOUT *filename*. +*`filename`* is the parameter that you pass to `/IDLOUT`. If [`/TLBOUT`](tlbout-name-dot-tlb-file.md) is specified, the .tlb file will get its name from `/TLBOUT` *`filename`*. -If you specify neither /IDLOUT nor /TLBOUT, the linker will create vc70.tlb, vc70.idl, vc70_p.c, vc70_i.c, and vc70.h. +If you specify neither `/IDLOUT` nor `/TLBOUT`, the linker will create vc70.tlb, vc70.idl, vc70_p.c, vc70_i.c, and vc70.h. ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Embedded IDL** property page. - 1. Modify the **Merge IDL Base File Name** property. ### To set this linker option programmatically @@ -54,8 +48,8 @@ If you specify neither /IDLOUT nor /TLBOUT, the linker will create vc70.tlb, vc7 ## See also -[MSVC linker reference](linking.md)
-[MSVC Linker Options](linker-options.md)
-[/IGNOREIDL (Don't Process Attributes into MIDL)](ignoreidl-don-t-process-attributes-into-midl.md)
-[/MIDL (Specify MIDL Command Line Options)](midl-specify-midl-command-line-options.md)
+[MSVC linker reference](linking.md)\ +[MSVC Linker Options](linker-options.md)\ +[/IGNOREIDL (Don't Process Attributes into MIDL)](ignoreidl-don-t-process-attributes-into-midl.md)\ +[/MIDL (Specify MIDL Command Line Options)](midl-specify-midl-command-line-options.md)\ [Building an Attributed Program](../../windows/attributes/cpp-attributes-com-net.md) diff --git a/docs/build/reference/ifc-map.md b/docs/build/reference/ifc-map.md index e196dd9c33..7466fd2b00 100644 --- a/docs/build/reference/ifc-map.md +++ b/docs/build/reference/ifc-map.md @@ -17,7 +17,7 @@ This switch tells the compiler where to find the IFC reference map file, which m ## Remarks -The `*filename*` argument specifies the IFC reference map file. It can be relative to the compiler's working directory, or an absolute path. +The *`filename`* argument specifies the IFC reference map file. It can be relative to the compiler's working directory, or an absolute path. You can provide multiple `/ifcMap` arguments to the compiler. @@ -41,7 +41,7 @@ name = "N" ifc = "C:\\modules\\N.ifc" ``` -This IFC reference map file maps the named modules `'M'` and `'N'` to their respective IFC files. The equivalent [`/reference'](module-reference.md) is: +This IFC reference map file maps the named modules `'M'` and `'N'` to their respective IFC files. The equivalent [`/reference`](module-reference.md) is: ```cmd /reference M=C:\modules\M.ifc /reference N=C:\modules\N.ifc diff --git a/docs/build/reference/ilk-name-incremental-database-file.md b/docs/build/reference/ilk-name-incremental-database-file.md index 752535f808..ab1d1d456e 100644 --- a/docs/build/reference/ilk-name-incremental-database-file.md +++ b/docs/build/reference/ilk-name-incremental-database-file.md @@ -1,7 +1,7 @@ --- title: "/ILK (Name incremental database file)" description: "The MSVC linker option /ILK specifies the incremental link database file pathname." -ms.date: 09/07/2022 +ms.date: 03/27/2025 f1_keywords: ["VC.Project.VCLinkerTool.IncrementalLinkDatabaseFile", "/ilk", "ilk"] helpviewer_keywords: ["Name incremental database file in C++ linker", "/ILK linker option", "-ILK linker option", "ILK linker option"] --- @@ -16,7 +16,7 @@ The **`/ILK`** linker option tells the linker where to put the *`.ilk`* database ### Arguments *`pathname`*\ -The destination directory and filename for the generated *`.ilk`* file. If the **`/ILK`** option isn't specified when **`/INCREMENTAL`** is used, the filename is created by appending *`.ilk`* to the target base filename. +The destination directory and filename for the generated *`.ilk`* file. If the **`/ILK`** option isn't specified when **`/INCREMENTAL`** is used, the filename is created by appending *`.ilk`* to the target base filename. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks @@ -25,9 +25,7 @@ The **`/ILK`** linker option tells the linker the path and filename to use for t ### To set this compiler option in the Visual Studio development environment 1. Open the project **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **General** property page. - 1. Modify the **Incremental Link Database File** property. The default value is `$(IntDir)$(TargetName).ilk`. ### To set this compiler option programmatically diff --git a/docs/build/reference/implib-name-import-library.md b/docs/build/reference/implib-name-import-library.md index 9bf0f23ef3..93ad9b6efb 100644 --- a/docs/build/reference/implib-name-import-library.md +++ b/docs/build/reference/implib-name-import-library.md @@ -1,38 +1,35 @@ --- description: "Learn more about: /IMPLIB (Name Import Library)" title: "/IMPLIB (Name Import Library)" -ms.date: "11/04/2016" +ms.date: 03/24/2025 f1_keywords: ["/implib", "VC.Project.VCLinkerTool.ImportLIbrary"] helpviewer_keywords: ["IMPLIB linker option", "/IMPLIB linker option", "-IMPLIB linker option", "import libraries, overriding default name"] -ms.assetid: fe8f71ab-7055-41b5-8ef8-2b97cfa4a432 --- -# /IMPLIB (Name Import Library) +# `/IMPLIB` (Name Import Library) + +## Syntax > /IMPLIB:*filename* -## Parameters +## Argument -*filename*
-A user-specified name for the import library. It replaces the default name. +*`filename`*\ +A user-specified name for the import library. It replaces the default name. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The /IMPLIB option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension .lib. A program contains exports if one or more of the following are specified: +The `/IMPLIB` option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension `.lib`. A program contains exports if one or more of the following are specified: - The [__declspec(dllexport)](../../cpp/dllexport-dllimport.md) keyword in the source code - - [EXPORTS](exports.md) statement in a .def file - - An [/EXPORT](export-exports-a-function.md) specification in a LINK command -LINK ignores /IMPLIB when an import library is not being created. If no exports are specified, LINK does not create an import library. If an export file is used in the build, LINK assumes that an import library already exists and does not create one. For information on import libraries and export files, see [LIB Reference](lib-reference.md). +LINK ignores `/IMPLIB` when an import library isn't being created. If no exports are specified, LINK doesn't create an import library. If an export file is used in the build, LINK assumes that an import library already exists and doesn't create one. For information on import libraries and export files, see [LIB Reference](lib-reference.md). ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Advanced** property page. - 1. Modify the **Import Library** property. ### To set this linker option programmatically @@ -41,5 +38,5 @@ LINK ignores /IMPLIB when an import library is not being created. If no exports ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/inference-rules.md b/docs/build/reference/inference-rules.md index e30b337647..ebb37cb557 100644 --- a/docs/build/reference/inference-rules.md +++ b/docs/build/reference/inference-rules.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: NMAKE inference rules" title: "Inference rules" +description: "Learn more about: NMAKE inference rules" ms.date: 09/30/2021 helpviewer_keywords: ["inference rules in NMAKE", "rules, inference", "NMAKE program, inference rules", "search paths in NMAKE inference rules", "defining inference rules", "batch-mode inference rules in NMAKE", "rules, predefined", "NMAKE program, predefined rules", "predefined rules in NMAKE", "rules, inferred", "inferred dependents in NMAKE", "inferred rules in NMAKE", "dependents, inferred", "precedence, inference rule"] --- @@ -10,7 +10,7 @@ Inference rules in NMAKE supply commands to update targets and to infer dependen If an out-of-date dependency has no commands, and if [`.SUFFIXES`](dot-directives.md) contains the dependent's extension, NMAKE uses a rule whose extensions match the target and an existing file in the current or specified directory. If more than one rule matches existing files, the **`.SUFFIXES`** list determines which to use; list priority descends from left to right. If a dependent file doesn't exist and isn't listed as a target in another description block, an inference rule can create the missing dependent from another file that has the same base name. If a description block's target has no dependents or commands, an inference rule can update the target. Inference rules can build a command-line target even if no description block exists. NMAKE may invoke a rule for an inferred dependent even if an explicit dependent is specified. -## Defining a rule +## Defining a rule The *from_ext* represents the extension of a dependent file, and *to_ext* represents the extension of a target file. @@ -21,7 +21,7 @@ The *from_ext* represents the extension of a dependent file, and *to_ext* repres Extensions aren't case-sensitive. Macros can be invoked to represent *from_ext* and *to_ext*; the macros are expanded during preprocessing. The period (**`.`**) that precedes *from_ext* must appear at the beginning of the line. The colon (**`:`**) is preceded by zero or more spaces or tabs. It can be followed only by spaces or tabs, a semicolon (**`;`**) to specify a command, a number sign (**`#`**) to specify a comment, or a newline character. No other spaces are allowed. Commands are specified as in description blocks. -## Search paths in rules +## Search paths in rules ```makefile {from_path}.from_ext{to_path}.to_ext: @@ -61,7 +61,7 @@ An inference rule applies to a dependency only if paths specified in the depende $(CC) $(CFLAGS) $< ``` -## Batch-mode rules +## Batch-mode rules ```makefile {from_path}.from_ext{to_path}.to_ext:: @@ -135,7 +135,7 @@ foo4.cpp Generating Code... ``` -## Predefined rules +## Predefined rules Predefined inference rules use NMAKE-supplied command and options macros. @@ -155,7 +155,7 @@ Predefined inference rules use NMAKE-supplied command and options macros. | `.cxx.obj` | `$(CXX) $(CXXFLAGS) /c $<` | `cl /c $<` | yes | all | | `.rc.res` | `$(RC) $(RFLAGS) /r $<` | `rc /r $<` | no | all | -## Inferred dependents and rules +## Inferred dependents and rules NMAKE assumes an inferred dependent for a target if an applicable inference rule exists. A rule applies if: @@ -169,7 +169,7 @@ NMAKE assumes an inferred dependent for a target if an applicable inference rule Inferred dependents can cause unexpected side effects. If the target's description block contains commands, NMAKE executes those commands instead of the commands in the rule. -## Precedence in inference rules +## Precedence in inference rules If an inference rule is defined more than once, NMAKE uses the highest-precedence definition. The following list shows the order of precedence from highest to lowest: diff --git a/docs/build/reference/inline-files-in-a-makefile.md b/docs/build/reference/inline-files-in-a-makefile.md index 7731da1cd6..b18211ffdc 100644 --- a/docs/build/reference/inline-files-in-a-makefile.md +++ b/docs/build/reference/inline-files-in-a-makefile.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Inline files in a makefile" title: "Inline files in a makefile" +description: "Learn more about: Inline files in a makefile" ms.date: 09/30/2021 helpviewer_keywords: ["inline files [C++], in makefiles", "inline files [C++]", "NMAKE program, inline files", "makefiles, inline files", "files [C++], inline", "inline files, multiple NMAKE", "multiple inline files", "inline files, reusing NMAKE", "reusing inline files", "inline files, creating text", "inline files [C++], specifying NMAKE"] --- @@ -8,7 +8,7 @@ helpviewer_keywords: ["inline files [C++], in makefiles", "inline files [C++]", An inline file contains text you specify in the makefile. Its name can be used in commands as input (for example, a LINK command file), or it can pass commands to the operating system. The file is created on disk when a command that creates the file is run. -## Specify an inline file +## Specify an inline file Specify two angle brackets (**`<<`**) in the command where *filename* is to appear. The angle brackets can't be a macro expansion. The *filename* is optional: @@ -18,7 +18,7 @@ Specify two angle brackets (**`<<`**) in the command where *filename* is to appe When the command is run, the angle brackets are replaced by *filename*, if specified, or by a unique NMAKE-generated name. If specified, *filename* must follow angle brackets without a space or tab. A path is permitted. No extension is required or assumed. If *filename* is specified, the file is created in the current or specified directory, overwriting any existing file by that name. Otherwise, it's created in the `TMP` directory (or the current directory, if the `TMP` environment variable isn't defined). If a previous *filename* is reused, NMAKE replaces the previous file. -## Create inline file text +## Create inline file text Inline files are temporary or permanent. @@ -34,11 +34,11 @@ Specify your *inline_text* on the first line after the command. Mark the end wit A temporary file exists for the duration of the session and can be reused by other commands. Specify **`KEEP`** after the closing angle brackets to retain the file after the NMAKE session; an unnamed file is preserved on disk with the generated filename. Specify **`NOKEEP`** or nothing for a temporary file. **`KEEP`** and **`NOKEEP`** are not case sensitive. -## Reuse inline files +## Reuse inline files To reuse an inline file, specify `< Multiple inline files +## Multiple inline files A command can create more than one inline file: diff --git a/docs/build/reference/keyfile-specify-key-or-key-pair-to-sign-an-assembly.md b/docs/build/reference/keyfile-specify-key-or-key-pair-to-sign-an-assembly.md index 2ef01ea543..3d1a74d531 100644 --- a/docs/build/reference/keyfile-specify-key-or-key-pair-to-sign-an-assembly.md +++ b/docs/build/reference/keyfile-specify-key-or-key-pair-to-sign-an-assembly.md @@ -1,12 +1,11 @@ --- -description: "Learn more about: /KEYFILE (Specify Key or Key Pair to Sign an Assembly)" title: "/KEYFILE (Specify Key or Key Pair to Sign an Assembly)" -ms.date: "11/04/2016" +description: "Learn more about: /KEYFILE (Specify Key or Key Pair to Sign an Assembly)" +ms.date: 03/24/2025 f1_keywords: ["/keyfile", "VC.Project.VCLinkerTool.KeyFile"] helpviewer_keywords: ["/KEYFILE linker option", "-KEYFILE linker option", "KEYFILE linker option"] -ms.assetid: 9b71f8c0-541c-4fe5-a0c7-9364f42ecb06 --- -# /KEYFILE (Specify Key or Key Pair to Sign an Assembly) +# `/KEYFILE` (Specify Key or Key Pair to Sign an Assembly) ``` /KEYFILE:filename @@ -14,39 +13,33 @@ ms.assetid: 9b71f8c0-541c-4fe5-a0c7-9364f42ecb06 ## Arguments -*filename*
+*`filename`*\ File that contains the key. Place the string in double quotation marks (" ") if it contains a space. ## Remarks -The linker inserts the public key into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type [sn -k](/dotnet/framework/tools/sn-exe-strong-name-tool) *filename* at the command line. A signed assembly is said to have a strong name. +The linker inserts the public key into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type [`sn -k`](/dotnet/framework/tools/sn-exe-strong-name-tool) *filename* at the command line. A signed assembly is said to have a strong name. -If you compile with [/LN](ln-create-msil-module.md), the name of the key file is held in the module and incorporated into the assembly that is created when you compile an assembly that includes an explicit reference to the module, via [#using](../../preprocessor/hash-using-directive-cpp.md), or when linking with [/ASSEMBLYMODULE](assemblymodule-add-a-msil-module-to-the-assembly.md). +If you compile with [`/LN`](ln-create-msil-module.md), the name of the key file is held in the module and incorporated into the assembly that is created when you compile an assembly that includes an explicit reference to the module, via [`#using`](../../preprocessor/hash-using-directive-cpp.md), or when linking with [`/ASSEMBLYMODULE`](assemblymodule-add-a-msil-module-to-the-assembly.md). -You can also pass your encryption information to the linker with [/KEYCONTAINER](keycontainer-specify-a-key-container-to-sign-an-assembly.md). Use [/DELAYSIGN](delaysign-partially-sign-an-assembly.md) if you want a partially signed assembly. For more information on signing an assembly, see [Strong Name Assemblies (Assembly Signing) (C++/CLI)](../../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md) and [Creating and Using Strong-Named Assemblies](/dotnet/framework/app-domains/create-and-use-strong-named-assemblies). +You can also pass your encryption information to the linker with [`/KEYCONTAINER`](keycontainer-specify-a-key-container-to-sign-an-assembly.md). Use [`/DELAYSIGN`](delaysign-partially-sign-an-assembly.md) if you want a partially signed assembly. For more information on signing an assembly, see [Strong Name Assemblies (Assembly Signing) (C++/CLI)](../../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md) and [Creating and Using Strong-Named Assemblies](/dotnet/framework/app-domains/create-and-use-strong-named-assemblies). -In case both **/KEYFILE** and **/KEYCONTAINER** are specified (either by command-line option or by custom attribute), the linker will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the linker doesn't find the key container, it will try the file specified with /KEYFILE. If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container (similar to sn -i) so that on the next compilation, the key container will be valid. +In case both **`/KEYFILE`** and **`/KEYCONTAINER`** are specified (either by command-line option or by custom attribute), the linker will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the linker doesn't find the key container, it will try the file specified with /KEYFILE. If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container (similar to sn -i) so that on the next compilation, the key container will be valid. A key file might contain only the public key. Other linker options that affect assembly generation are: -- [/ASSEMBLYDEBUG](assemblydebug-add-debuggableattribute.md) - -- [/ASSEMBLYLINKRESOURCE](assemblylinkresource-link-to-dotnet-framework-resource.md) - -- [/ASSEMBLYMODULE](assemblymodule-add-a-msil-module-to-the-assembly.md) - -- [/ASSEMBLYRESOURCE](assemblyresource-embed-a-managed-resource.md) - -- [/NOASSEMBLY](noassembly-create-a-msil-module.md) +- [`/ASSEMBLYDEBUG`](assemblydebug-add-debuggableattribute.md) +- [`/ASSEMBLYLINKRESOURCE`](assemblylinkresource-link-to-dotnet-framework-resource.md) +- [`/ASSEMBLYMODULE`](assemblymodule-add-a-msil-module-to-the-assembly.md) +- [`/ASSEMBLYRESOURCE`](assemblyresource-embed-a-managed-resource.md) +- [`/NOASSEMBLY`](noassembly-create-a-msil-module.md) ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Command Line** property page. - 1. Enter the option into the **Additional Options** box. ### To set this linker option programmatically @@ -55,5 +48,5 @@ Other linker options that affect assembly generation are: ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/largeaddressaware-handle-large-addresses.md b/docs/build/reference/largeaddressaware-handle-large-addresses.md index 611fab4f7a..4d3910054e 100644 --- a/docs/build/reference/largeaddressaware-handle-large-addresses.md +++ b/docs/build/reference/largeaddressaware-handle-large-addresses.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: /LARGEADDRESSAWARE (Handle Large Addresses)" title: "/LARGEADDRESSAWARE (Handle Large Addresses)" +description: "Learn more about: /LARGEADDRESSAWARE (Handle Large Addresses)" ms.date: "02/12/2024" f1_keywords: ["VC.Project.VCLinkerTool.LargeAddressAware", "/largeaddressaware"] helpviewer_keywords: ["LARGEADDRESSAWARE linker option", "-LARGEADDRESSAWARE linker option", "/LARGEADDRESSAWARE linker option"] @@ -17,7 +17,7 @@ The /LARGEADDRESSAWARE option tells the linker that the application can handle a If an application was linked with `/LARGEADDRESSAWARE`, `DUMPBIN` [/HEADERS](headers.md) will display information to that effect. -Linking 64-bit applications with **`/LARGEADDRESSAWARE:NO`** is not recommended because it restricts the available address space, which can result in runtime failures if the app exhausts memory. It may also prevent x64 apps from running on ARM64 systems because the emulation runtime will try to reserve 4GB of virtual address space. If the app was linked with `/LARGEADRESSAWARE:NO`, the app won't launch because it can't allocate that much address space. +Linking 64-bit applications with **`/LARGEADDRESSAWARE:NO`** is not recommended because it restricts the available address space, which can result in runtime failures if the app exhausts memory. It may also prevent x64 apps from running on ARM64 systems because the emulation runtime will try to reserve 4GB of virtual address space. If the app was linked with `/LARGEADDRESSAWARE:NO`, the app won't launch because it can't allocate that much address space. ### To set this linker option in the Visual Studio development environment @@ -33,5 +33,5 @@ Linking 64-bit applications with **`/LARGEADDRESSAWARE:NO`** is not recommended ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/libpath-additional-libpath.md b/docs/build/reference/libpath-additional-libpath.md index 1ac84a5485..64cfdd3f94 100644 --- a/docs/build/reference/libpath-additional-libpath.md +++ b/docs/build/reference/libpath-additional-libpath.md @@ -1,32 +1,29 @@ --- description: "Learn more about: /LIBPATH (Additional Libpath)" title: "/LIBPATH (Additional Libpath)" -ms.date: "11/04/2016" +ms.date: 03/27/2025 f1_keywords: ["/libpath", "VC.Project.VCLinkerTool.AdditionalLibraryDirectories"] helpviewer_keywords: ["LIBPATH linker option", "/LIBPATH linker option", "Additional Libpath linker option", "environment library path override", "-LIBPATH linker option", "library path linker option"] -ms.assetid: 7240af0b-9a3d-4d53-8169-2a92cd6958ba --- -# /LIBPATH (Additional Libpath) +# `/LIBPATH` (Additional Libpath) -``` -/LIBPATH:dir -``` +## Syntax -## Parameters +> /LIBPATH:dir -*dir*
-Specifies a path that the linker will search before it searches the path specified in the LIB environment option. +## Argument + +*`dir`*\ +Specifies a path that the linker searches before it searches the path specified in the `LIB` environment option. When expanded, the fully qualified directory must not exceed `MAX_PATH` (260 characters). ## Remarks -Use the /LIBPATH option to override the environment library path. The linker will first search in the path specified by this option, and then search in the path specified in the LIB environment variable. You can specify only one directory for each /LIBPATH option you enter. If you want to specify more than one directory, you must specify multiple /LIBPATH options. The linker will then search the specified directories in order. +Use the `/LIBPATH` option to override the environment library path. The linker first searches in the path specified by this option, and then searches in the path specified in the `LIB` environment variable. You can specify only one directory for each `/LIBPATH` option you enter. To specify more than one directory, specify multiple `/LIBPATH` options. The linker searches the specified directories in order. ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **General** property page. - 1. Modify the **Additional Library Directories** property. ### To set this linker option programmatically @@ -35,5 +32,5 @@ Use the /LIBPATH option to override the environment library path. The linker wil ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/link-repro-full-path-rsp.md b/docs/build/reference/link-repro-full-path-rsp.md index 1174adb871..c08892e4c7 100644 --- a/docs/build/reference/link-repro-full-path-rsp.md +++ b/docs/build/reference/link-repro-full-path-rsp.md @@ -1,23 +1,28 @@ --- description: "Learn more about: /LINKREPROFULLPATHRSP (Generate file containing absolute paths of linked files)" title: "/LINKREPROFULLPATHRSP (Generate file containing absolute paths of linked files)" -ms.date: 06/10/2024 +ms.date: 03/27/2025 f1_keywords: ["VC.Project.VCLinkerTool.LinkReproFullPathRSP", "/LINKREPROFULLPATHRSP"] helpviewer_keywords: ["/LINKREPROFULLPATHRSP linker option", "-LINKREPROFULLPATHRSP linker option", "LINKREPROFULLPATHRSP linker option"] --- # `/LINKREPROFULLPATHRSP` (Generate file containing absolute paths of linked files) -Generates a response file (.RSP) containing the absolute paths of all the files the linker took as input. +Generates a response file (`.RSP`) containing the absolute paths of all the files the linker took as input. This flag was introduced in Visual Studio 2022 version 17.11. ## Syntax -> **`/LINKREPROFULLPATHRSP:filename`** +> **/LINKREPROFULLPATHRSP:filename** + +## Argument + +*`filename`*\ +Specifies the name of the response file to create. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -Rather than generating a full link repro like `/LINKREPRO` which copies all the files to a directory and creating a response file with relative paths to that directory, this option writes the names of the files used during linking to the specified file. +Rather than generate a full link repro like `/LINKREPRO`, which copies all the files to a directory and creates a response file with relative paths to that directory, this option writes the names of the files used during linking to the specified file. For example, given: - a directory `c:\temp\test` that contains the files `test.cpp`, `f1.cpp`, `f2.cpp` diff --git a/docs/build/reference/linker-options.md b/docs/build/reference/linker-options.md index 968094a0b5..5749d0c236 100644 --- a/docs/build/reference/linker-options.md +++ b/docs/build/reference/linker-options.md @@ -1,7 +1,7 @@ --- title: "MSVC Linker options" description: "A list of the options supported by the Microsoft LINK linker." -ms.date: 06/10/2024 +ms.date: 03/14/2025 f1_keywords: ["link"] helpviewer_keywords: ["linker [C++]", "linker [C++], options listed", "libraries [C++], linking to COFF", "LINK tool [C++], linker options"] --- @@ -9,14 +9,14 @@ helpviewer_keywords: ["linker [C++]", "linker [C++], options listed", "libraries LINK.exe links Common Object File Format (COFF) object files and libraries to create an executable (EXE) file or a dynamic-link library (DLL). -The following table lists options for LINK.exe. For more information about LINK, see: +The following table lists options for `LINK.exe`. For more information about LINK, see: - [Compiler-controlled LINK options](compiler-controlled-link-options.md) - [LINK input files](link-input-files.md) - [LINK output](link-output.md) - [Reserved words](reserved-words.md) -On the command line, linker options aren't case-sensitive; for example, `/base` and `/BASE` mean the same thing. For details on how to specify each option on the command line or in Visual Studio, see the documentation for that option. +Linker options aren't case-sensitive; for example, `/base` and `/BASE` mean the same thing. For details on how to specify each option on the command line or in Visual Studio, see the documentation for that option. You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to specify some linker options. @@ -52,6 +52,7 @@ You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to speci | [`/DLL`](dll-build-a-dll.md) | Builds a DLL. | | [`/DRIVER`](driver-windows-nt-kernel-mode-driver.md) | Creates a kernel mode driver. | | [`/DYNAMICBASE`](dynamicbase-use-address-space-layout-randomization.md) | Specifies whether to generate an executable image that's rebased at load time by using the address space layout randomization (ASLR) feature. | +| [`/DYNAMICDEOPT`](dynamic-deopt-linker.md) | Enable [C++ Dynamic Debugging (Preview)](/visualstudio/debugger/cpp-dynamic-debugging) and step in anywhere with on-demand function deoptimization. | | [`/ENTRY`](entry-entry-point-symbol.md) | Sets the starting address. | | [`/ERRORREPORT`](errorreport-report-internal-linker-errors.md) | Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. | | [`/EXPORT`](export-exports-a-function.md) | Exports a function. | diff --git a/docs/build/reference/linker-property-pages.md b/docs/build/reference/linker-property-pages.md index 84c379aa0b..27a8a52d11 100644 --- a/docs/build/reference/linker-property-pages.md +++ b/docs/build/reference/linker-property-pages.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Linker Property Pages" title: "Linker Property Pages" +description: "Learn more about: Linker Property Pages" ms.date: 09/07/2022 ms.topic: "article" f1_keywords: ["VC.Project.VCLinkerTool.IgnoreImportLibrary", "VC.Project.VCLinkerTool.RegisterOutput", "VC.Project.VCLinkerTool.PerUserRedirection", "VC.Project.VCLinkerTool.LinkLibraryDependencies", "VC.Project.VCLinkerTool.UseLibraryDependencyInputs"] -ms.assetid: 7e7671e5-a35a-4e67-9bdb-661d75c4d11e --- # Linker Property Pages @@ -252,7 +251,7 @@ Specifies total heap allocation size in virtual memory. Default is 1 MB. ([`/ ### Heap Commit Size -Specifies total heap allocation size in physical memory. Default is 4 KB. (`[/HEAP:reserve,commit`](heap-set-heap-size.md)) +Specifies total heap allocation size in physical memory. Default is 4 KB. ([`/HEAP:reserve,commit`](heap-set-heap-size.md)) ### Stack Reserve Size @@ -373,7 +372,7 @@ Partially sign the Windows Metadata. Use [`/WINMDDELAYSIGN`](winmddelaysign-part ### Entry Point -The `[/ENTRY`](entry-entry-point-symbol.md) option specifies an entry point function as the starting address for an *`.exe`* file or DLL. +The [`/ENTRY`](entry-entry-point-symbol.md) option specifies an entry point function as the starting address for an *`.exe`* file or DLL. ### No Entry Point diff --git a/docs/build/reference/linking.md b/docs/build/reference/linking.md index ecfebb2496..8891ebf554 100644 --- a/docs/build/reference/linking.md +++ b/docs/build/reference/linking.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Linking" title: "MSVC linker reference" -ms.date: "12/10/2018" +ms.date: 03/27/2025 --- # Linking @@ -38,6 +38,9 @@ On the command line, an option consists of an option specifier, either a dash (` To pass a file to the linker, specify the filename on the command line after the `link.exe` command. You can specify an absolute or relative path with the filename, and you can use wildcards in the filename. If you omit the dot (`.`) and filename extension, the linker assumes an extension of `.obj` to find the file. The linker doesn't use filename extensions or the lack of them to make assumptions about the contents of files. It determines the type of file by examining it, and processes it accordingly. +> [!NOTE] +> Various linker flags take a filename. Whether you specify a relative path or an absolute path, if the fully-qualified filename exceeds `MAX_PATH` (260 characters), the linker may fail--particularly while searching for libraries. If you encounter this problem, try using a shorter path. + The linker returns zero for success (no errors). Otherwise, it returns the error number that stopped the link. For example, if the linker generates `LNK1104`, the linker returns 1104. Accordingly, the lowest error number returned on an error by the linker is 1000. A return value of 128 represents a configuration problem with either the operating system or a .config file; the loader didn't load either `link.exe` or `c2.dll`. ## Linker command files @@ -46,7 +49,7 @@ You can pass command-line arguments to `link.exe` in the form of a command file. > `link @commandfile` -The *`commandfile`* is the name of a text file. No space or tab is allowed between the at sign (**\@**) and the filename. There's no default extension; you must specify the full filename, including any extension. Wildcards can't be used. You can specify an absolute or relative path with the filename. The linker doesn't use an environment variable to search for the file. +The *`commandfile`* is the name of a text file. No space or tab is allowed between the at sign (**\@**) and the filename. There's no default extension; you must specify the full filename, including any extension. Wildcards can't be used. You can specify an absolute or relative path with the filename. Must not exceed `MAX_PATH` (260 characters). The linker doesn't use an environment variable to search for the file. In the command file, arguments are separated by spaces or tabs (as on the command line) and by newline characters. diff --git a/docs/build/reference/linkrepro.md b/docs/build/reference/linkrepro.md index 9d00525a14..a106200fdc 100644 --- a/docs/build/reference/linkrepro.md +++ b/docs/build/reference/linkrepro.md @@ -1,7 +1,7 @@ --- title: "/LINKREPRO (Link repro directory name)" description: Linker or library tool option to set the directory for a link repro. -ms.date: "09/24/2019" +ms.date: 03/28/2025 f1_keywords: ["/LINKREPRO"] helpviewer_keywords: ["LINKREPRO linker option", "/LINKREPRO linker option", "-LINKREPRO linker option", "linker repro reporting"] --- @@ -11,12 +11,12 @@ Tells the linker or library tool to generate a link repro in a specified directo ## Syntax -> **/LINKREPRO:**_directory-name_ +> `/LINKREPRO:` **_directory-name_** ### Arguments -**/LINKREPRO:**_directory-name_\ -The user-specified directory to store the link repro in. Directory names that include spaces must be enclosed in double quotes. +**_directory-name_**\ +The user-specified directory to store the link repro in. Directory names that include spaces must be enclosed in double quotes. When expanded, the fully qualified link repro filename must not exceed `MAX_PATH` (260 characters). ## Remarks diff --git a/docs/build/reference/makefile-preprocessing.md b/docs/build/reference/makefile-preprocessing.md index fd50b23a67..7092de7a26 100644 --- a/docs/build/reference/makefile-preprocessing.md +++ b/docs/build/reference/makefile-preprocessing.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Makefile Preprocessing" title: "Makefile preprocessing" +description: "Learn more about: Makefile Preprocessing" ms.date: 09/30/2021 f1_keywords: ["!UNDEF", "!INCLUDE", "!IFNDEF", "!MESSAGE"] helpviewer_keywords: ["preprocessing makefiles", "makefiles, preprocessing", "!CMDSWITCHES directive", "!ELSE directive", "!ELSEIF directive", "!ELSEIFDEF directive", "!ELSEIFNDEF directive", "!ENDIF directive", "!ERROR directive", "!IF directive", "!IFDEF directive", "!IFNDEF directive", "!INCLUDE directive", "!MESSAGE directive", "!UNDEF directive", "directives, makefile preprocessing", "preprocessing directives, makefiles", "NMAKE program, expressions", "NMAKE program, preprocessor directives", "makefiles, preprocessing directives", "expressions [C++], makefile preprocessing", "operators [C++], makefile preprocessing", "EXIST operator", "preprocessing NMAKE makefile operators", "NMAKE program, operators", "DEFINED operator", "makefiles, preprocessing operators"] @@ -9,7 +9,7 @@ helpviewer_keywords: ["preprocessing makefiles", "makefiles, preprocessing", "!C You can control the NMAKE session by using preprocessing directives and expressions. Preprocessing instructions can be placed in the makefile or in *`Tools.ini`*. Using directives, you can conditionally process your makefile, display error messages, include other makefiles, undefine a macro, and turn certain options on or off. -## Makefile Preprocessing Directives +## Makefile Preprocessing Directives Preprocessing directives aren't case-sensitive. The initial exclamation point (**`!`**) must appear at the beginning of the line. Zero or more spaces or tabs can appear after the exclamation point, for indentation. @@ -67,13 +67,13 @@ Preprocessing directives aren't case-sensitive. The initial exclamation point (* Undefines *macro_name*. -## Expressions in makefile preprocessing +## Expressions in makefile preprocessing The **`!IF`** or **`!ELSE IF`** *constant_expression* consists of integer constants (in decimal or C-language notation), string constants, or commands. Use parentheses to group expressions. Expressions use C-style signed long integer arithmetic; numbers are in 32-bit two's-complement form in the range -2147483648 to 2147483647. Expressions can use operators that act on constant values, exit codes from commands, strings, macros, and file-system paths. -## Makefile preprocessing operators +## Makefile preprocessing operators Makefile preprocessing expressions can use operators that act on constant values, exit codes from commands, strings, macros, and file-system paths. To evaluate the expression, the preprocessor first expands macros, and then executes commands, and then does the operations. It evaluates operations in order of explicit grouping in parentheses, and then in order of operator precedence. The result is a constant value. @@ -125,7 +125,7 @@ Expressions can use the following operators. The operators of equal precedence a > [!NOTE] > The bitwise XOR operator (**`^`**) is the same as the escape character, and must be escaped (as **`^^`**) when it's used in an expression. -## Executing a program in preprocessing +## Executing a program in preprocessing To use a command's exit code during preprocessing, specify the command, with any arguments, within brackets (**`[ ]`**). Any macros are expanded before the command is executed. NMAKE replaces the command specification with the command's exit code, which can be used in an expression to control preprocessing. diff --git a/docs/build/reference/manifestfile-name-manifest-file.md b/docs/build/reference/manifestfile-name-manifest-file.md index acd17845b9..32a06f368e 100644 --- a/docs/build/reference/manifestfile-name-manifest-file.md +++ b/docs/build/reference/manifestfile-name-manifest-file.md @@ -4,26 +4,28 @@ title: "/MANIFESTFILE (Name Manifest File)" ms.date: "11/04/2016" f1_keywords: ["VC.Project.VCLinkerTool.ManifestFile"] helpviewer_keywords: ["MANIFESTFILE linker option", "-MANIFESTFILE linker option", "/MANIFESTFILE linker option"] -ms.assetid: befa5ab2-a9cf-4c9b-969a-e7b4a930f08d --- # /MANIFESTFILE (Name Manifest File) -``` -/MANIFESTFILE:filename -``` +Change the default name of the manifest file. -## Remarks +## Syntax + +> `/MANIFESTFILE:`**filename** -/MANIFESTFILE lets you change the default name of the manifest file. The default name of the manifest file is the file name with .manifest appended. +## Arguments -/MANIFESTFILE will have no effect if you do not also link with [/MANIFEST](manifest-create-side-by-side-assembly-manifest.md). +**filename**\ +The default name of the manifest file is *filename* with `.manifest` appended. + +## Remarks + +`/MANIFESTFILE` has no effect if you do not also link with [/MANIFEST](manifest-create-side-by-side-assembly-manifest.md). ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Manifest File** property page. - 1. Modify the **Manifest File** property. ### To set this linker option programmatically @@ -32,5 +34,5 @@ ms.assetid: befa5ab2-a9cf-4c9b-969a-e7b4a930f08d ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/manifestinput-specify-manifest-input.md b/docs/build/reference/manifestinput-specify-manifest-input.md index 9c48c9dc54..df8b326f7d 100644 --- a/docs/build/reference/manifestinput-specify-manifest-input.md +++ b/docs/build/reference/manifestinput-specify-manifest-input.md @@ -1,9 +1,8 @@ --- description: "Learn more about: /MANIFESTINPUT (Specify Manifest Input)" title: "/MANIFESTINPUT (Specify Manifest Input)" -ms.date: 09/09/2022 +ms.date: 03/27/2025 f1_keywords: ["VC.Project.VCLinkerTool.ManifestInput"] -ms.assetid: a0b0c21e-1f9b-4d8c-bb3f-178f57fa7f1b --- # /MANIFESTINPUT (Specify Manifest Input) @@ -11,20 +10,20 @@ Specifies a manifest input file to include in the manifest that's embedded in th ## Syntax -> **`/MANIFESTINPUT:`***`filename`* +> `/MANIFESTINPUT:`*filename* ### Parameters -*`filename`*\ -The manifest file to include in the embedded manifest. +*filename*\ +The manifest file to include in the embedded manifest. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks The **`/MANIFESTINPUT`** option specifies the path of an input file to use to create the embedded manifest in an executable image. If you have multiple manifest input files, use the switch multiple times: once for each input file. The manifest input files are merged to create the embedded manifest. This option requires the **`/MANIFEST:EMBED`** option. -This option can't be set directly in Visual Studio. Instead, use the **Additional Manifest Files** property of the project to specify additional manifest files to include. For more information, see [Manifest Tool Property Pages](manifest-tool-property-pages.md). +This option can't be set directly in Visual Studio. Instead, use the **Additional Manifest Files** property of the project to specify other manifest files to include. For more information, see [Manifest Tool Property Pages](manifest-tool-property-pages.md). ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/md-mt-ld-use-run-time-library.md b/docs/build/reference/md-mt-ld-use-run-time-library.md index 0db8d589cb..0867d33ed0 100644 --- a/docs/build/reference/md-mt-ld-use-run-time-library.md +++ b/docs/build/reference/md-mt-ld-use-run-time-library.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: /MD, /MT, /LD (Use Run-Time Library)" -title: "/MD, -MT, -LD (Use Run-Time Library)" -ms.date: "07/17/2019" +title: "/MD, /MT, /LD (Use runtime library)" +description: "Learn more about: /MD, /MT, /LD (Use runtime library)" +ms.date: "01/13/2025" f1_keywords: ["/ld", "/mt", "VC.Project.VCCLWCECompilerTool.RuntimeLibrary", "VC.Project.VCCLCompilerTool.RuntimeLibrary", "/md", "/ml"] helpviewer_keywords: ["/MT compiler option [C++]", "-MD compiler option [C++]", "threading [C++], multithread compiler option", "MSVCRTD.lib", "MSVCRT.lib", "LIBCMT.lib", "MD compiler option [C++]", "/MD compiler option [C++]", "MT compiler option [C++]", "LD compiler option [C++]", "MDd compiler option [C++]", "-MDd compiler option [C++]", "LIBCD.lib", "-MTd compiler option [C++]", "MTd compiler option [C++]", "/MTd compiler option [C++]", "-LD compiler option [C++]", "/MDd compiler option [C++]", "multithread compiler option", "_STATIC_CPPLIB symbol", "LIBC.lib", "/LD compiler option [C++]", "DLLs [C++], compiler options", "LIBCMTD.lib", "-MT compiler option [C++]"] -ms.assetid: cf7ed652-dc3a-49b3-aab9-ad60e5395579 --- -# /MD, /MT, /LD (Use Run-Time Library) +# /MD, /MT, /LD (Use runtime library) -Indicates whether a multithreaded module is a DLL and specifies retail or debug versions of the run-time library. +Indicates whether a multithreaded module is a DLL and specifies retail or debug versions of the runtime library. ## Syntax @@ -22,27 +21,25 @@ Indicates whether a multithreaded module is a DLL and specifies retail or debug |Option|Description| |------------|-----------------| -|**/MD**|Causes the application to use the multithread-specific and DLL-specific version of the run-time library. Defines `_MT` and `_DLL` and causes the compiler to place the library name MSVCRT.lib into the .obj file.

Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that enables the linker to resolve external references. The actual working code is contained in MSVCR*versionnumber*.DLL, which must be available at run time to applications linked with MSVCRT.lib.| -|**/MDd**|Defines `_DEBUG`, `_MT`, and `_DLL` and causes the application to use the debug multithread-specific and DLL-specific version of the run-time library. It also causes the compiler to place the library name MSVCRTD.lib into the .obj file.| -|**/MT**|Causes the application to use the multithread, static version of the run-time library. Defines `_MT` and causes the compiler to place the library name LIBCMT.lib into the .obj file so that the linker will use LIBCMT.lib to resolve external symbols.| -|**/MTd**|Defines `_DEBUG` and `_MT`. This option also causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols.| -|**/LD**|Creates a DLL.

Passes the **/DLL** option to the linker. The linker looks for, but does not require, a `DllMain` function. If you do not write a `DllMain` function, the linker inserts a `DllMain` function that returns TRUE.

Links the DLL startup code.

Creates an import library (.lib), if an export (.exp) file is not specified on the command line. You link the import library to applications that call your DLL.

Interprets [/Fe (Name EXE File)](fe-name-exe-file.md) as naming a DLL rather than an .exe file. By default, the program name becomes *basename*.dll instead of *basename*.exe.

Implies **/MT** unless you explicitly specify **/MD**.| -|**/LDd**|Creates a debug DLL. Defines `_MT` and `_DEBUG`.| +|**/MD**|Use the multithread-specific and DLL-specific version of the runtime library. Defines `_MT` and `_DLL`. The linker uses the `MSVCRT.lib` import library to resolve runtime symbols.| +|**/MDd**|Use the debug multithread-specific and DLL-specific version of the runtime library. Defines `_DEBUG`, `_MT`, and `_DLL`. The linker uses the `MSVCRTD.lib` import library to resolve runtime symbols.| +|**/MT**| Use the multithread, static version of the runtime library. Defines `_MT`. The linker uses `LIBCMT.lib` to resolve runtime symbols.| +|**/MTd**| Use the debug multithread, static version of the runtime library. Defines `_DEBUG` and `_MT`. The linker uses `LIBCMTD.lib` to resolve runtime symbols.| +|**/LD**|Create a DLL.

Passes the **/DLL** option to the linker. The linker looks for, but does not require, a `DllMain` function. If you don't write a `DllMain` function, the linker inserts a `DllMain` function that returns TRUE.

Links the DLL startup code.

Creates an import library (`.lib`), if an export (`.exp`) file is not specified on the command line. You link the import library to applications that call your DLL.

Interprets [/Fe (Name EXE File)](fe-name-exe-file.md) as naming a DLL rather than an `.exe` file. By default, the program name becomes *basename*.dll instead of *basename*.exe.

Implies **/MT** unless you explicitly specify **/MD**.| +|**/LDd**|Create a debug DLL. Defines `_MT` and `_DEBUG`.| -For more information about C run-time libraries and which libraries are used when you compile with [/clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md), see [CRT Library Features](../../c-runtime-library/crt-library-features.md). +For more information about C runtime libraries and which libraries are used when you compile with [/clr (Common Language Runtime Compilation)](clr-common-language-runtime-compilation.md), see [CRT Library Features](../../c-runtime-library/crt-library-features.md). -All modules passed to a given invocation of the linker must have been compiled with the same run-time library compiler option (**/MD**, **/MT**, **/LD**). +All modules passed to a given invocation of the linker must have been compiled with the same runtime library compiler option (**/MD**, **/MT**, **/LD**). -For more information about how to use the debug versions of the run-time libraries, see [C Run-Time Library Reference](../../c-runtime-library/c-run-time-library-reference.md). +For more information about how to use the debug versions of the runtime libraries, see [C runtime Library Reference](../../c-runtime-library/c-run-time-library-reference.md). For more about DLLs, see [Create C/C++ DLLs in Visual Studio](../dlls-in-visual-cpp.md). ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **C/C++** > **Code Generation** property page. - 1. Modify the **Runtime Library** property. ### To set this compiler option programmatically @@ -51,5 +48,6 @@ For more about DLLs, see [Create C/C++ DLLs in Visual Studio](../dlls-in-visual- ## See also -[MSVC Compiler Options](compiler-options.md)
-[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md) +[MSVC Compiler Options](compiler-options.md)\ +[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)\ +[The Great C Runtime (CRT) Refactoring](https://devblogs.microsoft.com/cppblog/the-great-c-runtime-crt-refactoring/) \ No newline at end of file diff --git a/docs/build/reference/msbuild-reference-cpp.md b/docs/build/reference/msbuild-reference-cpp.md index e779a699b2..bbc889a922 100644 --- a/docs/build/reference/msbuild-reference-cpp.md +++ b/docs/build/reference/msbuild-reference-cpp.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: MSBuild reference for C++ projects" title: "MSBuild reference for C++ projects in Visual Studio" -ms.date: "12/08/2018" +description: "Learn more about: MSBuild reference for C++ projects" +ms.date: 12/08/2018 helpviewer_keywords: ["MSBuild reference [C++]"] --- # MSBuild reference for C++ projects @@ -12,25 +12,25 @@ If for some reason you wish to use MSBuild directly from the command line, see [ ## In this section -[MSBuild internals for C++ projects](msbuild-visual-cpp-overview.md)
+[MSBuild internals for C++ projects](msbuild-visual-cpp-overview.md)\ Information about how properties and targets are stored and consumed. -[Common macros for build commands and properties](common-macros-for-build-commands-and-properties.md)
+[Common macros for build commands and properties](common-macros-for-build-commands-and-properties.md)\ Describes macros (compile-time constants) that can be used to define properties such as paths and product versions. -[File types created for C++ projects](file-types-created-for-visual-cpp-projects.md)
+[File types created for C++ projects](file-types-created-for-visual-cpp-projects.md)\ Describes the various kinds of files that Visual Studio creates for different project types. -[Visual Studio C++ project templates](visual-cpp-project-types.md)
+[Visual Studio C++ project templates](visual-cpp-project-types.md)\ Describes the MSBuild-based project types that are available for C++. -[C++ new item templates](using-visual-cpp-add-new-item-templates.md)
+[C++ new item templates](using-visual-cpp-add-new-item-templates.md)\ Describes source files and other items you can add to a Visual Studio project. -[Precompiled header files](../creating-precompiled-header-files.md) +[Precompiled header files](../creating-precompiled-header-files.md)\ How to use precompiled header files and how to create your own custom precompiled code to speed up build times. -[Visual Studio project property reference](property-pages-visual-cpp.md)
+[Visual Studio project property reference](property-pages-visual-cpp.md)\ Reference documentation for project properties that are set in the Visual Studio IDE. ## See also diff --git a/docs/build/reference/nodefaultlib-ignore-libraries.md b/docs/build/reference/nodefaultlib-ignore-libraries.md index ba4c2438a9..646e515a1e 100644 --- a/docs/build/reference/nodefaultlib-ignore-libraries.md +++ b/docs/build/reference/nodefaultlib-ignore-libraries.md @@ -1,14 +1,13 @@ --- description: "Learn more about: /NODEFAULTLIB (Ignore libraries)" title: "/NODEFAULTLIB (Ignore libraries)" -ms.date: 09/09/2022 +ms.date: 04/16/2025 f1_keywords: ["VC.Project.VCLinkerTool.IgnoreAllDefaultLibraries", "VC.Project.VCLinkerTool.IgnoreDefaultLibraryNames", "VC.Project.VCLinkerTool.OVERWRITEAllDefaultLibraries", "VC.Project.VCLinkerTool.OVERWRITEDefaultLibraryNames", "/nodefaultlib"] helpviewer_keywords: ["default libraries, removing", "-NODEFAULTLIB linker option", "libraries, ignore", "NODEFAULTLIB linker option", "/NODEFAULTLIB linker option", "ignore libraries linker option"] -ms.assetid: 7270b673-6711-468e-97a7-c2925ac2be6e --- # `/NODEFAULTLIB` (Ignore Libraries) -The **`/NODEFAULTLIB`** linker option tells the linker to remove one or more default libraries from the list of libraries it searches when it resolves external references. +Unless an optional library name is provided, the `/NODEFAULTLIB` linker option removes all libraries not explicitly specified on the linker command-line. This also includes `#pragma`, `cl.exe` command-line switches, libs referenced by other libs, and so on. ## Syntax @@ -34,11 +33,8 @@ If you use **`/NODEFAULTLIB`** to build your program without the C run-time libr ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Input** property page. - 1. Modify the **Ignore All Default Libraries** property. Or, specify a semicolon-separated list of the libraries you want to ignore in the **Ignore Specific Default Libraries** property. The **Linker** > **Command Line** property page shows the effect of the changes you make to these properties. - 1. Choose **OK** or **Apply** to save your changes. ### To set this linker option programmatically diff --git a/docs/build/reference/oi-generate-intrinsic-functions.md b/docs/build/reference/oi-generate-intrinsic-functions.md index 7eb1b3e971..22b21114a4 100644 --- a/docs/build/reference/oi-generate-intrinsic-functions.md +++ b/docs/build/reference/oi-generate-intrinsic-functions.md @@ -4,7 +4,6 @@ title: "/Oi (Generate Intrinsic Functions)" ms.date: "11/04/2016" f1_keywords: ["VC.Project.VCCLCompilerTool.EnableIntrinsicFunctions", "/oi", "VC.Project.VCCLWCECompilerTool.EnableIntrinsicFunctions"] helpviewer_keywords: ["Oi compiler option [C++]", "intrinsic functions, generate", "/Oi compiler option [C++]", "-Oi compiler option [C++]", "generate intrinsic functions compiler option [C++]"] -ms.assetid: fa4a3bf6-0ed8-481b-91c0-add7636132b4 --- # /Oi (Generate Intrinsic Functions) @@ -18,17 +17,18 @@ Replaces some function calls with intrinsic or otherwise special forms of the fu ## Remarks -Programs that use intrinsic functions are faster because they do not have the overhead of function calls, but may be larger because of the additional code created. +Programs that use intrinsic functions are faster because they don't have the overhead of function calls but may be larger because of the extra code created. -See [intrinsic](../../preprocessor/intrinsic.md) for more information on which functions have intrinsic forms. +For more information about which functions have intrinsic forms, see [intrinsic](../../preprocessor/intrinsic.md). -**/Oi** is only a request to the compiler to replace some function calls with intrinsics; the compiler may call the function (and not replace the function call with an intrinsic) if it will result in better performance. +**/Oi** is only a request to the compiler to replace some function calls with intrinsics. The compiler may call the function (and not replace the function call with an intrinsic) if it results in better performance.\ +**/Oi-** turns off this behavior, which may be useful if `/Oi` has been specified elsewhere and you want to override it. **x86 Specific** -The intrinsic floating-point functions do not perform any special checks on input values and so work in restricted ranges of input, and have different exception handling and boundary conditions than the library routines with the same name. Using the true intrinsic forms implies loss of IEEE exception handling, and loss of `_matherr` and `errno` functionality; the latter implies loss of ANSI conformance. However, the intrinsic forms can considerably speed up floating-point-intensive programs, and for many programs, the conformance issues are of little practical value. +The intrinsic floating-point functions don't perform any special checks on input values and so work in restricted ranges of input, and have different exception handling and boundary conditions than the library routines with the same name. Using the true intrinsic forms implies loss of IEEE exception handling, and loss of `_matherr` and `errno` functionality; the latter implies loss of ANSI conformance. However, the intrinsic forms can considerably speed up floating-point-intensive programs, and for many programs, the conformance issues are of little practical value. -You can use the [Za](za-ze-disable-language-extensions.md) compiler option to override generation of true intrinsic floating-point options. In this case, the functions are generated as library routines that pass arguments directly to the floating-point chip instead of pushing them onto the program stack. +You can use the [`Za`](za-ze-disable-language-extensions.md) compiler option to override generation of true intrinsic floating-point options. In this case, the functions are generated as library routines that pass arguments directly to the floating-point chip instead of pushing them onto the program stack. **END x86 Specific** @@ -37,9 +37,7 @@ You also use [intrinsic](../../preprocessor/intrinsic.md) to create intrinsic fu ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **C/C++** > **Optimization** property page. - 1. Modify the **Enable Intrinsic Functions** property. ### To set this compiler option programmatically @@ -48,7 +46,7 @@ You also use [intrinsic](../../preprocessor/intrinsic.md) to create intrinsic fu ## See also -[/O Options (Optimize Code)](o-options-optimize-code.md)
-[MSVC Compiler Options](compiler-options.md)
-[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
+[/O Options (Optimize Code)](o-options-optimize-code.md)\ +[MSVC Compiler Options](compiler-options.md)\ +[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)\ [Compiler Intrinsics](../../intrinsics/compiler-intrinsics.md) diff --git a/docs/build/reference/out-output-file-name.md b/docs/build/reference/out-output-file-name.md index f43bb724dc..f671586c63 100644 --- a/docs/build/reference/out-output-file-name.md +++ b/docs/build/reference/out-output-file-name.md @@ -1,29 +1,26 @@ --- description: "Learn more about: /OUT (Output File Name)" title: "/OUT (Output File Name)" -ms.date: "11/04/2016" +ms.date: 03/24/2025 f1_keywords: ["VC.Project.VCLinkerTool.OutputFile", "/out"] helpviewer_keywords: ["output files, name linker option", "-OUT linker option", "OUT linker option", "/OUT C++ linker option", "linker [C++], output files"] -ms.assetid: 976210a4-e51f-4cfb-af5e-c16344455834 --- # /OUT (Output File Name) -``` -/OUT:filename -``` +> /OUT:filename ## Arguments -*filename*
-A user-specified name for the output file. It replaces the default name. +*`filename`*\ +A user-specified name for the output file. It replaces the default name. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The /OUT option overrides the default name and location of the program that the linker creates. +The `/OUT` option overrides the default name and location of the program that the linker creates. -By default, the linker forms the file name using the base name of the first .obj file specified and the appropriate extension (.exe or .dll). +By default, the linker forms the file name using the base name of the first `.obj` file specified and the appropriate extension (`.exe` or `.dll`). -This option the default base name for a .mapfile or import library. For details, see [Generate Mapfile](map-generate-mapfile.md) (/MAP) and [/IMPLIB](implib-name-import-library.md). +This option the default base name for a `.mapfile` or import library. For details, see [Generate Mapfile](map-generate-mapfile.md) (`/MAP`) and [/IMPLIB](implib-name-import-library.md). ### To set this linker option in the Visual Studio development environment @@ -39,5 +36,5 @@ This option the default base name for a .mapfile or import library. For details, ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/pdb-use-program-database.md b/docs/build/reference/pdb-use-program-database.md index 3801076b0d..9d61dad7b1 100644 --- a/docs/build/reference/pdb-use-program-database.md +++ b/docs/build/reference/pdb-use-program-database.md @@ -1,38 +1,37 @@ --- -description: "Learn more about: /PDB (Use Program Database)" title: "/PDB (Use Program Database)" -ms.date: "11/04/2016" +description: "Learn more about: /PDB (Use Program Database)" +ms.date: 03/24/2025 f1_keywords: ["/pdb", "VC.Project.VCLinkerTool.ProgramDatabaseFile"] helpviewer_keywords: ["-PDB linker option", "/PDB linker option", "PDB linker option", "PDB files, creating", ".pdb files, creating"] -ms.assetid: d23db0ce-10cb-427a-bc60-d6b2a852723d --- # /PDB (Use Program Database) -``` -/PDB:filename -``` +Specify the name of the program database (PDB) file that the linker creates. + +## Syntax + +> /PDB:filename ## Arguments -*filename*
-A user-specified name for the program database (PDB) that the linker creates. It replaces the default name. +*`filename`*\ +A user-specified name for the program database (PDB) that the linker creates. It replaces the default name. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -By default, when [/DEBUG](debug-generate-debug-info.md) is specified, the linker creates a program database (PDB) which holds debugging information. The default file name for the PDB has the base name of the program and the extension .pdb. +By default, when [`/DEBUG`](debug-generate-debug-info.md) is specified, the linker creates a program database (PDB) which holds debugging information. The default file name for the PDB has the base name of the program and the extension .pdb. -Use /PDB:*filename* to specify the name of the PDB file. If /DEBUG is not specified, the /PDB option is ignored. +Use `/PDB:`*`filename`* to specify the name of the PDB file. If `/DEBUG` is not specified, the `/PDB` option is ignored. -A PDB file can be up to 2GB. +A PDB file can be up to 2GB in size. For more information, see [.pdb Files as Linker Input](dot-pdb-files-as-linker-input.md). ### To set this linker option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Debug** property page. - 1. Modify the **Generate Program Database File** property. ### To set this linker option programmatically @@ -41,5 +40,5 @@ For more information, see [.pdb Files as Linker Input](dot-pdb-files-as-linker-i ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/pdbaltpath-use-alternate-pdb-path.md b/docs/build/reference/pdbaltpath-use-alternate-pdb-path.md index 654278e537..6c198f7815 100644 --- a/docs/build/reference/pdbaltpath-use-alternate-pdb-path.md +++ b/docs/build/reference/pdbaltpath-use-alternate-pdb-path.md @@ -1,29 +1,30 @@ --- description: "Learn more about: /PDBALTPATH (Use Alternate PDB Path)" title: "/PDBALTPATH (Use Alternate PDB Path)" -ms.date: "11/04/2016" +ms.date: 03/24/2025 f1_keywords: ["/pdbaltpath"] helpviewer_keywords: [".pdb files, path", "PDBALTPATH dumpbin option", "-PDBALTPATH dumpbin option", "/PDBALTPATH dumpbin option", "PDB files, path"] -ms.assetid: 72e200aa-e2c3-4ad8-b687-25528da1aaaf --- # /PDBALTPATH (Use Alternate PDB Path) -``` -/PDBALTPATH:pdb_file_name -``` +Provide an alternate location for the Program Database (`.pdb`) file in a compiled binary file. + +## Syntax + +> /PDBALTPATH:pdb_file_name ## Arguments -*pdb_file_name*
-The path and file name for the .pdb file. +*`pdb_file_name`*\ +The path and filename for the `.pdb` file. The path may exceed `MAX_PATH` (260 characters). The filename (not including the path) must not exceed `MAX_PATH`. ## Remarks -Use this option to provide an alternate location for the Program Database (.pdb) file in a compiled binary file. Normally, the linker records the location of the .pdb file in the binaries that it produces. You can use this option to provide a different path and file name for the .pdb file. The information provided with /PDBALTPATH does not change the location or name of the actual .pdb file; it changes the information that the linker writes in the binary file. This enables you to provide a path that is independent of the file structure of the build computer. Two common uses for this option are to provide a network path or a file that has no path information. +Use this option to provide an alternate location for the Program Database (`.pdb`) file in a compiled binary file. Normally, the linker records the location of the `.pdb` file in the binaries that it produces. You can use this option to provide a different path and file name for the `.pdb` file. The information provided with `/PDBALTPATH` does not change the location or name of the actual `.pdb` file; it changes the information that the linker writes in the binary file. This enables you to provide a path that is independent of the file structure of the build computer. Two common uses for this option are to provide a network path or a file that has no path information. -The value of *pdb_file_name* can be an arbitrary string, an environment variable, or **%_PDB%**. The linker will expand an environment variable, such as **%SystemRoot%**, to its value. The linker defines the environment variables **%_PDB%** and **%_EXT%**. **%_PDB%** expands to the file name of the actual .pdb file without any path information and **%_EXT%** is the extension of the generated executable. +The value of *`pdb_file_name`* can be an arbitrary string, an environment variable, or `%_PDB%`. The linker will expand an environment variable, such as `%SystemRoot%`, to its value. The linker defines the environment variables `%_PDB%` and `%_EXT%`. `%_PDB%` expands to the file name of the actual `.pdb` file without any path information and `%_EXT%` is the extension of the generated executable. ## See also -[DUMPBIN Options](dumpbin-options.md)
-[/PDBPATH](pdbpath.md) +[DUMPBIN Options](dumpbin-options.md)\ +[`/PDBPATH`](pdbpath.md) diff --git a/docs/build/reference/pgd-specify-database-for-profile-guided-optimizations.md b/docs/build/reference/pgd-specify-database-for-profile-guided-optimizations.md index 219bd6b023..77539e99b0 100644 --- a/docs/build/reference/pgd-specify-database-for-profile-guided-optimizations.md +++ b/docs/build/reference/pgd-specify-database-for-profile-guided-optimizations.md @@ -1,14 +1,13 @@ --- description: "Learn more about: /PGD (Specify Database for Profile-Guided Optimizations)" title: "/PGD (Specify Database for Profile-Guided Optimizations)" -ms.date: "03/14/2018" +ms.date: 03/24/2025 f1_keywords: ["VC.Project.VCLinkerTool.ProfileGuidedDatabase"] helpviewer_keywords: ["-PGD linker option", "/PGD linker option"] -ms.assetid: 9f312498-493b-461f-886f-92652257e443 --- # /PGD (Specify Database for Profile-Guided Optimizations) -**The /PGD option is deprecated.** Starting in Visual Studio 2015, prefer the [/GENPROFILE or /FASTGENPROFILE](genprofile-fastgenprofile-generate-profiling-instrumented-build.md) linker options instead. This option is used to specify the name of the .pgd file used by the profile-guided optimization process. +**The /PGD option is deprecated.** Starting in Visual Studio 2015, prefer the [`/GENPROFILE`or `/FASTGENPROFILE`](genprofile-fastgenprofile-generate-profiling-instrumented-build.md) linker options instead. This option is used to specify the name of the .pgd file used by the profile-guided optimization process. ## Syntax @@ -16,14 +15,14 @@ ms.assetid: 9f312498-493b-461f-886f-92652257e443 ## Argument -*filename*
-Specifies the name of the .pgd file that is used to hold information about the running program. +`filename`\ +Specifies the name of the `.pgd` file that is used to hold information about the running program. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -When using the deprecated [/LTCG:PGINSTRUMENT](ltcg-link-time-code-generation.md) option, use **/PGD** to specify a nondefault name or location for the .pgd file. If you do not specify **/PGD**, the .pgd file base name is the same as the output file (.exe or .dll) base name and is created in the same directory from which the link was invoked. +When using the deprecated [`/LTCG:PGINSTRUMENT`](ltcg-link-time-code-generation.md) option, use **`/PGD`** to specify a nondefault name or location for the `.pgd` file. If you don't specify **`/PGD`**, the `.pgd` file base name is the same as the output file (`.exe` or `.dll`) base name and is created in the same directory from which the link was invoked. -When using the deprecated **/LTCG:PGOPTIMIZE** option, use the **/PGD** option to specify the name of the .pgd file to use to create the optimized image. The *filename* argument should match the *filename* specified to **/LTCG:PGINSTRUMENT**. +When using the deprecated **`/LTCG:PGOPTIMIZE`** option, use the **`/PGD`** option to specify the name of the `.pgd` file to use to create the optimized image. The *`filename`* argument should match the *`filename`* specified to **`/LTCG:PGINSTRUMENT`**. For more information, see [Profile-Guided Optimizations](../profile-guided-optimizations.md). @@ -41,5 +40,5 @@ For more information, see [Profile-Guided Optimizations](../profile-guided-optim ## See also -[MSVC linker reference](linking.md)
-[MSVC Linker Options](linker-options.md)
+[MSVC linker reference](linking.md)\ +[MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/qspectre.md b/docs/build/reference/qspectre.md index 67dfb19bb4..2eace5222a 100644 --- a/docs/build/reference/qspectre.md +++ b/docs/build/reference/qspectre.md @@ -1,11 +1,11 @@ --- -description: "Learn more about: /Qspectre" title: "/Qspectre" +description: "Learn more about: /Qspectre" ms.date: 07/02/2021 f1_keywords: ["VC.Project.VCCLCompilerTool.SpectreMitigation"] helpviewer_keywords: ["/Qspectre"] --- -# /Qspectre +# `/Qspectre` Specifies compiler generation of instructions to mitigate certain Spectre variant 1 security vulnerabilities. @@ -38,7 +38,7 @@ If your code operates on data that crosses a trust boundary, then we recommend y The **`/Qspectre`** option is available starting in Visual Studio 2017 version 15.5.5, and in all updates to Microsoft C/C++ compilers (MSVC) made on or after January 23, 2018. Use the Visual Studio Installer to update the compiler, and to install the Spectre-mitigated libraries as individual components. The **`/Qspectre`** option is also available in Visual Studio 2015 Update 3 through a patch. For more information, see [KB 4338871](https://support.microsoft.com/help/4338871). -All versions of Visual Studio 2017 version 15.5, and all Previews of Visual Studio 2017 version 15.6. include an undocumented option, **/`d2guardspecload`**. It's equivalent to the initial behavior of **`/Qspectre`**. You can use **`/d2guardspecload`** to apply the same mitigations to your code in these versions of the compiler. We recommend you update your build to use **`/Qspectre`** in compilers that support the option. The **`/Qspectre`** option may also support new mitigations in later versions of the compiler. +All versions of Visual Studio 2017 version 15.5, and all Previews of Visual Studio 2017 version 15.6. include an undocumented option, **`/d2guardspecload`**. It's equivalent to the initial behavior of **`/Qspectre`**. You can use **`/d2guardspecload`** to apply the same mitigations to your code in these versions of the compiler. We recommend you update your build to use **`/Qspectre`** in compilers that support the option. The **`/Qspectre`** option may also support new mitigations in later versions of the compiler. ### Effect diff --git a/docs/build/reference/running-nmake.md b/docs/build/reference/running-nmake.md index ad7fa7d7b7..e9633b59a9 100644 --- a/docs/build/reference/running-nmake.md +++ b/docs/build/reference/running-nmake.md @@ -12,6 +12,8 @@ helpviewer_keywords: ["targets, building", "response files, NMAKE", "targets", " ## Remarks +NMAKE must run in a Developer Command Prompt window. A Developer Command Prompt window has the environment variables set for the tools, libraries, and include file paths required to build at the command line. For details on how to open a Developer Command Prompt window, see [Use the MSVC toolset from the command line](../building-on-the-command-line.md). + NMAKE builds only specified *targets* or, when none is specified, the first target in the makefile. The first makefile target can be a [pseudotarget](description-blocks.md#pseudotargets) that builds other targets. NMAKE uses makefiles specified with **`/F`**, or if **`/F`** isn't specified, the Makefile file in the current directory. If no makefile is specified, it uses inference rules to build command-line *targets*. The *command-file* text file (or response file) contains command-line input. Other input can precede or follow \@*command-file*. A path is permitted. In *command-file*, line breaks are treated as spaces. Enclose macro definitions in quotation marks if they contain spaces. diff --git a/docs/build/reference/sarif-output.md b/docs/build/reference/sarif-output.md index 3cbd752476..29e608baa8 100644 --- a/docs/build/reference/sarif-output.md +++ b/docs/build/reference/sarif-output.md @@ -15,7 +15,7 @@ The MSVC compiler can be made to output diagnostics as [SARIF](https://sarifweb. There are two ways to make the MSVC compiler produce SARIF diagnostics: - Pass the `/experimental:log` switch on the command line. See the [documentation for `/experimental:log`](experimental-log.md) for details. -- Launch `cl.exe` programatically and set the `SARIF_OUTPUT_PIPE` environment variable to retrieve SARIF blocks through a pipe. +- Launch `cl.exe` programmatically and set the `SARIF_OUTPUT_PIPE` environment variable to retrieve SARIF blocks through a pipe. ## Retrieving SARIF through a pipe diff --git a/docs/build/reference/scandependencies.md b/docs/build/reference/scandependencies.md index 0bf2e54226..d7a6f2f99c 100644 --- a/docs/build/reference/scandependencies.md +++ b/docs/build/reference/scandependencies.md @@ -60,10 +60,8 @@ Consider the following sample code: #include import other.module; -import std.core; - +import std; import "t.h"; - import ; int main() {} @@ -83,14 +81,14 @@ The compiler produces a JSON file, *`output.json`*, with content similar to: { "primary-output": "app.obj", "outputs": [ - "C:\\Users\\username\\source\\repos\\app\\app" + "output.json" ], "requires": [ { "logical-name": "other.module" }, { - "logical-name": "std.core" + "logical-name": "std" }, { "logical-name": "t.h", @@ -134,6 +132,7 @@ To report module and header unit dependencies, you must also set the **Configura ## See also +[Import the C++ standard library using modules](../../cpp/tutorial-import-stl-named-module.md)\ [MSVC compiler options](compiler-options.md)\ [MSVC compiler command-line syntax](compiler-command-line-syntax.md)\ [`/sourceDependencies:directives`](sourcedependencies-directives.md)\ diff --git a/docs/build/reference/sourcedependencies-directives.md b/docs/build/reference/sourcedependencies-directives.md index 7f1e9efe38..25cfd5f192 100644 --- a/docs/build/reference/sourcedependencies-directives.md +++ b/docs/build/reference/sourcedependencies-directives.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["/sourceDependencies:directives compiler option", "/source --- # `/sourceDependencies:directives` (List module and header unit dependencies) -This command-line option scans source files and their `#include` statements to generate a JSON file that lists module export and imports. This information can be used by a build system to determine the build order of modules and header units. +This command-line option scans source files and their `#include` statements to generate a JSON file that lists module export and imports. A build system can use this information to determine the build order of modules and header units. This option differs from [`/sourceDependencies`](sourcedependencies.md) in the following ways: @@ -59,10 +59,8 @@ Given the following sample code: #include import m; -import std.core; - +import std; import ; - import "t.h"; int main() {} @@ -78,15 +76,16 @@ produces a JSON file *`output.json`* similar to: { "Version":"1.1", "Data":{ - "Source":"C:\\a\\b\\main.cpp", + "Source":"C:\\test\\main.cpp", "ProvidedModule":"", "ImportedModules":[ "m", - "std.core" + "std" ], "ImportedHeaderUnits":[ "C:\\...\\utility", - "C:\\a\\b\\t.h" + "C:\\...\\vector", + "C:\\test\\t.h" ] } } @@ -100,10 +99,11 @@ No *`.ifc`* files are listed in the output because they weren't built. Unlike `/ ## To set this compiler option in Visual Studio -You normally shouldn't set this option yourself in the Visual Studio development environment. It's set by the build system. +You normally shouldn't set this option yourself in the Visual Studio development environment. The build system sets it. ## See also +[Import the C++ standard library using modules](../../cpp/tutorial-import-stl-named-module.md)\ [`/translateInclude`](translateinclude.md)\ [C++ header-units.json reference](header-unit-json-reference.md)\ [MSVC compiler options](compiler-options.md)\ diff --git a/docs/build/reference/sourcelink.md b/docs/build/reference/sourcelink.md index 1e9b7002ed..2240b03d4b 100644 --- a/docs/build/reference/sourcelink.md +++ b/docs/build/reference/sourcelink.md @@ -16,11 +16,11 @@ Specifies a Source Link configuration file to include in the PDB file generated ## Arguments *filename*
-Specifies a JSON-formatted configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger. For more information on the format of this file, see [Source Link JSON Schema](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md#source-link-json-schema). +Specifies a JSON-formatted configuration file that contains a simple mapping of local file paths to URLs for source files to display in the debugger. For more information on the format of this file, see [Source Link JSON Schema](https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/source-link.md#source-link-json-schema). ## Remarks -Source Link is a language- and source-control agnostic system for providing source debugging for binaries. Source Link is supported for native C++ binaries starting in Visual Studio 2017 version 15.8. For an overview of Source Link, see [Source Link](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md). For information on how to use Source Link in your projects, and how to generate the SourceLink file as part of your project, see [Using Source Link](https://github.com/dotnet/sourcelink#using-source-link-in-c-projects). +Source Link is a language- and source-control agnostic system for providing source debugging for binaries. Source Link is supported for native C++ binaries starting in Visual Studio 2017 version 15.8. For an overview of Source Link, see [Source Link](https://github.com/dotnet/designs/blob/main/accepted/2020/diagnostics/source-link.md). For information on how to use Source Link in your projects, and how to generate the SourceLink file as part of your project, see [Using Source Link](https://github.com/dotnet/sourcelink#using-source-link-in-c-projects). ### To set the /SOURCELINK linker option in Visual Studio @@ -36,5 +36,5 @@ Source Link is a language- and source-control agnostic system for providing sour ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/special-nmake-macros.md b/docs/build/reference/special-nmake-macros.md index 1ed4fd8b92..93dcf23449 100644 --- a/docs/build/reference/special-nmake-macros.md +++ b/docs/build/reference/special-nmake-macros.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Special NMAKE macros" title: "Special NMAKE macros" +description: "Learn more about: Special NMAKE macros" ms.date: 09/30/2021 helpviewer_keywords: ["special NMAKE macros", "macros, NMAKE", "NMAKE macros, special", "NMAKE program, environment variable macros", "environment variables, macros in NMAKE", "macros, environment-variable", "options macros", "command macros in NMAKE", "macros, options macros", "macros, command macros", "NMAKE program, recursion macros", "recursion macros", "macros, recursion", "filename macros in NMAKE", "NMAKE program, filename macros"] no-loc: [AS, AFLAGS, CC, CFLAGS, CPP, CPPFLAGS, CXX, CXXFLAGS, RC, RFLAGS, ias, ml, ml64, cl, rc] @@ -9,7 +9,7 @@ no-loc: [AS, AFLAGS, CC, CFLAGS, CPP, CPPFLAGS, CXX, CXXFLAGS, RC, RFLAGS, ias, NMAKE provides several special macros to represent various filenames and commands. One use for some of these macros is in the predefined inference rules. Like all macros, the macros provided by NMAKE are case sensitive. -## Filename Macros +## Filename Macros Filename macros are predefined as filenames specified in the dependency (not full filename specifications on disk). These macros don't need to be enclosed in parentheses when invoked; specify only a **`$`** as shown. @@ -31,7 +31,7 @@ To specify part of a predefined filename macro, append a macro modifier and encl | **`F`** | Base name plus extension | | **`R`** | Drive plus directory plus base name | -## Recursion macros +## Recursion macros Use recursion macros to call NMAKE recursively. Recursive sessions inherit command-line and environment-variable macros and *`Tools.ini`* information. They don't inherit makefile-defined inference rules or `.SUFFIXES` and `.PRECIOUS` specifications. There are three ways to pass macros to a recursive NMAKE session: @@ -45,7 +45,7 @@ Use recursion macros to call NMAKE recursively. Recursive sessions inherit comma | **`MAKEDIR`** | Current directory when NMAKE was invoked. | | **`MAKEFLAGS`** | Options currently in effect. Use as `/$(MAKEFLAGS)`. The **`/F`** option isn't included. | -## Command macros and options macros +## Command macros and options macros Command macros are predefined for Microsoft products. Options macros represent options to these products and are undefined by default. Both are used in predefined inference rules and can be used in description blocks or user-defined inference rules. Command macros can be redefined to represent part or all of a command line, including options. Options macros generate a null string if left undefined. @@ -57,7 +57,7 @@ Command macros are predefined for Microsoft products. Options macros represent o | C++ Compiler | **`CXX`** | `cl` | **`CXXFLAGS`** | | Resource Compiler | **`RC`** | `rc` | **`RFLAGS`** | -## Environment-variable macros +## Environment-variable macros NMAKE inherits macro definitions for environment variables that exist before the start of the session. If a variable was set in the operating-system environment, it is available as an NMAKE macro. The inherited names are converted to uppercase. Inheritance occurs before preprocessing. Use the /E option to cause macros inherited from environment variables to override any macros with the same name in the makefile. diff --git a/docs/build/reference/std-specify-language-standard-version.md b/docs/build/reference/std-specify-language-standard-version.md index e6044538be..c9eeb3f544 100644 --- a/docs/build/reference/std-specify-language-standard-version.md +++ b/docs/build/reference/std-specify-language-standard-version.md @@ -1,8 +1,8 @@ --- title: "/std (Specify Language Standard Version)" description: "The MSVC compiler option /std specifies the C or C++ language standard supported by the compiler." -ms.date: 4/9/2023 -f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c++20", "/std:c11", "/std:c17", "/std:clatest", "VC.Project.VCCLCompilerTool.CppLanguageStandard"] +ms.date: 1/29/2025 +f1_keywords: ["/std", "-std", "/std:c++14", "/std:c++17", "/std:c++20", "/std:c++23preview", "/std:c++latest", "/std:c11", "/std:c17", "/std:clatest", "VC.Project.VCCLCompilerTool.CppLanguageStandard"] --- # `/std` (Specify Language Standard Version) @@ -13,6 +13,7 @@ Enable supported C and C++ language features from the specified version of the C > **`/std:c++14`**\ > **`/std:c++17`**\ > **`/std:c++20`**\ +> **`/std:c++23preview`**\ > **`/std:c++latest`**\ > **`/std:c11`**\ > **`/std:c17`**\ @@ -24,19 +25,20 @@ The **`/std`** options are available in Visual Studio 2017 and later. They're us The Microsoft C++ compiler in Visual Studio 2017 and later versions doesn't support C++ standards modes earlier than C++14 (**`/std:c++14`**). Such support isn't planned. As an imperfect workaround, it's possible to use older Visual C++ compiler toolsets that didn't implement features from later standards. For more information on how to install and use older compiler toolsets in Visual Studio, see [Use native multi-targeting in Visual Studio to build old projects](../../porting/use-native-multi-targeting.md). -### C++ standards support +## C++ standards support -The **`/std`** option in effect during a C++ compilation can be detected by use of the [`_MSVC_LANG`](../../preprocessor/predefined-macros.md) preprocessor macro. For more information, see [Preprocessor Macros](../../preprocessor/predefined-macros.md). +Detect whether the **`/std`** option is in effect during a C++ compilation with the [`_MSVC_LANG`](../../preprocessor/predefined-macros.md) preprocessor macro. For more information, see [Preprocessor Macros](../../preprocessor/predefined-macros.md). > [!IMPORTANT] > Because some existing code depends on the value of the macro `__cplusplus` being `199711L`, the MSVC compiler doesn't change the value of this macro unless you explicitly opt in by setting [`/Zc:__cplusplus`](zc-cplusplus.md). Specify `/Zc:__cplusplus` and the **`/std`** option to set `__cplusplus` to the appropriate value. -**`/std:c++14`**\ -The **`/std:c++14`** option enables C++14 standard-specific features implemented by the MSVC compiler. This option is the default for code compiled as C++. It's available starting in Visual Studio 2015 Update 3. +### `/std:c++14` + +Enables C++14 standard-specific features implemented by the MSVC compiler. This option is the default for code compiled as C++. It's available starting in Visual Studio 2015 Update 3. This option disables compiler and standard library support for features that are changed or new in more recent versions of the language standard. However, it doesn't disable some C++17 features already implemented in previous releases of the MSVC compiler. For more information, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). The tables indicate which C++17 features are enabled when you specify **`/std:c++14`**. -The following features remain enabled when the **`/std:c++14`** option is specified to avoid breaking changes for users who have already taken dependencies on the features available in or before Visual Studio 2015 Update 2: +The following features remain enabled when the **`/std:c++14`** option is specified to avoid breaking changes for users who took dependencies on features available in or before Visual Studio 2015 Update 2: - [Rules for `auto` with braced-init-lists](https://wg21.link/n3922) - [`typename` in template template-parameters](https://wg21.link/n4051) @@ -44,39 +46,52 @@ The following features remain enabled when the **`/std:c++14`** option is specif - [Attributes for namespaces and enumerators](https://wg21.link/n4266) - [u8 character literals](https://wg21.link/n4267) -**`/std:c++17`**\ -The **`/std:c++17`** option enables C++17 standard-specific features and behavior. It enables the full set of C++17 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are new or changed after C++17. It specifically disables post-C++17 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard. This option is available starting in Visual Studio 2017 version 15.3. +### `/std:c++17` + +Enables C++17 standard-specific features and behavior. It enables the full set of C++17 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are new or changed after C++17. It specifically disables post-C++17 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard. This option is available starting in Visual Studio 2017 version 15.3. Depending on the MSVC compiler version or update level, C++17 features may not be fully implemented or fully conforming when you specify the **`/std:c++17`** option. For an overview of C++ language conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). -**`/std:c++20`**\ -The **`/std:c++20`** option enables C++20 standard-specific features and behavior. Available starting in Visual Studio 2019 version 16.11, it enables the full set of C++20 features implemented by the MSVC compiler, except for `std::format`, the C++20 `` formatting extensions, and the range factories and range adaptors from ``. These features are still only available under **`/std:c++latest`**. +### `/std:c++20` + +Enables C++20 standard-specific features and behavior. + +Enables the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overridden with **`/permissive`**. + +### `/std:c++23preview` -The **`/std:c++20`** option disables compiler and standard library support for features that are new or changed after C++20. It specifically disables post-C++20 changes in the C++ Standard and versions of the Working Draft. It doesn't disable retroactive defect updates of the C++ Standard. +Enables preview C++23 standard-specific features and behavior. Available starting in Visual Studio 2022 version 17.13 Preview 4. Preview features may change and may not be ABI compatible across releases. -**`/std:c++latest`**\ -The **`/std:c++latest`** option enables all currently implemented compiler and standard library features proposed for the next draft standard, as well as some in-progress and experimental features. This option is available starting in Visual Studio 2015 Update 3. +This switch will be removed when the `/std:c++23` switch is implemented--at which point C++23 features will be fully implemented and ABI stable. If in project properties **C/C++** > **Language** you specify **Preview - ISO C++ 23 Standard (/std:c++preview)**, it will automatically change to mean `/std:c++23` once the new switch is implemented. -Depending on the MSVC compiler version or update level, C++17, C++20, or proposed C++23 features may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** option. We recommend you use the latest version of Visual Studio for maximum standards conformance. For an overview of C++ language and library conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). +This switch differs from `/std:c++latest` in that it only enables features that are part of the C++23 standard. It doesn't enable experimental or in-progress features. -In versions of Visual Studio 2019 before version 16.11, **`/std:c++latest`** is required to enable all the compiler and standard library features of C++20. +### `/std:c++latest` + +Enables all currently implemented compiler and standard library features proposed in the next ISO C++ working draft, as well as some in-progress and experimental features. This option is available starting with Visual Studio 2015 Update 3. + +Depending on the MSVC compiler version or update level, features from published C++ standards or proposed features in the current C++ working draft, may not be fully implemented or fully conforming when you specify the **`/std:c++latest`** option. We recommend you use the latest version of Visual Studio for maximum standards conformance. For an overview of C++ language and library conformance in Visual C++ by release version, see [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). + +Since Visual Studio 2019 version 16.8, the **`/std:c++latest`** option has enabled the standard conformance mode provided by [**`/permissive-`**](./permissive-standards-conformance.md) unless explicitly overridden with **`/permissive`**. For a list of supported language and library features, see [What's New for C++ in Visual Studio](../../overview/what-s-new-for-visual-cpp-in-visual-studio.md). The **`/std:c++latest`** option doesn't enable features guarded by the **`/experimental`** switch, but may be required to enable them. > [!NOTE] -> The compiler and library features enabled by **`/std:c++latest`** may appear in a future C++ standard. Features that have not been approved are subject to breaking changes or removal without notice and are provided on an as-is basis. +> The compiler and library features enabled by **`/std:c++latest`** may appear in a future C++ standard. Features that haven't been approved are subject to breaking changes or removal without notice and are provided on an as-is basis. -### C standards support +## C standards support You can invoke the Microsoft C compiler by using the [`/TC` or `/Tc`](tc-tp-tc-tp-specify-source-file-type.md) compiler option. It's used by default for code that has a *`.c`* file extension, unless overridden by a **`/TP`** or **`/Tp`** option. The default C compiler (that is, the compiler when **`/std:c11`** or **`/std:c17`** isn't specified) implements ANSI C89, but includes several Microsoft extensions, some of which are part of ISO C99. Some Microsoft extensions to C89 can be disabled by using the [`/Za`](za-ze-disable-language-extensions.md) compiler option, but others remain in effect. It isn't possible to specify strict C89 conformance. The compiler doesn't implement several required features of C99, so it isn't possible to specify C99 conformance, either. -**`/std:c11`**\ -The **`/std:c11`** option enables ISO C11 conformance. It's available starting in Visual Studio 2019 version 16.8. +### `/std:c11` + +Enables ISO C11 conformance. It's available starting in Visual Studio 2019 version 16.8. -**`/std:c17`**\ -The **`/std:c17`** option enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8. +### `/std:c17` + +Enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8. Because the new preprocessor is needed to support these standards, the **`/std:c11`** and **`/std:c17`** compiler options set the [`/Zc:preprocessor`](zc-preprocessor.md) option automatically. If you want to use the traditional (legacy) preprocessor for C11 or C17, you must set the **`/Zc:preprocessor-`** compiler option explicitly. Setting the **`/Zc:preprocessor-`** option may lead to unexpected behavior, and isn't recommended. @@ -86,15 +101,10 @@ Because the new preprocessor is needed to support these standards, the **`/std:c When you specify **`/std:c11`** or **`/std:c17`**, MSVC supports all the features of C11 and C17 required by the standards. The **`/std:c11`** and **`/std:c17`** compiler options enable support for these functionalities: - [`_Pragma`](../../preprocessor/pragma-directives-and-the-pragma-keyword.md#the-pragma-preprocessing-operator) - - [`restrict`](../../c-language/type-qualifiers.md#restrict) - - [`_Noreturn`](../../c-language/noreturn.md) and \ - - [`_Alignas`, `_Alignof`](../../c-language/alignment-c.md) and \ - - [`_Generic`](../../c-language/generic-selection.md) and \ - - [`_Static_assert`](../../c-language/static-assert-c.md) The IDE uses C settings for IntelliSense and code highlighting when your source files have a *`.c`* file extension, or when you specify the [`/TC` or `/Tc`](tc-tp-tc-tp-specify-source-file-type.md) compiler option. Currently, IntelliSense in C highlights keywords `_Alignas`, `_Alignof`, `_Noreturn`, and `_Static_assert`, but not the equivalent macros defined in the standard headers: `alignas`, `alignof`, `noreturn`, and `static_assert`. @@ -111,17 +121,16 @@ The compiler doesn't support most optional features of ISO C11. Several of these - Variable length array (VLA) support isn't planned. VLAs provide attack vectors comparable to [`gets`](../../c-runtime-library/gets-getws.md), which is deprecated and planned for removal. -**`/std:clatest`**\ -The **`/std:clatest`** option behaves like the `/std:c++latest` switch for the C++ compiler. The switch enables all currently implemented compiler and standard library features proposed for the next draft C standard, as well as some in-progress and experimental features. +### `/std:clatest` + +The **`/std:clatest`** option behaves like the `/std:c++latest` switch for the C++ compiler. The switch enables all currently implemented compiler and standard library features proposed in the next draft C standard, as well as some in-progress and experimental features. For more information, see the C Standard library features section of [Microsoft C/C++ language conformance](../../overview/visual-cpp-language-conformance.md). ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **C/C++** > **Language** property page. - 1. In **C++ Language Standard** (or for C, **C Language Standard**), choose the language standard to support from the dropdown control, then choose **OK** or **Apply** to save your changes. ## See also diff --git a/docs/build/reference/subsystem-specify-subsystem.md b/docs/build/reference/subsystem-specify-subsystem.md index 4371a12db0..5669fa0e8b 100644 --- a/docs/build/reference/subsystem-specify-subsystem.md +++ b/docs/build/reference/subsystem-specify-subsystem.md @@ -29,7 +29,7 @@ Win32 character-mode application. The operating system provides a console for co **`EFI_BOOT_SERVICE_DRIVER`**\ **`EFI_ROM`**\ **`EFI_RUNTIME_DRIVER`**\ -The Extensible Firmware Interface subsystems. For more information, see the [UEFI specification](https://uefi.org/specifications). For examples, see the Intel [UEFI Driver and Application Tool Resources](https://www.intel.com/content/www/us/en/architecture-and-technology/unified-extensible-firmware-interface/uefi-driver-and-application-tool-resources.html). The minimum version and default version is 1.0. +The Extensible Firmware Interface subsystems. For more information, see the [UEFI specification](https://uefi.org/specifications). The minimum version and default version is 1.0. **`NATIVE`**\ Kernel mode drivers for Windows NT. This option is normally reserved for Windows system components. If [`/DRIVER:WDM`](driver-windows-nt-kernel-mode-driver.md) is specified, `NATIVE` is the default. diff --git a/docs/build/reference/tlbout-name-dot-tlb-file.md b/docs/build/reference/tlbout-name-dot-tlb-file.md index a9fde3067b..3daba01380 100644 --- a/docs/build/reference/tlbout-name-dot-tlb-file.md +++ b/docs/build/reference/tlbout-name-dot-tlb-file.md @@ -1,32 +1,31 @@ --- description: "Learn more about: /TLBOUT (Name .TLB File)" title: "/TLBOUT (Name .TLB File)" -ms.date: "11/04/2016" +ms.date: 03/24/2025 f1_keywords: ["VC.Project.VCLinkerTool.TypeLibraryFile", "/tlbout"] helpviewer_keywords: ["tlb files, renaming", "TLBOUT linker option", "/TLBOUT linker option", ".tlb files, renaming", "-TLBOUT linker option"] -ms.assetid: 0df6d078-2e48-46c9-a1a5-02674d85dce8 --- -# /TLBOUT (Name .TLB File) +# `/TLBOUT` (Name .TLB File) -``` +```cmd /TLBOUT:[path\]filename ``` ## Arguments -*path*
+*`path`*\ An absolute or relative path specification for where the .tlb file should be created. -*filename*
-Specifies the name of the .tlb file created by the MIDL compiler. No file extension is assumed; specify *filename*.tlb if you want a .tlb extension. +*`filename`* +Specifies the name of the .tlb file created by the MIDL compiler. No file extension is assumed; specify *filename*.tlb if you want a .tlb extension. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The /TLBOUT option specifies the name and extension of the .tlb file. +The `/TLBOUT` option specifies the name and extension of the .tlb file. The MIDL compiler is called by the MSVC linker when linking projects that have the [module](../../windows/attributes/module-cpp.md) attribute. -If /TLBOUT is not specified, the .tlb file will get its name from [/IDLOUT](idlout-name-midl-output-files.md) *filename*. If /IDLOUT is not specified, the .tlb file will be called vc70.tlb. +If `/TLBOUT` is not specified, the .tlb file will get its name from [/IDLOUT](idlout-name-midl-output-files.md) *filename*. If /IDLOUT is not specified, the .tlb file will be called vc70.tlb. ### To set this linker option in the Visual Studio development environment @@ -42,8 +41,8 @@ If /TLBOUT is not specified, the .tlb file will get its name from [/IDLOUT](idlo ## See also -[MSVC linker reference](linking.md)
-[MSVC Linker Options](linker-options.md)
-[/IGNOREIDL (Don't Process Attributes into MIDL)](ignoreidl-don-t-process-attributes-into-midl.md)
-[/MIDL (Specify MIDL Command Line Options)](midl-specify-midl-command-line-options.md)
+[MSVC linker reference](linking.md)\ +[MSVC Linker Options](linker-options.md)\ +[/IGNOREIDL (Don't Process Attributes into MIDL)](ignoreidl-don-t-process-attributes-into-midl.md)\ +[/MIDL (Specify MIDL Command Line Options)](midl-specify-midl-command-line-options.md)\ [Building an Attributed Program](../../windows/attributes/cpp-attributes-com-net.md) diff --git a/docs/build/reference/u-u-undefine-symbols.md b/docs/build/reference/u-u-undefine-symbols.md index 816c704527..cdc3cdd3ba 100644 --- a/docs/build/reference/u-u-undefine-symbols.md +++ b/docs/build/reference/u-u-undefine-symbols.md @@ -1,12 +1,11 @@ --- title: "/U, /u (Undefine symbols)" description: "Use the Microsoft C/C++ compiler /U and /u options to undefine preprocessor symbols." -ms.date: 09/03/2020 +ms.date: 04/14/2025 f1_keywords: ["VC.Project.VCCLCompilerTool.UndefinePreprocessorDefinitions", "VC.Project.VCCLWCECompilerTool.UndefinePreprocessorDefinitions", "VC.Project.VCCLCompilerTool.UndefineAllPreprocessorDefinitions", "/u", "VC.Project.VCCLWCECompilerTool.UndefineAllPreprocessorDefinitions"] helpviewer_keywords: ["-U compiler option [C++]", "Undefine Symbols compiler option", "/U compiler option [C++]", "U compiler option [C++]"] -ms.assetid: 7bc0474f-6d1f-419b-807d-0d8816763b2a --- -# /U, /u (Undefine symbols) +# `/U`, `/u` (Undefine symbols) The **`/U`** compiler option undefines the specified preprocessor symbol. The **`/u`** compiler option undefines the Microsoft-specific symbols that the compiler defines. @@ -17,7 +16,7 @@ The **`/U`** compiler option undefines the specified preprocessor symbol. The ** ## Arguments -*symbol*
+*`symbol`*\ The preprocessor symbol to undefine. ## Remarks @@ -44,9 +43,7 @@ For a complete list of Microsoft-specific predefined macros, see [Predefined mac ### To set this compiler option in the Visual Studio development environment 1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - -1. Select the **Configuration Properties** > **C/C++** > **Advanced** property page. - +1. Select the **Configuration Properties** > **C/C++** > **Preprocessor** property page. 1. Modify the **Undefine Preprocessor Definitions** or **Undefine All Preprocessor Definitions** properties. ### To set this compiler option programmatically @@ -55,9 +52,9 @@ For a complete list of Microsoft-specific predefined macros, see [Predefined mac ## See also -[MSVC compiler options](compiler-options.md)
-[MSVC compiler command-line syntax](compiler-command-line-syntax.md)
-[**`/J`** (Default char type is unsigned)](j-default-char-type-is-unsigned.md)
-[**`/GR`** (Enable run-time type information)](gr-enable-run-time-type-information.md)
-[**`/EH`** (Exception handling model)](eh-exception-handling-model.md)
+[MSVC compiler options](compiler-options.md)\ +[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\ +[**`/J`** (Default char type is unsigned)](j-default-char-type-is-unsigned.md)\ +[**`/GR`** (Enable run-time type information)](gr-enable-run-time-type-information.md)\ +[**`/EH`** (Exception handling model)](eh-exception-handling-model.md)\ [**`/MD`**, **`/MT`**, **`/LD`** (Use run-time library)](md-mt-ld-use-run-time-library.md) diff --git a/docs/build/reference/useprofile.md b/docs/build/reference/useprofile.md index 9efe996529..9a9fde9e72 100644 --- a/docs/build/reference/useprofile.md +++ b/docs/build/reference/useprofile.md @@ -1,12 +1,12 @@ --- description: "Learn more about: /USEPROFILE (Run PGO in thread safe mode)" title: "/USEPROFILE (Use PGO data with LTCG)" -ms.date: "03/14/2018" +ms.date: 03/24/2025 f1_keywords: ["USEPROFILE"] --- # /USEPROFILE (Run PGO in thread safe mode) -This linker option together with [/LTCG (Link-time code generation](ltcg-link-time-code-generation.md) tells the linker to build by using profile-guided optimization (PGO) training data. +This linker option together with [`/LTCG` (Link-time code generation](ltcg-link-time-code-generation.md) tells the linker to build by using profile-guided optimization (PGO) training data. ## Syntax @@ -14,21 +14,21 @@ This linker option together with [/LTCG (Link-time code generation](ltcg-link-ti ### Arguments -**AGGRESSIVE**
+**`AGGRESSIVE`**\ This optional argument specifies that aggressive speed optimizations should be used during optimized code generation. -**PGD**=*filename*
-Specifies a base file name for the .pgd file. By default, the linker uses the base executable file name with a .pgd extension. +**`PGD`**=*filename*\ +Specifies a base filename for the `.pgd` file. By default, the linker uses the base executable filename with a `.pgd` extension. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The **/USEPROFILE** linker option is used together with **/LTCG** to generate or update an optimized build based on PGO training data. It is the equivalent of the deprecated **/LTCG:PGUPDATE** and **/LTCG:PGOPTIMIZE** options. +The **`/USEPROFILE`** linker option is used together with **`/LTCG`** to generate or update an optimized build based on PGO training data. It is the equivalent of the deprecated **`/LTCG:PGUPDATE`** and **`/LTCG:PGOPTIMIZE`** options. -The optional **AGGRESSIVE** argument disables size-related heuristics to attempt to optimize for speed. This may result in optimizations that substantially increase the size of your executable, and may not increase the resulting speed. You should profile and compare the results of using and not using **AGGRESSIVE**. This argument must be specified explicitly; it is not enabled by default. +The optional **`AGGRESSIVE`** argument disables size-related heuristics to attempt to optimize for speed. This may result in optimizations that substantially increase the size of your executable, and may not increase the resulting speed. You should profile and compare the results of using and not using **`AGGRESSIVE`**. This argument must be specified explicitly; it is not enabled by default. -The **PGD** argument specifies an optional name for the training data .pgd file to use, the same as in [/GENPROFILE or /FASTGENPROFILE](genprofile-fastgenprofile-generate-profiling-instrumented-build.md). It is the equivalent of the deprecated **/PGD** switch. By default, or if no *filename* is specified, a .pgd file that has the same base name as the executable is used. +The **`PGD`** argument specifies an optional name for the training data `.pgd` file to use, the same as in [`/GENPROFILE` or `/FASTGENPROFILE`](genprofile-fastgenprofile-generate-profiling-instrumented-build.md). It is the equivalent of the deprecated **/PGD** switch. By default, or if no *`filename`* is specified, a `.pgd` file that has the same base name as the executable is used. -The **/USEPROFILE** linker option is new in Visual Studio 2015. +The **`/USEPROFILE`** linker option is new in Visual Studio 2015. ### To set this linker option in the Visual Studio development environment @@ -48,7 +48,7 @@ The **/USEPROFILE** linker option is new in Visual Studio 2015. ## See also -[/GENPROFILE and /FASTGENPROFILE](genprofile-fastgenprofile-generate-profiling-instrumented-build.md)
-[/LTCG](ltcg-link-time-code-generation.md)
-[Profile-Guided Optimizations](../profile-guided-optimizations.md)
-[Environment Variables for Profile-Guided Optimizations](../environment-variables-for-profile-guided-optimizations.md)
+[`/GENPROFILE` and `/FASTGENPROFILE`](genprofile-fastgenprofile-generate-profiling-instrumented-build.md)\ +[`/LTCG`](ltcg-link-time-code-generation.md)\ +[Profile-Guided Optimizations](../profile-guided-optimizations.md)\ +[Environment Variables for Profile-Guided Optimizations](../environment-variables-for-profile-guided-optimizations.md) diff --git a/docs/build/reference/using-an-nmake-macro.md b/docs/build/reference/using-an-nmake-macro.md index 6186d04089..f4b418744b 100644 --- a/docs/build/reference/using-an-nmake-macro.md +++ b/docs/build/reference/using-an-nmake-macro.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Using an NMAKE macro" title: "Use an NMAKE macro" +description: "Learn more about: Using an NMAKE macro" ms.date: 09/30/2021 helpviewer_keywords: ["macros, NMAKE", "NMAKE macros, using", "NMAKE program, macro substitution", "substitution macros in NMAKE", "NMAKE functions", "functions, NMAKE"] --- @@ -14,7 +14,7 @@ $(macro_name) No spaces are allowed. The parentheses are optional if *macro_name* is a single character. The definition string replaces `$(macro_name)`; an undefined macro is replaced by a null string. -## Macro substitution +## Macro substitution When *macro_name* is invoked, each occurrence of *string1* in its definition string is replaced by *string2*. @@ -28,11 +28,11 @@ No spaces or tabs precede the colon (**`:`**); any spaces or tabs after the colo ::: moniker range=">=msvc-170" -## Macro functions +## Macro functions NMAKE provides a set of functions that can be used to modify strings, lists of items and file paths. These functions are available in NMAKE starting in Visual Studio 2022. -### Function syntax +### Function syntax Functions use the following syntax: @@ -57,7 +57,7 @@ INPUT=a, b $(subst $(COMMA) , and ,$(INPUT)) # Evaluates to "a and b" ``` -### List syntax +### List syntax Some functions support a whitespace-separated list of items. Extra whitespace is ignored at the beginning of the list, the end of the list, or between each item. Lists produced by a function use a single space between each item as a separator, and don't have leading or trailing whitespace. @@ -67,7 +67,7 @@ For example, the simplest list function is `strip`, which takes a single list ar $(strip a b c d ) # Evaluates to "a b c d" ``` -### Pattern syntax +### Pattern syntax Some functions support using a *pattern*. A pattern is a string that contains a single wildcard that can match any number of characters. The first `%` in a pattern is the wildcard, and any later `%` characters are treated as literals. A `%` anywhere before the actual wildcard can be escaped by using `\` (that is, `\%` is treated as a literal `%`). Any `\` that would escape the wildcard can be escaped with another `\` (so `\\%` is treated as a literal `\` followed by the wildcard). To be considered a match, all of the input characters must be matched by the pattern; partial matches aren't supported. @@ -86,7 +86,7 @@ $(filter a%c\\%d,abc\\%d) # Evaluates to "abc\\%d" - any `\` after the wildcard $(filter \\a%f,\\abcdef) # Evaluates to "\\abcdef" - any `\\` that isn't directly before the wildcard isn't treated as an escape ``` -### Functions by category +### Functions by category | Function | Purpose | Supported | |--|--|--| diff --git a/docs/build/reference/vlen.md b/docs/build/reference/vlen.md new file mode 100644 index 0000000000..6557c219ef --- /dev/null +++ b/docs/build/reference/vlen.md @@ -0,0 +1,52 @@ +--- +description: "Learn more about: /vlen" +title: "/vlen" +ms.date: 09/24/2024 +f1_keywords: ["/vlen", "-vlen"] +helpviewer_keywords: ["specify vector length", "-vlen compiler option [C++]", "vlen compiler option [C++]", "/vlen compiler option [C++]"] +--- +# `/vlen` + +Specifies the vector length for code generation on x86 and x64. For more information about **`/arch`** for x86 and x64, see [`/arch` (x86)](arch-x86.md) and [`/arch` (x64)](arch-x64.md). + +## Syntax + +> **`/vlen=`**\[**`256`**|**`512`**] + +> **`/vlen`** + +## Arguments + +**`/vlen=256`**\ +Specify a vector length of 256 bits for auto-vectorization and other optimizations. + +**`/vlen=512`**\ +Specify a vector length of 512 bits for auto-vectorization and other optimizations. + +**`/vlen`**\ +Specify the default vector length for the selected **`/arch`** setting. + +## Remarks + +If a specific **`/vlen`** value isn't specified, the default vector length depends on the **`/arch`** flag setting. The **`/vlen`** flag can override the default vector length specified by **`/arch:AVX512`** or **`/arch:AVX10.1`** flag. For example: + +- **`/arch:AVX512 /vlen=256`** overrides the default vector length of 512 bits specified by **`/arch:AVX512`** to be 256 bits. +- **`/arch:AVX10.1 /vlen=512`** overrides the default vector length of 256 bits specified by **`/arch:AVX10.1`** to be 512 bits. + +When the specified **`/vlen`** value is incompatible with specified **`/arch`** flag, a warning is generated and default vector length for the **`/arch`** setting is used. For example: + +- **`/arch:AVX2 /vlen=512`** generates a warning because AVX2 doesn't support 512-bit vectors. Vector length of 256 bits is used in this case. + +### To set the `/vlen=256` or `/vlen=512` compiler option in Visual Studio + +1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). + +1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page. + +1. In the **Additional options** box, add *`/vlen=256`* or *`/vlen=512`*. Choose **OK** to save your changes. + +## See also + +[`/arch` (Minimum CPU Architecture)](arch-minimum-cpu-architecture.md)\ +[MSVC compiler options](compiler-options.md)\ +[MSVC compiler command-line syntax](compiler-command-line-syntax.md) diff --git a/docs/build/reference/wholearchive-include-all-library-object-files.md b/docs/build/reference/wholearchive-include-all-library-object-files.md index 4a1addad37..dafe4bcd5f 100644 --- a/docs/build/reference/wholearchive-include-all-library-object-files.md +++ b/docs/build/reference/wholearchive-include-all-library-object-files.md @@ -1,8 +1,7 @@ --- description: "Learn more about: /WHOLEARCHIVE (Include All Library Object Files)" title: "/WHOLEARCHIVE (Include All Library Object Files)" -ms.date: "02/12/2020" -ms.assetid: ee92d12f-18af-4602-9683-d6223be62ac9 +ms.date: 03/27/2025 --- # /WHOLEARCHIVE (Include All Library Object Files) @@ -15,26 +14,24 @@ Force the linker to include all object files in the static library in the linked ### Arguments -*library*\ -An optional pathname to a static library. The linker includes every object file from this library. +*`library`*\ +An optional pathname to a static library. The linker includes every object file from this library. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). ## Remarks -The /WHOLEARCHIVE option forces the linker to include every object file from either a specified static library, or if no library is specified, from all static libraries specified to the LINK command. To specify the /WHOLEARCHIVE option for multiple libraries, you can use more than one /WHOLEARCHIVE switch on the linker command line. By default, the linker includes object files in the linked output only if they export symbols referenced by other object files in the executable. The /WHOLEARCHIVE option makes the linker treat all object files archived in a static library as if they were specified individually on the linker command line. +The `/WHOLEARCHIVE` option forces the linker to include every object file from either a specified static library, or if no library is specified, from all static libraries specified to the LINK command. To specify the `/WHOLEARCHIVE` option for multiple libraries, you can use more than one `/WHOLEARCHIVE` switch on the linker command line. By default, the linker includes object files in the linked output only if they export symbols referenced by other object files in the executable. The `/WHOLEARCHIVE` option makes the linker treat all object files archived in a static library as if they were specified individually on the linker command line. -The /WHOLEARCHIVE option can be used to re-export all the symbols from a static library. This allows you to make sure that all of your library code, resources, and metadata are included when you create a component from more than one static library. If you see warning LNK4264 when you create a static library that contains Windows Runtime components for export, use the /WHOLEARCHIVE option when linking that library into another component or app. +The `/WHOLEARCHIVE` option can be used to re-export all the symbols from a static library. This allows you to make sure that all of your library code, resources, and metadata are included when you create a component from more than one static library. If you see warning LNK4264 when you create a static library that contains Windows Runtime components for export, use the `/WHOLEARCHIVE` option when linking that library into another component or app. -The /WHOLEARCHIVE option was introduced in Visual Studio 2015 Update 2. +The `/WHOLEARCHIVE` option was introduced in Visual Studio 2015 Update 2. ### To set this linker option in Visual Studio 1. Open the project **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md). - 1. Select the **Configuration Properties** > **Linker** > **Command Line** property page. - 1. Add the *`/WHOLEARCHIVE`* option to the **Additional Options** text box. ## See also -[MSVC linker reference](linking.md)
+[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/winmdfile-specify-winmd-file.md b/docs/build/reference/winmdfile-specify-winmd-file.md index fb489848b5..69f135c446 100644 --- a/docs/build/reference/winmdfile-specify-winmd-file.md +++ b/docs/build/reference/winmdfile-specify-winmd-file.md @@ -1,21 +1,25 @@ --- -description: "Learn more about: /WINMDFILE (Specify winmd File)" title: "/WINMDFILE (Specify winmd File)" -ms.date: "11/04/2016" +description: "Learn more about: /WINMDFILE (Specify winmd File)" +ms.date: 03/27/2025 f1_keywords: ["VC.Project.VCLinkerTool.GenerateWindowsMetadataFile"] -ms.assetid: 062b41b3-14d6-432c-a361-fdb66e918931 --- # /WINMDFILE (Specify winmd File) -Specifies the file name for the Windows Runtime Metadata (.winmd) output file that is generated by the [/WINMD](winmd-generate-windows-metadata.md) linker option. +Specifies the filename for the Windows Runtime Metadata (`.winmd`) output file that is generated by the [`/WINMD`](winmd-generate-windows-metadata.md) linker option. ``` /WINMDFILE:filename ``` +## Argument + +*`filename`*\ +The filename for `.winmd` output file. When expanded, the fully qualified filename must not exceed `MAX_PATH` (260 characters). + ## Remarks -Use the value that is specified in `filename` to override the default .winmd file name (`binaryname`.winmd). Notice that you do not append ".winmd" to `filename`. If multiple values are listed on the **/WINMDFILE** command line, the last one takes precedence. +Use the value that is specified in `filename` to override the default `.winmd` file name (`binaryname`.winmd). Don't append `".winmd"` to `filename`. If multiple values are listed on the **`/WINMDFILE`** command line, the last one takes precedence. The resulting name when combined with `.winmd` must not exceed `MAX_PATH` (260 characters). ### To set this linker option in the Visual Studio development environment @@ -27,6 +31,6 @@ Use the value that is specified in `filename` to override the default .winmd fil ## See also -[/WINMD (Generate Windows Metadata)](winmd-generate-windows-metadata.md)
-[MSVC linker reference](linking.md)
+[`/WINMD` (Generate Windows Metadata)](winmd-generate-windows-metadata.md)\ +[MSVC linker reference](linking.md)\ [MSVC Linker Options](linker-options.md) diff --git a/docs/build/reference/zc-alignednew.md b/docs/build/reference/zc-alignednew.md index c8a583964a..c591923268 100644 --- a/docs/build/reference/zc-alignednew.md +++ b/docs/build/reference/zc-alignednew.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: /Zc:alignedNew (C++17 over-aligned allocation)" title: "/Zc:alignedNew (C++17 over-aligned allocation)" +description: "Learn more about: /Zc:alignedNew (C++17 over-aligned allocation)" ms.date: "05/18/2019" f1_keywords: ["/Zc:alignedNew"] helpviewer_keywords: ["/Zc:alignedNew", "Zc:alignedNew", "-Zc:alignedNew"] @@ -17,7 +17,7 @@ Enable support for C++17 over-aligned **`new`**, dynamic memory allocation align The MSVC compiler and library support C++17 standard over-aligned dynamic memory allocation. When the **`/Zc:alignedNew`** option is specified, a dynamic allocation such as `new Example;` respects the alignment of `Example` even when it's greater than `max_align_t`, the largest alignment required for any fundamental type. When the alignment of the allocated type is no more than the alignment guaranteed by the original operator **`new`**, available as the value of the predefined macro `__STDCPP_DEFAULT_NEW_ALIGNMENT__`, the statement `new Example;` results in a call to `::operator new(size_t)` as it did in C++14. When the alignment is greater than `__STDCPP_DEFAULT_NEW_ALIGNMENT__`, the implementation instead obtains the memory by using `::operator new(size_t, align_val_t)`. Similarly, deletion of over-aligned types invokes `::operator delete(void*, align_val_t)` or the sized delete signature `::operator delete(void*, size_t, align_val_t)`. -The **`/Zc:alignedNew`** option is only available when [`/std:c++17`](std-specify-language-standard-version.md) or later is enabled. Under **`/std:c++17`** or later, **`/Zc:alignedNew`** is enabled by default to conform to the C++ standard. If the only reason you implement operator **`new`** and **`delete`** is to support over-aligned allocations, you may no longer need this code in C++17 or later modes. To turn off this option and revert to the C++14 behavior of **`new`** and **`delete`** when you use **`/std::c++17`** or later, specify **`/Zc:alignedNew-`**. If you implement operator **`new`** and **`delete`** but you're not ready to implement the over-aligned operator **`new`** and **`delete`** overloads that have the `align_val_t` parameter, use the **`/Zc:alignedNew-`** option to prevent the compiler and Standard Library from generating calls to the over-aligned overloads. The [`/permissive-`](permissive-standards-conformance.md) option doesn't change the default setting of **`/Zc:alignedNew`**. +The **`/Zc:alignedNew`** option is only available when [`/std:c++17`](std-specify-language-standard-version.md) or later is enabled. Under **`/std:c++17`** or later, **`/Zc:alignedNew`** is enabled by default to conform to the C++ standard. If the only reason you implement operator **`new`** and **`delete`** is to support over-aligned allocations, you may no longer need this code in C++17 or later modes. To turn off this option and revert to the C++14 behavior of **`new`** and **`delete`** when you use **`/std:c++17`** or later, specify **`/Zc:alignedNew-`**. If you implement operator **`new`** and **`delete`** but you're not ready to implement the over-aligned operator **`new`** and **`delete`** overloads that have the `align_val_t` parameter, use the **`/Zc:alignedNew-`** option to prevent the compiler and Standard Library from generating calls to the over-aligned overloads. The [`/permissive-`](permissive-standards-conformance.md) option doesn't change the default setting of **`/Zc:alignedNew`**. Support for **`/Zc:alignedNew`** is available starting in Visual Studio 2017 version 15.5. diff --git a/docs/build/reference/zc-lambda.md b/docs/build/reference/zc-lambda.md index be3feb313d..6081969b7c 100644 --- a/docs/build/reference/zc-lambda.md +++ b/docs/build/reference/zc-lambda.md @@ -17,8 +17,7 @@ The **`/Zc:lambda`** compiler option enables conforming lambda grammar and proce The **`/Zc:lambda`** compiler option enables the conforming lambda processor. It parses and implements lambda code according to the C++ standard. This option is off by default, which uses the legacy lambda processor. Use this option to enable conformance-mode syntax checks of generic lambdas when you use the default [`/std:c++14`](std-specify-language-standard-version.md) or the [`/std:c++17`](std-specify-language-standard-version.md) compiler options. -**`/Zc:lambda`** is automatically enabled by the [`/std:c++20`](std-specify-language-standard-version.md), [`/std:c++latest`] -(std-specify-language-standard-version.md), [`/permissive-`](permissive-standards-conformance.md), and [`/experimental:module`](experimental-module.md) options. You can disable it explicitly by using **`/Zc:lambda-`**. +**`/Zc:lambda`** is automatically enabled by the [`/std:c++20`](std-specify-language-standard-version.md), [`/std:c++latest`](std-specify-language-standard-version.md), [`/permissive-`](permissive-standards-conformance.md), and [`/experimental:module`](experimental-module.md) options. You can disable it explicitly by using **`/Zc:lambda-`**. The **`/Zc:lambda`** option is available starting in Visual Studio 2019 version 16.8. It's available as **`/experimental:newLambdaProcessor`** starting in Visual Studio 2019 version 16.3, but this spelling is now deprecated. diff --git a/docs/build/reference/zc-static-assert.md b/docs/build/reference/zc-static-assert.md index 78276252a8..9eb98b94a5 100644 --- a/docs/build/reference/zc-static-assert.md +++ b/docs/build/reference/zc-static-assert.md @@ -1,7 +1,7 @@ --- description: "Learn more about: /Zc:static_assert (Strict static_assert handling)" title: "/Zc:static_assert (Strict static_assert handling)" -ms.date: 12/15/2021 +ms.date: 1/15/2025 f1_keywords: ["/Zc:static_assert"] helpviewer_keywords: ["/Zc:static_assert compiler option (C++)"] --- @@ -16,7 +16,9 @@ The **`/Zc:static_assert`** compiler option tells the compiler to evaluate `stat ## Remarks -The **`/Zc:static_assert`** compiler option tells the compiler to evaluate a `static_assert` in the body of a function template or in the body of a class template member function when first parsed, if the test expression isn't dependent. If the non-dependent test expression isn't `false`, the compiler emits an error immediately. When the test expression is dependent, the `static_assert` isn't evaluated until the template is instantiated. +Starting with Visual Studio 17.10, `/Zc:static_assert` and `/Zc:static_assert-` have no effect. Both options are ignored to avoid breaking builds that use them. `static_assert` is now never evaluated when parsing class or function templates. + +The **`/Zc:static_assert`** compiler option tells the compiler to evaluate a `static_assert` in the body of a function template or in the body of a class template member function when first parsed, if the test expression isn't dependent. If the non-dependent test expression is `false`, the compiler emits an error immediately. When the test expression is dependent, the `static_assert` isn't evaluated until the template is instantiated. The **`/Zc:static_assert`** option is available starting in Visual Studio 2022 version 17.1. In earlier versions of Visual Studio, or if **`/Zc:static_assert-`** is specified, Visual Studio doesn't do dependent analysis if the `static_assert` is within the body of a function template or within the body of a member function of a class template. Instead, it only evaluates the `static_assert` when a template is instantiated. diff --git a/docs/build/reference/zc-ternary.md b/docs/build/reference/zc-ternary.md index 61d8b6a058..b77f0d7739 100644 --- a/docs/build/reference/zc-ternary.md +++ b/docs/build/reference/zc-ternary.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: `/Zc:ternary` (Enforce conditional operator rules)" title: "/Zc:ternary (Enforce conditional operator rules)" -ms.date: "09/12/2019" +description: "Learn more about: `/Zc:ternary` (Enforce conditional operator rules)" +ms.date: 09/12/2019 f1_keywords: ["/Zc:ternary"] helpviewer_keywords: ["/Zc:ternary", "Zc:ternary", "-Zc:ternary"] --- @@ -23,7 +23,7 @@ The **`/Zc:ternary`** option is off by default in Visual Studio 2017. Use **`/Zc ### Examples -This sample shows how a class that provides both non-explicit initialization from a type, and conversion to a type, can lead to ambiguous conversions. This code is accepted by the compiler by default, but rejected when **/`Zc:ternary`** or **`/permissive-`** is specified. +This sample shows how a class that provides both non-explicit initialization from a type, and conversion to a type, can lead to ambiguous conversions. This code is accepted by the compiler by default, but rejected when **`/Zc:ternary`** or **`/permissive-`** is specified. ```cpp // zcternary1.cpp diff --git a/docs/build/reference/zc-tlsguards.md b/docs/build/reference/zc-tlsguards.md index dfaf7ff2d0..15c36abf13 100644 --- a/docs/build/reference/zc-tlsguards.md +++ b/docs/build/reference/zc-tlsguards.md @@ -1,6 +1,6 @@ --- -description: "Learn more about the /Zc:tlsGuards (Check TLS initialization) compiler option." title: "/Zc:tlsGuards (Check TLS initialization)" +description: "Learn more about the /Zc:tlsGuards (Check TLS initialization) compiler option." ms.date: 11/08/2022 f1_keywords: ["/Zc:tlsGuards"] helpviewer_keywords: ["-Zc:tlsGuards compiler option (C++)", "/Zc:tlsGuards compiler option (C++)"] @@ -29,4 +29,4 @@ The **`/Zc:tlsGuards`** option is new in Visual Studio 2019 version 16.5. This o ## See also -[`/Zc` (Conformance)](zc-conformance.md)\ +[`/Zc` (Conformance)](zc-conformance.md) diff --git a/docs/build/reference/zc-twophase.md b/docs/build/reference/zc-twophase.md index 61178e9b21..5675256313 100644 --- a/docs/build/reference/zc-twophase.md +++ b/docs/build/reference/zc-twophase.md @@ -163,7 +163,7 @@ typename T::TYPE func(typename T::TYPE*) } ``` -If you don't use the keyword **`typename`** in the function body, this code compiles under **`/permissive- /Zc:twoPhase-`**, but not under **`/permissive-`** alone. The **`typename`** keyword is required to indicate that the `TYPE` is dependent. Because the body isn't parsed under **`/Zc:twoPhase-`**, the compiler does't require the keyword. In **`/permissive-`** conformance mode, code without the **`typename`** keyword generates errors. To migrate your code to conformance in Visual Studio 2017 version 15.3 and beyond, insert the **`typename`** keyword where it's missing. +If you don't use the keyword **`typename`** in the function body, this code compiles under **`/permissive- /Zc:twoPhase-`**, but not under **`/permissive-`** alone. The **`typename`** keyword is required to indicate that the `TYPE` is dependent. Because the body isn't parsed under **`/Zc:twoPhase-`**, the compiler doesn't require the keyword. In **`/permissive-`** conformance mode, code without the **`typename`** keyword generates errors. To migrate your code to conformance in Visual Studio 2017 version 15.3 and beyond, insert the **`typename`** keyword where it's missing. Similarly, consider this code sample: diff --git a/docs/build/toc.yml b/docs/build/toc.yml index cfa6cdba79..444ec54501 100644 --- a/docs/build/toc.yml +++ b/docs/build/toc.yml @@ -9,7 +9,7 @@ items: - name: Set C++ compiler and build properties in Visual Studio expanded: false items: - - name: Set C++ compiler and build properties in Visual Studio + - name: Set C++ compiler and build properties href: ../build/working-with-project-properties.md - name: Share or reuse Visual Studio project settings href: ../build/create-reusable-property-configurations.md @@ -562,6 +562,9 @@ items: href: ../build/reference/fc-full-path-of-source-code-file-in-diagnostics.md - name: /feature (Enable architecture features) href: ../build/reference/feature-arm64.md + - name: /forceInterlockedFunctions (Generate and link with out-of-line atomic + functions) + href: ./reference/force-interlocked-functions.md - name: /fp (Specify floating-point behavior) href: ../build/reference/fp-specify-floating-point-behavior.md - name: /fpcvt (Floating-point to unsigned integer conversion behavior) @@ -740,6 +743,8 @@ items: href: ../build/reference/validate-charset-validate-for-compatible-characters.md - name: /vd (Disable construction displacements) href: ../build/reference/vd-disable-construction-displacements.md + - name: /vlen (Specify vector length) + href: ../build/reference/vlen.md - name: /vmb, /vmg (Representation method) href: ../build/reference/vmb-vmg-representation-method.md - name: /vmm, /vms, /vmv (General purpose representation) diff --git a/docs/build/understanding-manifest-generation-for-c-cpp-programs.md b/docs/build/understanding-manifest-generation-for-c-cpp-programs.md index 9caa982097..2735311ee3 100644 --- a/docs/build/understanding-manifest-generation-for-c-cpp-programs.md +++ b/docs/build/understanding-manifest-generation-for-c-cpp-programs.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Understanding manifest generation for C/C++ programs" title: "Understanding manifest generation for C/C++ programs" +description: "Learn more about: Understanding manifest generation for C/C++ programs" ms.date: 06/10/2022 helpviewer_keywords: ["manifests [C++]"] -ms.assetid: a1f24221-5b09-4824-be48-92eae5644b53 --- # Understanding manifest generation for C/C++ programs @@ -181,7 +180,7 @@ clean : #^^^^^^^^^^^^^^^^^^^^^^^^^ Change #4. (Add full path if necessary.) ``` -The makefiles now include two files that do the real work,*` makefile.inc`* and *`makefile.target.inc`*. +The makefiles now include two files that do the real work, *`makefile.inc`* and *`makefile.target.inc`*. Create *`makefile.inc`* and copy the following content into it: diff --git a/docs/build/vscpp-step-0-installation.md b/docs/build/vscpp-step-0-installation.md index 59fc3131c8..f6e9b8cea0 100644 --- a/docs/build/vscpp-step-0-installation.md +++ b/docs/build/vscpp-step-0-installation.md @@ -1,29 +1,29 @@ --- title: Install C and C++ support in Visual Studio -description: "Learn how to install Visual Studio with support for Microsoft C/C++ and related workloads." +description: "Learn how to install Visual Studio with support for Microsoft C and C++ and related workloads." ms.custom: vs-acquisition, intro-installation -ms.date: 11/08/2021 -ms.topic: "tutorial" +ms.date: 03/18/2025 +ms.topic: tutorial ms.devlang: "cpp" --- # Install C and C++ support in Visual Studio -If you haven't downloaded and installed Visual Studio and the Microsoft C/C++ tools yet, here's how to get started. +If you haven't installed Visual Studio and the Microsoft C and C++ tools yet, here's how to get started. ::: moniker range="msvc-170" -## Visual Studio 2022 Installation +## Visual Studio 2022 installation -Welcome to Visual Studio 2022! In this version, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact. +Welcome to Visual Studio 2022! In this version, it's easy to choose and install just the features you need. Because of its reduced minimum footprint, Visual Studio installs quickly and with less system impact. > [!NOTE] -> This topic applies to installation of Visual Studio on Windows. [Visual Studio Code](https://code.visualstudio.com/) is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft [C/C++ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension supports IntelliSense, debugging, code formatting, auto-completion. Visual Studio for Mac doesn't support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see [Install Visual Studio for Mac](/visualstudio/mac/installation/). +> This article applies to installation of Visual Studio on Windows. [Visual Studio Code](https://code.visualstudio.com) is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft [C/C++ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension supports IntelliSense, debugging, code formatting, autocompletion. Visual Studio for Mac doesn't support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see [Install Visual Studio for Mac](/visualstudio/mac/installation/). -Want to know more about what else is new in this version? See the Visual Studio [release notes](/visualstudio/releases/2022/release-notes/). +To learn what else is new in this version, see the Visual Studio [release notes](/visualstudio/releases/2022/release-notes/). -Ready to install? We walk you through it, step-by-step. +Ready to install? Use the following step-by-step guide. -### Step 1 - Make sure your computer is ready for Visual Studio +### Step 1 - Prepare your computer for Visual Studio Before you begin installing Visual Studio: @@ -31,28 +31,27 @@ Before you begin installing Visual Studio: 1. Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio. -1. Reboot. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install. +1. Reboot your computer. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install. -1. Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app. +1. Free up disk space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app. For questions about running previous versions of Visual Studio side by side with Visual Studio 2022, see the [Visual Studio 2022 Platform Targeting and Compatibility](/visualstudio/releases/2022/compatibility/) page. ### Step 2 - Download Visual Studio -Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Select the edition of Visual Studio that you want and choose the **Free trial** or **Free download** button. +Select the following button to go to the Visual Studio download page, and download the Visual Studio bootstrapper file. Select the edition of Visual Studio that you want and choose the **Free trial** or **Free download** button. - > [!div class="button"] - > [Download Visual Studio](https://visualstudio.microsoft.com/downloads/) +> [!div class="button"] +> [Download Visual Studio](https://visualstudio.microsoft.com/downloads/) -### Step 3 - Install the Visual Studio installer +>[!TIP] +> The Community edition is for individual developers, classroom learning, academic research, and open source development. For other uses, install Visual Studio 2022 Professional or Visual Studio 2022 Enterprise. -Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio. +### Step 3 - Install the Visual Studio Installer -1. From your **Downloads** folder, double-click the bootstrapper that matches or is similar to one of the following files: +Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio. - - **vs_community.exe** for Visual Studio Community - - **vs_professional.exe** for Visual Studio Professional - - **vs_enterprise.exe** for Visual Studio Enterprise +1. From your *Downloads* folder, double-click the bootstrapper file called *VisualStudioSetup.exe*. If you receive a User Account Control notice, choose **Yes** to allow the bootstrapper to run. @@ -60,40 +59,40 @@ Run the bootstrapper file you downloaded to install the Visual Studio Installer. ### Step 4 - Choose workloads -After the installer is installed, you can use it to customize your installation by selecting the *workloads*, or feature sets, that you want. Here's how. +You can use the installer to customize your installation by selecting the *workloads*, or feature sets, that you want. 1. Find the workload you want in the **Installing Visual Studio** screen. - :::image type="content" source="../get-started/media/vs2022-installer-workloads.png" alt-text="Visual studio installer with the Desktop development with C++ workload selected." lightbox="../get-started/media/vs2022-installer-workloads.png"::: - - For core C and C++ support, choose the "Desktop development with C++" workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. + :::image type="content" source="../get-started/media/vs2022-installer-workloads.png" alt-text="Screenshot of the Visual Studio 2022 installer with the Desktop development with C plus plus workload selected." lightbox="../get-started/media/vs2022-installer-workloads.png"::: - Other workloads support more kinds of development. For example, choose the "Universal Windows Platform development" workload to create apps that use the Windows Runtime for the Microsoft Store. Choose "Game development with C++" to create games that use DirectX, Unreal, and Cocos2d. Choose "Linux development with C++" to target Linux platforms, including IoT development. + For core C and C++ support, choose the **Desktop development with C++** workload. It comes with the default core editor, which includes basic code editing support for more than 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. The **Installation details** pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more. -1. After you choose the workload(s) and optional components you want, choose **Install**. + Other workloads support more kinds of development. For example, choose the **Universal Windows Platform development** workload to create apps that use the Windows Runtime for the Microsoft Store. Choose **Game development with C++** to create games that use DirectX, Unreal, or Cocos2d. Choose **Linux development with C++** to target Linux platforms, including IoT development. + +1. After you choose the workloads and optional components you want, choose **Install**. Next, status screens appear that show the progress of your Visual Studio installation. > [!TIP] > At any time after installation, you can install workloads or components that you didn't install initially. If you have Visual Studio open, go to **Tools** > **Get Tools and Features...** which opens the Visual Studio Installer. Or, open **Visual Studio Installer** from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose **Modify**. -### Step 5 - Choose individual components (Optional) +### Step 5 - Choose individual components (optional) If you don't want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the **Individual components** tab. Choose what you want, and then follow the prompts. -### Step 6 - Install language packs (Optional) +### Step 6 - Install language packs (optional) By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the **Language packs** tab from the Visual Studio Installer, and then follow the prompts. - :::image type="content" source="../get-started/media/vs-installer-language-packs.png" alt-text="Screenshot of the Visual Studio Installer, showing the Install language packs tab view and the languages you can choose from like English, Spanish, Chinese (simplified or traditional), and more." lightbox="../get-started/media/vs-installer-language-packs.png"::: + :::image type="content" source="../get-started/media/vs-installer-language-packs.png" alt-text="Screenshot of the Visual Studio Installer, showing the Install language packs tab view and the languages you can choose from like English, Spanish, Chinese (simplified or traditional)." lightbox="../get-started/media/vs-installer-language-packs.png"::: #### Change the installer language from the command line -Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: `vs_installer.exe --locale en-US`. The installer will remember this setting when it's run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr. +Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: `vs_installer.exe --locale en-US`. The installer remembers this setting when it's run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr. -### Step 7 - Change the installation location (Optional) +### Step 7 - Change the installation location (optional) You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest. @@ -106,9 +105,9 @@ You can reduce the installation footprint of Visual Studio on your system drive. 1. On the start window, choose **Create a new project**. -1. In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads. +1. In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workloads that you chose during installation. To see different templates, choose different workloads. - You can also filter your search for a specific programming language by using the **Language** drop-down list. You can filter by using the **Platform** list and the **Project type** list, too. + You can also filter your search for a specific programming language by using the **Language** dropdown list. You can filter by using the **Platform** list and the **Project type** list, too. 1. Visual Studio opens your new project, and you're ready to code! @@ -116,18 +115,18 @@ You can reduce the installation footprint of Visual Studio on your system drive. ::: moniker range="msvc-160" -## Visual Studio 2019 Installation +## Visual Studio 2019 installation -Welcome to Visual Studio 2019! In this version, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact. +Welcome to Visual Studio 2019! In this version, it's easy to choose and install just the features you need. Because of its reduced minimum footprint, Visual Studio installs quickly and with less system impact. > [!NOTE] -> This topic applies to installation of Visual Studio on Windows. [Visual Studio Code](https://code.visualstudio.com/) is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft [C/C++ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension supports IntelliSense, debugging, code formatting, auto-completion. Visual Studio for Mac doesn't support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see [Install Visual Studio for Mac](/visualstudio/mac/installation/). +> This article applies to installation of Visual Studio on Windows. [Visual Studio Code](https://code.visualstudio.com) is a lightweight, cross-platform development environment that runs on Windows, Mac, and Linux systems. The Microsoft [C/C++ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension supports IntelliSense, debugging, code formatting, autocompletion. Visual Studio for Mac doesn't support Microsoft C++, but does support .NET languages and cross-platform development. For installation instructions, see [Install Visual Studio for Mac](/visualstudio/mac/installation/). -Want to know more about what else is new in this version? See the Visual Studio [release notes](/visualstudio/releases/2019/release-notes/). +To learn what else is new in this version, see the Visual Studio [release notes](/visualstudio/releases/2019/release-notes/). -Ready to install? We walk you through it, step-by-step. +Ready to install? Use the following step-by-step guide. -### Step 1 - Make sure your computer is ready for Visual Studio +### Step 1 - Prepare your computer for Visual Studio Before you begin installing Visual Studio: @@ -135,28 +134,24 @@ Before you begin installing Visual Studio: 1. Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio. -1. Reboot. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install. +1. Reboot your computer. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install. -1. Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app. +1. Free up disk space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app. For questions about running previous versions of Visual Studio side by side with Visual Studio 2019, see the [Visual Studio 2019 Platform Targeting and Compatibility](/visualstudio/releases/2019/compatibility/) page. ### Step 2 - Download Visual Studio -Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Choose the Download button, then you can select the edition of Visual Studio that you want. +Select the following button to go to the Visual Studio older downloads page, and download the Visual Studio 2019 bootstrapper file. > [!div class="button"] > [Download Visual Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products) -### Step 3 - Install the Visual Studio installer +### Step 3 - Install the Visual Studio Installer Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio. -1. From your **Downloads** folder, double-click the bootstrapper that matches or is similar to one of the following files: - - - **vs_community.exe** for Visual Studio Community - - **vs_professional.exe** for Visual Studio Professional - - **vs_enterprise.exe** for Visual Studio Enterprise +1. From your *Downloads* folder, double-click the bootstrapper file. If you receive a User Account Control notice, choose **Yes** to allow the bootstrapper to run. @@ -164,46 +159,46 @@ Run the bootstrapper file you downloaded to install the Visual Studio Installer. ### Step 4 - Choose workloads -After the installer is installed, you can use it to customize your installation by selecting the *workloads*, or feature sets, that you want. Here's how. +You can use the installer to customize your installation by selecting the *workloads*, or feature sets, that you want. 1. Find the workload you want in the **Installing Visual Studio** screen. - ![Visual Studio 2019: Install a workload.](../get-started/media/vs-installer-workloads.png) + :::image type="content" source="../get-started/media/vs-installer-workloads.png" alt-text="Screenshot of the Visual Studio 2019 installer." lightbox="../get-started/media/vs-installer-workloads.png"::: - For core C and C++ support, choose the "Desktop development with C++" workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. - - Other workloads support more kinds of development. For example, choose the "Universal Windows Platform development" workload to create apps that use the Windows Runtime for the Microsoft Store. Choose "Game development with C++" to create games that use DirectX, Unreal, and Cocos2d. Choose "Linux development with C++" to target Linux platforms, including IoT development. + For core C and C++ support, choose the **Desktop development with C++** workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control. The **Installation details** pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more. -1. After you choose the workload(s) and optional components you want, choose **Install**. + Other workloads support more kinds of development. For example, choose the **Universal Windows Platform development** workload to create apps that use the Windows Runtime for the Microsoft Store. Choose **Game development with C++** to create games that use DirectX, Unreal, and Cocos2d. Choose **Linux development with C++** to target Linux platforms, including IoT development. + +1. After you choose the workloads and optional components you want, choose **Install**. Next, status screens appear that show the progress of your Visual Studio installation. > [!TIP] > At any time after installation, you can install workloads or components that you didn't install initially. If you have Visual Studio open, go to **Tools** > **Get Tools and Features...** which opens the Visual Studio Installer. Or, open **Visual Studio Installer** from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose **Modify**. -### Step 5 - Choose individual components (Optional) +### Step 5 - Choose individual components (optional) -If you don't want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the **Individual components** tab. Choose what you want, and then follow the prompts. +If you don't want to use the Workloads feature to customize your Visual Studio installation, or if you want to add more components than a workload installs, you can do so by installing or adding individual components from the **Individual components** tab. Choose what you want, and then follow the prompts. - ![Screenshot of the Visual Studio Installer, showing the Install individual components tab view.](../get-started/media/vs-installer-individual-components.png "Install Visual Studio individual components") +:::image type="content" source="../get-started/media/vs-installer-individual-components.png" alt-text="Screenshot of the Visual Studio Installer, showing the Install individual components tab view." lightbox="../get-started/media/vs-installer-individual-components.png"::: -### Step 6 - Install language packs (Optional) +### Step 6 - Install language packs (optional) By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the **Language packs** tab from the Visual Studio Installer, and then follow the prompts. - ![Screenshot of the Visual Studio Installer, showing the Install language packs tab view.](../get-started/media/vs-installer-language-packs.png "Install Visual Studio language packs") +:::image type="content" source="../get-started/media/vs-installer-language-packs.png" alt-text="Screenshot of the Visual Studio Installer, showing the Install language packs tab view." lightbox="../get-started/media/vs-installer-language-packs.png"::: #### Change the installer language from the command line Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: `vs_installer.exe --locale en-US`. The installer will remember this setting when it's run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr. -### Step 7 - Change the installation location (Optional) +### Step 7 - Change the installation location (optional) You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest. - ![Screenshot of the Visual Studio Installer, showing the installation locations tab view.](../get-started/media/vs-installer-installation-locations.png "Change the installation location") +:::image type="content" source="../get-started/media/vs-installer-installation-locations.png" alt-text="Screenshot of the Visual Studio Installer, showing the installation locations tab view." lightbox="../get-started/media/vs-installer-installation-locations.png"::: > [!IMPORTANT] > You can select a different drive only when you first install Visual Studio. If you've already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it. @@ -214,9 +209,9 @@ You can reduce the installation footprint of Visual Studio on your system drive. 1. On the start window, choose **Create a new project**. -1. In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads. +1. In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workloads that you chose during installation. To see different templates, choose different workloads. - You can also filter your search for a specific programming language by using the **Language** drop-down list. You can filter by using the **Platform** list and the **Project type** list, too. + You can also filter your search for a specific programming language by using the **Language** dropdown list. You can filter by using the **Platform** list and the **Project type** list, too. 1. Visual Studio opens your new project, and you're ready to code! @@ -224,14 +219,12 @@ You can reduce the installation footprint of Visual Studio on your system drive. ::: moniker range="msvc-150" -## Visual Studio 2017 Installation +## Visual Studio 2017 installation -In Visual Studio 2017, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact. +In Visual Studio 2017, it's easy to choose and install just the features you need. Because of its reduced minimum footprint, it installs quickly and with less system impact. ### Prerequisites -- A broadband internet connection. The Visual Studio installer can download several gigabytes of data. - - A computer that runs Microsoft Windows 7 or later versions. We recommend the latest version of Windows for the best development experience. Make sure that the latest updates are applied to your system before you install Visual Studio. - Enough free disk space. Visual Studio requires at least 7 GB of disk space, and can take 50 GB or more if many common options are installed. We recommend you install it on your C: drive. @@ -240,36 +233,29 @@ For details on the disk space and operating system requirements, see [Visual Stu ### Download and install -1. To download the latest Visual Studio 2017 installer for Windows, go to the Microsoft Visual Studio [Older downloads](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2017-and-other-products) page. Expand the **2017** section, and choose the **Download** button. +1. To download the Visual Studio 2017 installer for Windows, go to the Visual Studio [older downloads](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2017-and-other-products) page. Expand the **2017** section, and choose the **Download** button. - >[!Tip] - > The Community edition is for individual developers, classroom learning, academic research, and open source development. For other uses, install Visual Studio 2017 Professional or Visual Studio 2017 Enterprise. +1. Find the installer file you downloaded and run it. The downloaded file might be displayed in your browser, or you might find it in your *Downloads* folder. The installer needs Administrator privileges to run. You might see a **User Account Control** dialog asking you to give permission to let the installer make changes to your system; choose **Yes**. If you're having trouble, find the downloaded file in File Explorer, right-click on the installer icon, and choose **Run as Administrator** from the context menu. -1. Find the installer file you downloaded and run it. The downloaded file might be displayed in your browser, or you might find it in your Downloads folder. The installer needs Administrator privileges to run. You might see a **User Account Control** dialog asking you to give permission to let the installer make changes to your system; choose **Yes**. If you're having trouble, find the downloaded file in File Explorer, right-click on the installer icon, and choose **Run as Administrator** from the context menu. - - ![What you see when you download and install the Visual Studio Installer.](media/vscpp-concierge-run-installer.gif "Download and install the Visual Studio Installer") + :::image type="content" source="media/vscpp-concierge-run-installer.gif" alt-text="Animation that shows the Visual Studio Installer."::: 1. The installer presents you with a list of workloads, which are groups of related options for specific development areas. Support for C++ is now part of optional workloads that aren't installed by default. - ![Detail showing the Desktop development with C++ workload.](media/desktop-development-with-cpp.png "Desktop development with C++") + :::image type="content" source="media/desktop-development-with-cpp.png" alt-text="Screenshot showing the Desktop development with C plus plus workload."::: For C and C++, select the **Desktop development with C++** workload and then choose **Install**. - ![What you see when you select the Desktop development with C++ workload then choose the Install button.](media/vscpp-concierge-choose-workload.gif "Install the Desktop development with C++ workload") + :::image type="content" source="media/vscpp-concierge-choose-workload.gif" alt-text="Animation that shows the Desktop development with C plus plus workload then choose the Install button."::: 1. When the installation completes, choose the **Launch** button to start Visual Studio. The first time you run Visual Studio, you're asked to sign in with a Microsoft Account. If you don't have one, you can create one for free. You must also choose a theme. Don't worry, you can change it later if you want to. - It might take Visual Studio several minutes to get ready for use the first time you run it. Here's what it looks like in a quick time-lapse: - - ![Visual Studio sign in dialog.](media/vscpp-quickstart-first-run.gif "Visual Studio 2017 sign in") - - Visual Studio starts faster when you run it again. + It might take Visual Studio several minutes to get ready for use the first time you run it. 1. When Visual Studio opens, check to see if the flag icon in the title bar is highlighted: - ![Visual Studio notification flag.](media/vscpp-first-start-page-flag.png "Visual Studio 2017 notification flag") + :::image type="content" source="media/vscpp-first-start-page-flag.png" alt-text="Screenshot of the Visual Studio notification flag."::: If it's highlighted, select it to open the **Notifications** window. If there are any updates available for Visual Studio, we recommend you install them now. Once the installation is complete, restart Visual Studio. @@ -277,9 +263,9 @@ For details on the disk space and operating system requirements, see [Visual Stu ::: moniker range=" [!div class="nextstepaction"] -> [Create a C++ project](vscpp-step-1-create.md) +> [Create a C++ console app project](vscpp-step-1-create.md) diff --git a/docs/build/vscpp-step-1-create.md b/docs/build/vscpp-step-1-create.md index 73bc28ca5c..e4830eee92 100644 --- a/docs/build/vscpp-step-1-create.md +++ b/docs/build/vscpp-step-1-create.md @@ -11,7 +11,7 @@ The usual starting point for a C++ programmer is a "Hello, world!" application t ## Prerequisites -- Have Visual Studio with the Desktop development with C++ workload installed and running on your computer. If it's not installed yet, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). +- The **Desktop development with C++** workload must be installed to make the **Console App (C++)** project type available. If it's not installed, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). ## Create your app project @@ -25,6 +25,8 @@ Visual Studio uses *projects* to organize the code for an app, and *solutions* t The create a new project dialog with the Console App template selected. That template says: Run code in a windows terminal. Prints hello world by default. Has the tags c++, Windows, and Console. :::image-end::: + The **Desktop development with C++** workload must be installed for the C++ Console App template to show up. See [Install C++ support in Visual Studio](vscpp-step-0-installation.md) if you haven't already installed it. + 1. In the **Configure your new project** dialog, enter *HelloWorld* in the **Project name** edit box. Choose **Create** to create the project. :::image type="complex" source="media/vs2019-configure-new-project-hello-world.png" alt-text="Screenshot of Configure your new project dialog."::: @@ -79,7 +81,7 @@ Visual Studio now knows to build your project to run in a console window. Next, ![View of the process to add a source file for HelloWorld.cpp.](media/vscpp-add-new-item.gif "Add a source file for HelloWorld.cpp") -Visual studio creates a new, empty source code file and opens it in an editor window, ready to enter your source code. +Visual Studio creates a new, empty source code file and opens it in an editor window, ready to enter your source code. [I ran into a problem.](#add-a-source-code-file-issues) diff --git a/docs/build/vscpp-step-2-build.md b/docs/build/vscpp-step-2-build.md index c5245431eb..e708ea80e0 100644 --- a/docs/build/vscpp-step-2-build.md +++ b/docs/build/vscpp-step-2-build.md @@ -2,18 +2,17 @@ title: Build and run a C++ console app project description: "Build and run a Hello World console app in Visual C++" ms.custom: "mvc" -ms.date: 07/05/2023 +ms.date: 06/28/2024 ms.topic: "tutorial" ms.devlang: "cpp" --- # Build and run a C++ console app project -You've created a C++ console app project and entered your code. Now you can build and run it within Visual Studio. Then, run it as a stand-alone app from the command line. +In [Create a C++ console app project](vscpp-step-1-create.md) you created a C++ console app project and entered your code. Now you can build and run it within Visual Studio. Then, run it as a stand-alone app from the command line. ## Prerequisites - Have Visual Studio with the Desktop development with C++ workload installed and running on your computer. If it's not installed, follow the steps in [Install C++ support in Visual Studio](vscpp-step-0-installation.md). - - Create a "Hello, World!" project. By default, it contains code to print `Hello World!`. If you haven't done this step yet, follow the steps in [Create a C++ console app project](vscpp-step-1-create.md). If Visual Studio looks like this, you're ready to build and run your app: @@ -24,11 +23,11 @@ If Visual Studio looks like this, you're ready to build and run your app: ## Build and run your code in Visual Studio -1. To build your project, choose **Build Solution** from the **Build** menu. The **Output** window shows the results of the build process. +1. To build your project, from the main menu choose **Build** > **Build Solution**. The **Output** window shows the results of the build process. :::image type="complex" source="media/vscpp-build-solution.gif" alt-text="Animated screenshot showing the sequence of actions taken to build a project in Visual Studio."::: First, Build is selected from the main menu. Then Build Solution is selected. The Output window shows the build output messages, including that the build is successful. - :::image-end::: + :::image-end::: 1. To run the code, on the menu bar, choose **Debug**, **Start without debugging**. @@ -38,7 +37,7 @@ If Visual Studio looks like this, you're ready to build and run your app: A console window opens and then runs your app. When you start a console app in Visual Studio, it runs your code, then prints "Press any key to continue . . ." to give you a chance to see the output. -Congratulations! You've created your first "Hello, world!" console app in Visual Studio! Press a key to dismiss the console window and return to Visual Studio. +Congratulations! You created your first "Hello, world!" console app in Visual Studio! Press a key to dismiss the console window and return to Visual Studio. [I ran into a problem.](#build-and-run-your-code-in-visual-studio-issues) @@ -50,12 +49,12 @@ Normally, you run console apps at the command prompt, not in Visual Studio. Once ::: moniker range=" [!NOTE] > A developer command prompt shortcut automatically sets the correct paths for the compiler and tools, and for any required headers and libraries. Some of these values are different for each build configuration. You must set these environment values yourself if you don't use one of the shortcuts. For more information, see [Use the MSVC toolset from the command line](./building-on-the-command-line.md). Because the build environment is complex, we strongly recommend you use a developer command prompt shortcut instead of building your own. -These instructions vary depending on which version of Visual Studio you're using. To see the documentation for your preferred version of Visual Studio, use the **Version** selector control. It's found at the top of the table of contents on this page. +These instructions vary depending on which version of Visual Studio you're using. To see the documentation for your preferred version of Visual Studio, use the **Version** selector located at the top of the table of contents on this page. ::: moniker range="msvc-170" ## Open a developer command prompt in Visual Studio 2022 -If you've installed Visual Studio 2022 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2022** folder (not the Visual Studio 2022 app). Choose **Developer Command Prompt for VS 2022** to open the command prompt window. +If you installed Visual Studio 2022 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2022** folder (not the Visual Studio 2022 app). Choose **Developer Command Prompt for VS 2022** to open the command prompt window. ::: moniker-end @@ -39,7 +38,7 @@ If you've installed Visual Studio 2022 on Windows 10 or later, open the Start me ## Open a developer command prompt in Visual Studio 2019 -If you've installed Visual Studio 2019 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2019** folder (not the Visual Studio 2019 app). Choose **Developer Command Prompt for VS 2019** to open the command prompt window. +If you installed Visual Studio 2019 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2019** folder (not the Visual Studio 2019 app). Choose **Developer Command Prompt for VS 2019** to open the command prompt window. ::: moniker-end @@ -47,7 +46,7 @@ If you've installed Visual Studio 2019 on Windows 10 or later, open the Start me ## Open a developer command prompt in Visual Studio 2017 -If you've installed Visual Studio 2017 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2017** folder (not the Visual Studio 2017 app). Choose **Developer Command Prompt for VS 2017** to open the command prompt window. +If you installed Visual Studio 2017 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual Studio 2017** folder (not the Visual Studio 2017 app). Choose **Developer Command Prompt for VS 2017** to open the command prompt window. ::: moniker-end @@ -55,11 +54,11 @@ If you've installed Visual Studio 2017 on Windows 10 or later, open the Start me ## Open a developer command prompt in Visual Studio 2015 -If you've installed Microsoft Visual C++ Build Tools 2015 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual C++ Build Tools** folder. Choose **Visual C++ 2015 x86 Native Tools Command Prompt** to open the command prompt window. +If you installed Microsoft Visual C++ Build Tools 2015 on Windows 10 or later, open the Start menu, and choose **All apps**. Then, scroll down and open the **Visual C++ Build Tools** folder. Choose **Visual C++ 2015 x86 Native Tools Command Prompt** to open the command prompt window. ::: moniker-end -If you're using a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut. You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window. +If you're using a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut. You can also use the Windows search function to search for *developer command prompt* and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window. Next, verify that the developer command prompt is set up correctly. In the command prompt window, enter `cl` (or `CL`, case doesn't matter for the compiler name, but it does matter for compiler options). The output should look something like this: @@ -71,19 +70,19 @@ Copyright (C) Microsoft Corporation. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ] ``` -There may be differences in the current directory or version numbers, depending on the version of Visual Studio and any updates installed. If the above output is similar to what you see, then you're ready to build C or C++ programs at the command line. +There might be differences in the current directory or version numbers, depending on the version of Visual Studio and any updates installed. If the preceding output is similar to what you see, then you're ready to build C or C++ programs at the command line. > [!NOTE] -> If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104 when you run the **cl** command, then either you are not using a developer command prompt, or something is wrong with your installation of Visual Studio. You must fix this issue before you can continue. +> If you get an error such as **'cl' is not recognized as an internal or external command, operable program or batch file**, error C1034, or error LNK1104 when you run the `cl` command, then either you're not using a developer command prompt, or something is wrong with your installation of Visual Studio. You must fix this issue before you can continue. -If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your Visual Studio installation may have a problem. If you're using Visual Studio 2017 or later, try reinstalling the **Desktop development with C++** workload in the Visual Studio installer. For details, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). Or, reinstall the Build Tools from the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/) page. Don't go on to the next section until the `cl` command works. For more information about installing and troubleshooting Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). +If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your Visual Studio installation might have a problem. If you're using Visual Studio 2017 or later, try reinstalling the **Desktop development with C++** workload in the Visual Studio installer. For details, see [Install C++ support in Visual Studio](vscpp-step-0-installation.md). Or, reinstall the build tools from the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/) page. Don't go on to the next section until the `cl` command works. For more information about installing and troubleshooting Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). > [!NOTE] -> Depending on the version of Windows on the computer and the system security configuration, you might have to right-click to open the shortcut menu for the developer command prompt shortcut and then choose **Run as Administrator** to successfully build and run the program that you create by following this walkthrough. +> Depending on the version of Windows on the computer and the system security configuration, you might need to right-click to open the shortcut menu for the developer command prompt shortcut and then choose **Run as Administrator** to successfully build and run the program that you create by following this walkthrough. ## Create a C source file and compile it on the command line -1. In the developer command prompt window, enter `cd c:\` to change the current working directory to the root of your C: drive. Next, enter `md c:\hello` to create a directory, and then enter `cd c:\hello` to change to that directory. This directory will hold your source file and the compiled program. +1. In the developer command prompt window, enter `cd c:\` to change the current working directory to the root of your C: drive. Next, enter `md c:\hello` to create a directory, and then enter `cd c:\hello` to change to that directory. This directory holds your source file and the compiled program. 1. Enter `notepad hello.c` at the developer command prompt. In the Notepad alert dialog that pops up, choose **Yes** to create a new *`hello.c`* file in your working directory. @@ -122,7 +121,7 @@ If you can't find the developer command prompt shortcut, or if you get an error 1. To compile your program, enter `cl hello.c` at the developer command prompt. - You can see the executable program name, hello.exe, in the lines of output information that the compiler displays: + You can see the executable program name, *`hello.exe`*, in the lines of output information that the compiler displays: ```Output c:\hello>cl hello.c @@ -138,7 +137,7 @@ If you can't find the developer command prompt shortcut, or if you get an error ``` > [!NOTE] - > If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104, your developer command prompt is not set up correctly. For information on how to fix this issue, go back to the **Open a developer command prompt** section. + > If you get an error such as **'cl' is not recognized as an internal or external command, operable program or batch file,** error C1034, or error LNK1104, your developer command prompt isn't set up correctly. For information on how to fix this issue, go back to the **Open a developer command prompt** section. > > If you get a different compiler or linker error or warning, review your source code to correct any errors, then save it and run the compiler again. For information about specific errors, use the search box at the top of this page to look for the error number. @@ -152,9 +151,9 @@ If you can't find the developer command prompt shortcut, or if you get an error Congratulations, you've compiled and run a C program by using the command line. -## Next steps +## Advanced steps -This "Hello, World" example is about as basic as a C program can get. Real world programs have header files and more source files, link in libraries, and do useful work. +This *Hello, World* example is about as basic as a C program can get. Real-world programs have header files and more source files, link in libraries, and do useful work. You can use the steps in this walkthrough to build your own C code instead of typing the sample code shown. You can also build many C code sample programs that you find elsewhere. To compile a program that has more source code files, enter them all on the command line: @@ -164,23 +163,23 @@ The compiler outputs a program called *`file1.exe`*. To change the name to *`pro `cl file1.c file2.c file3.c /link /out:program1.exe` -And to catch more programming mistakes automatically, we recommend you compile by using either the [/W3](reference/compiler-option-warning-level.md) or [/W4](reference/compiler-option-warning-level.md) warning level option: +And to catch more programming mistakes automatically, we recommend you compile by using either the [/W3 or /W4](reference/compiler-option-warning-level.md) warning level option: `cl /W4 file1.c file2.c file3.c /link /out:program1.exe` -The compiler, cl.exe, has many more options you can apply to build, optimize, debug, and analyze your code. For a quick list, enter `cl /?` at the developer command prompt. You can also compile and link separately and apply linker options in more complex build scenarios. For more information on compiler and linker options and usage, see [C/C++ Building Reference](reference/c-cpp-building-reference.md). +The compiler, *`cl.exe`*, has many more options you can apply to build, optimize, debug, and analyze your code. For a quick list, enter `cl /?` at the developer command prompt. You can also compile and link separately and apply linker options in more complex build scenarios. For more information on compiler and linker options and usage, see [C/C++ Building Reference](reference/c-cpp-building-reference.md). You can use NMAKE and makefiles, or MSBuild and project files to configure and build more complex projects on the command line. For more information on using these tools, see [NMAKE Reference](reference/nmake-reference.md) and [MSBuild](msbuild-visual-cpp.md). -The C and C++ languages are similar, but not the same. The Microsoft C/C++ compiler (MSVC) uses a basic rule to determine which language to use when it compiles your code. By default, the MSVC compiler treats all files that end in *`.c`* as C source code, and all files that end in *`.cpp`* as C++ source code. To force the compiler to treat all files as C no matter the file name extension, use the [/TC](reference/tc-tp-tc-tp-specify-source-file-type.md) compiler option. +The C and C++ languages are similar, but not the same. The MSVC compiler uses a basic rule to determine which language to use when it compiles your code. By default, the MSVC compiler treats all files that end in *`.c`* as C source code, and all files that end in *`.cpp`* as C++ source code. To force the compiler to treat all files as C no matter the file name extension, use the [/TC](reference/tc-tp-tc-tp-specify-source-file-type.md) compiler option. -By default, MSVC is compatible with the ANSI C89 and ISO C99 standards, but not strictly conforming. In most cases, portable C code will compile and run as expected. The compiler provides optional support for the changes in ISO C11/C17. To compile with C11/C17 support, use the compiler flag **`/std:c11`** or **`/std:c17`**. C11/C17 support requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.22000.0 or later is recommended. You can download the latest SDK from the [Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk/) page. For more information, and instructions on how to install and use this SDK for C development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md). +By default, MSVC is compatible with the ANSI C89 and ISO C99 standards, but not strictly conforming. In most cases, portable C code compiles and runs as expected. The compiler provides optional support for the changes in ISO C11 and C17. To compile with C11 and C17 support, use the compiler flag `/std:c11` or `/std:c17`. C11 and C17 support requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.22000.0 or later is recommended. You can download the latest SDK from the [Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk/) page. For more information, and instructions on how to install and use this SDK for C development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md). Certain library functions and POSIX function names are deprecated by MSVC. The functions are supported, but the preferred names have changed. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md) and [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). ## See also -[Walkthrough: Creating a Standard C++ Program (C++)](../windows/walkthrough-creating-a-standard-cpp-program-cpp.md)\ -[C Language Reference](../c-language/c-language-reference.md)\ -[Projects and build systems](projects-and-build-systems-cpp.md)\ -[Compatibility](../c-runtime-library/compatibility.md) +- [Walkthrough: Create a Standard C++ Program](../windows/walkthrough-creating-a-standard-cpp-program-cpp.md) +- [C Language Reference](../c-language/c-language-reference.md) +- [C/C++ projects and build systems](projects-and-build-systems-cpp.md) +- [Compatibility](../c-runtime-library/compatibility.md) diff --git a/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md b/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md index ed1941b880..ad06919a0c 100644 --- a/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md +++ b/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md @@ -1,59 +1,55 @@ --- -title: "Walkthrough: Create and use your own Dynamic Link Library (C++)" -description: "Use C++ to create a Windows dynamic-link library (DLL) in Visual Studio." +title: "Create and Use Your Own Dynamic-Link Library (C++)" +description: "Learn how to use C++ to create a Windows dynamic-link library (DLL) in Visual Studio." ms.topic: tutorial -ms.date: 12/09/2021 +ms.date: 03/17/2025 helpviewer_keywords: ["libraries [C++], DLLs", "DLLs [C++], walkthroughs"] --- -# Walkthrough: Create and use your own Dynamic Link Library (C++) +# Walkthrough: Create and use your own dynamic-link library (C++) -This step-by-step walkthrough shows how to use the Visual Studio IDE to create your own dynamic link library (DLL) written in Microsoft C++ (MSVC). Then it shows how to use the DLL from another C++ app. DLLs (also known as *shared libraries* in UNIX-based operating systems) are one of the most useful kinds of Windows components. You can use them as a way to share code and resources, and to shrink the size of your apps. DLLs can even make it easier to service and extend your apps. +This step-by-step walkthrough explains how to use the Visual Studio IDE to create your own dynamic-link library (DLL) written in Microsoft C++ (MSVC), and how to use the DLL from another C++ app. DLLs, also known as *shared libraries* in UNIX-based operating systems, are one of the most useful kinds of Windows components. You can use them to share code and resources, and to shrink the size of your apps. DLLs can even make it easier to service and extend your apps. -In this walkthrough, you'll create a DLL that implements some math functions. Then you'll create a console app that uses the functions from the DLL. You'll also get an introduction to some of the programming techniques and conventions used in Windows DLLs. +In this walkthrough, you create a DLL that implements some math functions. Then you create a console app that uses the functions from the DLL. You also get an introduction to some of the programming techniques and conventions used in Windows DLLs. -This walkthrough covers these tasks: +This walkthrough covers the following steps: - Create a DLL project in Visual Studio. - - Add exported functions and variables to the DLL. - - Create a console app project in Visual Studio. - - Use the functions and variables imported from the DLL in the console app. - - Run the completed app. Like a statically linked library, a DLL _exports_ variables, functions, and resources by name. A client app _imports_ the names to use those variables, functions, and resources. Unlike a statically linked library, Windows connects the imports in your app to the exports in a DLL at load time or at run time, instead of connecting them at link time. Windows requires extra information that isn't part of the standard C++ compilation model to make these connections. The MSVC compiler implements some Microsoft-specific extensions to C++ to provide this extra information. We explain these extensions as we go. -This walkthrough creates two Visual Studio solutions; one that builds the DLL, and one that builds the client app. The DLL uses the C calling convention. It can be called from apps written in other programming languages, as long as the platform, calling conventions, and linking conventions match. The client app uses _implicit linking_, where Windows links the app to the DLL at load-time. This linking lets the app call the DLL-supplied functions just like the functions in a statically linked library. +This walkthrough creates two Visual Studio solutions: one that builds the DLL, and one that builds the client app. The DLL uses the C calling convention. It can be called from apps written in other programming languages, as long as the platform, calling conventions, and linking conventions match. The client app uses _implicit linking_, where Windows links the app to the DLL at load time. This linking lets the app call the DLL-supplied functions just like the functions in a statically linked library. -This walkthrough doesn't cover some common situations. The code doesn't show the use of C++ DLLs by other programming languages. It doesn't show how to [create a resource-only DLL](creating-a-resource-only-dll.md), or how to use [explicit linking](linking-an-executable-to-a-dll.md#linking-explicitly) to load DLLs at run-time rather than at load-time. Rest assured, you can use MSVC and Visual Studio to do all these things. +This walkthrough doesn't cover some common situations. The code doesn't show the use of C++ DLLs by other programming languages. It doesn't show how to [create a resource-only DLL](creating-a-resource-only-dll.md), or how to use [explicit linking](linking-an-executable-to-a-dll.md#linking-explicitly) to load DLLs at run time rather than at load time. Rest assured, you can use MSVC and Visual Studio to do all these things. -Even though the code of the DLL is written in C++, we've used C-style interfaces for the exported functions. There are two main reasons for this: First, many other languages support imports of C-style functions. The client app doesn't have to be written in C++. Second, it avoids some common pitfalls related to exported classes and member functions. It's easy to make hard-to-diagnose errors when exporting classes, since everything referred to within a class declaration has to have an instantiation that's also exported. This restriction applies to DLLs, but not static libraries. If your classes are plain-old-data style, you shouldn't run into this issue. +Even though the code of the DLL is written in C++, we use C-style interfaces for the exported functions. There are two main reasons for this: First, many other languages support imports of C-style functions. The client app doesn't have to be written in C++. Second, it avoids some common pitfalls related to exported classes and member functions. It's easy to make hard-to-diagnose errors when exporting classes, since everything referred to within a class declaration has to have an instantiation that's also exported. This restriction applies to DLLs, but not static libraries. If your classes are plain-old-data style, you shouldn't run into this issue. For links to more information about DLLs, see [Create C/C++ DLLs in Visual Studio](dlls-in-visual-cpp.md). For more information about implicit linking and explicit linking, see [Determine which linking method to use](linking-an-executable-to-a-dll.md#determining-which-linking-method-to-use). For information about creating C++ DLLs for use with programming languages that use C-language linkage conventions, see [Exporting C++ functions for use in C-language executables](exporting-cpp-functions-for-use-in-c-language-executables.md). For information about how to create DLLs for use with .NET languages, see [Calling DLL Functions from Visual Basic Applications](calling-dll-functions-from-visual-basic-applications.md). ## Prerequisites -- A computer that runs Microsoft Windows 7 or later versions. We recommend the latest version of Windows for the best development experience. +- Microsoft Windows 7 or later. We recommend the latest version of Windows for the best development experience. ::: moniker range=">=msvc-150" -- A copy of Visual Studio. For information on how to download and install Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). When you run the installer, make sure that the **Desktop development with C++** workload is checked. Don't worry if you didn't install this workload when you installed Visual Studio. You can run the installer again and install it now. +- Visual Studio. To learn how to download and install Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio). When you run the installer, make sure that the **Desktop development with C++** workload is checked. Don't worry if you didn't install this workload when you installed Visual Studio. You can run the installer again and install it now. - ![Visual Studio Installer, Desktop development with C++ workload.](media/desktop-development-with-cpp.png "Desktop development with C++") + :::image type="content" source="media/desktop-development-with-cpp.png" alt-text="Screenshot of the Visual Studio Installer, Desktop development with C++ workload."::: ::: moniker-end ::: moniker range="msvc-140" -- A copy of Visual Studio. For information on how to download and install Visual Studio 2015, see [Install Visual Studio 2015](/visualstudio/install/install-visual-studio-2015?view=vs-2015&preserve-view=true). Use a **Custom** installation to install the C++ compiler and tools, since they're not installed by default. +- Visual Studio. For information on how to download and install Visual Studio 2015, see [Install Visual Studio 2015](/visualstudio/install/install-visual-studio-2015?view=vs-2015&preserve-view=true). Use a **Custom** installation to install the C++ compiler and tools, since they're not installed by default. ::: moniker-end - An understanding of the basics of using the Visual Studio IDE. If you've used Windows desktop apps before, you can probably keep up. For an introduction, see [Visual Studio IDE feature tour](/visualstudio/ide/visual-studio-ide). -- An understanding of enough of the fundamentals of the C++ language to follow along. Don't worry, we don't do anything too complicated. +- Some familiarity with the C++ language. Don't worry, we don't do anything too complicated. ::: moniker range="msvc-150" @@ -64,15 +60,15 @@ For links to more information about DLLs, see [Create C/C++ DLLs in Visual Studi ## Create the DLL project -In this set of tasks, you create a project for your DLL, add code, and build it. To begin, start the Visual Studio IDE, and sign in if you need to. The instructions vary slightly depending on which version of Visual Studio you're using. Make sure you have the correct version selected in the control in the upper left of this page. +In the following set of tasks, you create a project for your DLL, add code, and build it. To begin, start the Visual Studio IDE, and sign in if you need to. The instructions vary slightly depending on which version of Visual Studio you're using. To see the steps for your preferred version of Visual Studio, use the **Version** selector located at the top of the table of contents on this page. ::: moniker range=">=msvc-160" -### To create a DLL project in Visual Studio 2019 +### To create a DLL project in Visual Studio 1. On the menu bar, choose **File** > **New** > **Project** to open the **Create a New Project** dialog box. - ![Screenshot of the Create a new project dialog with the Dynamic Link Library template highlighted.](media/create-new-dll-project-2019.png "Create the MathLibrary project") + :::image type="content" source="media/create-new-dll-project-2019.png" alt-text="Screenshot of the Create a new project dialog box with the dynamic-link library template highlighted."::: 1. At the top of the dialog, set **Language** to **C++**, set **Platform** to **Windows**, and set **Project type** to **Library**. @@ -84,7 +80,7 @@ In this set of tasks, you create a project for your DLL, add code, and build it. When the solution is created, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio. -![Screenshot of the Solution Explorer window with the Math Library project highlighted.](media/mathlibrary-solution-explorer-162.png "Generated solution in Visual Studio") + :::image type="content" source="media/mathlibrary-solution-explorer-162.png" alt-text="Screenshot of the Solution Explorer window with the MathLibrary project highlighted."::: ::: moniker-end @@ -96,13 +92,13 @@ When the solution is created, you can see the generated project and source files 1. In the left pane of the **New Project** dialog box, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Dynamic-Link Library (DLL)**. Enter *MathLibrary* in the **Name** box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked. - ![Screenshot of the New Project dialog box showing Math Library in the Name text box.](media/mathlibrary-new-project-name-159.png "Name the MathLibrary project") + :::image type="content" source="media/mathlibrary-new-project-name-159.png" alt-text="Screenshot of the New Project dialog box in Visual Studio 2017 showing Math Library in the Name text box."::: 1. Choose the **OK** button to create the project. When the solution is created, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio. -![Screenshot of the Solution Explorer window with the Math Library highlighted.](media/mathlibrary-solution-explorer-159.png "Generated solution in Visual Studio") +:::image type="content" source="media/mathlibrary-solution-explorer-159.png" alt-text="Screenshot of the Solution Explorer window in Visual Studio 2017 with the Math Library highlighted."::: ::: moniker-end @@ -114,21 +110,21 @@ When the solution is created, you can see the generated project and source files 1. In the left pane of the **New Project** dialog box, expand **Installed** > **Templates**, and select **Visual C++**, and then in the center pane, select **Win32 Console Application**. Enter *MathLibrary* in the **Name** edit box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked. - ![Screenshot of the New Project dialog box showing Math Library in the Name text box.](media/mathlibrary-project-name.png "Name the MathLibrary project") + :::image type="content" source="media/mathlibrary-project-name.png" alt-text="Screenshot of the New Project dialog box in Visual Studio 2015 showing MathLibrary in the Name text box."::: 1. Choose the **OK** button to dismiss the **New Project** dialog and start the **Win32 Application Wizard**. - ![Screenshot of the Win32 Application Wizard Overview page.](media/mathlibrary-project-wizard-1.png "Win32 Application Wizard Overview") + :::image type="content" source="media/mathlibrary-project-wizard-1.png" alt-text="Screenshot of the Win32 Application Wizard Overview page."::: 1. Choose the **Next** button. On the **Application Settings** page, under **Application type**, select **DLL**. - ![Screenshot of the Win32 Application Wizard Application Settings Page.](media/mathlibrary-project-wizard-2.png "Create DLL in Win32 Application Wizard") + :::image type="content" source="media/mathlibrary-project-wizard-2.png" alt-text="Screenshot of the Win32 Application Wizard Application Settings Page."::: 1. Choose the **Finish** button to create the project. When the wizard completes the solution, you can see the generated project and source files in the **Solution Explorer** window in Visual Studio. -![Screenshot of the Solution Explorer window with the Math Library highlighted.](media/mathlibrary-solution-explorer-153.png "Generated solution in Visual Studio") +:::image type="content" source="media/mathlibrary-solution-explorer-153.png" alt-text="Screenshot of the Solution Explorer window in Visual Studio 2015 with the MathLibrary highlighted."::: ::: moniker-end @@ -138,13 +134,13 @@ Right now, this DLL doesn't do very much. Next, you'll create a header file to d 1. To create a header file for your functions, on the menu bar, choose **Project** > **Add New Item**. -1. In the **Add New Item** dialog box, in the left pane, select **Visual C++**. In the center pane, select **Header File (.h)**. Specify *MathLibrary.h* as the name for the header file. +1. In the **Add New Item** dialog box, in the left pane, select **Visual C++**. In the center pane, select **Header File (.h)**. Specify *`MathLibrary.h`* as the name for the header file. - ![Screenshot of the Add New Item dialog with the C plus plus Header File template selected, and MathLibrary.h entered in the Name textbox.](media/mathlibrary-add-new-item-header-file.png "Add header file in Add New Item dialog") + :::image type="content" source="media/mathlibrary-add-new-item-header-file.png" alt-text="Screenshot of the Add New Item dialog with the C plus plus Header File template selected, and MathLibrary.h entered in the Name textbox."::: 1. Choose the **Add** button to generate a blank header file, which is displayed in a new editor window. - ![Screenshot of the empty MathLibrary.h file in the editor.](media/edit-empty-mathlibrary-header.png "Empty MathLibrary.h file in editor") + :::image type="content" source="media/edit-empty-mathlibrary-header.png" alt-text="Screenshot of the empty MathLibrary.h file in the editor."::: 1. Replace the contents of the header file with this code: @@ -195,11 +191,11 @@ When the `MATHLIBRARY_EXPORTS` macro is defined, the `MATHLIBRARY_API` macro set ::: moniker range=">=msvc-160" -1. In **Solution Explorer**, right-click on the **Source Files** node and choose **Add** > **New Item**. Create a new .cpp file called *MathLibrary.cpp*, in the same way that you added a new header file in the previous step. +1. In **Solution Explorer**, right-click on the **Source Files** node and choose **Add** > **New Item**. Create a new *`.cpp`* file called *`MathLibrary.cpp`*, in the same way that you added a new header file in the previous step. -1. In the editor window, select the tab for **MathLibrary.cpp** if it's already open. If not, in **Solution Explorer**, double-click **MathLibrary.cpp** in the **Source Files** folder of the **MathLibrary** project to open it. +1. In the editor window, select the *`MathLibrary.cpp`* tab if it's already open. If not, in **Solution Explorer**, double-click *`MathLibrary.cpp`* in the **Source Files** folder of the **MathLibrary** project to open it. -1. In the editor, replace the contents of the MathLibrary.cpp file with the following code: +1. In the editor, replace the contents of the *`MathLibrary.cpp`* file with the following code: ```cpp // MathLibrary.cpp : Defines the exported functions for the DLL. @@ -266,7 +262,7 @@ When the `MATHLIBRARY_EXPORTS` macro is defined, the `MATHLIBRARY_API` macro set 1. In the editor window, select the tab for **MathLibrary.cpp** if it's already open. If not, in **Solution Explorer**, double-click **MathLibrary.cpp** in the **Source Files** folder of the **MathLibrary** project to open it. -1. In the editor, replace the contents of the MathLibrary.cpp file with the following code: +1. In the editor, replace the contents of the *`MathLibrary.cpp`* file with the following code: ```cpp // MathLibrary.cpp : Defines the exported functions for the DLL. @@ -329,7 +325,7 @@ When the `MATHLIBRARY_EXPORTS` macro is defined, the `MATHLIBRARY_API` macro set ::: moniker-end -To verify that everything works so far, compile the dynamic link library. To compile, choose **Build** > **Build Solution** on the menu bar. The DLL and related compiler output are placed in a folder called *Debug* directly below the solution folder. If you create a Release build, the output is placed in a folder called *Release*. The output should look something like this: +To verify that everything works so far, compile the DLL. To compile, choose **Build** > **Build Solution** on the menu bar. The DLL and related compiler output are placed in a folder called `Debug` directly below the solution folder. If you create a Release build, the output is placed in a folder called `Release`. The output should look something like this: ::: moniker range=">=msvc-160" @@ -380,9 +376,9 @@ Congratulations, you've created a DLL using Visual Studio! Next, you'll create a ## Create a client app that uses the DLL -When you create a DLL, think about how client apps may use it. To call the functions or access the data exported by a DLL, client source code must have the declarations available at compile time. At link time, the linker requires information to resolve the function calls or data accesses. A DLL supplies this information in an *import library*, a file that contains information about how to find the functions and data, instead of the actual code. And at run time, the DLL must be available to the client, in a location that the operating system can find. +When you create a DLL, think about how client apps might use it. To call the functions or access the data exported by a DLL, client source code must have the declarations available at compile time. At link time, the linker requires information to resolve the function calls or data accesses. A DLL supplies this information in an *import library*, a file that contains information about how to find the functions and data, instead of the actual code. And at run time, the DLL must be available to the client, in a location that the operating system can find. -Whether it's your own or from a third-party, your client app project needs several pieces of information to use a DLL. It needs to find the headers that declare the DLL exports, the import libraries for the linker, and the DLL itself. One solution is to copy all of these files into your client project. For third-party DLLs that are unlikely to change while your client is in development, this method may be the best way to use them. However, when you also build the DLL, it's better to avoid duplication. If you make a local copy of DLL files that are under development, you may accidentally change a header file in one copy but not the other, or use an out-of-date library. +Whether it's your own or from a third-party, your client app project needs several pieces of information to use a DLL. It needs to find the headers that declare the DLL exports, the import libraries for the linker, and the DLL itself. One solution is to copy all of these files into your client project. For third-party DLLs that are unlikely to change while your client is in development, this method might be the best way to use them. However, when you also build the DLL, it's better to avoid duplication. If you make a local copy of DLL files that are under development, you might accidentally change a header file in one copy but not the other, or use an out-of-date library. To avoid out-of-sync code, we recommend you set the include path in your client project to include the DLL header files directly from your DLL project. Also, set the library path in your client project to include the DLL import libraries from the DLL project. And finally, copy the built DLL from the DLL project into your client build output directory. This step allows your client app to use the same DLL code you build. @@ -398,11 +394,11 @@ To avoid out-of-sync code, we recommend you set the include path in your client 1. In the **Configure your new project** page, enter *MathClient* in the **Project name** box to specify a name for the project. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Uncheck **Place solution and project in the same directory** if it's checked. - ![Screenshot of the Create a new project dialog box with the Console App option highlighted.](media/mathclient-project-name-2019.png "Name the client project") + :::image type="content" source="media/mathclient-project-name-2019.png" alt-text="Screenshot of the Create a new project dialog box with the Console App option highlighted."::: 1. Choose the **Create** button to create the client project. -A minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named **MathClient.cpp**. You can build it, but it doesn't use your DLL yet. +A minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named *`MathClient.cpp`*. You can build it, but it doesn't use your DLL yet. ::: moniker-end @@ -412,13 +408,13 @@ A minimal console application project is created for you. The name for the main 1. To create a C++ app that uses the DLL that you created, on the menu bar, choose **File** > **New** > **Project**. -1. In the left pane of the **New Project** dialog, select **Windows Desktop** under **Installed** > **Visual C++**. In the center pane, select **Windows Console Application**. Specify the name for the project, *MathClient*, in the **Name** edit box. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked. +1. In the left pane of the **New Project** dialog, select **Windows Desktop** under **Installed** > **Visual C++**. In the center pane, select **Windows Console Application**. Specify the name for the project, *MathClient*, in the **Name** edit box. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked. - ![Screenshot of the New Project dialog box with Installed > Visual C plus plus > Windows Desktop selected, Windows Console Application highlighted, and Math Client typed in the Name text box.](media/mathclient-new-project-name-159.png "Name the client project") + :::image type="content" source="media/mathclient-new-project-name-159.png" alt-text="Screenshot of the New Project dialog box with Windows Console Application highlighted, and Math Client typed in the Name text box."::: 1. Choose **OK** to create the client app project. -A minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named **MathClient.cpp**. You can build it, but it doesn't use your DLL yet. +A minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named *`MathClient.cpp`*. You can build it, but it doesn't use your DLL yet. ::: moniker-end @@ -430,7 +426,7 @@ A minimal console application project is created for you. The name for the main 1. In the left pane of the **New Project** dialog, select **Win32** under **Installed** > **Templates** > **Visual C++**. In the center pane, select **Win32 Console Application**. Specify the name for the project, *MathClient*, in the **Name** edit box. Leave the default **Location** and **Solution name** values. Set **Solution** to **Create new solution**. Check **Create directory for solution** if it's unchecked. - ![Screenshot of the New Project dialog box with Installed > Templates > Visual C plus plus > Win32 selected, Win32 Console Application Visual C plus plus highlighted, and Math Client typed in the Name text box.](media/mathclient-project-name.png "Name the client project") + :::image type="content" source="media/mathclient-project-name.png" alt-text="Screenshot of the New Project dialog box with Win32 Console Application Visual C plus plus highlighted, and Math Client typed in the Name text box."::: 1. Choose the **OK** button to dismiss the **New Project** dialog and start the **Win32 Application Wizard**. On the **Overview** page of the **Win32 Application Wizard** dialog box, choose the **Next** button. @@ -438,27 +434,27 @@ A minimal console application project is created for you. The name for the main 1. Choose the **Finish** button to create the project. -When the wizard finishes, a minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named **MathClient.cpp**. You can build it, but it doesn't use your DLL yet. +When the wizard finishes, a minimal console application project is created for you. The name for the main source file is the same as the project name that you entered earlier. In this example, it's named *`MathClient.cpp`*. You can build it, but it doesn't use your DLL yet. ::: moniker-end -Next, to call the MathLibrary functions in your source code, your project must include the *MathLibrary.h* file. You could copy this header file into your client app project, then add it to the project as an existing item. This method can be a good choice for third-party libraries. However, if you're working on the code for your DLL and your client at the same time, the header files could get out of sync. To avoid this issue, set the **Additional Include Directories** path in your project to include the path to the original header. +Next, to call the MathLibrary functions in your source code, your project must include the *`MathLibrary.h`* file. You could copy this header file into your client app project, then add it to the project as an existing item. This method can be a good choice for third-party libraries. However, if you're working on the code for your DLL and your client at the same time, the header files could get out of sync. To avoid this issue, set the **Additional Include Directories** path in your project to include the path to the original header. ### To add the DLL header to your include path 1. Right-click on the **MathClient** node in **Solution Explorer** to open the **Property Pages** dialog. -1. In the **Configuration** drop-down box, select **All Configurations** if it's not already selected. +1. In the **Configuration** dropdown box, select **All Configurations** if it's not already selected. 1. In the left pane, select **Configuration Properties** > **C/C++** > **General**. -1. In the property pane, select the drop-down control next to the **Additional Include Directories** edit box, and then choose **Edit**. +1. In the property pane, select the dropdown control next to the **Additional Include Directories** edit box, and then choose **Edit**. - ![Screenshot of the Property Pages dialog showing the Edit command in the Additional Include Directories property drop-down.](media/mathclient-additional-include-directories-property.png "Edit the Additional Include Directories property") + :::image type="content" source="media/mathclient-additional-include-directories-property.png" alt-text="Screenshot of the Property Pages dialog showing the Edit command in the Additional Include Directories property dropdown."::: 1. Double-click in the top pane of the **Additional Include Directories** dialog box to enable an edit control. Or, choose the folder icon to create a new entry. -1. In the edit control, specify the path to the location of the **MathLibrary.h** header file. You can choose the ellipsis (**...**) control to browse to the correct folder. +1. In the edit control, specify the path to the location of the *`MathLibrary.h`* header file. You can choose the ellipsis (**...**) control to browse to the correct folder. You can also enter a relative path from your client source files to the folder that contains the DLL header files. If you followed the directions to put your client project in a separate solution from the DLL, the relative path should look like this: @@ -470,11 +466,11 @@ Next, to call the MathLibrary functions in your source code, your project must i When the DLL and client projects are in other folders, adjust the relative path to match. Or, use the ellipsis control to browse for the folder. - ![Screenshot of the Additional Include Directories dialog showing the relative path to the MathLibrary directory.](media/mathclient-additional-include-directories.png "Add the header location to the Additional Include Directories property") + :::image type="content" source="media/mathclient-additional-include-directories.png" alt-text="Screenshot of the Additional Include Directories dialog showing the relative path to the MathLibrary directory."::: 1. After you've entered the path to the header file in the **Additional Include Directories** dialog box, choose the **OK** button. In the **Property Pages** dialog box, choose the **OK** button to save your changes. -You can now include the **MathLibrary.h** file and use the functions it declares in your client application. Replace the contents of **MathClient.cpp** by using this code: +You can now include the *`MathLibrary.h`* file and use the functions it declares in your client application. Replace the contents of *`MathClient.cpp`* by using this code: ```cpp // MathClient.cpp : Client app for MathLibrary DLL. @@ -498,51 +494,51 @@ int main() } ``` -This code can be compiled, but not linked. If you build the client app now, the error list shows several LNK2019 errors. That's because your project is missing some information: You haven't specified that your project has a dependency on the *MathLibrary.lib* library yet. And, you haven't told the linker how to find the *MathLibrary.lib* file. +This code can be compiled, but not linked. If you build the client app now, the error list shows several LNK2019 errors. That's because your project is missing some information: You haven't specified that your project has a dependency on the *`MathLibrary.lib`* library yet. And, you haven't told the linker how to find the *`MathLibrary.lib`* file. -To fix this issue, you could copy the library file directly into your client app project. The linker would find and use it automatically. However, if both the library and the client app are under development, that might lead to changes in one copy that aren't shown in the other. To avoid this issue, you can set the **Additional Dependencies** property to tell the build system that your project depends on *MathLibrary.lib*. And, you can set an **Additional Library Directories** path in your project to include the path to the original library when you link. +To fix this issue, you could copy the library file directly into your client app project. The linker would find and use it automatically. However, if both the library and the client app are under development, that might lead to changes in one copy that aren't shown in the other. To avoid this issue, you can set the **Additional Dependencies** property to tell the build system that your project depends on *`MathLibrary.lib`*. And, you can set an **Additional Library Directories** path in your project to include the path to the original library when you link. ### To add the DLL import library to your project 1. Right-click on the **MathClient** node in **Solution Explorer** and choose **Properties** to open the **Property Pages** dialog. -1. In the **Configuration** drop-down box, select **All Configurations** if it's not already selected. It ensures that any property changes apply to both Debug and Release builds. +1. In the **Configuration** dropdown box, select **All Configurations** if it's not already selected. It ensures that any property changes apply to both Debug and Release builds. -1. In the left pane, select **Configuration Properties** > **Linker** > **Input**. In the property pane, select the drop-down control next to the **Additional Dependencies** edit box, and then choose **Edit**. +1. In the left pane, select **Configuration Properties** > **Linker** > **Input**. In the property pane, select the dropdown control next to the **Additional Dependencies** edit box, and then choose **Edit**. - ![Screenshot of the Property Pages dialog showing the Edit command in the Linker > Input > Additional Dependencies property drop-down.](media/mathclient-additional-dependencies-property.png "Edit the Additional Dependencies property") + :::image type="content" source="media/mathclient-additional-dependencies-property.png" alt-text="Screenshot of the Property Pages dialog box under Input that shows the Edit command in the Additional Dependencies property dropdown."::: -1. In the **Additional Dependencies** dialog, add *MathLibrary.lib* to the list in the top edit control. +1. In the **Additional Dependencies** dialog, add *`MathLibrary.lib`* to the list in the top edit control. - ![Screenshot of the Additional Dependencies dialog showing the MathLibrary.lib file.](media/mathclient-additional-dependencies.png "Add the library dependency") + :::image type="content" source="media/mathclient-additional-dependencies.png" alt-text="Screenshot of the Additional Dependencies dialog box showing the MathLibrary.lib file."::: 1. Choose **OK** to go back to the **Property Pages** dialog box. -1. In the left pane, select **Configuration Properties** > **Linker** > **General**. In the property pane, select the drop-down control next to the **Additional Library Directories** edit box, and then choose **Edit**. +1. In the left pane, select **Configuration Properties** > **Linker** > **General**. In the property pane, select the dropdown control next to the **Additional Library Directories** edit box, and then choose **Edit**. - ![Screenshot of the Property Pages dialog showing the Edit command in the Linker > General > Additional Library Directories property drop-down.](media/mathclient-additional-library-directories-property.png "Edit the Additional Library Directories property") + :::image type="content" source="media/mathclient-additional-library-directories-property.png" alt-text="Screenshot of the Property Pages dialog box under General that shows the Edit command in the Additional Library Directories property dropdown."::: -1. Double-click in the top pane of the **Additional Library Directories** dialog box to enable an edit control. In the edit control, specify the path to the location of the **MathLibrary.lib** file. By default, it's in a folder called *Debug* directly under the DLL solution folder. If you create a release build, the file is placed in a folder called *Release*. You can use the `$(IntDir)` macro so that the linker can find your DLL, no matter which kind of build you create. If you followed the directions to put your client project in a separate solution from the DLL project, the relative path should look like this: +1. Double-click in the top pane of the **Additional Library Directories** dialog box to enable an edit control. In the edit control, specify the path to the location of the *`MathLibrary.lib`* file. By default, it's in a folder called *Debug* directly under the DLL solution folder. If you create a release build, the file is placed in a folder called *Release*. You can use the `$(IntDir)` macro so that the linker can find your DLL, no matter which kind of build you create. If you followed the directions to put your client project in a separate solution from the DLL project, the relative path should look like this: `..\..\MathLibrary\$(IntDir)` If your DLL and client projects are in other locations, adjust the relative path to match. - ![Screenshot of the Additional Library Directories dialog.](media/mathclient-additional-library-directories.png "Add the library directory") + :::image type="content" source="media/mathclient-additional-library-directories.png" alt-text="Screenshot of the Additional Library Directories dialog."::: 1. Once you've entered the path to the library file in the **Additional Library Directories** dialog box, choose the **OK** button to go back to the **Property Pages** dialog box. Choose **OK** to save the property changes. Your client app can now compile and link successfully, but it still doesn't have everything it needs to run. When the operating system loads your app, it looks for the MathLibrary DLL. If it can't find the DLL in certain system directories, the environment path, or the local app directory, the load fails. Depending on the operating system, you'll see an error message like this: -![Screenshot of the error dialog, MathLibrary DLL not found.](media/mathclient-system-error-mathlibrary-dll-not-found.png "MathLibrary DLL not found error") +:::image type="content" source="media/mathclient-system-error-mathlibrary-dll-not-found.png" alt-text="Screenshot of the error dialog, MathLibrary DLL not found."::: -One way to avoid this issue is to copy the DLL to the directory that contains your client executable as part of the build process. You can add a **Post-Build Event** to your project, to add a command that copies the DLL to your build output directory. The command specified here copies the DLL only if it's missing or has changed. It uses macros to copy to and from the Debug or Release locations, based on your build configuration. +One way to avoid this issue is to copy the DLL to the directory that contains your client executable as part of the build process. You can add a *post-build event* to your project, to add a command that copies the DLL to your build output directory. The command specified here copies the DLL only if it's missing or has changed. It uses macros to copy to and from the Debug or Release locations, based on your build configuration. ### To copy the DLL in a post-build event 1. Right-click on the **MathClient** node in **Solution Explorer** and choose **Properties** to open the **Property Pages** dialog. -1. In the **Configuration** drop-down box, select **All Configurations** if it isn't already selected. +1. In the **Configuration** dropdown box, select **All Configurations** if it isn't already selected. 1. In the left pane, select **Configuration Properties** > **Build Events** > **Post-Build Event**. @@ -552,7 +548,7 @@ One way to avoid this issue is to copy the DLL to the directory that contains yo If your DLL and client projects are in other directories, change the relative path to the DLL to match. - ![Screenshot of the Property Pages dialog showing the post build event command line property.](media/mathclient-post-build-command-line.png "Add the post-build command") + :::image type="content" source="media/mathclient-post-build-command-line.png" alt-text="Screenshot of the Property Pages dialog showing the post build event command line property."::: 1. Choose the **OK** button to save your changes to the project properties. @@ -568,7 +564,7 @@ Now your client app has everything it needs to build and run. Build the applicat Congratulations, you've created an application that calls functions in your DLL. Now run your application to see what it does. On the menu bar, choose **Debug** > **Start Without Debugging**. Visual Studio opens a command window for the program to run in. The last part of the output should look like: -![Screenshot of the command window output when you start the client app without debugging.](media/mathclient-run-without-debugging.png "Start the client app without debugging") +:::image type="content" source="media/mathclient-run-without-debugging.png" alt-text="Screenshot of the command window output when you start the client app without debugging."::: Press any key to dismiss the command window. @@ -578,4 +574,4 @@ When you deploy your app, you must also deploy the DLLs it uses. The simplest wa ## See also -[Calling DLL Functions from Visual Basic Applications](calling-dll-functions-from-visual-basic-applications.md) +- [Calling DLL Functions from Visual Basic Applications](calling-dll-functions-from-visual-basic-applications.md) diff --git a/docs/build/walkthrough-import-stl-header-units.md b/docs/build/walkthrough-import-stl-header-units.md index 80708ae720..3c2fd2d7e5 100644 --- a/docs/build/walkthrough-import-stl-header-units.md +++ b/docs/build/walkthrough-import-stl-header-units.md @@ -1,6 +1,6 @@ --- -description: "Learn to use header units to import C++ Standard Template Library (STL) libraries in Visual Studio." title: "Walkthrough: Import STL libraries as header units" +description: "Learn to use header units to import C++ Standard Template Library (STL) libraries in Visual Studio." ms.date: 10/15/2022 ms.custom: "conceptual" author: "tylermsft" @@ -170,7 +170,7 @@ This option is convenient when your project includes many STL header files acros This approach is less flexible than the static library approach, because it doesn't lend itself towards reusing the built header units in other projects. This approach might not be appropriate for larger projects: It doesn't guarantee an optimal build time, since all of the sources must be scanned for `#include` statements. -Not all header files can be automatically converted to header units. For example, headers that depend on conditional compilation via macros shouldn't be converted to header units. There's an allowlist in the form of a `header-units.json`file for the STL headers that the compiler uses when `/translateInclude` is specified. It determines which STL headers can be compiled into header units. The `header-units.json` file is under the installation directory for Visual Studio. For example, `%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\header-units.json`. If the STL header file isn't on the list, it's treated as a normal `#include` instead of importing it as a header unit. Another advantage of the `header-units.json` file is that it prevents symbol duplication in the built header units. That is, if compiling a header unit brings in another library header multiple times, the symbols won't be duplicated. +Not all header files can be automatically converted to header units. For example, headers that depend on conditional compilation via macros shouldn't be converted to header units. There's an allowlist in the form of a `header-units.json` file for the STL headers that the compiler uses when `/translateInclude` is specified. It determines which STL headers can be compiled into header units. The `header-units.json` file is under the installation directory for Visual Studio. For example, `%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\header-units.json`. If the STL header file isn't on the list, it's treated as a normal `#include` instead of importing it as a header unit. Another advantage of the `header-units.json` file is that it prevents symbol duplication in the built header units. That is, if compiling a header unit brings in another library header multiple times, the symbols won't be duplicated. To try out this approach, create a project that includes two STL libraries. Then, change the project's properties so that it imports the libraries as header units instead of including them, as described in the next section. @@ -182,8 +182,8 @@ Follow these steps to create a project that includes two STL libraries: `; - #include ; + #include + #include int main() { @@ -222,4 +222,4 @@ The main consideration for whether to use this approach is the balance between c [Compare header units, modules, and precompiled headers](compare-inclusion-methods.md)\ [Tutorial: Import the C++ standard library using modules](../cpp/tutorial-import-stl-named-module.md)\ [Walkthrough: Build and import header units in your Visual C++ projects](walkthrough-header-units.md)\ -[`/translateInclude`](./reference/translateinclude.md) \ No newline at end of file +[`/translateInclude`](./reference/translateinclude.md) diff --git a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md index 9543859eee..2e21028185 100644 --- a/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md +++ b/docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md @@ -83,10 +83,10 @@ An MSBuild project file is an XML file that contains a project root element (`

` element shown here. (Use `ToolsVersion="14.0"` if you're using Visual Studio 2015, `ToolsVersion="15.0"` if you're using Visual Studio 2017, or `ToolsVersion="16.0"` if you're using Visual Studio 2019.) +1. Use a text editor to create a project file that is named *`myproject.vcxproj`*, and then add the root `` element shown here. (Use `ToolsVersion="14.0"` if you're using Visual Studio 2015, `ToolsVersion="15.0"` if you're using Visual Studio 2017, `ToolsVersion="16.0"` if you're using Visual Studio 2019, or `ToolsVersion="17.0"` if you're using Visual Studio 2022.) ```xml - + ``` @@ -113,12 +113,12 @@ An MSBuild project file is an XML file that contains a project root element (`

``` -1. Add a property group element (``) that specifies two project properties, `` and ``. (Use `v140` as the `` value if you're using Visual Studio 2015, `v141` if you're using Visual Studio 2017, or `v142` if you're using Visual Studio 2019.) +1. Add a property group element (``) that specifies two project properties, `` and ``. (Use `v140` as the `` value if you're using Visual Studio 2015, `v141` if you're using Visual Studio 2017, `v142` if you're using Visual Studio 2019 or `v143` if you're using Visual Studio 2022.) ```xml Application - v142 + v143 ``` @@ -155,10 +155,10 @@ An MSBuild project file is an XML file that contains a project root element (`

+ Debug diff --git a/docs/build/working-with-project-properties.md b/docs/build/working-with-project-properties.md index 8cd9eae55a..7f6b508708 100644 --- a/docs/build/working-with-project-properties.md +++ b/docs/build/working-with-project-properties.md @@ -1,22 +1,23 @@ --- -title: "Set C++ compiler and build properties in Visual Studio" +title: "Set C++ Compiler and Build Properties in Visual Studio" description: "Use the Visual Studio IDE to change C++ compiler and linker options and other build settings." -ms.date: "07/17/2019" +ms.date: 03/19/2025 +ms.topic: concept-article helpviewer_keywords: ["project properties [C++], modifying", "properties [C++]", "Visual C++ projects, properties", "projects [C++], properties"] --- # Set compiler and build properties -In the IDE, properties expose the information needed to build a project. This information includes the application name, extension (such as DLL, LIB, EXE), compiler options, linker options, debugger settings, custom build steps, and many other things. Typically, you use *property pages* to view and modify these properties. To access the property pages, choose **Project** > **_project-name_ Properties** from the main menu, or right-click on the project node in **Solution Explorer** and choose **Properties**. +In the Visual Studio IDE, you can view and edit the properties needed to compile and build a project. This information includes the application name, extension (such as DLL, LIB, EXE), compiler options, linker options, debugger settings, and custom build steps. + +You can view and modify these properties by using *property pages*. To access the property pages, choose **Project** > **_project-name_ Properties** from the main menu, or right-click on the project node in **Solution Explorer** and choose **Properties**. ## Default properties -When you create a project, the system assigns values for various properties. The defaults vary somewhat depending on the kind of project and what options you choose in the app wizard. For example, an ATL project has properties related to MIDL files, but these properties are absent in a basic console application. The default properties are shown in the General pane in the Property Pages: +When you create a project, the system assigns values for various properties. The defaults vary somewhat depending on the kind of project and what options you choose in the app wizard. For example, an Active Template Library (ATL) project has properties related to Microsoft Interface Definition Language (MIDL) files, but these properties are absent in a basic console application. The default properties are shown in the Advanced pane in the **Property Pages** window: -:::image type="complex" source="media/visual-c---project-defaults.png" alt-text="Screenshot of the Visual Studio project properties dialog."::: -The General page is open. The Project Defaults section is highlighted, which includes Configuration Type set to Application (.exe), use of MFC set to Use standard Windows libraries, Character set is Unicode, Common Language Runtime Support is set to No Common Language Runtime Support, Whole Program optimization is set to No Whole Program Optimization, and Windows Store APP support is set to No. -:::image-end::: +:::image type="content" source="media/visual-c---project-defaults.png" alt-text="Screenshot of the Visual Studio project properties dialog box with the Advanced pane selected. Properties such as Use of MFC, Character Set, and so on are highlighted." lightbox="media/visual-c---project-defaults.png"::: -## Applying properties to build configurations and target platforms +## Apply properties to build configurations and target platforms Some properties, such as the application name, apply to all build variations and target platforms, whether it's a debug or release build. But most properties are configuration-dependent. To generate the correct code, the compiler has to know both the specific platform the program runs on and which specific compiler options to use. So when you set a property, it's important to pay attention to which configuration and platform the new value should apply to. Should it apply only to Debug Win32 builds, or should it also apply to Debug ARM64 and Debug x64? For example, the **Optimization** property, by default, is set to **Maximize Speed (/O2)** in a Release configuration, but is disabled in the Debug configuration. @@ -28,11 +29,11 @@ The page is open to C/C++, Optimization. The Optimization setting is set to Disa The following illustration shows the same project property page, but the configuration has been changed to Release. Note the different value for the Optimization property. Also note that the active configuration is still Debug. You can set properties for any configuration here; it doesn't have to be the active one. -:::image type="content" source="media/visual-c---property-pages-showing-release-config.png" alt-text="Screenshot of the Visual Studio project Property Pages dialog. The Configuration dropdown is called out and is set to Release. The C/C++ > Optimization > Optimization setting is set to Maximize Speed (/O2)."::: +:::image type="content" source="media/visual-c---property-pages-showing-release-config.png" alt-text="Screenshot of the Visual Studio project Property Pages dialog. The Configuration dropdown is called out and is set to Release. The optimization setting is set to Maximize Speed slash O2."::: ## Target platforms -*Target platform* refers to the kind of device and operating system that the executable will run on. You can build a project for more than one platform. The available target platforms for C++ projects depend on the kind of project. They include but aren't limited to Win32, x64, ARM, ARM64, Android, and iOS. The **x86** target platform that you might see in **Configuration Manager** is identical to **Win32** in native C++ projects. Win32 means 32-bit Windows and **x64** means 64-bit Windows. For more information about these two platforms, see [Running 32-bit applications](/windows/win32/WinProg64/running-32-bit-applications). +*Target platform* refers to the kind of device and operating system that the executable runs on. You can build a project for more than one platform. The available target platforms for C++ projects depend on the kind of project. They include but aren't limited to Win32, x64, ARM, ARM64, Android, and iOS. The **x86** target platform that you might see in **Configuration Manager** is identical to **Win32** in native C++ projects. Win32 means 32-bit Windows and **x64** means 64-bit Windows. For more information about these two platforms, see [Running 32-bit applications](/windows/win32/WinProg64/running-32-bit-applications). The **Any CPU** target platform value that you might see in **Configuration Manager** has no effect on native C++ projects. It's only relevant for C++/CLI and other .NET project types. For more information, see [`/CLRIMAGETYPE` (Specify Type of CLR Image)](reference/clrimagetype-specify-type-of-clr-image.md). @@ -51,7 +52,7 @@ The **Property Pages** dialog box shows only the property pages that are relevan ## Directory and path values -MSBuild supports the use of compile-time constants for certain string values, such as include directories and paths, called *macros*. A macro can refer to a value that's defined by Visual Studio or the MSBuild system, or to a user-defined value. Macros look like `$(macro-name)` or `%(item-macro-name)`. They're exposed in the property pages, where you can refer to and modify them by using the [Property Editor](#property_editor). Use macros instead of hard-coded values such as directory paths. Macros make it easier to share property settings between machines and between versions of Visual Studio. And, you can better ensure that your project settings participate correctly in [property inheritance](project-property-inheritance.md). +MSBuild supports the use of compile-time constants for certain string values, such as include directories and paths, called *macros*. A macro can refer to a value that's defined by Visual Studio or the MSBuild system, or to a user-defined value. Macros look like `$(macro-name)` or `%(item-macro-name)`. They're exposed in the property pages, where you can refer to and modify them by using the [Property Editor](#property_editor). Use macros instead of hard-coded values such as directory paths. Macros make it easier to share property settings between machines and between versions of Visual Studio. You can also better ensure that your project settings participate correctly in [property inheritance](project-property-inheritance.md). The following illustration shows the property pages for a Visual Studio C++ project. In the left pane, the **VC++ Directories** *rule* is selected, and the right pane lists the properties that are associated with that rule. The property values are often macros, such as `$(VC_SourcePath)`: @@ -63,21 +64,21 @@ You can use the [Property Editor](#property_editor) to view the values of all av ### Predefined macros -- **Global macros**:\ +- **Global macros**\ Global macros apply to all items in a project configuration. A global macro has the syntax `$(name)`. An example of a global macro is `$(VCInstallDir)`, which stores the root directory of your Visual Studio installation. A global macro corresponds to a `PropertyGroup` in MSBuild. - **Item macros**\ - Item macros have the syntax `%(name)`. For a file, an item macro applies only to that file—for example, you can use `%(AdditionalIncludeDirectories)` to specify include directories that apply only to a particular file. This kind of item macro corresponds to an `ItemGroup` metadata in MSBuild. When used in the context of a project configuration, an item macro applies to all files of a certain type. For example, the C/C++ **Preprocessor Definitions** configuration property can take a `%(PreprocessorDefinitions)` item macro that applies to all .cpp files in the project. This kind of item macro corresponds to an `ItemDefinitionGroup` metadata in MSBuild. For more information, see [Item Definitions](/visualstudio/msbuild/item-definitions). + Item macros have the syntax `%(name)`. For a file, an item macro applies only to that file. For example, you can use `%(AdditionalIncludeDirectories)` to specify include directories that apply only to a particular file. This kind of item macro corresponds to an `ItemGroup` metadata in MSBuild. When used in the context of a project configuration, an item macro applies to all files of a certain type. For example, the C/C++ **Preprocessor Definitions** configuration property can take a `%(PreprocessorDefinitions)` item macro that applies to all .cpp files in the project. This kind of item macro corresponds to an `ItemDefinitionGroup` metadata in MSBuild. For more information, see [Item definitions](/visualstudio/msbuild/item-definitions). ### User-defined macros -You can create *user-defined macros* to use as variables in project builds. For example, you could create a user-defined macro that provides a value to a custom build step or a custom build tool. A user-defined macro is a name/value pair. In a project file, use the `$(name)` notation to access the value. +You can create *user-defined macros* to use as variables in project builds. For example, you could create a user-defined macro that provides a value to a custom build step or a custom build tool. A user-defined macro is a name-value pair. In a project file, use the `$(name)` notation to access the value. A user-defined macro is stored in a property sheet. If your project doesn't already contain a property sheet, you can create one by following the steps under [Share or reuse Visual Studio project settings](create-reusable-property-configurations.md). #### To create a user-defined macro -1. Open the **Property Manager** window. (On the menu bar, choose **View** > **Property Manager** or **View** > **Other Windows** > **Property Manager**.) Open the shortcut menu for a property sheet (its name ends in *`.user`*) and then choose **Properties**. The **Property Pages** dialog box for that property sheet opens. +1. Open the **Property Manager** window. On the menu bar, select **View** > **Other Windows** > **Property Manager**. Open the shortcut menu for a property sheet (its name ends in *`.user`*) and then choose **Properties**. The **Property Pages** dialog box for that property sheet opens. 1. In the left pane of the dialog box, select **User Macros**. In the right pane, choose the **Add Macro** button to open the **Add User Macro** dialog box. @@ -99,20 +100,17 @@ The property editor for Include Directories is open. The evaluated value is disp ## Add an include directory to the set of default directories -When you add an include directory to a project, it's important not to override all the default directories. The correct way to add a directory is to append the new path, for example "`C:\MyNewIncludeDir\`", and then to Append the **`$(IncludePath)`** macro to the property value. +When you add an include directory to a project, it's important not to override all the default directories. The correct way to add a directory is to append the new path, for example `C:\MyNewIncludeDir\`, and then to append the `$(IncludePath)` macro to the property value. ## Quickly browse and search all properties The **All Options** property page (under the **Configuration Properties** > **C/C++** node in the **Property Pages** dialog box) provides a quick way to browse and search the properties that are available in the current context. It has a special search box and a simple syntax to help you filter results: -No prefix:\ -Search in property names only (case-insensitive substring). +- No prefix: Search in property names only (case-insensitive substring). -'`/`' or '`-`':\ -Search only in compiler switches (case-insensitive prefix) +- '`/`' or '`-`': Search only in compiler switches (case-insensitive prefix). -`v`:\ -Search only in values (case-insensitive substring). +- `v`: Search only in values (case-insensitive substring). ## Set environment variables for a build @@ -124,19 +122,14 @@ In the left pane of the project's **Property Pages** dialog box, expand **Config In the right pane, modify the **Environment** or **Merge Environment** project settings and then choose the **OK** button. -## In this section - -[Share or reuse Visual Studio project settings](create-reusable-property-configurations.md)\ -How to create a *`.props`* file with custom build settings that can be shared or reused. - -[Project property inheritance](project-property-inheritance.md)\ -Describes the order of evaluation for the *`.props`*, *`.targets`*, *`.vcxproj`* files, and environment variables in the build process. +## Articles in this section -[Modify properties and targets without changing the project file](modify-project-properties-without-changing-project-file.md)\ -How to create temporary build settings without having to modify a project file. +- [Share or reuse Visual Studio project settings](create-reusable-property-configurations.md) +- [Property inheritance in Visual Studio projects](project-property-inheritance.md) +- [Modify C++ project properties and targets without changing the project file](modify-project-properties-without-changing-project-file.md) ## See also -[Visual Studio Projects - C++](creating-and-managing-visual-cpp-projects.md)\ -[`.vcxproj` and `.props` file structure](reference/vcxproj-file-structure.md)\ -[Property page XML files](reference/property-page-xml-files.md) +- [Visual Studio projects - C++](creating-and-managing-visual-cpp-projects.md) +- [`.vcxproj` and `.props` file structure](reference/vcxproj-file-structure.md) +- [Property Page XML rule files](reference/property-page-xml-files.md) diff --git a/docs/build/x64-calling-convention.md b/docs/build/x64-calling-convention.md index 54418166c4..abb153a846 100644 --- a/docs/build/x64-calling-convention.md +++ b/docs/build/x64-calling-convention.md @@ -1,21 +1,22 @@ --- -title: "x64 calling convention" -description: "Learn about the details of the default x64 calling convention." -ms.date: 05/17/2022 +title: "x64 Calling Convention" +description: "Learn about the default x64 calling convention that one function uses to make calls into another function." +ms.date: 03/19/2025 +ms.topic: concept-article --- # x64 calling convention -This section describes the standard processes and conventions that one function (the caller) uses to make calls into another function (the callee) in x64 code. +This article describes the standard processes and conventions that one function (the caller) uses to make calls into another function (the callee) in x64 code. -For more information on the `__vectorcall` calling convention, see [__vectorcall](../cpp/vectorcall.md). +For more information about the `__vectorcall` calling convention, see [__vectorcall](../cpp/vectorcall.md). ## Calling convention defaults -The x64 Application Binary Interface (ABI) uses a four-register fast-call calling convention by default. Space is allocated on the call stack as a shadow store for callees to save those registers. +The x64 Application Binary Interface (ABI) uses a four-register, fast-call calling convention by default. Space is allocated on the call stack as a shadow store for callees to save those registers. There's a strict one-to-one correspondence between a function call's arguments and the registers used for those arguments. Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers. -The x87 register stack is unused. It may be used by the callee, but consider it volatile across function calls. All floating point operations are done using the 16 XMM registers. +The x87 register stack is unused. It might be used by the callee, but consider it volatile across function calls. All floating point operations are done using the 16 XMM registers. Integer arguments are passed in registers RCX, RDX, R8, and R9. Floating point arguments are passed in XMM0L, XMM1L, XMM2L, and XMM3L. 16-byte arguments are passed by reference. Parameter passing is described in detail in [Parameter passing](#parameter-passing). These registers, and RAX, R10, R11, XMM4, and XMM5, are considered *volatile*, or potentially changed by a callee on return. Register usage is documented in detail in [x64 register usage](x64-software-conventions.md#x64-register-usage) and [Caller/callee saved registers](#callercallee-saved-registers). @@ -27,13 +28,13 @@ Most structures are aligned to their natural alignment. The primary exceptions a ## Unwindability -Leaf functions are functions that don't change any non-volatile registers. A non-leaf function may change non-volatile RSP, for example, by calling a function. Or, it could change RSP by allocating additional stack space for local variables. To recover non-volatile registers when an exception is handled, non-leaf functions are annotated with static data. The data describes how to properly unwind the function at an arbitrary instruction. This data is stored as *pdata*, or procedure data, which in turn refers to *xdata*, the exception handling data. The xdata contains the unwinding information, and can point to additional pdata or an exception handler function. +Leaf functions are functions that don't change any nonvolatile registers. A nonleaf function might change nonvolatile RSP, for example, by calling a function. Or, it could change RSP by allocating more stack space for local variables. To recover nonvolatile registers when an exception is handled, nonleaf functions are annotated with static data. The data describes how to properly unwind the function at an arbitrary instruction. This data is stored as *pdata*, or procedure data, which in turn refers to *xdata*, the exception handling data. The xdata contains the unwinding information, and can point to additional pdata or an exception handler function. Prologs and epilogs are highly restricted so that they can be properly described in xdata. The stack pointer must remain 16-byte aligned in any region of code that isn't part of an epilog or prolog, except within leaf functions. Leaf functions can be unwound simply by simulating a return, so pdata and xdata aren't required. For details about the proper structure of function prologs and epilogs, see [x64 prolog and epilog](../build/prolog-and-epilog.md). For more information about exception handling, and the exception handling and unwinding of pdata and xdata, see [x64 exception handling](../build/exception-handling-x64.md). ## Parameter passing -By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order. +By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order. All arguments passed on the stack are 8-byte aligned. Integer valued arguments in the leftmost four positions are passed in left-to-right order in RCX, RDX, R8, and R9, respectively. The fifth and higher arguments are passed on the stack as previously described. All integer arguments in registers are right-justified, so the callee can ignore the upper bits of the register and access only the portion of the register necessary. @@ -101,9 +102,9 @@ func2() { // RCX = 2, RDX = XMM1 = 1.0, and R8 = 7 ## Return values -A scalar return value that can fit into 64 bits, including the **`__m64`** type, is returned through RAX. Non-scalar types including floats, doubles, and vector types such as [`__m128`](../cpp/m128.md), [`__m128i`](../cpp/m128i.md), [`__m128d`](../cpp/m128d.md) are returned in XMM0. The state of unused bits in the value returned in RAX or XMM0 is undefined. +A scalar return value that can fit into 64 bits, including the `__m64` type, is returned through RAX. Nonscalar types including floats, doubles, and vector types such as [`__m128`](../cpp/m128.md), [`__m128i`](../cpp/m128i.md), [`__m128d`](../cpp/m128d.md) are returned in XMM0. The state of unused bits in the value returned in RAX or XMM0 is undefined. -User-defined types can be returned by value from global functions and static member functions. To return a user-defined type by value in RAX, it must have a length of 1, 2, 4, 8, 16, 32, or 64 bits. It must also have no user-defined constructor, destructor, or copy assignment operator. It can have no private or protected non-static data members, and no non-static data members of reference type. It can't have base classes or virtual functions. And, it can only have data members that also meet these requirements. (This definition is essentially the same as a C++03 POD type. Because the definition has changed in the C++11 standard, we don't recommend using `std::is_pod` for this test.) Otherwise, the caller must allocate memory for the return value and pass a pointer to it as the first argument. The remaining arguments are then shifted one argument to the right. The same pointer must be returned by the callee in RAX. +User-defined types can be returned by value from global functions and static member functions. To return a user-defined type by value in RAX, it must have a length of 1, 2, 4, 8, 16, 32, or 64 bits. It must also have no user-defined constructor, destructor, or copy assignment operator. It can have no private or protected nonstatic data members, and no nonstatic data members of reference type. It can't have base classes or virtual functions. And, it can only have data members that also meet these requirements. This definition is essentially the same as a C++03 POD type. Because the definition has changed in the C++11 standard, we don't recommend using `std::is_pod` for this test. Otherwise, the caller must allocate memory for the return value and pass a pointer to it as the first argument. The remaining arguments are then shifted one argument to the right. The same pointer must be returned by the callee in RAX. These examples show how parameters and return values are passed for functions with the specified declarations: @@ -168,7 +169,7 @@ The x87 FPU control word register gets set using the following standard values a | Register\[bits] | Setting | |-|-| -| FPCSR\[0:6] | Exception masks all 1's (all exceptions masked) | +| FPCSR\[0:6] | Exception masks all 1s (all exceptions masked) | | FPCSR\[7] | Reserved - 0 | | FPCSR\[8:9] | Precision Control - 10B (double precision) | | FPCSR\[10:11] | Rounding control - 0 (round to nearest) | @@ -176,7 +177,7 @@ The x87 FPU control word register gets set using the following standard values a A callee that modifies any of the fields within FPCSR must restore them before returning to its caller. Furthermore, a caller that has modified any of these fields must restore them to their standard values before invoking a callee, unless by agreement the callee expects the modified values. -There are two exceptions to the rules about the non-volatility of the control flags: +There are two exceptions to the rules about the nonvolatility of the control flags: - In functions where the documented purpose of the given function is to modify the nonvolatile FPCSR flags. @@ -191,13 +192,13 @@ The nonvolatile portion is set to the following standard values at the start of | Register\[bits] | Setting | |-|-| | MXCSR\[6] | Denormals are zeros - 0 | -| MXCSR\[7:12] | Exception masks all 1's (all exceptions masked) | +| MXCSR\[7:12] | Exception masks all 1s (all exceptions masked) | | MXCSR\[13:14] | Rounding control - 0 (round to nearest) | | MXCSR\[15] | Flush to zero for masked underflow - 0 (off) | A callee that modifies any of the nonvolatile fields within MXCSR must restore them before returning to its caller. Furthermore, a caller that has modified any of these fields must restore them to their standard values before invoking a callee, unless by agreement the callee expects the modified values. -There are two exceptions to the rules about the non-volatility of the control flags: +There are two exceptions to the rules about the nonvolatility of the control flags: - In functions where the documented purpose of the given function is to modify the nonvolatile MXCSR flags. @@ -207,10 +208,10 @@ Make no assumptions about the MXCSR register's volatile portion state across a f ## setjmp/longjmp -When you include setjmpex.h or setjmp.h, all calls to [`setjmp`](../c-runtime-library/reference/setjmp.md) or [`longjmp`](../c-runtime-library/reference/longjmp.md) result in an unwind that invokes destructors and **`__finally`** calls. This behavior differs from x86, where including setjmp.h results in **`__finally`** clauses and destructors not being invoked. +When you include `setjmpex.h` or `setjmp.h`, all calls to [`setjmp`](../c-runtime-library/reference/setjmp.md) or [`longjmp`](../c-runtime-library/reference/longjmp.md) result in an unwind that invokes destructors and `__finally` calls. This behavior differs from x86, where including `setjmp.h` results in `__finally` clauses and destructors not being invoked. -A call to `setjmp` preserves the current stack pointer, non-volatile registers, and MXCSR registers. Calls to `longjmp` return to the most recent `setjmp` call site and resets the stack pointer, non-volatile registers, and MXCSR registers, back to the state as preserved by the most recent `setjmp` call. +A call to `setjmp` preserves the current stack pointer, nonvolatile registers, and MXCSR registers. Calls to `longjmp` return to the most recent `setjmp` call site and resets the stack pointer, nonvolatile registers, and MXCSR registers, back to the state as preserved by the most recent `setjmp` call. ## See also -[x64 software conventions](../build/x64-software-conventions.md) +- [Overview of x64 ABI conventions](../build/x64-software-conventions.md) diff --git a/docs/build/x64-software-conventions.md b/docs/build/x64-software-conventions.md index 256fbdb581..fe644a1aa5 100644 --- a/docs/build/x64-software-conventions.md +++ b/docs/build/x64-software-conventions.md @@ -1,7 +1,7 @@ --- description: "Learn more about: x64 ABI conventions" title: "x64 ABI conventions" -ms.date: 04/21/2022 +ms.date: 03/28/2025 helpviewer_keywords: ["x64 coding conventions", "x64 abi", "Visual C++, x64 calling conventions"] --- # Overview of x64 ABI conventions @@ -11,10 +11,11 @@ This topic describes the basic application binary interface (ABI) for x64, the 6 ## x64 calling conventions Two important differences between x86 and x64 are: + - 64-bit addressing capability - Sixteen 64-bit registers for general use. -Given the expanded register set, x64 uses the [__fastcall](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model. +Given the expanded register set, x64 uses the [`__fastcall`](../cpp/fastcall.md) calling convention and a RISC-based exception-handling model. The **`__fastcall`** convention uses registers for the first four arguments, and the stack frame to pass more arguments. For details on the x64 calling convention, including register usage, stack parameters, return values, and stack unwinding, see [x64 calling convention](x64-calling-convention.md). @@ -116,7 +117,7 @@ _declspec(align(2)) struct { } ``` -![Diagram showing the example 1 structure layout.](../build/media/vcamd_conv_ex_1_block.png "AMD conversion example 1 structure layout") +:::image type="content" source="../build/media/vcamd_conv_ex_1_block.png" alt-text="Diagram showing the structure layout for example 1. The diagram shows 2 bytes of memory. Member a, a short, occupies bytes 0 through 1."::: #### Example 2 @@ -130,7 +131,9 @@ _declspec(align(8)) struct { } ``` -![Diagram showing the example 2 structure layout.](../build/media/vcamd_conv_ex_2_block.png "AMD conversion example 2 structure layout") +:::image type="complex" source="../build/media/vcamd_conv_ex_2_block.png" alt-text="Diagram showing the structure layout for example 2."::: +The diagram shows 24 bytes of memory. Member a, an int, occupies bytes 0 through 3. The diagram shows padding for bytes 4 through 7. Member b, a double, occupies bytes 8 through 15. Member c, a short, occupies bytes 16 through 17. Bytes 18 through 23 are unused. +:::image-end::: #### Example 3 @@ -145,7 +148,9 @@ _declspec(align(4)) struct { } ``` -![Diagram showing the example 3 structure layout.](../build/media/vcamd_conv_ex_3_block.png "AMD conversion example 3 structure layout") +:::image type="complex" source="../build/media/vcamd_conv_ex_3_block.png" alt-text="Diagram showing the structure layout for example 3."::: +The diagram shows 12 bytes of memory. Member a, a char, occupies byte 0. Byte 1 is padding. Member b, a short, occupies bytes 2 through 4. Member c, a char, occupies byte 4. Bytes 5 through 7 are padding. Member d, an int, occupies bytes 8 through 11. +:::image-end::: #### Example 4 @@ -159,7 +164,9 @@ _declspec(align(8)) union { } ``` -![Diagram showing the example 4 union layout.](../build/media/vcamd_conv_ex_4_block.png "AMD conversion example 4 union layout") +:::image type="complex" source="../build/media/vcamd_conv_ex_4_block.png" alt-text="Diagram showing the union layout for example 4."::: +The diagram shows 8 bytes of memory. Member p, a char, occupies byte 0. Member s, a short, occupies bytes 0 through 1. Member l, a long, occupies bytes 0 through 3. Bytes 4 through 7 are padding. +:::image-end::: ### Bitfields @@ -211,7 +218,7 @@ On function exit and on function entry to C Runtime Library calls and Windows sy ## Stack usage -For details on stack allocation, alignment, function types and stack frames on x64, see [x64 stack usage](stack-usage.md). +For details on stack allocation, alignment, function types, and stack frames on x64, see [x64 stack usage](stack-usage.md). ## Prolog and epilog diff --git a/docs/c-language/c-enumeration-declarations.md b/docs/c-language/c-enumeration-declarations.md index 77dc5ee661..08d1312b46 100644 --- a/docs/c-language/c-enumeration-declarations.md +++ b/docs/c-language/c-enumeration-declarations.md @@ -133,4 +133,4 @@ enum { yes, no } response; ## See also -[Enumerations](../cpp/enumerations-cpp.md) +[Enumerations(C++)](../cpp/enumerations-cpp.md) diff --git a/docs/c-language/c-primary-expressions.md b/docs/c-language/c-primary-expressions.md index 1b57eecbf0..b2939192a2 100644 --- a/docs/c-language/c-primary-expressions.md +++ b/docs/c-language/c-primary-expressions.md @@ -23,5 +23,5 @@ Primary expressions are the building blocks of more complex expressions. They ma ## See also -[Generic selection](generic-selection.md) +[Generic selection](generic-selection.md)\ [Operands and Expressions](../c-language/operands-and-expressions.md) diff --git a/docs/c-language/demotion-of-integers.md b/docs/c-language/demotion-of-integers.md index f64f4104f9..5cc14b1695 100644 --- a/docs/c-language/demotion-of-integers.md +++ b/docs/c-language/demotion-of-integers.md @@ -25,7 +25,7 @@ char y = (char)0x1234; assigns the value 0x34 to `y`. -When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFE) to an **`unsigned`** value yields 254 (also 0xFE). +When **`signed`** variables are converted to **`unsigned`** and vice-versa, the bit patterns remain the same. For example, casting -2 (0xFFFFFFFE) to an **`unsigned int`** value yields 4294967294 (also 0xFFFFFFFE). ## See also diff --git a/docs/c-language/extern-storage-class-specifier.md b/docs/c-language/extern-storage-class-specifier.md index cfcf2a0c38..fc53268609 100644 --- a/docs/c-language/extern-storage-class-specifier.md +++ b/docs/c-language/extern-storage-class-specifier.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: extern Storage-Class Specifier" title: "extern Storage-Class Specifier" +description: "Learn more about: extern Storage-Class Specifier" ms.date: "07/10/2018" helpviewer_keywords: ["extern keyword [C]", "storage class specifiers, extern", "extern keyword [C], storage class specifier", "external linkage, storage-class specifiers", "external linkage, extern modifier"] -ms.assetid: 6e16d927-291f-49e4-986c-9d91a482a441 --- # extern Storage-Class Specifier @@ -14,12 +13,11 @@ A variable declared with the **`extern`** storage-class specifier is a reference This example illustrates internal- and external-level declarations: ```c - // Source1.c int i = 1; -// Source2. c +// Source2.c #include diff --git a/docs/c-language/index.yml b/docs/c-language/index.yml index feb5f6855e..3f038a096b 100644 --- a/docs/c-language/index.yml +++ b/docs/c-language/index.yml @@ -5,6 +5,7 @@ summary: Learn to use C and the C runtime library. metadata: title: C docs - get started, tutorials, reference. description: C programming reference for users of Microsoft C/C++ and Visual Studio. + ms.author: twhitney ms.topic: landing-page ms.date: 05/28/2020 ms.custom: intro-landing-hub diff --git a/docs/c-language/static-assert-c.md b/docs/c-language/static-assert-c.md index dc8ab22981..0890f6594b 100644 --- a/docs/c-language/static-assert-c.md +++ b/docs/c-language/static-assert-c.md @@ -78,5 +78,5 @@ Windows SDK 10.0.20348.0 (version 2104) or later. For more information on instal ## See also [`_STATIC_ASSERT` Macro](../c-runtime-library/reference/static-assert-macro.md)\ -[`assert` macro and `_assert` and `_wassert` functions](../c-runtime-library/reference/assert-macro-assert-wassert.md) +[`assert` macro and `_assert` and `_wassert` functions](../c-runtime-library/reference/assert-macro-assert-wassert.md)\ [`/std` (Specify language standard version)](../build/reference/std-specify-language-standard-version.md) diff --git a/docs/c-runtime-library/buffer-manipulation.md b/docs/c-runtime-library/buffer-manipulation.md index 21c4336737..7fce41ba6c 100644 --- a/docs/c-runtime-library/buffer-manipulation.md +++ b/docs/c-runtime-library/buffer-manipulation.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Buffer manipulation" title: "Buffer manipulation" -ms.date: "04/04/2018" +description: "Learn more about: Buffer manipulation" +ms.date: 04/04/2018 helpviewer_keywords: ["buffers, manipulation routines", "buffers"] -ms.assetid: 164f4860-ce66-412c-8291-396fbd70f03e --- # Buffer manipulation @@ -13,17 +12,17 @@ Use these routines to work with areas of memory on a byte-by-byte basis. | Routine | Use | |---|---| -| [`_memccpy`](./reference/memccpy.md) | Copy characters from one buffer to another until given character or given number of characters has been copied | -| [`memchr`, `wmemchr`](./reference/memchr-wmemchr.md) | Return pointer to first occurrence, within specified number of characters, of given character in buffer | -| [`memcmp`, `wmemcmp`](./reference/memcmp-wmemcmp.md) | Compare specified number of characters from two buffers | -| [`memcpy`, `wmemcpy`](./reference/memcpy-wmemcpy.md), [`memcpy_s`, `wmemcpy_s`](./reference/memcpy-s-wmemcpy-s.md) | Copy specified number of characters from one buffer to another | -| [`_memicmp`, `_memicmp_l`](./reference/memicmp-memicmp-l.md) | Compare specified number of characters from two buffers without regard to case | -| [`memmove`, `wmemmove`](./reference/memmove-wmemmove.md),[`memmove_s`, `wmemmove_s`](./reference/memmove-s-wmemmove-s.md) | Copy specified number of characters from one buffer to another | -| [`memset`, `wmemset`](./reference/memset-wmemset.md) | Use given character to initialize specified number of bytes in the buffer | -| [`_swab`](./reference/swab.md) | Swap bytes of data and store them at specified location | +| [`_memccpy`](reference/memccpy.md) | Copy characters from one buffer to another until given character or given number of characters has been copied | +| [`memchr`, `wmemchr`](reference/memchr-wmemchr.md) | Return pointer to first occurrence, within specified number of characters, of given character in buffer | +| [`memcmp`, `wmemcmp`](reference/memcmp-wmemcmp.md) | Compare specified number of characters from two buffers | +| [`memcpy`, `wmemcpy`](reference/memcpy-wmemcpy.md), [`memcpy_s`, `wmemcpy_s`](reference/memcpy-s-wmemcpy-s.md) | Copy specified number of characters from one buffer to another | +| [`_memicmp`, `_memicmp_l`](reference/memicmp-memicmp-l.md) | Compare specified number of characters from two buffers without regard to case | +| [`memmove`, `wmemmove`](reference/memmove-wmemmove.md), [`memmove_s`, `wmemmove_s`](reference/memmove-s-wmemmove-s.md) | Copy specified number of characters from one buffer to another | +| [`memset`, `wmemset`](reference/memset-wmemset.md) | Use given character to initialize specified number of bytes in the buffer | +| [`_swab`](reference/swab.md) | Swap bytes of data and store them at specified location | When the source and target areas overlap, only `memmove` is guaranteed to copy the full source properly. ## See also -[Universal C runtime routines by category](./run-time-routines-by-category.md) +[Universal C runtime routines by category](run-time-routines-by-category.md) diff --git a/docs/c-runtime-library/crt-debug-heap-details.md b/docs/c-runtime-library/crt-debug-heap-details.md index ffef146716..5a0d180c7d 100644 --- a/docs/c-runtime-library/crt-debug-heap-details.md +++ b/docs/c-runtime-library/crt-debug-heap-details.md @@ -102,14 +102,11 @@ typedef struct _CrtMemBlockHeader The `no_mans_land` buffers on either side of the user data area of the block are currently 4 bytes in size, and are filled with a known byte value used by the debug heap routines to verify that the limits of the user's memory block haven't been overwritten. The debug heap also fills new memory blocks with a known value. If you elect to keep freed blocks in the heap's linked list, these freed blocks are also filled with a known value. Currently, the actual byte values used are as follows: -`no_mans_land` (0xFD)\ -The "no_mans_land" buffers on either side of the memory used by an application are currently filled with 0xFD. - -Freed blocks (0xDD)\ -The freed blocks kept unused in the debug heap's linked list when the `_CRTDBG_DELAY_FREE_MEM_DF` flag is set are currently filled with 0xDD. - -New objects (0xCD)\ -New objects are filled with 0xCD when they're allocated. +|Code |Description | +|---------|---------| +|`no_mans_land` (0xFD) | The "no_mans_land" buffers on either side of the memory used by an application are currently filled with 0xFD. | +|Freed blocks (0xDD) | The freed blocks kept unused in the debug heap's linked list when the `_CRTDBG_DELAY_FREE_MEM_DF` flag is set are currently filled with 0xDD. | +|New objects (0xCD) | New objects are filled with 0xCD when they're allocated.| ## Types of blocks on the debug heap @@ -170,7 +167,7 @@ All calls to heap functions such as `malloc`, `free`, `calloc`, `realloc`, `new` ### To use the debug heap -- Link the debug build of your application with a debug version of the C runtime library. +Link the debug build of your application with a debug version of the C runtime library. ### To change one or more `_crtDbgFlag` bit fields and create a new state for the flag @@ -275,9 +272,9 @@ Knowing the source file name and line number of an assert or reporting macro is ### Unique allocation request numbers and `_crtBreakAlloc` -There's a simple way to identify the specific heap allocation call that went bad. It takes advantage of the unique allocation request number associated with each block in the debug heap. When information about a block is reported by one of the dump functions, this allocation request number is enclosed in braces (for example, "{36}"). +There's a simple way to identify the specific heap allocation call that went bad. It takes advantage of the unique allocation request number associated with each block in the debug heap. When information about a block is reported by one of the dump functions, this allocation request number is enclosed in braces. For example, `{36}`. -Once you know the allocation request number of an improperly allocated block, you can pass this number to [`_CrtSetBreakAlloc`](./reference/crtsetbreakalloc.md) to create a breakpoint. Execution will break just before allocating the block, and you can backtrack to determine what routine was responsible for the bad call. To avoid recompiling, you can accomplish the same thing in the debugger by setting `_crtBreakAlloc` to the allocation request number you're interested in. +Once you know the allocation request number of an improperly allocated block, you can pass this number to [`_CrtSetBreakAlloc`](./reference/crtsetbreakalloc.md) to create a breakpoint. Execution will break just before allocating the block and you can backtrack to determine what routine was responsible for the bad call. To avoid recompiling, you can accomplish the same thing in the debugger by setting `_crtBreakAlloc` to the allocation request number you're interested in. ### Creating debug versions of your allocation routines diff --git a/docs/c-runtime-library/crt-debugging-techniques.md b/docs/c-runtime-library/crt-debugging-techniques.md index a2379c0484..39d625f0e1 100644 --- a/docs/c-runtime-library/crt-debugging-techniques.md +++ b/docs/c-runtime-library/crt-debugging-techniques.md @@ -169,5 +169,5 @@ If the hook handles the message in question completely, so that no further repor ## See also -- [Debugging Native Code](/visualstudio/debugger/debugging-native-code.md) -- [Debugger Security](/visualstudio/debugger/debugger-security.md) +- [Debugging Native Code](/visualstudio/debugger/debugging-native-code) +- [Debugger Security](/visualstudio/debugger/debugger-security) diff --git a/docs/c-runtime-library/data-alignment.md b/docs/c-runtime-library/data-alignment.md index e9c8d32d66..97b03773fb 100644 --- a/docs/c-runtime-library/data-alignment.md +++ b/docs/c-runtime-library/data-alignment.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Data Alignment" title: "Data Alignment" -ms.date: "11/04/2016" +description: "Learn more about: Data Alignment" +ms.date: 11/04/2016 f1_keywords: ["data.alignment"] helpviewer_keywords: ["data alignment [C++]"] -ms.assetid: 35ac3d2d-a4b3-421b-954f-b7372b1f18e1 --- # Data alignment @@ -14,7 +13,7 @@ The following C run-time functions support data alignment. | Routine | Use | |---|---| -| [`_aligned_free`](./reference/aligned-free.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md)or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md). | +| [`_aligned_free`](./reference/aligned-free.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md). | | [`_aligned_free_dbg`](./reference/aligned-free-dbg.md) | Frees a block of memory that was allocated with [`_aligned_malloc`](./reference/aligned-malloc.md) or [`_aligned_offset_malloc`](./reference/aligned-offset-malloc.md) (debug only). | | [`_aligned_malloc`](./reference/aligned-malloc.md) | Allocates memory on a specified alignment boundary. | | [`_aligned_malloc_dbg`](./reference/aligned-malloc-dbg.md) | Allocates memory on a specified alignment boundary with extra space for a debugging header and overwrite buffers (debug version only). | diff --git a/docs/c-runtime-library/file-handling.md b/docs/c-runtime-library/file-handling.md index 9ff1cf7924..661f7a0fb3 100644 --- a/docs/c-runtime-library/file-handling.md +++ b/docs/c-runtime-library/file-handling.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: File Handling" title: "File Handling" -ms.date: "11/04/2016" +description: "Learn more about: File Handling" +ms.date: 11/04/2016 f1_keywords: ["c.files"] helpviewer_keywords: ["files [C++], handling", "files [C++], opening", "files [C++], manipulating"] -ms.assetid: 48119e2e-e94f-4602-b08b-b72440f731d8 --- # File handling Use these routines to create, delete, and manipulate files and to set and check file-access permissions. -The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [`_setmaxstdio`](./reference/setmaxstdio.md) to change this number. +The C run-time libraries have a 512 limit for the number of files that can be open at any one time. Attempting to open more than the maximum number of file descriptors or file streams causes program failure. Use [`_setmaxstdio`](reference/setmaxstdio.md) to change this number. ## File-handling routines (file descriptor) @@ -18,14 +17,14 @@ These routines operate on files designated by a file descriptor. | Routine | Use | |---|---| -| [`_chsize`](./reference/chsize.md),[`_chsize_s`](./reference/chsize-s.md) | Change file size | -| [`_filelength`, `_filelengthi64`](./reference/filelength-filelengthi64.md) | Get file length | -| [`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](./reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) | Get file-status information on descriptor | -| [`_get_osfhandle`](./reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor | -| [`_isatty`](./reference/isatty.md) | Check for character device | -| [`_locking`](./reference/locking.md) | Lock areas of file | -| [`_open_osfhandle`](./reference/open-osfhandle.md) | Associate C run-time file descriptor with existing operating-system file handle | -| [`_setmode`](./reference/setmode.md) | Set file-translation mode | +| [`_chsize`](reference/chsize.md), [`_chsize_s`](reference/chsize-s.md) | Change file size | +| [`_filelength`, `_filelengthi64`](reference/filelength-filelengthi64.md) | Get file length | +| [`_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`](reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md) | Get file-status information on descriptor | +| [`_get_osfhandle`](reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor | +| [`_isatty`](reference/isatty.md) | Check for character device | +| [`_locking`](reference/locking.md) | Lock areas of file | +| [`_open_osfhandle`](reference/open-osfhandle.md) | Associate C run-time file descriptor with existing operating-system file handle | +| [`_setmode`](reference/setmode.md) | Set file-translation mode | ## File-Handling Routines (Path or Filename) @@ -33,17 +32,17 @@ These routines operate on files specified by a path or filename. | Routine | Use | |---|---| -| [`_access`, `_waccess`](./reference/access-waccess.md), [`_access_s`, `_waccess_s`](./reference/access-s-waccess-s.md) | Check file-permission setting | -| [`_chmod`, `_wchmod`](./reference/chmod-wchmod.md) | Change file-permission setting | -| [`_fullpath`, `_wfullpath`](./reference/fullpath-wfullpath.md) | Expand a relative path to its absolute path name | -| [`_makepath`, `_wmakepath`](./reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](./reference/makepath-s-wmakepath-s.md) | Merge path components into single, full path | -| [`_mktemp`, `_wmktemp`](./reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](./reference/mktemp-s-wmktemp-s.md) | Create unique filename | -| [`remove`, `_wremove`](./reference/remove-wremove.md) | Delete file | -| [`rename`, `_wrename`](./reference/rename-wrename.md) | Rename file | -| [`_splitpath`, `_wsplitpath`](./reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](./reference/splitpath-s-wsplitpath-s.md) | Parse path into components | -| [`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](./reference/stat-functions.md) | Get file-status information on named file | -| [`_umask`](./reference/umask.md), [`_umask_s`](./reference/umask-s.md) | Set default permission mask for new files created by program | -| [`_unlink`, `_wunlink`](./reference/unlink-wunlink.md) | Delete file | +| [`_access`, `_waccess`](reference/access-waccess.md), [`_access_s`, `_waccess_s`](reference/access-s-waccess-s.md) | Check file-permission setting | +| [`_chmod`, `_wchmod`](reference/chmod-wchmod.md) | Change file-permission setting | +| [`_fullpath`, `_wfullpath`](reference/fullpath-wfullpath.md) | Expand a relative path to its absolute path name | +| [`_makepath`, `_wmakepath`](reference/makepath-wmakepath.md), [`_makepath_s`, `_wmakepath_s`](reference/makepath-s-wmakepath-s.md) | Merge path components into single, full path | +| [`_mktemp`, `_wmktemp`](reference/mktemp-wmktemp.md), [`_mktemp_s`, `_wmktemp_s`](reference/mktemp-s-wmktemp-s.md) | Create unique filename | +| [`remove`, `_wremove`](reference/remove-wremove.md) | Delete file | +| [`rename`, `_wrename`](reference/rename-wrename.md) | Rename file | +| [`_splitpath`, `_wsplitpath`](reference/splitpath-wsplitpath.md), [`_splitpath_s`, `_wsplitpath_s`](reference/splitpath-s-wsplitpath-s.md) | Parse path into components | +| [`_stat`, `_stat64`, `_stati64`, `_wstat`, `_wstat64`, `_wstati64`](reference/stat-functions.md) | Get file-status information on named file | +| [`_umask`](reference/umask.md), [`_umask_s`](reference/umask-s.md) | Set default permission mask for new files created by program | +| [`_unlink`, `_wunlink`](reference/unlink-wunlink.md) | Delete file | ## File-Handling Routines (Open File) @@ -51,32 +50,30 @@ These routines open files. | Routine | Use | |---|---| -| [`fopen`, `_wfopen`](./reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md) | Opens a file and returns a pointer to the open file. | -| [`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md) | Open a stream with file sharing and returns a pointer to the open file. | -| [`_open`, `_wopen`](./reference/open-wopen.md) | Opens a file and returns a file descriptor to the opened file. | -| [`_sopen`, `_wsopen`](./reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](./reference/sopen-s-wsopen-s.md) | Open a file with file sharing and returns a file descriptor to the open file. | -| [`_pipe`](./reference/pipe.md) | Creates a pipe for reading and writing. | -| [`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md) | Reassign a file pointer. | +| [`fopen`, `_wfopen`](reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md) | Opens a file and returns a pointer to the open file. | +| [`_fsopen`, `_wfsopen`](reference/fsopen-wfsopen.md) | Open a stream with file sharing and returns a pointer to the open file. | +| [`_open`, `_wopen`](reference/open-wopen.md) | Opens a file and returns a file descriptor to the opened file. | +| [`_sopen`, `_wsopen`](reference/sopen-wsopen.md), [`_sopen_s`, `_wsopen_s`](reference/sopen-s-wsopen-s.md) | Open a file with file sharing and returns a file descriptor to the open file. | +| [`_pipe`](reference/pipe.md) | Creates a pipe for reading and writing. | +| [`freopen`, `_wfreopen`](reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](reference/freopen-s-wfreopen-s.md) | Reassign a file pointer. | These routines provide a way to change the representation of the file between a `FILE` structure, a file descriptor, and a Win32 file handle. | Routine | Use | |---|---| -| [`_fdopen`, `_wfdopen`](./reference/fdopen-wfdopen.md) | Associates a stream with a file that was previously opened for low-level I/O and returns a pointer to the open stream. | -| [`_fileno`](./reference/fileno.md) | Gets the file descriptor associated with a stream. | -| [`_get_osfhandle`](./reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor | -| [`_open_osfhandle`](./reference/open-osfhandle.md) | Associates C run-time file descriptor with an existing operating-system file handle. | +| [`_fdopen`, `_wfdopen`](reference/fdopen-wfdopen.md) | Associates a stream with a file that was previously opened for low-level I/O and returns a pointer to the open stream. | +| [`_fileno`](reference/fileno.md) | Gets the file descriptor associated with a stream. | +| [`_get_osfhandle`](reference/get-osfhandle.md) | Return operating-system file handle associated with existing C run-time file descriptor | +| [`_open_osfhandle`](reference/open-osfhandle.md) | Associates C run-time file descriptor with an existing operating-system file handle. | The following Win32 functions also open files and pipes: - [`CreateFile`](/windows/win32/api/fileapi/nf-fileapi-createfilew) - - [`CreatePipe`](/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe) - - [`CreateNamedPipe`](/windows/win32/api/winbase/nf-winbase-createnamedpipea) ## See also -[Universal C runtime routines by category](./run-time-routines-by-category.md)\ -[Directory control](./directory-control.md)\ -[System calls](./system-calls.md) +[Universal C runtime routines by category](run-time-routines-by-category.md)\ +[Directory control](directory-control.md)\ +[System calls](system-calls.md) diff --git a/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md b/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md index dea101aead..1e78d27ce5 100644 --- a/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md +++ b/docs/c-runtime-library/find-memory-leaks-using-the-crt-library.md @@ -2,7 +2,7 @@ title: Find memory leaks with the CRT library description: Learn how the C/C++ debugger and C Run-time Library (CRT) can help find memory leaks. The techniques include memory-leak reports and comparing memory snapshots. ms.date: 02/03/2023 -helpviewer_keywords: +helpviewer_keywords: - breakpoints, on memory allocation - _CrtMemState - _CrtMemCheckpoint @@ -165,7 +165,7 @@ struct Pod { int x; }; -void main() { +int main() { Pod* pPod = DBG_NEW Pod; pPod = DBG_NEW Pod; // Oops, leaked the original pPod! delete pPod; @@ -216,7 +216,7 @@ You can use the allocation number to set a breakpoint on the memory allocation. After you set a breakpoint on a memory-allocation number, continue to debug. Make sure to run under the same conditions, so the memory-allocation number doesn't change. When your program breaks at the specified memory allocation, use the **Call Stack** window and other debugger windows to determine the conditions under which the memory was allocated. Then, you can continue execution to observe what happens to the object and determine why it isn't correctly deallocated. -Setting a data breakpoint on the object might also be helpful. For more information, see [Using breakpoints](/visualstudio/debugger/using-breakpoints.md). +Setting a data breakpoint on the object might also be helpful. For more information, see [Using breakpoints](/visualstudio/debugger/using-breakpoints). You can also set memory-allocation breakpoints in code. You can set: @@ -241,7 +241,7 @@ _CrtMemCheckpoint( &s1 ); The `_CrtMemCheckpoint` function fills in the structure with a snapshot of the current memory state. -To output the contents of a `_CrtMemState` structure, pass the structure to the `_ CrtMemDumpStatistics` function: +To output the contents of a `_CrtMemState` structure, pass the structure to the `_CrtMemDumpStatistics` function: ```cpp _CrtMemDumpStatistics( &s1 ); @@ -281,5 +281,5 @@ One technique for finding memory leaks begins by placing `_CrtMemCheckpoint` cal ## See also - [CRT debug heap details](./crt-debug-heap-details.md) -- [Debugger security](/visualstudio/debugger/debugger-security.md) -- [Debugging native code](/visualstudio/debugger/debugging-native-code.md) +- [Debugger security](/visualstudio/debugger/debugger-security) +- [Debugging native code](/visualstudio/debugger/debugging-native-code) diff --git a/docs/c-runtime-library/floating-point-support.md b/docs/c-runtime-library/floating-point-support.md index 69a51ce7ce..7f4ac7bc98 100644 --- a/docs/c-runtime-library/floating-point-support.md +++ b/docs/c-runtime-library/floating-point-support.md @@ -11,7 +11,9 @@ The Universal C Runtime library (UCRT) provides many integral and floating-point For ISO C Standard 11 (C11) and later, the `` header, in addition to including `` and ``, provides macros that invoke a corresponding math function based on the types of the parameters. See [Type-generic math](tgmath.md) for details. -Many of the floating point math library functions have different implementations for different CPU architectures. For example, the 32-bit x86 CRT may have a different implementation than the 64-bit x64 CRT. In addition, some of the functions may have multiple implementations for a given CPU architecture. The most efficient implementation is selected dynamically at run-time depending on the instruction sets supported by the CPU. For example, in the 32-bit x86 CRT, some functions have both an x87 implementation and an SSE2 implementation. When running on a CPU that supports SSE2, the faster SSE2 implementation is used. When running on a CPU that doesn't support SSE2, the slower x87 implementation is used. Because different implementations of the math library functions may use different CPU instructions and different algorithms to produce their results, the functions may produce different results across CPUs. In most cases, the results are within +/-1 ULP of the correctly rounded result, but the actual results may vary across CPUs. +Many of the floating-point math library functions have different implementations for different CPU architectures. For example, the 32-bit x86 CRT may have a different implementation than the 64-bit x64 CRT. In addition, some of the functions may have multiple implementations for a given CPU architecture. The most efficient implementation is selected dynamically at run-time depending on the instruction sets supported by the CPU. For example, in the 32-bit x86 CRT, some functions have both an x87 implementation and an SSE2 implementation. When running on a CPU that supports SSE2, the faster SSE2 implementation is used. When running on a CPU that doesn't support SSE2, the slower x87 implementation is used. Because different implementations of the math library functions may use different CPU instructions and different algorithms to produce their results, the functions may produce different results across CPUs. In most cases, the results are within +/-1 ULP of the correctly rounded result, but the actual results may vary across CPUs. + +Newer versions of the UCRT might improve the precision and accuracy of the floating-point math library functions. Since the UCRT is part of the Windows operating system, you might get different results for these functions on different operating system versions or between debug and release builds. Although it is not recommended, you can statically link to the UCRT to guarantee consistent results if you need these functions will produce identical results everywhere. Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the **`long double`** type as an 80-bit precision floating-point data type. In later versions of Visual C++, the **`long double`** data type is a 64-bit precision floating-point data type identical to the **`double`** type. The compiler treats **`long double`** and **`double`** as distinct types, but the **`long double`** functions are identical to their **`double`** counterparts. The CRT provides **`long double`** versions of the math functions for ISO C99 source code compatibility, but note that the binary representation may differ from other compilers. @@ -79,7 +81,7 @@ Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported t | [`imaxabs`](./reference/imaxabs.md) | Computes the absolute value of an integer type | | [`imaxdiv`](./reference/imaxdiv.md) | Computes the quotient and the remainder of two integer values | | [`isfinite`, `_finite`, `_finitef`](./reference/finite-finitef.md) | Determines whether a value is finite | -| [`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](./reference/floating-point-ordering.md) | Compare the order of two floating point values | +| [`isgreater`, `isgreaterequal`, `isless`, `islessequal`, `islessgreater`, `isunordered`](./reference/floating-point-ordering.md) | Compare the order of two floating-point values | | [`isinf`](./reference/isinf.md) | Determines whether a floating-point value is infinite | | [`isnan`, `_isnan`, `_isnanf`](./reference/isnan-isnan-isnanf.md) | Tests a floating-point value for NaN | | [`isnormal`](./reference/isnormal.md) | Tests whether a floating-point value is both finite and not subnormal | diff --git a/docs/c-runtime-library/heapset.md b/docs/c-runtime-library/heapset.md index 98b435fbb4..71dcd09725 100644 --- a/docs/c-runtime-library/heapset.md +++ b/docs/c-runtime-library/heapset.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _heapset" title: "_heapset" +description: "Learn more about: _heapset" ms.date: "11/04/2016" api_name: ["_heapset"] api_location: ["msvcr90.dll", "msvcr80.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcrt.dll", "msvcr120.dll", "msvcr100.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_heapset", "heapset"] helpviewer_keywords: ["checking heap", "heapset function", "heaps, checking", "debugging [CRT], heap-related problems", "_heapset function"] -ms.assetid: 9667eeb0-55bc-4c19-af5f-d1fd0a142b3c --- # `_heapset` @@ -47,7 +46,7 @@ In addition, if an error occurs, **`_heapset`** sets `errno` to `ENOSYS`. The **`_heapset`** function shows free memory locations or nodes that have been unintentionally overwritten. -**`_heapset`** checks for minimal consistency on the heap and then sets each byte of the heap's free entries to the `fill` value. This known value shows which memory locations of the heap contain free nodes and which contain data that were unintentionally written to freed memory. If the operating system doesn't support **`_heapset`**(for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`. +**`_heapset`** checks for minimal consistency on the heap and then sets each byte of the heap's free entries to the `fill` value. This known value shows which memory locations of the heap contain free nodes and which contain data that were unintentionally written to freed memory. If the operating system doesn't support **`_heapset`** (for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`. ## Requirements diff --git a/docs/c-runtime-library/is-isw-routines.md b/docs/c-runtime-library/is-isw-routines.md index ed95473112..749a96439b 100644 --- a/docs/c-runtime-library/is-isw-routines.md +++ b/docs/c-runtime-library/is-isw-routines.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: is, isw Routines" title: "is, isw Routines" +description: "Learn more about: is, isw Routines" ms.date: 01/11/2022 helpviewer_keywords: ["is routines", "isw routines"] --- @@ -15,7 +15,7 @@ helpviewer_keywords: ["is routines", "isw routines"] [`iscntrl`, `iswcntrl`, `_iscntrl_l`, `_iswcntrl_l`](./reference/iscntrl-iswcntrl-iscntrl-l-iswcntrl-l.md)\ [`iscsym`, `iscsymf`, `__iscsym`, `__iswcsym`, `__iscsymf`, `__iswcsymf`, `_iscsym_l`, `_iswcsym_l`, `_iscsymf_l`, `_iswcsymf_l`](./reference/iscsym-functions.md)\ [`_isctype`, `iswctype`, `_isctype_l`, `_iswctype_l`](./reference/isctype-iswctype-isctype-l-iswctype-l.md)\ - [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md) + [`isdigit`, `iswdigit`, `_isdigit_l`, `_iswdigit_l`](./reference/isdigit-iswdigit-isdigit-l-iswdigit-l.md)\ [`isgraph`, `iswgraph`, `_isgraph_l`, `_iswgraph_l`](./reference/isgraph-iswgraph-isgraph-l-iswgraph-l.md)\ [`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md)\ [`islower`, `iswlower`, `_islower_l`, `_iswlower_l`](./reference/islower-iswlower-islower-l-iswlower-l.md)\ diff --git a/docs/c-runtime-library/ismbc-routines.md b/docs/c-runtime-library/ismbc-routines.md index b941bbcf3c..7c7a33362c 100644 --- a/docs/c-runtime-library/ismbc-routines.md +++ b/docs/c-runtime-library/ismbc-routines.md @@ -1,41 +1,40 @@ --- -description: "Learn more about: _ismbc Routines" title: "_ismbc Routines" +description: "Learn more about: _ismbc Routines" ms.date: "11/04/2016" helpviewer_keywords: ["ismbc routines", "_ismbc routines"] -ms.assetid: b8995391-7857-4ac3-9a1e-de946eb4464d --- # `_ismbc` routines Each `_ismbc` routine tests a given multibyte character `c` for a particular condition. -- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md)\ -- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md)\ -- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md)\ -- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md)\ -- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md)\ -- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) +- [`_ismbcalnum`, `_ismbcalnum_l`, `_ismbcalpha`, `_ismbcalpha_l`, `_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md) +- [`_ismbcl0`, `_ismbcl0_l`, `_ismbcl1`, `_ismbcl1_l`, `_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) +- [`_ismbcgraph`, `_ismbcgraph_l`, `_ismbcprint`, `_ismbcprint_l`, `_ismbcpunct`, `_ismbcpunct_l`, `_ismbcblank`, `_ismbcblank_l`, `_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md) +- [`_ismbclegal`, `_ismbclegal_l`, `_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) +- [`_ismbchira`, `_ismbchira_l`, `_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) +- [`_ismbclower`, `_ismbclower_l`, `_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) ## Remarks -The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](./reference/getmbcp.md) or [`_setmbcp`](./reference/setmbcp.md), respectively. +The test result of each `_ismbc` routine depends on the multibyte code page in effect. Multibyte code pages have single-byte alphabetic characters. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. You can query or change the multibyte code page in use with [`_getmbcp`](reference/getmbcp.md) or [`_setmbcp`](reference/setmbcp.md), respectively. -The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](./reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead. +The output value is affected by the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](reference/setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead. | Routine | Test condition | Code page 932 example | |---|---|---| -| [`_ismbcalnum`, `_ismbcalnum_l`](./reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. | -| [`_ismbcalpha`, `_ismbcalpha_l`](./reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. | -| [`_ismbcdigit`, `_ismbcdigit_l`](./reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. | -| [`_ismbcgraph`, `_ismbcgraph_l`](./reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. | -| [`_ismbclegal`, `_ismbclegal_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. | -| [`_ismbclower`, `_ismbclower_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. | -| [`_ismbcprint`, `_ismbcprint_l`](./reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. | -| [`_ismbcpunct`, `_ismbcpunct_l`](./reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. | -| [`_ismbcblank`, `_ismbcblank_l`](./reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. | -| [`_ismbcspace`, `_ismbcspace_l`](./reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. | -| [`_ismbcsymbol`, `_ismbcsymbol_l`](./reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. | -| [`_ismbcupper`, `_ismbcupper_l`](./reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. | +| [`_ismbcalnum`, `_ismbcalnum_l`](reference/ismbcalnum-functions.md) | Alphanumeric | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcdigit` and `_ismbcalpha`. | +| [`_ismbcalpha`, `_ismbcalpha_l`](reference/ismbcalnum-functions.md) | Alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII English letter: See examples for `_ismbcupper` and `_ismbclower`; or a katakana letter: 0xA6<=`c`<=0xDF. | +| [`_ismbcdigit`, `_ismbcdigit_l`](reference/ismbcalnum-functions.md) | Digit | Returns nonzero if and only if `c` is a single-byte representation of an ASCII digit: 0x30<=`c`<=0x39. | +| [`_ismbcgraph`, `_ismbcgraph_l`](reference/ismbcgraph-functions.md) | Graphic | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character except a white space ( ). See examples for `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. | +| [`_ismbclegal`, `_ismbclegal_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Valid multibyte character | Returns nonzero if and only if the first byte of `c` is within ranges 0x81 - 0x9F or 0xE0 - 0xFC, while the second byte is within ranges 0x40 - 0x7E or 0x80 - FC. | +| [`_ismbclower`, `_ismbclower_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Lowercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII lowercase English letter: 0x61<=`c`<=0x7A. | +| [`_ismbcprint`, `_ismbcprint_l`](reference/ismbcgraph-functions.md) | Printable | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana printable character including a white space ( ): See examples for `_ismbcspace`, `_ismbcdigit`, `_ismbcalpha`, and `_ismbcpunct`. | +| [`_ismbcpunct`, `_ismbcpunct_l`](reference/ismbcgraph-functions.md) | Punctuation | Returns nonzero if and only if `c` is a single-byte representation of any ASCII or katakana punctuation character. | +| [`_ismbcblank`, `_ismbcblank_l`](reference/ismbcgraph-functions.md) | Space or horizontal tab | Returns nonzero if and only if `c` is a single-byte representation of a space character or a horizontal tab character: `c`=0x20 or `c`=0x09. | +| [`_ismbcspace`, `_ismbcspace_l`](reference/ismbcgraph-functions.md) | Whitespace | Returns nonzero if and only if `c` is a white space character: `c`=0x20 or 0x09<=`c`<=0x0D. | +| [`_ismbcsymbol`, `_ismbcsymbol_l`](reference/ismbclegal-ismbclegal-l-ismbcsymbol-ismbcsymbol-l.md) | Multibyte symbol | Returns nonzero if and only if 0x8141<=`c`<=0x81AC. | +| [`_ismbcupper`, `_ismbcupper_l`](reference/ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | Uppercase alphabetic | Returns nonzero if and only if `c` is a single-byte representation of an ASCII uppercase English letter: 0x41<=`c`<=0x5A. | **Code Page 932 Specific** @@ -43,18 +42,18 @@ The following routines are specific to code page 932. | Routine | Test condition (code page 932 only) | |---|---| -| [`_ismbchira`, `_ismbchira_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. | -| [`_ismbckata`, `_ismbckata_l`](./reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. | -| [`_ismbcl0`, `_ismbcl0_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. | -| [`_ismbcl1`, `_ismbcl1_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. | -| [`_ismbcl2`, `_ismbcl2_l`](./reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. | +| [`_ismbchira`, `_ismbchira_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte Hiragana: 0x829F<=`c`<=0x82F1. | +| [`_ismbckata`, `_ismbckata_l`](reference/ismbchira-ismbchira-l-ismbckata-ismbckata-l.md) | Double-byte katakana: 0x8340<=`c`<=0x8396. | +| [`_ismbcl0`, `_ismbcl0_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS non-Kanji: 0x8140<=`c`<=0x889E. | +| [`_ismbcl1`, `_ismbcl1_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-1: 0x889F<=`c`<=0x9872. | +| [`_ismbcl2`, `_ismbcl2_l`](reference/ismbcl0-ismbcl0-l-ismbcl1-ismbcl1-l-ismbcl2-ismbcl2-l.md) | JIS level-2: 0x989F<=`c`<=0xEA9E. | -`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](./reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. +`_ismbcl0`, `_ismbcl1`, and `_ismbcl2` check that the specified value `c` matches the test conditions described in the preceding table, but don't check that `c` is a valid multibyte character. If the lower byte is in the ranges 0x00 - 0x3F, 0x7F, or 0xFD - 0xFF, these functions return a nonzero value, indicating that the character satisfies the test condition. Use [`_ismbbtrail`, `_ismbbtrail_l`](reference/ismbbtrail-ismbbtrail-l.md) to test whether the multibyte character is defined. **END Code Page 932 Specific** ## See also -[Character classification](./character-classification.md)\ -[`is`, `isw` routines](./is-isw-routines.md)\ -[`_ismbb` routines](./ismbb-routines.md) +[Character classification](character-classification.md)\ +[`is`, `isw` routines](is-isw-routines.md)\ +[`_ismbb` routines](ismbb-routines.md) diff --git a/docs/c-runtime-library/language-strings.md b/docs/c-runtime-library/language-strings.md index c68c721c29..99b9af3a15 100644 --- a/docs/c-runtime-library/language-strings.md +++ b/docs/c-runtime-library/language-strings.md @@ -6,7 +6,7 @@ helpviewer_keywords: ["language strings"] --- # Language strings -The [`setlocale`](./reference/setlocale-wsetlocale.md) and [`_create_locale`](./reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample). +The [`setlocale`](reference/setlocale-wsetlocale.md) and [`_create_locale`](reference/create-locale-wcreate-locale.md) functions can use the Windows NLS API supported languages on operating systems that don't use the Unicode code page. For a list of supported languages by operating system version, see [Appendix A: Product Behavior](/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c) in \[MS-LCID]: Windows Language Code Identifier (LCID) Reference. The language string can be any of the values in the **Language** and **Language tag** columns of the list of supported languages. For example code that enumerates available locale names and related values, see [NLS: Name-based APIs Sample](/windows/win32/intl/nls--name-based-apis-sample). ## Supported language strings @@ -82,7 +82,7 @@ The Microsoft C run-time library implementation also supports these language str ## See also -- [Locale names, Languages, and Country/Region strings](./locale-names-languages-and-country-region-strings.md)\ -- [Country/Region strings](./country-region-strings.md)\ -- [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md)\ -- [`_create_locale`, `_wcreate_locale`](./reference/create-locale-wcreate-locale.md) +- [Locale names, Languages, and Country/Region strings](locale-names-languages-and-country-region-strings.md) +- [Country/Region strings](country-region-strings.md) +- [`setlocale`, `_wsetlocale`](reference/setlocale-wsetlocale.md) +- [`_create_locale`, `_wcreate_locale`](reference/create-locale-wcreate-locale.md) diff --git a/docs/c-runtime-library/link-options.md b/docs/c-runtime-library/link-options.md index 33a73b92de..7f27f9a178 100644 --- a/docs/c-runtime-library/link-options.md +++ b/docs/c-runtime-library/link-options.md @@ -1,27 +1,26 @@ --- -description: "Learn more about: Link Options" -title: "Link Options" +title: "Link options" +description: "Learn more about: Link options" ms.date: "11/04/2016" helpviewer_keywords: ["nothrownew.obj", "newmode.obj", "noenv.obj", "psetargv.obj", "legacy_stdio_float_rounding.obj", "loosefpmath.obj", "smallheap.obj", "fp10.obj", "nochkclr.obj", "chkstk.obj", "pcommode.obj", "pnoenv.obj", "link options [C++]", "invalidcontinue.obj", "pnothrownew.obj", "pwsetargv.obj", "pinvalidcontinue.obj", "wsetargv.obj", "binmode.obj", "setargv.obj", "noarg.obj", "pnewmode.obj", "commode.obj", "pthreadlocale.obj", "pbinmode.obj", "threadlocale.obj", "pnoarg.obj"] -ms.assetid: 05b5a77b-9dd1-494b-ae46-314598c770bb --- # Link options -The CRT lib directory includes several small object files that enable specific CRT features without any code change. These object files are called "link options" since you only have to add them to the linker command line to use them. +The CRT lib directory includes several small object files that enable specific CRT features without code changes. These object files are called "link options" because you only have to add them to the linker command line to use them. To do this from Visual Studio, in the Solution Explorer right-click your project and choose **Properties**. Under **Configuration Properties**, choose **Linker** > **Input** > **Additional Dependencies** and specify the additional items to add to the link command line. -CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and /clr code. +CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. Use the regular versions for native and [`/clr`](../build/reference/clr-common-language-runtime-compilation.md) code. | Native and /clr | Pure mode | Description | |---|---|---| -| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](./fmode.md). | +| `binmode.obj` | `pbinmode.obj` | Sets the default file-translation mode to binary. See [`_fmode`](fmode.md). | | `chkstk.obj` | n/a | Provides stack-checking and alloca support when not using the CRT. | -| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](./reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md). | -| exe_initialize_mta.lib | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [onecore.lib](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [/NODEFAULTLIB](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. | -| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](./floating-point-support.md). | +| `commode.obj` | `pcommode.obj` | Sets the global commit flag to "commit". See [`fopen`, `_wfopen`](reference/fopen-wfopen.md) and [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md). | +| `exe_initialize_mta.lib` | n/a | Initializes the MTA apartment during EXE startup, which allows the use of COM objects in global smart pointers. Because this option leaks an MTA apartment reference during shutdown, don't use it for DLLs. Linking to this file is equivalent to including `combase.h` and defining `_EXE_INITIALIZE_MTA`. Using this link option adds [`onecore.lib`](/windows/win32/apiindex/windows-umbrella-libraries) to the default library list. If this effect is undesirable (such as using onecore_apiset.lib or other umbrella library), use [`/NODEFAULTLIB`](../build/reference/nodefaultlib-ignore-libraries.md) to override this behavior and provide an alternative. | +| `fp10.obj` | n/a | Changes the default precision control to 64 bits. See [Math and floating-point support](floating-point-support.md). | | `invalidcontinue.obj` | `pinvalidcontinue.obj` | Sets a default invalid parameter handler that does nothing, meaning that invalid parameters passed to CRT functions will just set errno and return an error result. | -| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](./reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. | +| `legacy_stdio_float_rounding.obj` | n/a | The printing of floating-point values (for example, when using [`printf`](reference/printf-printf-l-wprintf-wprintf-l.md)) with the Windows 10 19041 Universal C Runtime has been fixed. It now properly rounds exactly representable floating-point numbers, and respects the floating-point rounding requested by [`fesetround`](reference/fegetround-fesetround2.md). This behavior update is available in Visual Studio 2019 version 16.2 and later. Legacy behavior is used in earlier versions of Visual Studio, or by providing this link option. | | `loosefpmath.obj` | n/a | Ensures that floating point code tolerates denormal values. | -| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](./reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](./reference/set-new-mode.md), [`_set_new_handler`](./reference/set-new-handler.md), [`calloc`](./reference/calloc.md), and [`realloc`](./reference/realloc.md). | +| `newmode.obj` | `pnewmode.obj` | Causes [`malloc`](reference/malloc.md) to call the new handler on failure. See [`_set_new_mode`](reference/set-new-mode.md), [`_set_new_handler`](reference/set-new-handler.md), [`calloc`](reference/calloc.md), and [`realloc`](reference/realloc.md). | | `noarg.obj` | `pnoarg.obj` | Disables all processing of argc and argv. | | `nochkclr.obj` | n/a | Does nothing. Remove from your project. | | `noenv.obj` | `pnoenv.obj` | Disables the creation of a cached environment for the CRT. | @@ -32,4 +31,4 @@ CLR pure mode versions of these objects are deprecated in Visual Studio 2015 and ## See also -- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md) +- [C runtime (CRT) and C++ Standard Library (STL) `.lib` files](crt-library-features.md) diff --git a/docs/c-runtime-library/locale.md b/docs/c-runtime-library/locale.md index f7ced3c342..5801ca774e 100644 --- a/docs/c-runtime-library/locale.md +++ b/docs/c-runtime-library/locale.md @@ -1,63 +1,63 @@ --- -description: "Learn more about: Locale" title: "Locale" -ms.date: "04/11/2018" +description: "Learn more about: Locale" +ms.date: 04/11/2018 f1_keywords: ["c.international"] helpviewer_keywords: ["localization, locale", "country/region information", "language information routines", "setlocale function", "locale routines"] --- # Locale -*Locale* refers to country/region and language settings that you can use to customize your program. Some locale-dependent categories include the display formats for dates and monetary values. For more information, see [Locale categories](./locale-categories.md). +*Locale* refers to country/region and language settings that you can use to customize your program. Some locale-dependent categories include the display formats for dates and monetary values. For more information, see [Locale categories](locale-categories.md). -Use the [`setlocale`](./reference/setlocale-wsetlocale.md) function to change or query some or all of the current program or thread locale information while using functions without the **`_l`** suffix. The functions with the **`_l`** suffix will use the locale parameter passed in for their locale information during the execution of that specific function only. To create a locale for use with a function with a **`_l`** suffix, use [`_create_locale`](./reference/create-locale-wcreate-locale.md). To free this locale, use [`_free_locale`](./reference/free-locale.md). To get the current locale, use [`_get_current_locale`](./reference/get-current-locale.md). +Use the [`setlocale`](reference/setlocale-wsetlocale.md) function to change or query some or all of the current program or thread locale information while using functions without the **`_l`** suffix. The functions with the **`_l`** suffix will use the locale parameter passed in for their locale information during the execution of that specific function only. To create a locale for use with a function with a **`_l`** suffix, use [`_create_locale`](reference/create-locale-wcreate-locale.md). To free this locale, use [`_free_locale`](reference/free-locale.md). To get the current locale, use [`_get_current_locale`](reference/get-current-locale.md). -Use [`_configthreadlocale`](./reference/configthreadlocale.md) to control whether each thread has its own locale, or all threads in a program share the same locale. For more information, see [Locales and code pages](../text/locales-and-code-pages.md). +Use [`_configthreadlocale`](reference/configthreadlocale.md) to control whether each thread has its own locale, or all threads in a program share the same locale. For more information, see [Locales and code pages](../text/locales-and-code-pages.md). -More secure versions of the functions in the following table are available, indicated by the **`_s`** ("secure") suffix. For more information, see [Security features in the CRT](./security-features-in-the-crt.md). +More secure versions of the functions in the following table are available, indicated by the **`_s`** ("secure") suffix. For more information, see [Security features in the CRT](security-features-in-the-crt.md). ## Locale-dependent routines | Routine | Use | **`setlocale`** category setting dependence | |---|---|---| -| [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](./reference/atof-atof-l-wtof-wtof-l.md) | Convert character to floating-point value | `LC_NUMERIC` | -| [`atoi`, `_atoi_l`, `_wtoi`, `_wtoi_l`](./reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert character to integer value | `LC_NUMERIC` | -| [`_atoi64`, `_atoi64_l`, `_wtoi64`, `_wtoi64_l`](./reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert character to 64-bit integer value | `LC_NUMERIC` | -| [`atol`, `_atol_l`, `_wtol`, `_wtol_l`](./reference/atol-atol-l-wtol-wtol-l.md) | Convert character to long value | `LC_NUMERIC` | -| [`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](./reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) | Convert character to double-long value | `LC_NUMERIC` | -| [`is`, `isw` routines](./is-isw-routines.md) | Test given integer for particular condition. | `LC_CTYPE` | -| [`isleadbyte`, `_isleadbyte_l`](./reference/isleadbyte-isleadbyte-l.md) | Test for lead byte | `LC_CTYPE` | -| [`localeconv`](./reference/localeconv.md) | Read appropriate values for formatting numeric quantities | `LC_MONETARY, LC_NUMERIC` | -| [`MB_CUR_MAX`](./mb-cur-max.md) | Maximum length in bytes of any multibyte character in current locale (macro defined in `STDLIB.H`) | `LC_CTYPE` | -| [`_mbccpy`, `_mbccpy_l`](./reference/mbccpy-mbccpy-l.md),[`_mbccpy_s`, `_mbccpy_s_l`](./reference/mbccpy-s-mbccpy-s-l.md) | Copy one multibyte character | `LC_CTYPE` | -| [`_mbclen`, `mblen`, `_mblen_l`](./reference/mbclen-mblen-mblen-l.md) | Validate and return number of bytes in multibyte character | `LC_CTYPE` | -| [`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](./reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) | For multibyte-character strings: validate each character in string; return string length | `LC_CTYPE` | -| [`mbstowcs`, `_mbstowcs_l`](./reference/mbstowcs-mbstowcs-l.md),[`mbstowcs_s`, `_mbstowcs_s_l`](./reference/mbstowcs-s-mbstowcs-s-l.md) | Convert sequence of multibyte characters to corresponding sequence of wide characters | `LC_CTYPE` | -| [`mbtowc`, `_mbtowc_l`](./reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character | `LC_CTYPE` | -| [`printf`](./reference/printf-printf-l-wprintf-wprintf-l.md) functions | Write formatted output | `LC_NUMERIC` (determines radix character output) | -| [`scanf`](./reference/scanf-scanf-l-wscanf-wscanf-l.md) functions | Read formatted input | `LC_NUMERIC` (determines radix character recognition) | -| [`setlocale`, `_wsetlocale`](./reference/setlocale-wsetlocale.md) | Select locale for program | Not applicable | -| [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](./reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md) | Compare characters of two strings | `LC_COLLATE` | -| [`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](./reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) | Compare two strings without regard to case | `LC_CTYPE` | -| [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](./reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) | Compare characters of two strings (case insensitive) | `LC_COLLATE` | -| [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](./reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | Compare first **`n`** characters of two strings | `LC_COLLATE` | -| [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](./reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) | Compare characters of two strings without regard to case. | `LC_CTYPE` | -| [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](./reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | Compare first **`n`** characters of two strings (case insensitive) | `LC_COLLATE` | -| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date and time value according to supplied **`format`** argument | `LC_TIME` | -| [`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](./reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md),[`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](./reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) | Convert, in place, each uppercase letter in given string to lowercase | `LC_CTYPE` | -| [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](./reference/strtod-strtod-l-wcstod-wcstod-l.md) | Convert character string to **`double`** value | `LC_NUMERIC` (determines radix character recognition) | -| [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](./reference/strtol-wcstol-strtol-l-wcstol-l.md) | Convert character string to **`long`** value | `LC_NUMERIC` (determines radix character recognition) | -| [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](./reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) | Convert character string to unsigned long value | `LC_NUMERIC` (determines radix character recognition) | -| [`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](./reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md),[`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](./reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) | Convert, in place, each lowercase letter in string to uppercase | `LC_CTYPE` | -| [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](./reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) | Transform string into collated form according to locale | `LC_COLLATE` | -| [`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](./reference/tolower-tolower-towlower-tolower-l-towlower-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](./reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding lowercase character | `LC_CTYPE` | -| [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](./reference/toupper-toupper-towupper-toupper-l-towupper-l.md),[`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](./reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding uppercase letter | `LC_CTYPE` | -| [`wcstombs`, `_wcstombs_l`](./reference/wcstombs-wcstombs-l.md),[`wcstombs_s`, `_wcstombs_s_l`](./reference/wcstombs-s-wcstombs-s-l.md) | Convert sequence of wide characters to corresponding sequence of multibyte characters | `LC_CTYPE` | -| [`wctomb`, `_wctomb_l`](./reference/wctomb-wctomb-l.md),[`wctomb_s`, `_wctomb_s_l`](./reference/wctomb-s-wctomb-s-l.md) | Convert wide character to corresponding multibyte character | `LC_CTYPE` | +| [`atof`, `_atof_l`, `_wtof`, `_wtof_l`](reference/atof-atof-l-wtof-wtof-l.md) | Convert character to floating-point value | `LC_NUMERIC` | +| [`atoi`, `_atoi_l`, `_wtoi`, `_wtoi_l`](reference/atoi-atoi-l-wtoi-wtoi-l.md) | Convert character to integer value | `LC_NUMERIC` | +| [`_atoi64`, `_atoi64_l`, `_wtoi64`, `_wtoi64_l`](reference/atoi64-atoi64-l-wtoi64-wtoi64-l.md) | Convert character to 64-bit integer value | `LC_NUMERIC` | +| [`atol`, `_atol_l`, `_wtol`, `_wtol_l`](reference/atol-atol-l-wtol-wtol-l.md) | Convert character to long value | `LC_NUMERIC` | +| [`_atodbl`, `_atodbl_l`, `_atoldbl`, `_atoldbl_l`, `_atoflt`, `_atoflt_l`](reference/atodbl-atodbl-l-atoldbl-atoldbl-l-atoflt-atoflt-l.md) | Convert character to double-long value | `LC_NUMERIC` | +| [`is`, `isw` routines](is-isw-routines.md) | Test given integer for particular condition. | `LC_CTYPE` | +| [`isleadbyte`, `_isleadbyte_l`](reference/isleadbyte-isleadbyte-l.md) | Test for lead byte | `LC_CTYPE` | +| [`localeconv`](reference/localeconv.md) | Read appropriate values for formatting numeric quantities | `LC_MONETARY, LC_NUMERIC` | +| [`MB_CUR_MAX`](mb-cur-max.md) | Maximum length in bytes of any multibyte character in current locale (macro defined in `STDLIB.H`) | `LC_CTYPE` | +| [`_mbccpy`, `_mbccpy_l`](reference/mbccpy-mbccpy-l.md), [`_mbccpy_s`, `_mbccpy_s_l`](reference/mbccpy-s-mbccpy-s-l.md) | Copy one multibyte character | `LC_CTYPE` | +| [`_mbclen`, `mblen`, `_mblen_l`](reference/mbclen-mblen-mblen-l.md) | Validate and return number of bytes in multibyte character | `LC_CTYPE` | +| [`strlen`, `wcslen`, `_mbslen`, `_mbslen_l`, `_mbstrlen`, `_mbstrlen_l`](reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l.md) | For multibyte-character strings: validate each character in string; return string length | `LC_CTYPE` | +| [`mbstowcs`, `_mbstowcs_l`](reference/mbstowcs-mbstowcs-l.md), [`mbstowcs_s`, `_mbstowcs_s_l`](reference/mbstowcs-s-mbstowcs-s-l.md) | Convert sequence of multibyte characters to corresponding sequence of wide characters | `LC_CTYPE` | +| [`mbtowc`, `_mbtowc_l`](reference/mbtowc-mbtowc-l.md) | Convert multibyte character to corresponding wide character | `LC_CTYPE` | +| [`printf`](reference/printf-printf-l-wprintf-wprintf-l.md) functions | Write formatted output | `LC_NUMERIC` (determines radix character output) | +| [`scanf`](reference/scanf-scanf-l-wscanf-wscanf-l.md) functions | Read formatted input | `LC_NUMERIC` (determines radix character recognition) | +| [`setlocale`, `_wsetlocale`](reference/setlocale-wsetlocale.md) | Select locale for program | Not applicable | +| [`strcoll`, `wcscoll`, `_mbscoll`, `_strcoll_l`, `_wcscoll_l`, `_mbscoll_l`](reference/strcoll-wcscoll-mbscoll-strcoll-l-wcscoll-l-mbscoll-l.md) | Compare characters of two strings | `LC_COLLATE` | +| [`_stricmp`, `_wcsicmp`, `_mbsicmp`, `_stricmp_l`, `_wcsicmp_l`, `_mbsicmp_l`](reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l.md) | Compare two strings without regard to case | `LC_CTYPE` | +| [`_stricoll`, `_wcsicoll`, `_mbsicoll`, `_stricoll_l`, `_wcsicoll_l`, `_mbsicoll_l`](reference/stricoll-wcsicoll-mbsicoll-stricoll-l-wcsicoll-l-mbsicoll-l.md) | Compare characters of two strings (case insensitive) | `LC_COLLATE` | +| [`_strncoll`, `_wcsncoll`, `_mbsncoll`, `_strncoll_l`, `_wcsncoll_l`, `_mbsncoll_l`](reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md) | Compare first **`n`** characters of two strings | `LC_COLLATE` | +| [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](reference/strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md) | Compare characters of two strings without regard to case. | `LC_CTYPE` | +| [`_strnicoll`, `_wcsnicoll`, `_mbsnicoll`, `_strnicoll_l`, `_wcsnicoll_l`, `_mbsnicoll_l`](reference/strnicoll-wcsnicoll-mbsnicoll-strnicoll-l-wcsnicoll-l-mbsnicoll-l.md) | Compare first **`n`** characters of two strings (case insensitive) | `LC_COLLATE` | +| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date and time value according to supplied **`format`** argument | `LC_TIME` | +| [`_strlwr`, `_wcslwr`, `_mbslwr`, `_strlwr_l`, `_wcslwr_l`, `_mbslwr_l`](reference/strlwr-wcslwr-mbslwr-strlwr-l-wcslwr-l-mbslwr-l.md), [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](reference/strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) | Convert, in place, each uppercase letter in given string to lowercase | `LC_CTYPE` | +| [`strtod`, `_strtod_l`, `wcstod`, `_wcstod_l`](reference/strtod-strtod-l-wcstod-wcstod-l.md) | Convert character string to **`double`** value | `LC_NUMERIC` (determines radix character recognition) | +| [`strtol`, `wcstol`, `_strtol_l`, `_wcstol_l`](reference/strtol-wcstol-strtol-l-wcstol-l.md) | Convert character string to **`long`** value | `LC_NUMERIC` (determines radix character recognition) | +| [`strtoul`, `_strtoul_l`, `wcstoul`, `_wcstoul_l`](reference/strtoul-strtoul-l-wcstoul-wcstoul-l.md) | Convert character string to unsigned long value | `LC_NUMERIC` (determines radix character recognition) | +| [`_strupr`, `_strupr_l`, `_mbsupr`, `_mbsupr_l`, `_wcsupr_l`, `_wcsupr`](reference/strupr-strupr-l-mbsupr-mbsupr-l-wcsupr-l-wcsupr.md), [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](reference/strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) | Convert, in place, each lowercase letter in string to uppercase | `LC_CTYPE` | +| [`strxfrm`, `wcsxfrm`, `_strxfrm_l`, `_wcsxfrm_l`](reference/strxfrm-wcsxfrm-strxfrm-l-wcsxfrm-l.md) | Transform string into collated form according to locale | `LC_COLLATE` | +| [`tolower`, `_tolower`, `towlower`, `_tolower_l`, `_towlower_l`](reference/tolower-tolower-towlower-tolower-l-towlower-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding lowercase character | `LC_CTYPE` | +| [`toupper`, `_toupper`, `towupper`, `_toupper_l`, `_towupper_l`](reference/toupper-toupper-towupper-toupper-l-towupper-l.md), [`_mbctolower`, `_mbctolower_l`, `_mbctoupper`, `_mbctoupper_l`](reference/mbctolower-mbctolower-l-mbctoupper-mbctoupper-l.md) | Convert given character to corresponding uppercase letter | `LC_CTYPE` | +| [`wcstombs`, `_wcstombs_l`](reference/wcstombs-wcstombs-l.md), [`wcstombs_s`, `_wcstombs_s_l`](reference/wcstombs-s-wcstombs-s-l.md) | Convert sequence of wide characters to corresponding sequence of multibyte characters | `LC_CTYPE` | +| [`wctomb`, `_wctomb_l`](reference/wctomb-wctomb-l.md), [`wctomb_s`, `_wctomb_s_l`](reference/wctomb-s-wctomb-s-l.md) | Convert wide character to corresponding multibyte character | `LC_CTYPE` | > [!NOTE] -> For multibyte routines, the multibyte code page must be equivalent to the locale set with [`setlocale`](./reference/setlocale-wsetlocale.md). [`_setmbcp`](./reference/setmbcp.md), with an argument of `_MB_CP_LOCALE` makes the multibyte code page the same as the **`setlocale`** code page. +> For multibyte routines, the multibyte code page must be equivalent to the locale set with [`setlocale`](reference/setlocale-wsetlocale.md). [`_setmbcp`](reference/setmbcp.md), with an argument of `_MB_CP_LOCALE` makes the multibyte code page the same as the **`setlocale`** code page. ## See also -[Internationalization](./internationalization.md)\ -[Universal C runtime routines by category](./run-time-routines-by-category.md) +[Internationalization](internationalization.md)\ +[Universal C runtime routines by category](run-time-routines-by-category.md) diff --git a/docs/c-runtime-library/lock.md b/docs/c-runtime-library/lock.md index e9f4e94fa0..19562f13ef 100644 --- a/docs/c-runtime-library/lock.md +++ b/docs/c-runtime-library/lock.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: _lock" title: "_lock" -ms.date: "11/04/2016" +description: "Learn more about: _lock" +ms.date: 11/04/2016 api_name: ["_lock"] api_location: ["msvcr110_clr0400.dll", "msvcr120.dll", "msvcr100.dll", "msvcr90.dll", "msvcr80.dll", "msvcr110.dll", "msvcrt.dll", "msvcr120_clr0400.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_lock"] helpviewer_keywords: ["lock function", "_lock function"] -ms.assetid: 29f77c37-30de-4b3d-91b6-030216e645a6 --- # `_lock` @@ -20,7 +19,7 @@ Acquires a multi-thread lock. ## Syntax ```cpp -void __cdecl _lock +void __cdecl _lock( int locknum ); ``` diff --git a/docs/c-runtime-library/reference/abort.md b/docs/c-runtime-library/reference/abort.md index 991f464049..436a39de91 100644 --- a/docs/c-runtime-library/reference/abort.md +++ b/docs/c-runtime-library/reference/abort.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: abort" title: "abort" +description: "Learn more about: abort" ms.date: 07/07/2022 api_name: ["abort", "_o_abort"] api_location: ["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-runtime-l1-1-0.dll"] @@ -14,7 +14,7 @@ helpviewer_keywords: ["aborting current process", "abort function", "processes, Aborts the current process and returns an error code. > [!NOTE] -> Do not use this method to shut down a Microsoft Store app or Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). +> Do not use this method to shut down a Microsoft Store app or Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). ## Syntax @@ -71,8 +71,8 @@ The following program tries to open a file and aborts if the attempt fails. // the abort function by attempting to open a file // and aborts if the attempt fails. -#include -#include +#include +#include int main( void ) { diff --git a/docs/c-runtime-library/reference/access-s-waccess-s.md b/docs/c-runtime-library/reference/access-s-waccess-s.md index 1f3fedc12e..c054b3b97d 100644 --- a/docs/c-runtime-library/reference/access-s-waccess-s.md +++ b/docs/c-runtime-library/reference/access-s-waccess-s.md @@ -1,19 +1,20 @@ --- -description: "Learn more about: _access_s, _waccess_s" -title: "_access_s, _waccess_s" +description: "Learn more about: _access_s, _waccess_s, _taccess_s" +title: "_access_s, _waccess_s, _taccess_s" ms.date: "4/2/2020" -api_name: ["_access_s", "_waccess_s", "_o__access_s", "_o__waccess_s"] +api_name: ["_access_s", "_waccess_s", "_taccess_s", "_o__access_s", "_o__waccess_s"] api_location: ["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-filesystem-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["waccess_s", "access_s", "_waccess_s", "_access_s"] -helpviewer_keywords: ["access_s function", "taccess_s function", "_taccess_s function", "waccess_s function", "_access_s function", "_waccess_s function"] -ms.assetid: fb3004fc-dcd3-4569-8b27-d817546e947e +f1_keywords: ["waccess_s", "access_s", "_taccess_s"] +helpviewer_keywords: ["access_s function", "waccess_s function", "_taccess_s function"] --- -# `_access_s`, `_waccess_s` +# `_access_s`, `_waccess_s`, `_taccess_s` Determines file read/write permissions. These functions are versions of [`_access`, `_waccess`](access-waccess.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). +For `_taccess_s`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -66,18 +67,20 @@ These functions validate their parameters. If *`path`* is `NULL` or *`mode`* doe By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| `_taccess_s` | **`_access_s`** | **`_access_s`** | **`_waccess_s`** | +| `_taccess_s` | `_access_s` | `_access_s` | `_waccess_s` | ## Requirements | Routine | Required header | Optional header | |---|---|---| -| **`_access_s`** | \ | \ | -| **`_waccess_s`** | \ or \ | \ | +| **`_access_s`** | `` | `` | +| **`_waccess_s`** | `` or `` | `` | ## Example diff --git a/docs/c-runtime-library/reference/access-waccess.md b/docs/c-runtime-library/reference/access-waccess.md index b6c08cc8bf..87cf212ca0 100644 --- a/docs/c-runtime-library/reference/access-waccess.md +++ b/docs/c-runtime-library/reference/access-waccess.md @@ -1,19 +1,20 @@ --- -description: "Learn more about: _access, _waccess" title: "_access, _waccess" +description: "Learn more about: _access, _waccess" ms.date: "4/2/2020" -api_name: ["_access", "_waccess", "_o__access", "_o__waccess"] +api_name: ["_access", "_waccess", "t_access", "_o__access", "_o__waccess"] api_location: ["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-filesystem-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_waccess", "_access", "taccess", "waccess", "_taccess"] helpviewer_keywords: ["access function", "_taccess function", "waccess function", "_access function", "_waccess function", "taccess function"] -ms.assetid: ba34f745-85c3-49e5-a7d4-3590bd249dd3 --- -# `_access`, `_waccess` +# `_access`, `_waccess`, `t_access` Determines if a file is read-only or not. More secure versions are available; see [`_access_s`, `_waccess_s`](access-s-waccess-s.md). +For `_taccess`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -66,7 +67,7 @@ This function validates its parameters. If *`path`* is `NULL` or *`mode`* doesn' By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-text routine mappings +### Generic-text function mappings | `Tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| @@ -89,9 +90,9 @@ The following example uses **`_access`** to check the file named *`crt_ACCESS.C` // This example uses _access to check the file named // crt_ACCESS.C to see if it exists and if writing is allowed. -#include -#include -#include +#include +#include +#include int main( void ) { diff --git a/docs/c-runtime-library/reference/and.md b/docs/c-runtime-library/reference/and.md index 2a5a4412c1..efa2cca286 100644 --- a/docs/c-runtime-library/reference/and.md +++ b/docs/c-runtime-library/reference/and.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: and" title: "and" +description: "Learn more about: and" ms.date: "11/04/2016" api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["ISO646/and", "and", "std.and", "std::and"] helpviewer_keywords: ["and macro"] -ms.assetid: 2644ab57-8e1b-48f0-9021-cafe3e26bdc4 --- # `and` @@ -16,7 +15,6 @@ An alternative to the && operator. ## Syntax ```C - #define and && ``` diff --git a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md index 02b797f39a..b7ce5af41b 100644 --- a/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md +++ b/docs/c-runtime-library/reference/atanh-atanhf-atanhl.md @@ -1,14 +1,13 @@ --- title: "atanh, atanhf, atanhl" description: "API reference for atanh, atanhf, and atanhl; which calculate the inverse hyperbolic tangent of a floating-point value." -ms.date: "08/31/2020" +ms.date: 08/31/2020 api_name: ["atanhl", "atanhf", "atanh", "_o_atanh", "_o_atanhf", "_o_atanhl"] api_location: ["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-math-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["atanhl", "atanhf", "atanh"] -helpviewer_keywords: ["atanhf function", "atanhl function", "atanh funciton"] -ms.assetid: 83a43b5b-2580-4461-854f-dc84236d9f32 +helpviewer_keywords: ["atanhf function", "atanhl function", "atanh function"] --- # `atanh`, `atanhf`, `atanhl` diff --git a/docs/c-runtime-library/reference/bitand.md b/docs/c-runtime-library/reference/bitand.md index cc4b84b0bd..0701824a21 100644 --- a/docs/c-runtime-library/reference/bitand.md +++ b/docs/c-runtime-library/reference/bitand.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: bitand" title: "bitand" +description: "Learn more about: bitand" ms.date: "11/04/2016" api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["std::bitand", "std.bitand", "ISO646/bitand", "bitand"] helpviewer_keywords: ["bitand function"] -ms.assetid: 279cf9b5-fac1-49de-b329-f1a31b3481fe --- # `bitand` @@ -16,7 +15,6 @@ An alternative to the & operator. ## Syntax ```C - #define bitand & ``` diff --git a/docs/c-runtime-library/reference/bitor.md b/docs/c-runtime-library/reference/bitor.md index 4451365a0e..8f2aaf236d 100644 --- a/docs/c-runtime-library/reference/bitor.md +++ b/docs/c-runtime-library/reference/bitor.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: bitor" title: "bitor" +description: "Learn more about: bitor" ms.date: "11/04/2016" api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["ISO646/bitor", "bitor", "std.bitor", "std::bitor"] helpviewer_keywords: ["bitor function"] -ms.assetid: 3c0a3711-9c74-41f2-b400-2f7797da30d1 --- # `bitor` @@ -16,7 +15,6 @@ An alternative to the `|` operator. ## Syntax ```C - #define bitor | ``` diff --git a/docs/c-runtime-library/reference/calloc-dbg.md b/docs/c-runtime-library/reference/calloc-dbg.md index 0c3df65724..fbff456b61 100644 --- a/docs/c-runtime-library/reference/calloc-dbg.md +++ b/docs/c-runtime-library/reference/calloc-dbg.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _calloc_dbg" title: "_calloc_dbg" +description: "Learn more about: _calloc_dbg" ms.date: "11/04/2016" api_name: ["_calloc_dbg"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_calloc_dbg", "calloc_dbg"] helpviewer_keywords: ["_calloc_dbg function", "calloc_dbg function"] -ms.assetid: 7f62c42b-eb9f-4de5-87d0-df57036c87de --- # `_calloc_dbg` @@ -37,7 +36,7 @@ Requested size of each memory block (bytes). *`blockType`*\ Requested type of memory block: `_CLIENT_BLOCK` or `_NORMAL_BLOCK`. -For information about the allocation block types and how they're used, see[Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). +For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). *`filename`*\ Pointer to name of the source file that requested allocation operation or `NULL`. @@ -100,7 +99,7 @@ int main( void ) else printf( "Problem allocating memory\n" ); - / _free_dbg must be called to free CLIENT type blocks + // _free_dbg must be called to free CLIENT type blocks free( bufferN ); _free_dbg( bufferC, _CLIENT_BLOCK ); } diff --git a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md index 8709404d4c..82de69ea28 100644 --- a/docs/c-runtime-library/reference/cgets-s-cgetws-s.md +++ b/docs/c-runtime-library/reference/cgets-s-cgetws-s.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _cgets_s, _cgetws_s" title: "_cgets_s, _cgetws_s" +description: "Learn more about: _cgets_s, _cgetws_s" ms.date: "4/2/2020" api_name: ["_cgetws_s", "_cgets_s", "_o__cgets_s", "_o__cgetws_s"] api_location: ["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-conio-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_cgets_s", "cgets_s", "cgetws_s", "_cgetws_s"] helpviewer_keywords: ["strings [C++], getting from console", "console, getting strings from", "_cgets_s function", "cget_s function", "_cgetws_s function", "cgetws_s function"] -ms.assetid: 38b74897-afe6-4dd9-a43f-36a3c0d72c5c --- # `_cgets_s`, `_cgetws_s` @@ -26,7 +25,7 @@ errno_t _cgets_s( size_t *pSizeRead ); errno_t _cgetws_s( - wchar_t *buffer + wchar_t *buffer, size_t numberOfElements, size_t *pSizeRead ); diff --git a/docs/c-runtime-library/reference/controlfp-s.md b/docs/c-runtime-library/reference/controlfp-s.md index d955dfb42e..8de3df8b7c 100644 --- a/docs/c-runtime-library/reference/controlfp-s.md +++ b/docs/c-runtime-library/reference/controlfp-s.md @@ -1,7 +1,7 @@ --- description: "Learn more about: _controlfp_s" title: "_controlfp_s" -ms.date: "4/2/2020" +ms.date: 03/27/2025 api_name: ["_controlfp_s", "_o__controlfp_s"] api_location: ["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-runtime-l1-1-0.dll"] api_type: ["DLLExport"] @@ -75,16 +75,23 @@ _controlfp_s(¤t_word, _DN_FLUSH, _MCW_DN); // and x64 processors with SSE2 support. Ignored on other x86 platforms. ``` -On ARM platforms, the **`_controlfp_s`** function applies to the FPSCR register. On x64 architectures, only the SSE2 control word that's stored in the MXCSR register is affected. On Intel (x86) platforms, **`_controlfp_s`** affects the control words for both the x87 and the SSE2, if present. It's possible for the two control words to be inconsistent with each other (because of a previous call to [`__control87_2`](control87-controlfp-control87-2.md), for example); if there's an inconsistency between the two control words, **`_controlfp_s`** sets the `EM_AMBIGUOUS` flag in *`currentControl`*. It's a warning that the returned control word might not represent the state of both floating-point control words accurately. +This function is ignored when you use [`/clr` (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) to compile because the common language runtime (CLR) only supports the default floating-point precision. -On the ARM and x64 architectures, changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). +On x64, only the SSE2 control word stored in the MXCSR register is affected. Changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked as described in [Parameter validation](../parameter-validation.md). -If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `EINVAL` and sets `errno` to `EINVAL`. +On x86, **`_controlfp_s`** affects the control words for both the x87 and the SSE2, if present. It's possible for the two control words to be inconsistent with each other (because of a previous call to [`__control87_2`](control87-controlfp-control87-2.md), for example); if there's an inconsistency between the two control words, **`_controlfp_s`** sets the `EM_AMBIGUOUS` flag in *`currentControl`*. It's a warning that the returned control word might not represent the state of both floating-point control words accurately. -This function is ignored when you use [`/clr` (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) to compile because the common language runtime (CLR) only supports the default floating-point precision. +If the mask isn't set correctly, this function generates an invalid parameter exception, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, this function returns `EINVAL` and sets `errno` to `EINVAL`. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). +### Arm platforms + +- Changing the infinity mode or the floating-point precision isn't supported. If the precision control mask is used on the x64 platform, the function raises an assertion and the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). +- On ARM32 (discontinued), Windows doesn't support FP exceptions. +- On ARM64, unmasking the whole `_MCW_EM` or any bits from it (`_EM_INEXACT`, `_EM_UNDERFLOW`, `_EM_OVERFLOW`, `_EM_ZERODIVIDE`, and `_EM_INVALID`) correctly change the FPCR register. Floating point exceptions raised by standard math functions, like Invalid operation from `std::acos`, are exempt from this behavior and can be ignored or raised properly depending on the FPCR register. For more information, see [Overview of ARM32 ABI Conventions](../../build/overview-of-arm-abi-conventions.md#floating-point-exceptions). +- On ARM64EC, Windows catches processor floating-point exceptions and disables them in the FPCR register. This ensures consistent behavior across different processor variants. + ### Mask constants and values For the `_MCW_EM` mask, clearing it sets the exception, which allows the hardware exception; setting it hides the exception. If a `_EM_UNDERFLOW` or `_EM_OVERFLOW` occurs, no hardware exception is thrown until the next floating-point instruction is executed. To generate a hardware exception immediately after `_EM_UNDERFLOW` or `_EM_OVERFLOW`, call the `FWAIT MASM` instruction. diff --git a/docs/c-runtime-library/reference/crtcheckmemory.md b/docs/c-runtime-library/reference/crtcheckmemory.md index de0f6e98ce..5c9ca5d58e 100644 --- a/docs/c-runtime-library/reference/crtcheckmemory.md +++ b/docs/c-runtime-library/reference/crtcheckmemory.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _CrtCheckMemory" title: "_CrtCheckMemory" +description: "Learn more about: _CrtCheckMemory" ms.date: "11/04/2016" api_name: ["_CrtCheckMemory"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["CrtCheckMemory", "_CrtCheckMemory"] helpviewer_keywords: ["_CrtCheckMemory function", "CrtCheckMemory function"] -ms.assetid: 457cc72e-60fd-4177-ab5c-6ae26a420765 --- # `_CrtCheckMemory` @@ -17,7 +16,6 @@ Confirms the integrity of the memory blocks allocated in the debug heap (debug v ## Syntax ```C - int _CrtCheckMemory( void ); ``` diff --git a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md index 5e934bfd26..28291b7a9c 100644 --- a/docs/c-runtime-library/reference/crtdumpmemoryleaks.md +++ b/docs/c-runtime-library/reference/crtdumpmemoryleaks.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _CrtDumpMemoryLeaks" title: "_CrtDumpMemoryLeaks" +description: "Learn more about: _CrtDumpMemoryLeaks" ms.date: "11/04/2016" api_name: ["_CrtDumpMemoryLeaks"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -16,7 +16,6 @@ Dumps all the memory blocks in the debug heap when a memory leak has occurred (d ## Syntax ```C - int _CrtDumpMemoryLeaks( void ); ``` diff --git a/docs/c-runtime-library/reference/crtreportblocktype.md b/docs/c-runtime-library/reference/crtreportblocktype.md index 48220ad606..e9c58f7c24 100644 --- a/docs/c-runtime-library/reference/crtreportblocktype.md +++ b/docs/c-runtime-library/reference/crtreportblocktype.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: _CrtReportBlockType" title: "_CrtReportBlockType" -ms.date: "11/04/2016" +description: "Learn more about: _CrtReportBlockType" +ms.date: 11/04/2016 api_name: ["_CrtReportBlockType"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_CrtReportBlockType", "CrtReportBlockType"] helpviewer_keywords: ["CrtReportBlockType function", "BLOCK_SUBTYPE macro", "_CrtReportBlockType function", "_BLOCK_TYPE macro", "_BLOCK_SUBTYPE macro", "BLOCK_TYPE macro"] -ms.assetid: 0f4b9da7-bebb-4956-9541-b2581640ec6b --- # `_CrtReportBlockType` @@ -19,7 +18,7 @@ Returns the block type/subtype associated with a given debug heap block pointer. ```C int _CrtReportBlockType( const void * pBlock -}; +); ``` ### Parameters diff --git a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md index bd91d7fa57..b7ce8b7bbb 100644 --- a/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md +++ b/docs/c-runtime-library/reference/crtsetdebugfillthreshold.md @@ -1,14 +1,13 @@ --- title: "_CrtSetDebugFillThreshold" description: "Use the _CrtSetDebugFillThreshold function to set the maximum amount of buffer to fill in secure CRT functions." -ms.date: "10/31/2019" +ms.date: 04/10/2025 api_name: ["_CrtSetDebugFillThreshold"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_CrtSetDebugFillThreshold", "CrtSetDebugFillThreshold"] helpviewer_keywords: ["debug, buffer-filling behavior", "CrtSetDebugFillThreshold function", "_CrtSetDebugFillThreshold function", "buffer-filling behavior", "0xFE"] -ms.assetid: 6cb360e8-56ae-4248-b17f-e28aee3e0ed7 --- # `_CrtSetDebugFillThreshold` @@ -38,58 +37,36 @@ The default threshold is `SIZE_T_MAX`. Here's a list of the affected functions: - [`asctime_s`, `_wasctime_s`](asctime-s-wasctime-s.md) - - [`_cgets_s`, `_cgetws_s`](cgets-s-cgetws-s.md) - - [`ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) - - [`_ecvt_s`](ecvt-s.md) - - [`_fcvt_s`](fcvt-s.md) - - [`_gcvt_s`](gcvt-s.md) - - [`_itoa_s`, `_ltoa_s`, `_ultoa_s`, `_i64toa_s`, `_ui64toa_s`, `_itow_s`, `_ltow_s`, `_ultow_s`, `_i64tow_s`, `_ui64tow_s`](itoa-s-itow-s.md) - - [`_makepath_s`, `_wmakepath_s`](makepath-s-wmakepath-s.md) - - [`_mbsnbcat_s`, `_mbsnbcat_s_l`](mbsnbcat-s-mbsnbcat-s-l.md) - - [`_mbsnbcpy_s`, `_mbsnbcpy_s_l`](mbsnbcpy-s-mbsnbcpy-s-l.md) - - [`_mbsnbset_s`, `_mbsnbset_s_l`](mbsnbset-s-mbsnbset-s-l.md) - - [`_mktemp_s`, `_wmktemp_s`](makepath-s-wmakepath-s.md) - - [`_splitpath_s`, `_wsplitpath_s`](splitpath-s-wsplitpath-s.md) - - [`strcat_s`, `wcscat_s`, `_mbscat_s`](strcat-s-wcscat-s-mbscat-s.md) - - [`strcpy_s`, `wcscpy_s`, `_mbscpy_s`](strcpy-s-wcscpy-s-mbscpy-s.md) - - [`_strdate_s`, `_wstrdate_s`](strdate-s-wstrdate-s.md) - - [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](strerror-s-strerror-s-wcserror-s-wcserror-s.md) - - [`_strlwr_s`, `_strlwr_s_l`, `_mbslwr_s`, `_mbslwr_s_l`, `_wcslwr_s`, `_wcslwr_s_l`](strlwr-s-strlwr-s-l-mbslwr-s-mbslwr-s-l-wcslwr-s-wcslwr-s-l.md) - - [`strncat_s`, `_strncat_s_l`, `wcsncat_s`, `_wcsncat_s_l`, `_mbsncat_s`, `_mbsncat_s_l`](strncat-s-strncat-s-l-wcsncat-s-wcsncat-s-l-mbsncat-s-mbsncat-s-l.md) - - [`strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`](strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md) - - [`_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`](strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md) - - [`_strset_s`, `_strset_s_l`, `_wcsset_s`, `_wcsset_s_l`, `_mbsset_s`, `_mbsset_s_l`](strset-s-strset-s-l-wcsset-s-wcsset-s-l-mbsset-s-mbsset-s-l.md) - - [`_strtime_s`, `_wstrtime_s`](strtime-s-wstrtime-s.md) - - [`_strupr_s`, `_strupr_s_l`, `_mbsupr_s`, `_mbsupr_s_l`, `_wcsupr_s`, `_wcsupr_s_l`](strupr-s-strupr-s-l-mbsupr-s-mbsupr-s-l-wcsupr-s-wcsupr-s-l.md) - +- [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, _vsnwpr`intf_s_l](vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) + ## Requirements | Routine | Required header | |---|---| -| **`_CrtSetDebugFillThreshold`** | \ | +| **`_CrtSetDebugFillThreshold`** | `` | This function is Microsoft-specific. For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/cxxthrowexception.md b/docs/c-runtime-library/reference/cxxthrowexception.md index 1bad3b4dd0..2a2a3b87b6 100644 --- a/docs/c-runtime-library/reference/cxxthrowexception.md +++ b/docs/c-runtime-library/reference/cxxthrowexception.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _CxxThrowException" title: "_CxxThrowException" +description: "Learn more about: _CxxThrowException" ms.date: "11/04/2016" api_name: ["_CxxThrowException"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["CxxThrowException", "_CxxThrowException"] helpviewer_keywords: ["_CxxThrowException function", "CxxThrowException function"] -ms.assetid: 0b90bef5-b7d2-46e0-88e2-59e531e01a4d --- # `_CxxThrowException` @@ -18,7 +17,7 @@ Builds the exception record and calls the runtime environment to start processin ```C extern "C" void __stdcall _CxxThrowException( - void* pExceptionObject + void* pExceptionObject, _ThrowInfo* pThrowInfo ); ``` diff --git a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md index cfc0b250e2..047aba34af 100644 --- a/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md +++ b/docs/c-runtime-library/reference/dupenv-s-dbg-wdupenv-s-dbg.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _dupenv_s_dbg, _wdupenv_s_dbg" title: "_dupenv_s_dbg, _wdupenv_s_dbg" +description: "Learn more about: _dupenv_s_dbg, _wdupenv_s_dbg" ms.date: "11/04/2016" api_name: ["_dupenv_s_dbg", "_wdupenv_s_dbg"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_tdupenv_s_dbg", "_dupenv_s_dbg", "_wdupenv_s_dbg"] helpviewer_keywords: ["_tdupenv_s_dbg function", "dupenv_s_dbg function", "_wdupenv_s_dbg function", "environment variables", "tdupenv_s_dbg function", "wdupenv_s_dbg function", "_dupenv_s_dbg function"] -ms.assetid: e3d81148-e24e-46d0-a21d-fd87b5e6256c --- # `_dupenv_s_dbg`, `_wdupenv_s_dbg` @@ -88,7 +87,7 @@ For more compatibility information, see [Compatibility](../compatibility.md). ```C // crt_dupenv_s_dbg.c -#include +#include #include int main( void ) diff --git a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md index e0d4242db2..da9fb11032 100644 --- a/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md +++ b/docs/c-runtime-library/reference/dupenv-s-wdupenv-s.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _dupenv_s, _wdupenv_s" title: "_dupenv_s, _wdupenv_s" +description: "Learn more about: _dupenv_s, _wdupenv_s" ms.date: "4/2/2020" api_name: ["_dupenv_s", "_wdupenv_s", "_o__dupenv_s", "_o__wdupenv_s"] api_location: ["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-environment-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["tdupenv_s", "_dupenv_s", "wdupenv_s", "dupenv_s", "_tdupenv_s", "_wdupenv_s"] helpviewer_keywords: ["_dupenv_s function", "_tdupenv_s function", "_wdupenv_s function", "environment variables", "wdupenv_s function", "dupenv_s function", "tdupenv_s function"] -ms.assetid: b729ecc2-a31d-4ccf-92a7-5accedb8f8c8 --- # `_dupenv_s`, `_wdupenv_s` @@ -89,7 +88,7 @@ For more compatibility information, see [Compatibility](../compatibility.md). ```C // crt_dupenv_s.c -#include +#include int main( void ) { diff --git a/docs/c-runtime-library/reference/exit-exit-exit.md b/docs/c-runtime-library/reference/exit-exit-exit.md index 1ad98c4dc5..bcec154714 100644 --- a/docs/c-runtime-library/reference/exit-exit-exit.md +++ b/docs/c-runtime-library/reference/exit-exit-exit.md @@ -14,7 +14,7 @@ helpviewer_keywords: ["exit function", "_exit function", "processes, terminating Terminates the calling process. The **`exit`** function terminates it after cleanup; **`_exit`** and **`_Exit`** terminate it immediately. > [!NOTE] -> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps). +> Do not use this method to shut down a Universal Windows Platform (UWP) app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). For more information about UWP apps, see [Universal Windows Platform documentation](https://developer.microsoft.com/windows/apps). ## Syntax diff --git a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md index b2d84ff608..bf7a2e2893 100644 --- a/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md +++ b/docs/c-runtime-library/reference/exp2-exp2f-exp2l.md @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["exp2", "math/exp2", "exp2f", "math/exp2f", "exp2l", "math/exp2l"] helpviewer_keywords: ["exp2 function", "exp2f function", "exp2l function"] -ms.assetid: 526e3e10-201a-4610-a886-533f44ece344 --- # `exp2`, `exp2f`, `exp2l` @@ -79,5 +78,5 @@ For more compatibility information, see [Compatibility](../compatibility.md). ## See also [Alphabetical function reference](crt-alphabetical-function-reference.md)\ -[`exp`, `expf`, `expl`](exp-expf.md) +[`exp`, `expf`, `expl`](exp-expf.md)\ [`log2`, `log2f`, `log2l`](log2-log2f-log2l.md) diff --git a/docs/c-runtime-library/reference/findfirst-functions.md b/docs/c-runtime-library/reference/findfirst-functions.md index d34d13c777..dcfbffe363 100644 --- a/docs/c-runtime-library/reference/findfirst-functions.md +++ b/docs/c-runtime-library/reference/findfirst-functions.md @@ -72,7 +72,7 @@ intptr_t _wfindfirst64i32( Target file specification (can include wildcard characters). *`fileinfo`*\ -File information buffer. +File information buffer. For more information about the `fileinfo` structs, see the Remarks in [Filename search functions](../filename-search-functions.md) and see [Data type mappings](../data-type-mappings.md). The structs are defined in the same header file as the function that uses them as a parameter. ## Return value @@ -101,7 +101,7 @@ These functions use various forms of the **`_finddata_t`** structure for the *`f The variations that use a 64-bit time type enable file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC. The ones that use 32-bit time types represent dates only through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions. -Unless you have a specific reason to use the versions that specify the time size explicitly, use **`_findfirst`** or **`_wfindfirst`** or, if you need to support file sizes larger than 3 GB, use **`_findfirsti64`** or **`_wfindfirsti64`**. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this change is a breaking change for an application, you might define `_USE_32BIT_TIME_T` to revert to the old behavior. If `_USE_32BIT_TIME_T` is defined, **`_findfirst`**, **`_finfirsti64`**, and their corresponding Unicode versions use a 32-bit time. +Unless you have a specific reason to use the versions that specify the time size explicitly, use **`_findfirst`** or **`_wfindfirst`** or, if you need to support file sizes larger than 3 GB, use **`_findfirsti64`** or **`_wfindfirsti64`**. All these functions use the 64-bit time type. In earlier versions, these functions used a 32-bit time type. If this change is a breaking change for an application, you might define `_USE_32BIT_TIME_T` to revert to the old behavior. If `_USE_32BIT_TIME_T` is defined, **`_findfirst`**, **`_findfirsti64`**, and their corresponding Unicode versions use a 32-bit time. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). diff --git a/docs/c-runtime-library/reference/floating-point-ordering.md b/docs/c-runtime-library/reference/floating-point-ordering.md index ece44b97be..acdf45961d 100644 --- a/docs/c-runtime-library/reference/floating-point-ordering.md +++ b/docs/c-runtime-library/reference/floating-point-ordering.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered" title: "isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered" +description: "Learn more about: isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered" ms.date: "01/31/2019" f1_keywords: ["isgreater", "math/isgreater", "isgreaterequal", "math/isgreaterequal", "isless", "math/isless", "islessequal", "math/islessequal", "islessgreater", "math/islessgreater", "isunordered", "math/isunordered"] helpviewer_keywords: ["isgreater function", "isgreaterequal function", "isless function", "islessequal function", "islessgreater function", "isunordered function"] @@ -43,7 +43,7 @@ int isunordered( ); /* C-only macro */ ``` -```C++ +```cpp template inline bool isgreater( FloatingType1 x, diff --git a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md index 1efd939eec..6964db2b65 100644 --- a/docs/c-runtime-library/reference/fopen-s-wfopen-s.md +++ b/docs/c-runtime-library/reference/fopen-s-wfopen-s.md @@ -153,6 +153,7 @@ Valid characters for the *`mode`* string used in **`fopen_s`** and [`_fdopen`](f | **`t`** | `_O_TEXT` (translated) | | **`c`** | None | | **`n`** | None | +| **`N`** | `_O_NOINHERIT` | | **`D`** | `_O_TEMPORARY` | | **`R`** | `_O_RANDOM` | | **`S`** | `_O_SEQUENTIAL` | @@ -166,7 +167,7 @@ The **`c`**, **`n`**, **`R`**, **`S`**, **`t`**, **`T`**, and **`D`** *`mode`* o If you're using **`rb`** mode, memory mapped Win32 files might also be an option if you don't need to port your code, you expect to read much of the file, or you don't care about network performance. Regarding `T` and `D`: -- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](https://learn.microsoft.com/archive/blogs/larryosterman/its-only-temporary). +- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary). - `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed. You can combine `TD` to get both semantics. diff --git a/docs/c-runtime-library/reference/fopen-wfopen.md b/docs/c-runtime-library/reference/fopen-wfopen.md index 3756a268d0..22d44f2421 100644 --- a/docs/c-runtime-library/reference/fopen-wfopen.md +++ b/docs/c-runtime-library/reference/fopen-wfopen.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: fopen, _wfopen" title: "fopen, _wfopen" +description: "Learn more about: fopen, _wfopen" ms.date: 04/27/2023 api_name: ["_wfopen", "fopen", "_o__wfopen", "_o_fopen"] api_location: ["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"] @@ -136,7 +136,7 @@ Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdo | Characters in *`mode`* string | Equivalent *`oflag`* value for `_open`/`_sopen` | |--|--| | **`a`** | `_O_WRONLY | _O_APPEND` (usually `_O_WRONLY | _O_CREAT | _O_APPEND`) | -| **`a+`** | `_O_RDWR | _O_APPEND` (usually `_O_RDWR | _O_APPEND | _O_CREAT` ) | +| **`a+`** | `_O_RDWR | _O_APPEND` (usually `_O_RDWR | _O_APPEND | _O_CREAT`) | | **`r`** | `_O_RDONLY` | | **`r+`** | `_O_RDWR` | | **`w`** | `_O_WRONLY` (usually `_O_WRONLY | _O_CREAT | _O_TRUNC`) | @@ -146,6 +146,7 @@ Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdo | **`x`** | `_O_EXCL` | | **`c`** | None | | **`n`** | None | +| **`N`** | `_O_NOINHERIT` | | **`S`** | `_O_SEQUENTIAL` | | **`R`** | `_O_RANDOM` | | **`T`** | `_O_SHORTLIVED` | @@ -157,7 +158,7 @@ Valid characters for the *`mode`* string that is used in **`fopen`** and **`_fdo If you're using **`rb`** mode, you don't have to port your code, and if you expect to read most of a large file or aren't concerned about network performance, you might also consider whether to use memory mapped Win32 files as an option. Regarding `T` and `D`: -- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](https://learn.microsoft.com/archive/blogs/larryosterman/its-only-temporary). +- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary). - `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed. You can combine `TD` to get both semantics. diff --git a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md index 184d2fc5e9..2d972d963a 100644 --- a/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md +++ b/docs/c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md @@ -1,18 +1,20 @@ --- -description: "Learn more about: fprintf, _fprintf_l, fwprintf, _fwprintf_l" -title: "fprintf, _fprintf_l, fwprintf, _fwprintf_l" +description: "Learn more about: fprintf, _fprintf_l, fwprintf, _ftprintf, _ftprintf_l" +title: "fprintf, _fprintf_l, fwprintf, _fwprintf_l, _ftprintf, _ftprintf_l" ms.date: "3/9/2021" -api_name: ["fwprintf", "fprintf", "_fprintf_l", "_fwprintf_l"] +api_name: ["fwprintf", "fprintf", "_fprintf_l", "_fwprintf_l", "_ftprintf", "_ftprintf_l"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["fprintf", "fwprintf", "_ftprintf"] -helpviewer_keywords: ["_fwprintf_l function", "fprintf function", "fprintf_l function", "_fprintf_l function", "_ftprintf function", "fwprintf function", "ftprintf_l function", "ftprintf function", "_ftprintf_l function", "print formatted data to streams", "fwprintf_l function"] +f1_keywords: ["fprintf", "fwprintf", "_ftprintf", "_fwprintf_l", "_ftprintf_l"] +helpviewer_keywords: ["fprintf function", "fprintf_l function", "_fprintf_l function", "_ftprintf function", "fwprintf function", "ftprintf_l function", "ftprintf function", "print formatted data to streams", "fwprintf_l function", "_ftprintf_l function"] --- -# `fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l` +# `fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`, `_ftprintf`, `_ftprintf_l` Print formatted data to a stream. More secure versions of these functions are available; see [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md). +For `_ftprintf` and `_ftprintf_l`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -73,12 +75,14 @@ The versions of these functions with the **`_l`** suffix are identical except th > > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| **`_ftprintf`** | **`fprintf`** | **`fprintf`** | **`fwprintf`** | -| **`_ftprintf_l`** | **`_fprintf_l`** | **`_fprintf_l`** | **`_fwprintf_l`** | +| `_ftprintf` | `fprintf` | `fprintf` | `fwprintf` | +| `_ftprintf_l` | `_fprintf_l` | `_fprintf_l` | `_fwprintf_l` | For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). diff --git a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md index 877bf4a16d..8ed284f343 100644 --- a/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md +++ b/docs/c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md @@ -1,18 +1,20 @@ --- -description: "Learn more about: _fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l" +description: "Learn more about: _fprintf_p, _fprintf_p_l, _ftprintf_p, _ftprintf_p_l, _fwprintf_p, _fwprintf_p_l" title: "_fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l" ms.date: "3/9/2021" api_name: ["_fwprintf_p", "_fprintf_p_l", "_fwprintf_p_l", "_fprintf_p"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["_fprintf_p", "_ftprintf_p", "fwprintf_p", "_fwprintf_p", "fprintf_p", "ftprintf_p"] -helpviewer_keywords: ["fprintf_p_l function", "fprintf_p function", "_fprintf_p_l function", "_fprintf_p function", "_ftprintf_p_l function", "streams, printing formatted data to", "_fwprintf_p function", "fwprintf_p function", "_ftprintf_p function", "_fwprintf_p_l function", "ftprintf_p function", "printing [C++], formatted data to streams", "ftprintf_p_l function", "fwprintf_p_l function"] +f1_keywords: ["_fprintf_p", "_ftprintf_p", "_ftprintf_p_l", "fwprintf_p", "_fwprintf_p", "fprintf_p", "ftprintf_p", "_fwprintf_p_l"] +helpviewer_keywords: ["fprintf_p_l function", "fprintf_p function", "_fprintf_p_l function", "_fprintf_p function", "_ftprintf_p function", "_ftprintf_p_l function", "streams, printing formatted data to", "_fwprintf_p function", "fwprintf_p function", "_fwprintf_p_l function", "ftprintf_p function", "printing [C++], formatted data to streams", "ftprintf_p_l function", "fwprintf_p_l function"] --- -# `_fprintf_p`, `_fprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l` +# `_fprintf_p`, `_fprintf_p_l`, `_ftprintf_p`, `_ftprintf_p_l`, `_fwprintf_p`, `_fwprintf_p_l` Prints formatted data to a stream. +For `_ftprintf_p` and `_ftprintf_p_l`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -73,12 +75,14 @@ The versions of these functions with the `_l` suffix are identical except that t Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a null pointer or if there are any unknown or badly formed formatting specifiers. If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| `_ftprintf_p` | **`_fprintf_p`** | **`_fprintf_p`** | **`_fwprintf_p`** | -| `_ftprintf_p_l` | **`_fprintf_p_l`** | **`_fprintf_p_l`** | **`_fwprintf_p_l`** | +| `_ftprintf_p` | `_fprintf_p` | `_fprintf_p` | `_fwprintf_p` | +| `_ftprintf_p_l` | `_fprintf_p_l` | `_fprintf_p_l` | `_fwprintf_p_l` | For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). @@ -86,8 +90,8 @@ For more information, see [Format specification syntax](../format-specification- | Function | Required header | |---|---| -| **`_fprintf_p`**, **`_fprintf_p_l`** | \ | -| **`_fwprintf_p`**, **`_fwprintf_p_l`** | \ or \ | +| `_fprintf_p`, `_fprintf_p_l` | `` | +| `_fwprintf_p`, `_fwprintf_p_l` | `` or `` | For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md index 9cdfdff5fc..225ec4abc7 100644 --- a/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md +++ b/docs/c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md @@ -1,18 +1,20 @@ --- -description: "Learn more about: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l" -title: "fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l" +description: "Learn more about: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf_s, _ftprintf_s_l" +title: "fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf_s, _ftprintf_s_l" ms.date: "3/9/2021" -api_name: ["_fprintf_s_l", "fwprintf_s", "fprintf_s", "_fwprintf_s_l"] +api_name: ["_fprintf_s_l", "fwprintf_s", "fprintf_s", "_fwprintf_s_l", "_ftprintf_s", "_ftprintf_s_l"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["_ftprintf_s", "fprintf_s", "fwprintf_s"] -helpviewer_keywords: ["ftprintf_s_l function", "ftprintf_s function", "_fprintf_s_l function", "_ftprintf_s function", "_ftprintf_s_l function", "fwprintf_s_l function", "fwprintf_s function", "fprintf_s_l function", "fprintf_s function", "_fwprintf_s_l function", "print formatted data to streams"] +f1_keywords: ["_ftprintf_s", "_ftprintf_s_l", "fprintf_s", "fwprintf_s", "_fwprintf_s_l", "_ftprintf", "_ftprintf_l"] +helpviewer_keywords: ["ftprintf_s_l function", "ftprintf_s function", "_ftprintf_l function", "_fprintf_s_l function", "_ftprintf_s function", "_ftprintf_s_l function", "fwprintf_s_l function", "fwprintf_s function", "fprintf_s_l function", "fprintf_s function", "_fwprintf_s_l function", "_fwprintf_s_l function", "print formatted data to streams"] --- -# `fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l` +# `fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`, `_ftprintf`, `_ftprintf_l`, `_ftprintf_s`, `_ftprintf_s_l` Print formatted data to a stream. These functions are versions of [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). +For `_ftprintf_s` and `_ftprintf_s_l`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -69,17 +71,18 @@ The versions of these functions with the **`_l`** suffix are identical except th > [!IMPORTANT] > Ensure that *`format`* is not a user-defined string. > -> > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). Like the non-secure versions (see [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)), these functions validate their parameters and invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md), if either *`stream`* or *`format`* is a `NULL` pointer. The format string itself is also validated. If there are any unknown or badly formed formatting specifiers, these functions generate the invalid parameter exception. In all cases, If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. For more information about return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| **`_ftprintf_s`** | **`fprintf_s`** | **`fprintf_s`** | **`fwprintf_s`** | -| **`_ftprintf_s_l`** | **`_fprintf_s_l`** | **`_fprintf_s_l`** | **`_fwprintf_s_l`** | +| `_ftprintf_s` | `fprintf_s` | `fprintf_s` | `fwprintf_s` | +| `_ftprintf_s_l` | `_fprintf_s_l` | `_fprintf_s_l` | `_fwprintf_s_l` | For more information, see [Format specification syntax](../format-specification-syntax-printf-and-wprintf-functions.md). diff --git a/docs/c-runtime-library/reference/fsopen-wfsopen.md b/docs/c-runtime-library/reference/fsopen-wfsopen.md index 8f558b4def..5f2c003e22 100644 --- a/docs/c-runtime-library/reference/fsopen-wfsopen.md +++ b/docs/c-runtime-library/reference/fsopen-wfsopen.md @@ -76,7 +76,7 @@ When a file is opened with the **"`a`"** or **"`a+`"** access type, all write op If **`t`** or **`b`** isn't given in *`mode`*, the translation mode is defined by the default-mode variable **`_fmode`**. If **`t`** or **`b`** is prefixed to the argument, the function fails and returns `NULL`. For a discussion of text and binary modes, see [Text and binary mode file I/O](../text-and-binary-mode-file-i-o.md). Regarding `T` and `D`: -- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](https://learn.microsoft.com/archive/blogs/larryosterman/its-only-temporary). +- `T` avoids writing the file to disk as long as memory pressure doesn't require it. For more information, see `FILE_ATTRIBUTE_TEMPORARY` in [File attribute constants](/windows/win32/fileio/file-attribute-constants), and also this blog post [It's only temporary](/archive/blogs/larryosterman/its-only-temporary). - `D` specifies a regular file that is written to disk. The difference is that it's automatically deleted when it's closed. You can combine `TD` to get both semantics. diff --git a/docs/c-runtime-library/reference/fwide.md b/docs/c-runtime-library/reference/fwide.md index f21511e106..71113cfe48 100644 --- a/docs/c-runtime-library/reference/fwide.md +++ b/docs/c-runtime-library/reference/fwide.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: fwide" title: "fwide" -ms.date: "11/04/2016" +description: "Learn more about: fwide" +ms.date: 11/04/2016 api_name: ["fwide"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["fwide"] helpviewer_keywords: ["fwide function"] -ms.assetid: a4641f5b-d74f-4946-95d5-53a64610d28d --- # `fwide` @@ -19,7 +18,7 @@ Unimplemented. ```C int fwide( FILE *stream, - int mode; + int mode ); ``` diff --git a/docs/c-runtime-library/reference/heapchk.md b/docs/c-runtime-library/reference/heapchk.md index 589d119aef..4e77c83690 100644 --- a/docs/c-runtime-library/reference/heapchk.md +++ b/docs/c-runtime-library/reference/heapchk.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _heapchk" title: "_heapchk" +description: "Learn more about: _heapchk" ms.date: "4/2/2020" api_name: ["_heapchk", "_o__heapchk"] api_location: ["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-heap-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_heapchk", "heapchk"] helpviewer_keywords: ["debugging [CRT], heap-related problems", "consistency checking of heaps", "heapchk function", "heaps, checking consistency", "_heapchk function"] -ms.assetid: 859619a5-1e35-4f02-9e09-11d9fa266ec0 --- # `_heapchk` @@ -36,7 +35,7 @@ In addition, if an error occurs, **`_heapchk`** sets `errno` to `ENOSYS`. ## Remarks -The **`_heapchk`** function helps debug heap-related problems by checking for minimal consistency of the heap. If the operating system doesn't support **`_heapchk`**(for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`. +The **`_heapchk`** function helps debug heap-related problems by checking for minimal consistency of the heap. If the operating system doesn't support **`_heapchk`** (for example, Windows 98), the function returns `_HEAPOK` and sets `errno` to `ENOSYS`. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). diff --git a/docs/c-runtime-library/reference/heapmin.md b/docs/c-runtime-library/reference/heapmin.md index ffee2908c1..f5f5e5671a 100644 --- a/docs/c-runtime-library/reference/heapmin.md +++ b/docs/c-runtime-library/reference/heapmin.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _heapmin" title: "_heapmin" +description: "Learn more about: _heapmin" ms.date: "4/2/2020" api_name: ["_heapmin", "_o__heapmin"] api_location: ["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-heap-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_heapmin", "heapmin"] helpviewer_keywords: ["heap memory", "minimizing heaps", "memory, releasing", "heaps, releasing unused memory", "_heapmin function", "heapmin function"] -ms.assetid: c0bccdf6-2d14-4d7b-a7ff-d6a17bdb410f --- # `_heapmin` @@ -28,7 +27,7 @@ For more information about this and other return codes, see [`errno`, `_doserrno ## Remarks -The **`_heapmin`** function minimizes the heap by releasing unused heap memory to the operating system. If the operating system doesn't support **`_heapmin`**(for example, Windows 98), the function returns -1 and sets `errno` to `ENOSYS`. +The **`_heapmin`** function minimizes the heap by releasing unused heap memory to the operating system. If the operating system doesn't support **`_heapmin`** (for example, Windows 98), the function returns -1 and sets `errno` to `ENOSYS`. By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). diff --git a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md index 02dded213e..f95d12c979 100644 --- a/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md +++ b/docs/c-runtime-library/reference/islower-iswlower-islower-l-iswlower-l.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: islower, iswlower, _islower_l, _iswlower_l" title: "islower, iswlower, _islower_l, _iswlower_l" -ms.date: "4/2/2020" +description: "Learn more about: islower, iswlower, _islower_l, _iswlower_l" +ms.date: 4/2/2020 api_name: ["iswlower", "_islower_l", "islower", "_iswlower_l", "_o_islower", "_o_iswlower"] api_location: ["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-string-l1-1-0.dll", "ntoskrnl.exe"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_istlower", "islower", "_ismbclower_l", "_liswlower_l", "_istlower_l", "_iswlower_l", "_islower _l", "_islower_l", "iswlower"] helpviewer_keywords: ["_islower _l function", "_ismbclower_l function", "islower function", "_iswlower_l function", "_liswlower_l function", "_istlower_l function", "istlower function", "_istlower function", "iswlower function", "_islower_l function"] -ms.assetid: fcc3b70a-2b47-45fd-944d-e5c1942e6457 --- # `islower`, `iswlower`, `_islower_l`, `_iswlower_l` @@ -54,7 +53,7 @@ The behavior of **`islower`** and **`_islower_l`** is undefined if *`c`* isn't E | TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| | `_istlower` | **`islower`** | [`_ismbclower`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`iswlower`** | -| **`_istlower_l`** | `_islower _l` | [`_ismbclower_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`_liswlower_l`** | +| **`_istlower_l`** | `_islower_l` | [`_ismbclower_l`](ismbclower-ismbclower-l-ismbcupper-ismbcupper-l.md) | **`_liswlower_l`** | ## Remarks @@ -64,10 +63,10 @@ By default, this function's global state is scoped to the application. To change | Routine | Required header | |---|---| -| **`islower`** | \ | -| **`iswlower`** | \ or \ | -| **`_islower_l`** | \ | -| **`_swlower_l`** | \ or \ | +| **`islower`** | `` | +| **`iswlower`** | `` or `` | +| **`_islower_l`** | `` | +| **`_swlower_l`** | `` or `` | For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/itoa-itow.md b/docs/c-runtime-library/reference/itoa-itow.md index 48046135b6..1f03714208 100644 --- a/docs/c-runtime-library/reference/itoa-itow.md +++ b/docs/c-runtime-library/reference/itoa-itow.md @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_itoa", "_ltoa", "_ultoa", "_i64toa", "_ui64toa", "_itow", "_ltow", "_ultow", "_i64tow", "_ui64tow", "itoa", "ltoa", "ultoa", "i64toa", "ui64toa", "itow", "ltow", "ultow", "i64tow", "ui64tow", "itot", "_itot", "ltot", "_ltot", "ultot", "_ultot", "i64tot", "_i64tot", "ui64tot", "_ui64tot", "_MAX_ITOSTR_BASE16_COUNT", "_MAX_ITOSTR_BASE10_COUNT", "_MAX_ITOSTR_BASE8_COUNT", "_MAX_ITOSTR_BASE2_COUNT", "_MAX_LTOSTR_BASE16_COUNT", "_MAX_LTOSTR_BASE10_COUNT", "_MAX_LTOSTR_BASE8_COUNT", "_MAX_LTOSTR_BASE2_COUNT", "_MAX_ULTOSTR_BASE16_COUNT", "_MAX_ULTOSTR_BASE10_COUNT", "_MAX_ULTOSTR_BASE8_COUNT", "_MAX_ULTOSTR_BASE2_COUNT", "_MAX_I64TOSTR_BASE16_COUNT", "_MAX_I64TOSTR_BASE10_COUNT", "_MAX_I64TOSTR_BASE8_COUNT", "_MAX_I64TOSTR_BASE2_COUNT", "_MAX_U64TOSTR_BASE16_COUNT", "_MAX_U64TOSTR_BASE10_COUNT", "_MAX_U64TOSTR_BASE8_COUNT", "_MAX_U64TOSTR_BASE2_COUNT"] helpviewer_keywords: ["_itot function", "ui64toa function", "_ui64toa function", "converting integers", "itot function", "_i64tow function", "_i64toa function", "_itow function", "ui64tow function", "integers, converting", "itoa function", "_ui64tow function", "i64tow function", "itow function", "i64toa function", "converting numbers, to strings", "_itoa function"] -ms.assetid: 46592a00-77bb-4e73-98c0-bf629d96cea6 --- # `itoa`, `_itoa`, `ltoa`, `_ltoa`, `ultoa`, `_ultoa`, `_i64toa`, `_ui64toa`, `_itow`, `_ltow`, `_ultow`, `_i64tow`, `_ui64tow` @@ -137,7 +136,7 @@ This example uses a conversion count macro to define a buffer large enough to co int main() { wchar_t buffer[_MAX_U64TOSTR_BASE2_COUNT]; - std:wcout << _ui64tow(0xFFFFFFFFFFFFFFFFull, buffer, 2) << std::endl; + std::wcout << _ui64tow(0xFFFFFFFFFFFFFFFFull, buffer, 2) << std::endl; } ``` diff --git a/docs/c-runtime-library/reference/kbhit.md b/docs/c-runtime-library/reference/kbhit.md index e4f1f9cfb7..3d89e65caa 100644 --- a/docs/c-runtime-library/reference/kbhit.md +++ b/docs/c-runtime-library/reference/kbhit.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _kbhit" title: "_kbhit" +description: "Learn more about: _kbhit" ms.date: "4/2/2020" api_name: ["_kbhit", "_o__kbhit"] api_location: ["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"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_kbhit", "conio/_kbhit"] helpviewer_keywords: ["keyboard input", "user input, checking for keyboard", "kbhit function", "console", "console, checking", "keyboards, keyboard input", "_kbhit function", "keyboards, checking input"] -ms.assetid: e82a1cc9-bbec-4150-b678-a7e433220fe4 --- # `_kbhit` @@ -20,7 +19,6 @@ Checks the console for keyboard input. ## Syntax ```C - int _kbhit( void ); ``` diff --git a/docs/c-runtime-library/reference/log-logf-log10-log10f.md b/docs/c-runtime-library/reference/log-logf-log10-log10f.md index 475f466870..4ff277f7b0 100644 --- a/docs/c-runtime-library/reference/log-logf-log10-log10f.md +++ b/docs/c-runtime-library/reference/log-logf-log10-log10f.md @@ -122,9 +122,9 @@ Log base 2 of 65536.000000 is 16.000000 ## See also -[Math and floating-point support](../floating-point-support.md) \ -[`exp`, `expf`, `expl`](exp-expf.md) \ -[`_matherr`](matherr.md) \ -[`pow`, `powf`, `powl`](pow-powf-powl.md) \ -[`_CIlog`](../cilog.md) \ -[`_CIlog10`](../cilog10.md)\ +[Math and floating-point support](../floating-point-support.md)\ +[`exp`, `expf`, `expl`](exp-expf.md)\ +[`_matherr`](matherr.md)\ +[`pow`, `powf`, `powl`](pow-powf-powl.md)\ +[`_CIlog`](../cilog.md)\ +[`_CIlog10`](../cilog10.md) diff --git a/docs/c-runtime-library/reference/longjmp.md b/docs/c-runtime-library/reference/longjmp.md index e94b1110c1..da78b65d11 100644 --- a/docs/c-runtime-library/reference/longjmp.md +++ b/docs/c-runtime-library/reference/longjmp.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: longjmp" title: "longjmp" +description: "Learn more about: longjmp" ms.date: "1/14/2021" api_name: ["longjmp"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["longjmp"] helpviewer_keywords: ["restoring stack environment and execution locale", "longjmp function"] -ms.assetid: 0e13670a-5130-45c1-ad69-6862505b7a2f --- # `longjmp` @@ -75,5 +74,5 @@ See the example for [`_fpreset`](fpreset.md). ## See also -[Process and environment control](../process-and-environment-control.md) +[Process and environment control](../process-and-environment-control.md)\ [`setjmp`](setjmp.md) diff --git a/docs/c-runtime-library/reference/malloca.md b/docs/c-runtime-library/reference/malloca.md index 9953a91657..56b67ffeb9 100644 --- a/docs/c-runtime-library/reference/malloca.md +++ b/docs/c-runtime-library/reference/malloca.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: _malloca" title: "_malloca" -ms.date: "11/04/2016" +description: "Learn more about: _malloca" +ms.date: 11/04/2016 api_name: ["_malloca"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] @@ -38,7 +38,7 @@ If *`size`* is greater than `_ALLOCA_S_THRESHOLD`, then **`_malloca`** attempts There are restrictions to explicitly calling **`_malloca`** in an exception handler (EH). EH routines that run on x86-class processors operate in their own memory frame: They perform their tasks in memory space that isn't based on the current location of the stack pointer of the enclosing function. The most common implementations include Windows NT structured exception handling (SEH) and C++ catch clause expressions. Therefore, explicitly calling **`_malloca`** in any of the following scenarios results in program failure during the return to the calling EH routine: -- Windows SEH exception filter expression: **`__except`** (`_malloca ()` ) +- Windows SEH exception filter expression: **`__except`** (`_malloca ()`) - Windows SEH final exception handler: **`__finally`** {`_malloca ()` } diff --git a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md index abff8af776..d3e9461cbe 100644 --- a/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md +++ b/docs/c-runtime-library/reference/mbbtype-mbbtype-l.md @@ -50,9 +50,9 @@ The locale to use. |---|---|---|---| | Any value except 1 | Valid single byte or lead byte | `_MBC_SINGLE` (0) | Single byte (0x20 - 0x7E, 0xA1 - 0xDF) | | Any value except 1 | Valid single byte or lead byte | `_MBC_LEAD` (1) | Lead byte of multibyte character (0x81 - 0x9F, 0xE0 - 0xFC) | -| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL`

(-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC | +| Any value except 1 | Valid single-byte or lead byte | `_MBC_ILLEGAL` (-1) | Invalid character: not single or lead (0x00 - 0x1F, 0x7F, 0x80, 0xA0, 0xFD, 0xFE, 0xFF) | | 1 | Valid trail byte | `_MBC_TRAIL` (2) | Trailing byte of multibyte character (0x40 - 0x7E, 0x80 - 0xFC) | -| 1 | Valid trail byte | `_MBC_ILLEGAL`

(-1) | Invalid character (any value except 0x20 - 0x7E, 0xA1 - 0xDF, 0x81 - 0x9F, 0xE0 - 0xFC | +| 1 | Valid trail byte | `_MBC_ILLEGAL` (-1) | Invalid character: not trailing (0x00 - 0x3F, 0x7F, 0xFD, 0xFE, 0xFF) | ## Remarks diff --git a/docs/c-runtime-library/reference/mbrtowc.md b/docs/c-runtime-library/reference/mbrtowc.md index b8634e50a7..7c64576e18 100644 --- a/docs/c-runtime-library/reference/mbrtowc.md +++ b/docs/c-runtime-library/reference/mbrtowc.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: mbrtowc" title: "mbrtowc" -ms.date: "4/2/2020" +description: "Learn more about: mbrtowc" +ms.date: 4/2/2020 api_name: ["mbrtowc", "_o_mbrtowc"] api_location: ["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-convert-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["mbrtowc"] helpviewer_keywords: ["mbrtowc function"] -ms.assetid: a1e87fcc-6de0-4ca1-bf26-508d28490286 --- # `mbrtowc` @@ -100,7 +99,7 @@ int Sample(char* szIn, wchar_t* wcOut, int nMax) szLocal = setlocale(LC_ALL, "French_Canada.1252"); if (!szLocal) { - printf("The fuction setlocale(LC_ALL, \"French_Canada.1252\") failed!\n"); + printf("The function setlocale(LC_ALL, \"French_Canada.1252\") failed!\n"); return 1; } @@ -110,7 +109,7 @@ int Sample(char* szIn, wchar_t* wcOut, int nMax) // from a previous call to setlocale. if (_setmbcp(_MB_CP_SBCS) == -1) { - printf("The fuction _setmbcp(_MB_CP_SBCS) failed!"); + printf("The function _setmbcp(_MB_CP_SBCS) failed!"); return 1; } diff --git a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md index 903e87992a..9fa6a973f5 100644 --- a/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md +++ b/docs/c-runtime-library/reference/mbsnbset-s-mbsnbset-s-l.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: _mbsnbset_s, _mbsnbset_s_l" title: "_mbsnbset_s, _mbsnbset_s_l" -ms.date: "4/2/2020" +description: "Learn more about: _mbsnbset_s, _mbsnbset_s_l" +ms.date: 4/2/2020 api_name: ["_mbsnbset_s_l", "_mbsnbset_s", "_o__mbsnbset_s", "_o__mbsnbset_s_l"] api_location: ["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-multibyte-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["mbsnbset_s", "_mbsnbset_s_l", "_mbsnbset_s", "mbsnbset_s_l"] helpviewer_keywords: ["tcsnset_s function", "mbsnbset_s function", "mbsnbset_s_l function", "_mbsnbset_s_l function", "_tcsnset_s_l function", "_mbsnbset_s function", "_tcsnset_s function", "tcsnset_s_l function"] -ms.assetid: 811f92c9-cc31-4bbd-8017-2d1bfc6fb96f --- # `_mbsnbset_s`, `_mbsnbset_s_l` @@ -90,14 +89,14 @@ By default, this function's global state is scoped to the application. To change | Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| | `_tcsnset_s` | `_strnset_s` | **`_mbsnbset_s`** | `_wcsnset_s` | -| `_tcsnset_s_l` | `_strnset_s _l` | **`_mbsnbset_s_l`** | `_wcsnset_s_l` | +| `_tcsnset_s_l` | `_strnset_s_l` | **`_mbsnbset_s_l`** | `_wcsnset_s_l` | ## Requirements | Routine | Required header | |---|---| -| **`_mbsnbset_s`** | \ | -| **`_mbsnbset_s_l`** | \ | +| **`_mbsnbset_s`** | `` | +| **`_mbsnbset_s_l`** | `` | For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/mkdir-wmkdir.md b/docs/c-runtime-library/reference/mkdir-wmkdir.md index 43a9a54ba6..f01bf458e6 100644 --- a/docs/c-runtime-library/reference/mkdir-wmkdir.md +++ b/docs/c-runtime-library/reference/mkdir-wmkdir.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _mkdir, _wmkdir" title: "_mkdir, _wmkdir" +description: "Learn more about: _mkdir, _wmkdir" ms.date: "4/2/2020" api_name: ["_wmkdir", "_mkdir", "_o__mkdir", "_o__wmkdir"] api_location: ["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-filesystem-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_mkdir", "tmkdir", "_tmkdir", "wmkdir", "_wmkdir"] helpviewer_keywords: ["_wmkdir function", "folders [C++], creating", "wmkdir function", "directories [C++], creating", "mkdir function", "tmkdir function", "_mkdir function", "_tmkdir function"] -ms.assetid: 7f22d01d-63a5-4712-a6e7-d34878b2d840 --- # `_mkdir`, `_wmkdir` @@ -17,7 +16,6 @@ Creates a new directory. ## Syntax ```C - int _mkdir( const char *dirname ); diff --git a/docs/c-runtime-library/reference/msize-dbg.md b/docs/c-runtime-library/reference/msize-dbg.md index b1edd1a907..01ea05ea49 100644 --- a/docs/c-runtime-library/reference/msize-dbg.md +++ b/docs/c-runtime-library/reference/msize-dbg.md @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_msize_dbg", "msize_dbg"] helpviewer_keywords: ["memory blocks", "_msize_dbg function", "msize_dbg function"] -ms.assetid: a333f4b6-f8a2-4e61-bb69-cb34063b8cef --- # `_msize_dbg` @@ -41,13 +40,13 @@ On successful completion, **`_msize_dbg`** returns the size (in bytes) of the sp For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](../crt-debug-heap-details.md). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](../crt-debug-heap-details.md#types-of-blocks-on-the-debug-heap). For information about the differences between standard heap functions and the debug versions, see [Debug versions of heap allocation functions](../debug-versions-of-heap-allocation-functions.md). -This function validates its parameter. If *`memblock`* is a null pointer, **`_msize_dbg`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1. +This function validates its parameter. If *`memblock`* is a null pointer, **`_msize_dbg`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1 (18,446,744,073,709,551,615 unsigned). ## Requirements | Routine | Required header | |---|---| -| **`_msize_dbg`** | \ | +| **`_msize_dbg`** | `` | For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/msize.md b/docs/c-runtime-library/reference/msize.md index db66cf4361..b5d1cad10b 100644 --- a/docs/c-runtime-library/reference/msize.md +++ b/docs/c-runtime-library/reference/msize.md @@ -1,7 +1,7 @@ --- description: "Learn more about: _msize" title: "_msize" -ms.date: "4/2/2020" +ms.date: 07/26/2024 api_name: ["_msize", "_o__msize"] api_location: ["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-heap-l1-1-0.dll"] api_type: ["DLLExport"] @@ -36,7 +36,7 @@ The **`_msize`** function returns the size, in bytes, of the memory block alloca When the application is linked with a debug version of the C run-time libraries, **`_msize`** resolves to [`_msize_dbg`](msize-dbg.md). For more information about how the heap is managed during the debugging process, see [The CRT debug heap](../crt-debug-heap-details.md). -This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1. +This function validates its parameter. If *`memblock`* is a `NULL` pointer, **`_msize`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1 (18,446,744,073,709,551,615 unsigned). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). diff --git a/docs/c-runtime-library/reference/nextafter-functions.md b/docs/c-runtime-library/reference/nextafter-functions.md index da24da3c06..f4945d818e 100644 --- a/docs/c-runtime-library/reference/nextafter-functions.md +++ b/docs/c-runtime-library/reference/nextafter-functions.md @@ -56,7 +56,7 @@ The **`nextafter`** and **`nexttoward`** function families are equivalent, excep Because C++ allows overloading, if you include `` you can call overloads of **`nextafter`** and **`nexttoward`** that return **`float`** and **`long double`** types. In a C program, unless you're using the `` macro to call this function, **`nextafter`** and **`nexttoward`** always return **`double`**. -If you use the `nextafter` or `nexttoward`macro from ``, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. +If you use the `nextafter` or `nexttoward` macro from ``, the type of the argument determines which version of the function is selected. See [Type-generic math](../tgmath.md) for details. The **`_nextafter`** and **`_nextafterf`** functions are Microsoft-specific. The **`_nextafterf`** function is only available when compiling for x64. diff --git a/docs/c-runtime-library/reference/not-eq.md b/docs/c-runtime-library/reference/not-eq.md index e89211cb5c..90877cd219 100644 --- a/docs/c-runtime-library/reference/not-eq.md +++ b/docs/c-runtime-library/reference/not-eq.md @@ -1,17 +1,16 @@ --- description: "Learn more about: not_eq" title: "not_eq" -ms.date: "11/04/2016" +ms.date: 08/09/2024 api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["ISO646/not_eq", "not_eq", "std::not_eq", "std.not_eq"] helpviewer_keywords: ["not_eq function"] -ms.assetid: d87ad299-8b50-4393-a57f-06f70e1f23fb --- # `not_eq` -An alternative to the **`!=`** operator. +An alternative spelling for the **`!=`** operator. ## Syntax @@ -21,34 +20,40 @@ An alternative to the **`!=`** operator. ## Remarks -The macro yields the operator **`!=`**. +C++: +- **`not_eq`** can be used as alternative to **`!=`**. The [`/permissive-`](../../build/reference/permissive-standards-conformance.md) or [`/Za`](../../build/reference/za-ze-disable-language-extensions.md) compiler option is required. +- Including `` or `` is deprecated. You can use the alternative spelling without including any header files. +- There's no alternative spelling for **`==`**. + +C: +- **`not_eq`** is an alternative spelling for **`!=`**. It is provided as a macro in ``, which you must `#include`. +- There's no alternative spelling for **`==`**. ## Example ```cpp -// iso646_not_eq.cpp // compile with: /EHsc #include #include int main( ) { - using namespace std; - int a = 0, b = 1; - - if (a != b) - cout << "a is not equal to b" << endl; - - if (a not_eq b) - cout << "a is not equal to b" << endl; + int x = 1, y = 2; + + // not_eq is available in C++ and C + // This example is for C++, so no header file is needed to use not_eq + // When compiling for C, #include to use not_eq + if (x not_eq y) + { + std::cout << "Not equal\n"; + } } ``` ```Output -a is not equal to b -a is not equal to b +Not equal ``` ## Requirements -**Header:** \ +**Header:** `` is necessary if you are compiling for C. \ No newline at end of file diff --git a/docs/c-runtime-library/reference/not.md b/docs/c-runtime-library/reference/not.md index 54b1235ef3..a878828337 100644 --- a/docs/c-runtime-library/reference/not.md +++ b/docs/c-runtime-library/reference/not.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: not" title: "not" +description: "Learn more about: not" ms.date: "11/04/2016" api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["std::not", "std.not", "ISO646/not", "not"] helpviewer_keywords: ["not function"] -ms.assetid: d2ddbd5c-33c0-4aff-8961-feac155b4ba1 --- # `not` @@ -16,7 +15,6 @@ An alternative to the **`!`** operator. ## Syntax ```C - #define not ! ``` diff --git a/docs/c-runtime-library/reference/or-eq.md b/docs/c-runtime-library/reference/or-eq.md index f9861186e4..86d34f9fb7 100644 --- a/docs/c-runtime-library/reference/or-eq.md +++ b/docs/c-runtime-library/reference/or-eq.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: or_eq" title: "or_eq" +description: "Learn more about: or_eq" ms.date: "11/04/2016" api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["std::or_eq", "ISO646/or_eq", "or_eq", "std.or_eq"] helpviewer_keywords: ["or_eq function"] -ms.assetid: 1eb92464-ed58-40d8-a30e-f0a6aa2f4318 --- # `or_eq` @@ -16,7 +15,6 @@ An alternative to the `|=` operator. ## Syntax ```C - #define or_eq |= ``` diff --git a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md index 31b8fd94bb..6437099f5c 100644 --- a/docs/c-runtime-library/reference/putenv-s-wputenv-s.md +++ b/docs/c-runtime-library/reference/putenv-s-wputenv-s.md @@ -1,21 +1,23 @@ --- description: "Learn more about: _putenv_s, _wputenv_s" -title: "_putenv_s, _wputenv_s" +title: "_putenv_s, _wputenv_s, _tputenv_s" ms.date: "4/2/2020" -api_name: ["_wputenv_s", "_putenv_s", "_o__putenv_s", "_o__wputenv_s"] +api_name: ["_wputenv_s", "_putenv_s", "_tputenv_s", "_o__putenv_s", "_o__wputenv_s"] api_location: ["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-environment-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["putenv_s", "wputenv_s", "_wputenv_s", "_putenv_s"] -helpviewer_keywords: ["wputenv_s function", "_putenv_s function", "environment variables, deleting", "putenv_s function", "_wputenv_s function", "environment variables, creating", "environment variables, modifying"] +f1_keywords: ["putenv_s", "wputenv_s", "_wputenv_s", "_putenv_s", "_tputenv_s"] +helpviewer_keywords: ["wputenv_s function", "_putenv_s function", "environment variables, deleting", "putenv_s function", "_wputenv_s function", "environment variables, creating", "environment variables, modifying", "_tputenv_s function"] --- -# `_putenv_s`, `_wputenv_s` +# `_putenv_s`, `_wputenv_s`, `_tputenv_s` Creates, modifies, or removes environment variables. These functions are versions of [`_putenv`, `_wputenv`](putenv-wputenv.md) that have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > This API cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). +For `_tputenv_s`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -56,11 +58,13 @@ The **`_putenv_s`** function adds new environment variables or modifies the valu By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| `_tputenv_s` | **`_putenv_s`** | **`_putenv_s`** | **`_wputenv_s`** | +| `_tputenv_s` | `_putenv_s` | `_putenv_s` | `_wputenv_s` | *`varname`* is the name of the environment variable to be added or modified and *`value_string`* is the variable's value. If *`varname`* is already part of the environment, its value is replaced by *`value_string`*; otherwise, the new *`varname`* variable and its *`value_string`* are added to the environment. You can remove a variable from the environment by specifying an empty string (that is, `""`) for *`value_string`*. diff --git a/docs/c-runtime-library/reference/raise.md b/docs/c-runtime-library/reference/raise.md index 2b33716eae..e3fe3e05b6 100644 --- a/docs/c-runtime-library/reference/raise.md +++ b/docs/c-runtime-library/reference/raise.md @@ -14,7 +14,7 @@ helpviewer_keywords: ["signals, sending to executing programs", "raise function" Sends a signal to the executing program. > [!NOTE] -> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). +> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). ## Syntax diff --git a/docs/c-runtime-library/reference/recalloc.md b/docs/c-runtime-library/reference/recalloc.md index 2e10f1ee09..09cd09dea3 100644 --- a/docs/c-runtime-library/reference/recalloc.md +++ b/docs/c-runtime-library/reference/recalloc.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _recalloc" title: "_recalloc" +description: "Learn more about: _recalloc" ms.date: "4/2/2020" api_name: ["_recalloc", "_o__recalloc"] api_location: ["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-heap-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_recalloc", "recalloc"] helpviewer_keywords: ["_recalloc function", "recalloc function"] -ms.assetid: 1db8305a-3f03-418c-8844-bf9149f63046 --- # `_recalloc` @@ -18,7 +17,7 @@ A combination of `realloc` and `calloc`. Reallocates an array in memory and init ```C void *_recalloc( - void *memblock + void *memblock, size_t num, size_t size ); diff --git a/docs/c-runtime-library/reference/remquo-remquof-remquol.md b/docs/c-runtime-library/reference/remquo-remquof-remquol.md index 9aa9613702..f6236f9679 100644 --- a/docs/c-runtime-library/reference/remquo-remquof-remquol.md +++ b/docs/c-runtime-library/reference/remquo-remquof-remquol.md @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["remquof", "remquol", "remquo"] helpviewer_keywords: ["remquol function", "remquof function", "remquo function"] -ms.assetid: a1d3cb8b-8027-4cd3-8deb-04eb17f299fc --- # `remquo`, `remquof`, `remquol` @@ -43,7 +42,7 @@ A pointer to an integer to store a value that has the sign and approximate magni ## Remarks -The **`remquo`** function calculates the floating-point remainder `f` of *`x`* / *`y`* such that *`x`* = `n` \* *`y`* + `f`*, where `n` is an integer, `f` has the same sign as *`x`*, and the absolute value of `f` is less than the absolute value of *`y`*. +The **`remquo`** function calculates the floating-point remainder `f` of *`x`* / *`y`* such that *`x`* = `n` \* *`y`* + *`f`*, where `n` is an integer, `f` has the same sign as *`x`*, and the absolute value of `f` is less than the absolute value of *`y`*. C++ allows overloading, so you can call overloads of **`remquo`** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \ macro to call this function, **`remquo`** always takes two **`double`** arguments and returns a **`double`**. diff --git a/docs/c-runtime-library/reference/rmtmp.md b/docs/c-runtime-library/reference/rmtmp.md index 857dc4c035..7fac6abd1a 100644 --- a/docs/c-runtime-library/reference/rmtmp.md +++ b/docs/c-runtime-library/reference/rmtmp.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _rmtmp" title: "_rmtmp" +description: "Learn more about: _rmtmp" ms.date: "4/2/2020" api_name: ["_rmtmp", "_o__rmtmp"] api_location: ["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"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_rmtmp"] helpviewer_keywords: ["removing temporary files", "_rmtmp function", "files [C++], temporary", "rmtmp function", "files [C++], removing", "temporary files [C++], removing"] -ms.assetid: 7419501e-2587-4f2a-b469-0dca07f84736 --- # `_rmtmp` @@ -17,7 +16,6 @@ Removes temporary files. ## Syntax ```C - int _rmtmp( void ); ``` diff --git a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md index dfdbaae96f..c095e8cada 100644 --- a/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md +++ b/docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_rotr64", "rotl64", "_rotl64", "rotr64", "rotr", "_rotr", "_rotl", "rotl"] helpviewer_keywords: ["rotl64 function", "_rotl function", "rotr function", "rotr64 function", "_rotr function", "rotl function", "_rotl64 function", "rotating bits", "_rotr64 function", "bits, rotating"] -ms.assetid: cfce439b-366f-4584-8ab1-d527b13fcfc6 --- # `_rotl`, `_rotl64`, `_rotr`, `_rotr64` @@ -17,7 +16,6 @@ Rotates bits to the left (**`_rotl`**) or right (**`_rotr`**). ## Syntax ```C - unsigned int _rotl( unsigned int value, int shift diff --git a/docs/c-runtime-library/reference/rtc-numerrors.md b/docs/c-runtime-library/reference/rtc-numerrors.md index d512c8f402..f2428d8e7a 100644 --- a/docs/c-runtime-library/reference/rtc-numerrors.md +++ b/docs/c-runtime-library/reference/rtc-numerrors.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _RTC_NumErrors" title: "_RTC_NumErrors" +description: "Learn more about: _RTC_NumErrors" ms.date: "11/04/2016" api_name: ["_RTC_NumErrors"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_RTC_NumErrors", "RTC_NumErrors"] helpviewer_keywords: ["run-time errors", "_RTC_NumErrors function", "RTC_NumErrors function"] -ms.assetid: 7e82adae-38e2-4f8b-bc0b-37bda8109fd1 --- # `_RTC_NumErrors` @@ -17,7 +16,6 @@ Returns the total number of errors that can be detected by run-time error checks ## Syntax ```C - int _RTC_NumErrors( void ); ``` diff --git a/docs/c-runtime-library/reference/set-abort-behavior.md b/docs/c-runtime-library/reference/set-abort-behavior.md index 1abfb48f28..957edb7430 100644 --- a/docs/c-runtime-library/reference/set-abort-behavior.md +++ b/docs/c-runtime-library/reference/set-abort-behavior.md @@ -14,7 +14,7 @@ helpviewer_keywords: ["aborting programs", "_set_abort_behavior function", "set_ Specifies the action to be taken when a program is abnormally terminated. > [!NOTE] -> Do not use the [`abort`](abort.md) function to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). +> Do not use the [`abort`](abort.md) function to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). ## Syntax diff --git a/docs/c-runtime-library/reference/signal.md b/docs/c-runtime-library/reference/signal.md index a9c623188f..ad4bd650a1 100644 --- a/docs/c-runtime-library/reference/signal.md +++ b/docs/c-runtime-library/reference/signal.md @@ -14,7 +14,7 @@ helpviewer_keywords: ["signal function"] Sets interrupt signal handling. > [!IMPORTANT] -> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/legal/windows/agreements/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). +> Do not use this method to shut down a Microsoft Store app, except in testing or debugging scenarios. Programmatic or UI ways to close a Store app are not permitted according to the [Microsoft Store policies](/windows/apps/publish/store-policies). For more information, see [UWP app lifecycle](/windows/uwp/launch-resume/app-lifecycle). ## Syntax diff --git a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md index 6adfc17e2e..6043ec459e 100644 --- a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md +++ b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md @@ -120,7 +120,7 @@ See [Behavior summary](#behavior-summary) for details. ## Remarks -Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`snprintf`** is no longer identical to **`_snprintf`**. The **`snprintf`** behavior is now C99 standard conformant. The difference is that if you run out of buffer, `snprintf` null-terminates the end of the buffer and returns the number of characters that would have been required whereas `_snprintf` doesn't null-terminate the buffer and returns -1. Also, `snprintf()` includes one more character in the output because it doesn't null-terminate the buffer. +Beginning with the UCRT in Visual Studio 2015 and Windows 10, **`snprintf`** is no longer identical to **`_snprintf`**. The **`snprintf`** behavior is now C99 standard conformant. The difference is that if you run out of buffer, `snprintf` null-terminates the end of the buffer and returns the number of characters that would have been required whereas `_snprintf` doesn't null-terminate the buffer and returns -1. Also, `_snprintf()` includes one more character in the output because it doesn't null-terminate the buffer. - **`snprintf`** and the **`_snprintf`** family of functions format and store *`count`* or fewer characters in *`buffer`*. - **`snprintf`** always stores a terminating `NULL` character, truncating the output if necessary. diff --git a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md index 3b1480c69a..04f2bd984a 100644 --- a/docs/c-runtime-library/reference/sopen-s-wsopen-s.md +++ b/docs/c-runtime-library/reference/sopen-s-wsopen-s.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _sopen_s, _wsopen_s" title: "_sopen_s, _wsopen_s" +description: "Learn more about: _sopen_s, _wsopen_s" ms.date: 05/18/2022 api_name: ["_sopen_s", "_wsopen_s", "_o__sopen_s", "_o__wsopen_s"] api_location: ["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"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["CORECRT_IO/_sopen_s", "CORECRT_WIO/_wsopen_s", "TCHAR/_tsopen_s", "_sopen_s", "_wsopen_s", "_tsopen_s", "sopen_s", "wsopen_s"] helpviewer_keywords: ["sopen_s function", "_wsopen_s function", "wsopen_s function", "opening files, for sharing", "files [C++], opening", "_sopen_s function", "files [C++], sharing"] -ms.assetid: 059a0084-d08c-4973-9174-55e391b72aa2 --- # `_sopen_s`, `_wsopen_s` @@ -29,7 +28,7 @@ errno_t _wsopen_s( const wchar_t *filename, int oflag, int shflag, - int pmode, + int pmode ); ``` diff --git a/docs/c-runtime-library/reference/splitpath-wsplitpath.md b/docs/c-runtime-library/reference/splitpath-wsplitpath.md index 7f0a8c3122..f11ecc1e6d 100644 --- a/docs/c-runtime-library/reference/splitpath-wsplitpath.md +++ b/docs/c-runtime-library/reference/splitpath-wsplitpath.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _splitpath, _wsplitpath" title: "_splitpath, _wsplitpath" +description: "Learn more about: _splitpath, _wsplitpath" ms.date: 11/30/2023 api_name: ["_wsplitpath", "_splitpath", "_o__splitpath", "_o__wsplitpath"] api_location: ["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-filesystem-l1-1-0.dll"] @@ -41,7 +41,7 @@ Full path. Drive letter, followed by a colon (**:**). You can pass `NULL` for this parameter if you don't need the drive letter. *`dir`*\ -Directory path, including trailing slash. Forward slashes ( `/` ), backslashes ( `\` ), or both may be used. Pass `NULL` for this parameter if you don't need the directory path. +Directory path, including trailing slash. Forward slashes (`/`), backslashes (`\`), or both may be used. Pass `NULL` for this parameter if you don't need the directory path. *`fname`*\ Base filename (no extension). Pass `NULL` for this parameter if you don't need the filename. diff --git a/docs/c-runtime-library/reference/stat-functions.md b/docs/c-runtime-library/reference/stat-functions.md index 797cf701fc..b1a5efc58f 100644 --- a/docs/c-runtime-library/reference/stat-functions.md +++ b/docs/c-runtime-library/reference/stat-functions.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32" title: "_stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32" +description: "Learn more about: _stat, _stat32, _stat64, _stati64, _stat32i64, _stat64i32, _wstat, _wstat32, _wstat64, _wstati64, _wstat32i64, _wstat64i32" ms.date: "5/25/2023" api_name: ["_wstat64", "_stati64", "_stat32", "_stat32i64", "_stat", "_wstati64", "_wstat32", "_wstat64i32", "_wstat", "_stat64", "_stat64i32", "_wstat32i64", "_o__stat32", "_o__stat32i64", "_o__stat64", "_o__stat64i32", "_o__wstat32", "_o__wstat32i64", "_o__wstat64", "_o__wstat64i32"] api_location: ["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-filesystem-l1-1-0.dll"] @@ -94,7 +94,7 @@ Variations of these functions support 32-bit or 64-bit time types, and 32-bit or > [!NOTE] > **`_wstat`** does not work with Windows Vista symbolic links. In these cases, **`_wstat`** will always report a file size of 0. **`_stat`** does work correctly with symbolic links. -> The `_stat`family of functions use `CreateFile` in Visual Studio 2015, instead of `FindFirstFile` as in Visual Studio 2013 and earlier. This means that `_stat` on a path ending with a slash succeeds if the path refers to a directory, as opposed to before when the function would error with `errno` set to `ENOENT`. +> The `_stat` family of functions use `CreateFile` in Visual Studio 2015, instead of `FindFirstFile` as in Visual Studio 2013 and earlier. This means that `_stat` on a path ending with a slash succeeds if the path refers to a directory, as opposed to before when the function would error with `errno` set to `ENOENT`. This function validates its parameters. If either *`path`* or *`buffer`* is `NULL`, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). diff --git a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md index 4ca437d019..2c9cdcfed2 100644 --- a/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md +++ b/docs/c-runtime-library/reference/strncnt-wcsncnt-mbsnbcnt-mbsnbcnt-l-mbsnccnt-mbsnccnt-l.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: _strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l" title: "_strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l" +description: "Learn more about: _strncnt, _wcsncnt, _mbsnbcnt, _mbsnbcnt_l, _mbsnccnt, _mbsnccnt_l" ms.date: "4/2/2020" api_name: ["_mbsnbcnt_l", "_mbsnccnt", "_wcsncnt", "_strncnt", "_mbsnccnt_l", "_mbsnbcnt", "_o__mbsnbcnt", "_o__mbsnbcnt_l", "_o__mbsnccnt", "_o__mbsnccnt_l"] api_location: ["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-multibyte-l1-1-0.dll"] @@ -8,7 +8,6 @@ api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["_mbsnbcnt", "wcsncnt", "_tcsnbcnt", "_mbsnccnt", "_ftcsnbcnt", "mbsnbcnt", "strncnt", "mbsnbcnt_l", "mbsnccnt_l", "mbsnccnt", "_strncnt", "_wcsncnt"] helpviewer_keywords: ["_strncnt function", "_mbsnbcnt function", "_mbsnbcnt_l function", "_mbsnccnt_l function", "mbsnbcnt_l function", "mbsnbcnt function", "tcsnbcnt function", "mbsnccnt_l function", "strncnt function", "_tcsnbcnt function", "mbsnccnt function", "wcsncnt function", "_mbsnccnt function", "_wcsncnt function"] -ms.assetid: 2a022e9e-a307-4acb-a66b-e56e5357f848 --- # `_strncnt`, `_wcsncnt`, `_mbsnbcnt`, `_mbsnbcnt_l`, `_mbsnccnt`, `_mbsnccnt_l` @@ -105,8 +104,8 @@ For more compatibility information, see [Compatibility](../compatibility.md). ```C // crt_mbsnbcnt.c -#include -#include +#include +#include int main( void ) { diff --git a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md index ddf9483e51..784bbae4d5 100644 --- a/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md +++ b/docs/c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md @@ -1,22 +1,23 @@ --- description: "Learn more about: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l" -title: "strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l" +title: "strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l, _tcsncpy_s, _tcsncpy_s_l, _tcsnccpy_s, _tcsnccpy_s_l" ms.date: "4/2/2020" -api_name: ["_mbsncpy_s_l", "wcsncpy_s", "_strncpy_s_l", "strncpy_s", "_mbsncpy_s", "_wcsncpy_s_l", "_o__mbsncpy_s", "_o__mbsncpy_s_l", "_o_strncpy_s", "_o_wcsncpy_s"] +api_name: ["_mbsncpy_s_l", "wcsncpy_s", "_strncpy_s_l", "strncpy_s", "_mbsncpy_s", "_wcsncpy_s_l", "_o__mbsncpy_s", "_o__mbsncpy_s_l", "_o_strncpy_s", "_o_wcsncpy_s", "_tcsnccpy_s", "_tcsnccpy_s_l", "_tcsncpy_s", "_tcsncpy_s_l"] api_location: ["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-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["_tcsncpy_s", "_wcsncpy_s_l", "strncpy_s", "_strncpy_s_l", "wcsncpy_s", "_tcsncpy_s_l"] -helpviewer_keywords: ["_wcsncpy_s_l function", "_mbsnbcpy_s function", "_tcsncpy_s_l function", "mbsncpy_s function", "strncpy_s_l function", "_strncpy_s_l function", "strncpy_s function", "mbsncpy_s_l function", "wcsncpy_s function", "copying strings", "strings [C++], copying", "_mbsnbcpy_s_l function", "_tcsncpy_s function", "wcsncpy_s_l function"] -ms.assetid: a971c800-94d1-4d88-92f3-a2fe236a4546 +f1_keywords: ["_tcsncpy_s", "_wcsncpy_s_l", "strncpy_s", "_strncpy_s_l", "wcsncpy_s", "_tcsncpy_s_l", "_tcsnccpy_s", "_tcsnccpy_s_l"] +helpviewer_keywords: ["_wcsncpy_s_l function", "_mbsnbcpy_s function", "_tcsncpy_s_l function", "mbsncpy_s function", "strncpy_s_l function", "_strncpy_s_l function", "strncpy_s function", "mbsncpy_s_l function", "wcsncpy_s function", "_tcsnccpy_s function", "copying strings", "strings [C++], copying", "_mbsnbcpy_s_l function", "_tcsncpy_s function", "wcsncpy_s_l function", "_tcsnccpy_s_l function"] --- -# `strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l` +# `strncpy_s`, `_strncpy_s_l`, `wcsncpy_s`, `_wcsncpy_s_l`, `_mbsncpy_s`, `_mbsncpy_s_l`, `_tcsncpy_s`, `_tcsncpy_s_l`, `_tcsnccpy_s`, `_tcsnccpy_s_l` Copies characters of one string to another. These versions of [`strncpy`, `_strncpy_l`, `wcsncpy`, `_wcsncpy_l`, `_mbsncpy`, `_mbsncpy_l`](strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbsncpy_s`** and **`_mbsncpy_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). +For `_tcsnccpy_s`, `_tcsnccpy_s_l`, `_tcsnccpy_s`, and `_tcsnccpy_s_l` see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -168,12 +169,16 @@ The debug library versions of these functions first fill the buffer with 0xFE. T By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| | `_tcsncpy_s` | **`strncpy_s`** | **`_mbsnbcpy_s`** | **`wcsncpy_s`** | | `_tcsncpy_s_l` | **`_strncpy_s_l`** | **`_mbsnbcpy_s_l`** | **`_wcsncpy_s_l`** | +| `_tcsnccpy_s` | **`strncpy_s`** | **`_mbsncpy_s`** | **`_wcsncpy_s`** | +| `_tcsnccpy_s_l` | **`_strncpy_s_l`** | **`_mbsncpy_s_l`** | **`_wcsncpy_s_l`** | > [!NOTE] > **`_strncpy_s_l`**, **`_wcsncpy_s_l`** and **`_mbsncpy_s_l`** have no locale dependence. They're provided just for `_tcsncpy_s_l` and aren't intended to be called directly. diff --git a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md index 61f514871a..e7d55e8de2 100644 --- a/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md +++ b/docs/c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md @@ -1,22 +1,23 @@ --- description: "Learn more about: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l" -title: "_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l" +title: "_strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l, _tcsnset_s, _tcsncset_s, _tcsncset_s_l" ms.date: "4/2/2020" -api_name: ["_mbsnset_s_l", "_strnset_s", "_mbsnset_s", "_strnset_s_l", "_wcsnset_s_l", "_wcsnset_s", "_o__mbsnset_s", "_o__mbsnset_s_l", "_o__strnset_s", "_o__wcsnset_s"] +api_name: ["_mbsnset_s_l", "_strnset_s", "_mbsnset_s", "_strnset_s_l", "_wcsnset_s_l", "_wcsnset_s", "_o__mbsnset_s", "_o__mbsnset_s_l", "_o__strnset_s", "_o__wcsnset_s", "_tcsncset_s", "_tcsncset_s_l", "_tcsnset_s"] api_location: ["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-multibyte-l1-1-0.dll", "api-ms-win-crt-string-l1-1-0.dll", "ntoskrnl.exe"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["_mbsnset_s_l", "wcsnset_s", "_tcsnset_s_l", "_wcsnset_s", "_mbsnset_s", "_wcsnset_s_l", "_strnset_s_l", "strnset_s_l", "_tcsnset_s", "_strnset_s", "strnset_s", "mbsnset_s_l", "mbsnset_s", "wcsnset_s_l"] -helpviewer_keywords: ["tcsnset_s function", "mbsnset_s_l function", "initializing characters", "wcsnset_s function", "mbsnset_s function", "_tcsnset_s_l function", "_strnset_s_l function", "_mbsnset_s function", "strnset_s_l function", "_tcsnset_s function", "_strnset_s function", "tcsnset_s_l function", "_mbsnset_s_l function", "strnset_s function", "_wcsnset_s function"] -ms.assetid: 9cf1b321-b5cb-4469-b285-4c07cfbd8813 +f1_keywords: ["_mbsnset_s_l", "wcsnset_s", "_tcsnset_s", "_tcsnset_s_l", "_wcsnset_s", "_mbsnset_s", "_wcsnset_s_l", "_strnset_s_l", "strnset_s_l", "_strnset_s", "strnset_s", "mbsnset_s_l", "mbsnset_s", "wcsnset_s_l", "_tcsncset_s", "_tcsncset_s_l"] +helpviewer_keywords: ["tcsnset_s function", "mbsnset_s_l function", "initializing characters", "wcsnset_s function", "mbsnset_s function", "_tcsnset_s function", "_tcsnset_s_l function", "_strnset_s_l function", "_mbsnset_s function", "strnset_s_l function", "_strnset_s function", "tcsnset_s_l function", "_mbsnset_s_l function", "strnset_s function", "_wcsnset_s function", "_tcsncset_s function", "_tcsncset_s_l function"] --- -# `_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l` +# `_strnset_s`, `_strnset_s_l`, `_wcsnset_s`, `_wcsnset_s_l`, `_mbsnset_s`, `_mbsnset_s_l`, `_tcsnset_s`, `_tcsncset_s`, `_tcsncset_s_l` Initializes characters of a string to a given character. These versions of [`_strnset`, `_strnset_l`, `_wcsnset`, `_wcsnset_l`, `_mbsnset`, `_mbsnset_l`](strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md) have security enhancements, as described in [Security features in the CRT](../security-features-in-the-crt.md). > [!IMPORTANT] > **`_mbsnset_s`** and **`_mbsnset_s_l`** cannot be used in applications that execute in the Windows Runtime. For more information, see [CRT functions not supported in Universal Windows Platform apps](../../cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md). +For `_tcsnset_s`, `_tcsnset_s_l`, `_tcsncset_s`, and `_tcsncset_s_l` see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -92,26 +93,30 @@ These functions set, at most, the first *`count`* characters of *`str`* to *`c`* The output value is affected by the setting of the `LC_CTYPE` category setting of the locale. For more information, see [`setlocale`](setlocale-wsetlocale.md). The versions of these functions without the `_l` suffix use the current locale for this locale-dependent behavior; the versions with the `_l` suffix are identical except that they use the locale parameter passed in instead. For more information, see [Locale](../locale.md). -The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). +The debug library versions of these functions first fill the buffer with `0xFE`. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| TCHAR.H routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| `_tcsnset_s` | **`_strnset_s`** | **`_mbsnbset_s`** | **`_wcsnset_s`** | -| `_tcsnset_s_l` | **`_strnset_s_l`** | **`_mbsnbset_s_l`** | **`_wcsnset_s_l`** | +| `_tcsnset_s` | `_strnset_s` | `_mbsnbset_s` | `_wcsnset_s` | +| `_tcsnset_s_l` | `_strnset_s_l` | `_mbsnbset_s_l` | `_wcsnset_s_l` | +| `_tcsncset_s` | `_strnset_s` | `_mbsnset_s` | `_wcsnset_s` | +| `_tcsncset_s_l` | `_strnset_s_l` | `_mbsnset_s_l` | `_wcsnset_s_l` | ## Requirements | Routine | Required header | |---|---| -| **`_strnset_s`** | \ | -| **`_strnset_s_l`** | \ | -| **`_wcsnset_s`** | \ or \ | -| **`_wcsnset_s_l`** | \ | -| **`_mbsnset_s`**, **`_mbsnset_s_l`** | \ | +| **`_strnset_s`** | `` | +| **`_strnset_s_l`** | `` | +| **`_wcsnset_s`** | `` or `` | +| **`_wcsnset_s_l`** | `` | +| **`_mbsnset_s`**, **`_mbsnset_s_l`** | `` | For more compatibility information, see [Compatibility](../compatibility.md). diff --git a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md index 90ada77650..9c8d760c68 100644 --- a/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md +++ b/docs/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: strrchr, wcsrchr, _mbsrchr, _mbsrchr_l" title: "strrchr, wcsrchr, _mbsrchr, _mbsrchr_l" +description: "Learn more about: strrchr, wcsrchr, _mbsrchr, _mbsrchr_l" ms.date: "4/2/2020" api_name: ["strrchr", "wcsrchr", "_mbsrchr", "_mbsrchr_l", "_o__mbsrchr", "_o__mbsrchr_l"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ntdll.dll", "ucrtbase.dll", "api-ms-win-crt-multibyte-l1-1-0.dll", "ntoskrnl.exe"] @@ -131,4 +131,4 @@ For an example of using **`strrchr`**, see [`strchr`](strchr-wcschr-mbschr-mbsch [`strcspn`, `wcscspn`, `_mbscspn`, `_mbscspn_l`](strcspn-wcscspn-mbscspn-mbscspn-l.md)\ [`_strnicmp`, `_wcsnicmp`, `_mbsnicmp`, `_strnicmp_l`, `_wcsnicmp_l`, `_mbsnicmp_l`](strnicmp-wcsnicmp-mbsnicmp-strnicmp-l-wcsnicmp-l-mbsnicmp-l.md)\ [`strpbrk`, `wcspbrk`, `_mbspbrk`, `_mbspbrk_l`](strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md)\ -[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md)\ +[`strspn`, `wcsspn`, `_mbsspn`, `_mbsspn_l`](strspn-wcsspn-mbsspn-mbsspn-l.md) diff --git a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md index c6bcf88b3f..288b4dcce8 100644 --- a/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md +++ b/docs/c-runtime-library/reference/strtoimax-strtoimax-l-wcstoimax-wcstoimax-l.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l" title: "strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l" -ms.date: "11/04/2016" +description: "Learn more about: strtoimax, _strtoimax_l, wcstoimax, _wcstoimax_l" +ms.date: 11/04/2016 api_name: ["wcstoimax", "_wcstoimax_l", "_strtoimax_l", "strtoimax"] api_location: ["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-convert-l1-1-0.dll"] api_type: ["DLLExport"] topic_type: ["apiref"] f1_keywords: ["wcstoimax", "_tcstoimax", "strtoimax", "_wcstoimax_l", "_strtoimax_l", "_tcstoimax_l"] -helpviewer_keywords: ["strtoimax funciton", "conversion functions", "_strtoimax_l function", "_wcstoimax_l function", "wcstoimax function"] -ms.assetid: 4530d3dc-aaac-4a76-b7cf-29ae3c98d0ae +helpviewer_keywords: ["strtoimax function", "conversion functions", "_strtoimax_l function", "_wcstoimax_l function", "wcstoimax function"] --- # `strtoimax`, `_strtoimax_l`, `wcstoimax`, `_wcstoimax_l` diff --git a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md index c2185baab2..6f6910fcf6 100644 --- a/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vscprintf-p-vscprintf-p-l-vscwprintf-p-vscwprintf-p-l.md @@ -59,6 +59,9 @@ These functions differ from **`_vscprintf`** and **`_vscwprintf`** only in that The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. +Return Value is the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words. +Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer. + If *`format`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. > [!IMPORTANT] diff --git a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md index 080aed3268..ac02613e06 100644 --- a/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md +++ b/docs/c-runtime-library/reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md @@ -59,6 +59,9 @@ If *`format`* is a null pointer, the invalid parameter handler is invoked, as de ## Remarks +Return Value is the size of the formatted data. If the function takes a `char` buffer, the size is in bytes. If the function takes a `wchar_t` buffer, the size specifies the number of 16-bit words. +Characters refer to `char` characters for functions that take a `char` buffer, and to `wchar_t` characters for functions that take a `wchar_t` buffer. + Each *`argument`* (if any) is converted according to the corresponding format specification in *`format`*. The format consists of ordinary characters and has the same form and function as the *`format`* argument for [`printf`](printf-printf-l-wprintf-wprintf-l.md). > [!IMPORTANT] diff --git a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md index 690566a0fc..096bc62882 100644 --- a/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md +++ b/docs/c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md @@ -105,12 +105,14 @@ See [Behavior summary](#behavior-summary) for details. ## Remarks -**`vsnprintf_s`** is identical to **`_vsnprintf_s`** and is included for conformance to the ANSI standard. **`_vnsprintf`** is retained for backward compatibility. +Each of these functions takes a pointer to an argument list, then formats and writes up to *`count`* characters of the given data to the memory pointed to by *`buffer`* and appends a terminating `NULL`. -Each of these functions takes a pointer to an argument list, then formats and writes up to *`count`* characters of the given data to the memory pointed to by *`buffer`* and appends a terminating null. +In debug builds, the remaining `sizeOfBuffer` bytes following the terminating `NULL` are filled with 'xFE' as described in [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md). The versions of these functions with the **`_l`** suffix are identical except that they use the locale parameter passed in instead of the current thread locale. +**`vsnprintf_s`** is identical to **`_vsnprintf_s`** and is included for conformance to the ANSI standard. **`_vnsprintf`** is retained for backward compatibility. + ### Behavior summary For the following table: @@ -127,6 +129,7 @@ For the following table: | `buffer == NULL` and `sizeOfBuffer == 0` and `count == 0` | No data is written. | 0 | N/A | No | | `buffer == NULL` and either `sizeOfBuffer != 0` or `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value.| -1 | `EINVAL` (22) | Yes | | `buffer != NULL` and `sizeOfBuffer == 0` | No data is written. If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value. | -1 | `EINVAL` (22) | Yes | +| `buffer != NULL` and `sizeOfBuffer != 0` and `count == 0` | The buffer is `NULL` terminated. | -1 | N/A | No | | `count == 0`| Doesn't write any data and returns the number of characters that would have been written, not including the terminating `NULL`. | The number of characters that would have been written not including the terminating `NULL`. | N/A | No | | `count < 0` | Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written, not including the terminating `NULL`. | N/A | No | | `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written. | N/A | No | @@ -144,7 +147,7 @@ For information about these and other error codes, see [`_doserrno`, `errno`, `_ > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). > [!NOTE] -> To ensure that there is room for the terminating null, be sure that *`count`* is strictly less than the buffer length, or use `_TRUNCATE`. +> To ensure that there is room for the terminating `NULL`, be sure that *`count`* is strictly less than the buffer length, or use `_TRUNCATE`. In C++, using these functions is simplified by template overloads; the overloads can infer buffer length automatically (eliminating the need to specify a size argument) and they can automatically replace older, non-secure functions with their newer, secure counterparts. For more information, see [Secure template overloads](../secure-template-overloads.md). @@ -209,4 +212,4 @@ nSize: -1, buff: Hi there! [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](fprintf-fprintf-l-fwprintf-fwprintf-l.md)\ [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](printf-printf-l-wprintf-wprintf-l.md)\ [`sprintf`, `_sprintf_l`, `swprintf`, `_swprintf_l`, `__swprintf_l`](sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md)\ -[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) \ No newline at end of file +[`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md) diff --git a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md index b4a5f31213..1f94c8f59a 100644 --- a/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md +++ b/docs/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md @@ -155,7 +155,8 @@ For the following table: | Encoding error during formatting | If processing string specifier `s`, `S`, or `Z`, format specification processing stops. | -1 | `EILSEQ` (42) | No | | Encoding error during formatting | If processing character specifier `c` or `C`, the invalid character is skipped. The number of characters written isn't incremented for the skipped character, nor is any data written for it. Processing the format specification continues after skipping the specifier with the encoding error. | The number of characters written, not including the terminating `NULL`. | `EILSEQ` (42) | No | | `buffer == NULL` and `count != 0` | If execution continues after invalid parameter handler executes, sets `errno` and returns a negative value.| -1 | `EINVAL` (22) | Yes | -| `count == 0` | No data is written | The number of characters that would have been written, not including the terminating `NULL`. You can use this result to allocate sufficient buffer space for the string and a terminating `NULL`, and then call the function again to fill the buffer. | N/A | No | +| `buffer == NULL` and `count == 0` | No data is written | The number of characters that would have been written, not including the terminating `NULL`. You can use this result to allocate sufficient buffer space for the string and a terminating `NULL`, and then call the function again to fill the buffer. | N/A | No | +| `count == 0` | No data is written | -1 | `ERANGE` (34) | No | | `count < 0`| Unsafe: the value is treated as unsigned, likely creating a large value that results in overwriting the memory that follows the buffer. | The number of characters written. | N/A | No | | `count < sizeOfBuffer` and `len <= count` | All of the data is written and a terminating `NULL` is appended. | The number of characters written, not including the terminating `NULL`. | N/A | No | | `count < sizeOfBuffer` and `len > count` | The first *`count-1`* characters are written followed by a null-terminator. | The number of characters that would have been written had `count` matched the number of characters to output, not including the null-terminator. | N/A | No | diff --git a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md index a5ab73d417..75116027f6 100644 --- a/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md +++ b/docs/c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md @@ -66,7 +66,9 @@ The locale to use. ## Return value -**`_vsprintf_p`** and **`_vswprintf_p`** return the number of characters written, not including the terminating null character, or a negative value if an output error occurs. +**`_vsprintf_p`** and **`_vswprintf_p`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs. +If the *`buffer`* is a `NULL` pointer and *`sizeInBytes`* or *`count`* are zero, functions return the number of characters that would have been written not including the terminating `NULL`. +If the *`buffer`* is valid and *`sizeInBytes`* or *`count`* are zero, returns -1. ## Remarks @@ -76,7 +78,7 @@ These functions differ from the `vsprintf_s` and `vswprintf_s` only in that they The versions of these functions with the `_l` suffix are identical except that they use the locale parameter passed in instead of the current thread locale. -If the *`buffer`* or *`format`* parameters are `NULL` pointers, if count is zero, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. +If the *`buffer`* or *`format`* parameters are `NULL` pointers, or if the format string contains invalid formatting characters, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`. > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). diff --git a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md index 184d230286..991b132063 100644 --- a/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md +++ b/docs/c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md @@ -1,18 +1,20 @@ --- description: "Learn more about: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l" -title: "vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l" +title: "vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l, _vstprintf_s, _vstprintf_s_l" ms.date: "3/9/2021" -api_name: ["_vswprintf_s_l", "vsprintf_s", "vswprintf_s", "_vsprintf_s_l"] +api_name: ["_vswprintf_s_l", "vsprintf_s", "vswprintf_s", "_vsprintf_s_l", _vstprintf_s, _vstprintf_s_l] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"] api_type: ["DLLExport"] topic_type: ["apiref"] -f1_keywords: ["CORECRT_WSTDIO/vswprintf_s", "STDIO/vsprintf_s", "TCHAR/_vstprintf_s", "vswprintf_s", "vsprintf_s", "_vstprintf_s"] +f1_keywords: ["CORECRT_WSTDIO/vswprintf_s", "STDIO/vsprintf_s", "TCHAR/_vstprintf_s", "vswprintf_s", "vsprintf_s", "_vstprintf_s", "_vstprintf_s_l", "_vswprintf_s_l"] helpviewer_keywords: ["_vstprintf_s_l function", "vsprintf_s_l function", "_vstprintf_s function", "vswprintf_s function", "vstprintf_s function", "vstprintf_s_l function", "vswprintf_s_l function", "vsprintf_s function", "_vsprintf_s_l function", "formatted text [C++]", "_vswprintf_s_l function"] --- -# `vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l` +# `vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`, `_vstprintf_s`, `_vstprintf_s_l` Write formatted output using a pointer to a list of arguments. These functions are versions of [`vsprintf`, `_vsprintf_l`, `vswprintf`, `_vswprintf_l`, \`__vswprintf_l`](vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md). +For `_vstprintf_s` and `_vstprintf_s_l`, see [Generic-text function mappings](#generic-text-function-mappings). + ## Syntax ```C @@ -94,12 +96,14 @@ In C++, using these functions is simplified by template overloads. The overloads > [!IMPORTANT] > Starting in Windows 10 version 2004 (build 19041), the `printf` family of functions prints exactly representable floating point numbers according to the IEEE 754 rules for rounding. In previous versions of Windows, exactly representable floating point numbers ending in '5' would always round up. IEEE 754 states that they must round to the closest even digit (also known as "Banker's Rounding"). For example, both `printf("%1.0f", 1.5)` and `printf("%1.0f", 2.5)` should round to 2. Previously, 1.5 would round to 2 and 2.5 would round to 3. This change only affects exactly representable numbers. For example, 2.35 (which, when represented in memory, is closer to 2.35000000000000008) continues to round up to 2.4. Rounding done by these functions now also respects the floating point rounding mode set by [`fesetround`](fegetround-fesetround2.md). Previously, rounding always chose `FE_TONEAREST` behavior. This change only affects programs built using Visual Studio 2019 version 16.2 and later. To use the legacy floating point rounding behavior, link with ['legacy_stdio_float_rounding.obj`](../link-options.md). -### Generic-text routine mappings +### Generic-text function mappings + +The function in the `tchar.h` column maps to the function in the other columns depending on the character set that is defined at compile time. -| `TCHAR.H` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `tchar.h` function | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| -| `_vstprintf_s` | **`vsprintf_s`** | **`vsprintf_s`** | **`vswprintf_s`** | -| `_vstprintf_s_l` | **`_vsprintf_s_l`** | **`_vsprintf_s_l`** | **`_vswprintf_s_l`** | +| `_vstprintf_s` | `vsprintf_s` | `vsprintf_s` | `vswprintf_s` | +| `_vstprintf_s_l` | `_vsprintf_s_l` | `_vsprintf_s_l` | `_vswprintf_s_l` | ## Requirements diff --git a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md index 0d197f9619..b3296103ad 100644 --- a/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md +++ b/docs/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md @@ -95,6 +95,10 @@ The locale to use. **`vsprintf`** and **`vswprintf`** return the number of characters written, not including the terminating `NULL` character, or a negative value if an output error occurs. If *`buffer`* or *`format`* is a `NULL` pointer, these functions invoke the invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, these functions return -1 and set `errno` to `EINVAL`. +If *`buffer`* is a `NULL` pointer and *`count`* is zero, **`vswprintf`** and **`_vswprintf_l`** return the number of characters that would have been written not including the terminating NULL. + +If *`buffer`* is valid and *`count`* is zero, **`vswprintf`** and **`_vswprintf_l`** return -1. The contents of *`buffer`* are unchanged. + For information on these and other error codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md). ## Remarks diff --git a/docs/c-runtime-library/routine-mappings.md b/docs/c-runtime-library/routine-mappings.md index 64d52861ae..087515c0cd 100644 --- a/docs/c-runtime-library/routine-mappings.md +++ b/docs/c-runtime-library/routine-mappings.md @@ -1,19 +1,21 @@ --- -description: "Learn more about: Routine Mappings" -title: "Routine Mappings" +description: "Learn more about: Microsoft specific generic-text functions and the CRT functions they map to." +title: "Generic-text function mappings" ms.date: "11/04/2016" -helpviewer_keywords: ["_tWinMain", "TCHAR.H data types, list of routine mappings", "generic-text mappings"] -ms.assetid: 38f33d3b-0f7b-430d-8a4f-75e27c6f1c42 +ms.author: twhitney +api_name: ["foo",] +f1_keywords: ["_cgetts", "_cgetts_s", "_cputts", "_fgettc", "_fgettchar", "_fgetts", "_fputtc", "_fputtchar", "_fputts", "_ftscanf", "_ftscanf_s", "_gettc", "_gettch", "_gettchar", "_gettche", "_getts", "_getts_s", "_istalnum", "_istalpha", "_istascii", "_istcntrl", "_istdigit", "_istgraph", "_istlead", "_istleadbyte", "_istlegal", "_istlower", "_istprint", "_istpunct", "_istspace", "_istupper", "_istxdigit", "_itot", "_itot_s", "_ltot", "_ltot_s", "_puttc", "_puttch", "_puttchar", "_putts", "_sctprintf", "_sntprintf", "_sntprintf_s", "_sntscanf", "_sntscanf_s", "_stprintf", "_stprintf_s", "_stscanf", "_stscanf_s", "_taccess", "_tasctime", "_tasctime_s", "_tccmp", "_tccpy", "_tccpy_s", "_tchdir", "_tclen", "_tchmod", "_tcprintf", "_tcprintf_s", "_tcreat", "_tcscanf", "_tcscanf_s", "_tcscat", "_tcscat_s", "_tcschr", "_tcsclen", "_tcsclen_s", "_tcscmp", "_tcscoll", "_tcscpy", "_tcscpy_s", "_tcscspn", "_tcsdec", "_tcsdup", "_tcserror", "_tcserror_s", "_tcsftime", "_tcsicmp", "_tcsicoll", "_tcsinc", "_tcslen", "_tcslwr", "_tcslwr_s", "_tcsnbcnt", "_tcsncat", "_tcsncat_s", "_tcsnccat", "_tcsnccmp", "_tcsnccmp_s", "_tcsnccoll", "_tcsncmp", "_tcsnccnt", "_tcsnccpy", "_tcsncicmp", "_tcsncicoll", "_tcsncpy", "_tcsncset", "_tcsnextc", "_tcsnicmp", "_tcsnicoll", "_tcsninc", "_tcsnccnt", "_tcsnset", "_tcspbrk", "_tcsspnp", "_tcsrchr", "_tcsrev", "_tcsset", "_tcsspn", "_tcsstr", "_tcstod", "_tcstoi64", "_tcstok", "_tcstok_s", "_tcstol", "_tcstoui64", "_tcstoul", "_tcsupr", "_tcsupr_s", "_tcsxfrm", "_tctime", "_tctime_s", "_tctime32", "_tctime32_s", "_tctime64", "_tctime64_s", "_texecl", "_texecle", "_texeclp", "_texeclpe", "_texecv", "_texecve", "_texecvp", "_texecvpe", "_tfdopen", "_tfindfirst", "_tfindnext", "_tfindnext32", "_tfindnext64", "_tfindnexti64", "_tfindnexti6432", "_tfindnext32i64", "_tfopen", "_tfopen_s", "_tfreopen", "_tfreopen_s", "_tfsopen", "_tfullpath", "_tgetcwd", "_tgetdcwd", "_tgetenv", "_tgetenv_s", "_tmain", "_tmakepath", "_tmakepath_s", "_tmkdir", "_tmktemp", "_tmktemp_s", "_topen", "_topen_s", "_totlower", "_totupper", "_tperror", "_tpopen", "_tprintf", "_tprintf_s", "_tputenv", "_tremove", "_trename", "_trmdir", "_tsearchenv", "_tsearchenv_s", "_tscanf", "_tscanf_s", "_tsetlocale", "_tsopen", "_tsopen_s", "_tspawnl", "_tspawnle", "_tspawnlp", "_tspawnlpe", "_tspawnv", "_tspawnve", "_tspawnvp", "_tspawnvpe", "_tsplitpath", "_tstat", "_tstat32", "_tstati32", "_tstat64", "_tstati64", "_tstof", "_tstoi", "_tstoi64", "_tstol", "_tstrdate", "_tstrdate_s", "_tstrtime", "_tstrtime_s", "_tsystem", "_ttempnam", "_ttmpnam", "_ttmpnam_s", "_ttoi", "_ttoi64", "_ttol", "_tunlink", "_tutime", "_tutime32", "_tutime64", "_tWinMain", "_ui64tot", "_ui64tot_s", "_ultot", "_ultot_s", "_ungettc", "_ungettch", "_vftprintf", "_vftprintf_s", "_vsctprintf", "_vsctprintf_s", "_vsntprintf", "_vsntprintf_s", "_vstprintf", "_vtprintf", "_vtprintf_s"] +helpviewer_keywords: ["_tWinMain", "TCHAR.H functions, list of generic-text function mappings", "generic-text mappings", "_cgetts function", "_cgetts_s function", "_cputts function", "_fgettc function", "_fgettchar function", "_fgetts function", "_fputtc function", "_fputtchar function", "_fputts function", "_ftscanf function", "_ftscanf_s function", "_gettc function", "_gettch function", "_gettchar function", "_gettche function", "_getts function", "_getts_s function", "_istalnum function", "_istalpha function", "_istascii function", "_istcntrl function", "_istdigit function", "_istgraph function", "_istlead function", "_istleadbyte function", "_istlegal function", "_istlower function", "_istprint function", "_istpunct function", "_istspace function", "_istupper function", "_istxdigit function", "_itot function", "_itot_s function", "_ltot function", "_ltot_s function", "_puttc function", "_puttch function", "_puttchar function", "_putts function", "_sctprintf function", "_sntprintf function", "_sntprintf_s function", "_sntscanf function", "_sntscanf_s function", "_stprintf function", "_stprintf_s function", "_stscanf function", "_stscanf_s function", "_taccess function", "_tasctime function", "_tasctime_s function", "_tccmp function", "_tccpy function", "_tccpy_s function", "_tchdir function", "_tclen function", "_tchmod function", "_tcprintf function", "_tcprintf_s function", "_tcreat function", "_tcscanf function", "_tcscanf_s function", "_tcscat function", "_tcscat_s function", "_tcschr function", "_tcsclen function", "_tcsclen_s function", "_tcscmp function", "_tcscoll function", "_tcscpy function", "_tcscpy_s function", "_tcscspn function", "_tcsdec function", "_tcsdup function", "_tcserror function", "_tcserror_s function", "_tcsftime function", "_tcsicmp function", "_tcsicoll function", "_tcsinc function", "_tcslen function", "_tcslwr function", "_tcslwr_s function", "_tcsnbcnt function", "_tcsncat function", "_tcsncat_s function", "_tcsnccat function", "_tcsnccmp function", "_tcsnccmp_s function", "_tcsnccoll function", "_tcsncmp function", "_tcsnccnt function", "_tcsnccpy function", "_tcsncicmp function", "_tcsncicoll function", "_tcsncpy function", "_tcsncset function", "_tcsnextc function", "_tcsnicmp function", "_tcsnicoll function", "_tcsninc function", "_tcsnccnt function", "_tcsnset function", "_tcspbrk function", "_tcsspnp function", "_tcsrchr function", "_tcsrev function", "_tcsset function", "_tcsspn function", "_tcsstr function", "_tcstod function", "_tcstoi64 function", "_tcstok function", "_tcstok_s function", "_tcstol function", "_tcstoui64 function", "_tcstoul function", "_tcsupr function", "_tcsupr_s function", "_tcsxfrm function", "_tctime function", "_tctime_s function", "_tctime32 function", "_tctime32_s function", "_tctime64 function", "_tctime64_s function", "_texecl function", "_texecle function", "_texeclp function", "_texeclpe function", "_texecv function", "_texecve function", "_texecvp function", "_texecvpe function", "_tfdopen function", "_tfindfirst function", "_tfindnext function", "_tfindnext32 function", "_tfindnext64 function", "_tfindnexti64 function", "_tfindnexti6432 function", "_tfindnext32i64 function", "_tfopen function", "_tfopen_s function", "_tfreopen function", "_tfreopen_s function", "_tfsopen function", "_tfullpath function", "_tgetcwd function", "_tgetdcwd function", "_tgetenv function", "_tgetenv_s function", "_tmain function", "_tmakepath function", "_tmakepath_s function", "_tmkdir function", "_tmktemp function", "_tmktemp_s function", "_topen function", "_topen_s function", "_totlower function", "_totupper function", "_tperror function", "_tpopen function", "_tprintf function", "_tprintf_s function", "_tputenv function", "_tremove function", "_trename function", "_trmdir function", "_tsearchenv function", "_tsearchenv_s function", "_tscanf function", "_tscanf_s function", "_tsetlocale function", "_tsopen function", "_tsopen_s function", "_tspawnl function", "_tspawnle function", "_tspawnlp function", "_tspawnlpe function", "_tspawnv function", "_tspawnve function", "_tspawnvp function", "_tspawnvpe function", "_tsplitpath function", "_tstat function", "_tstat32 function", "_tstati32 function", "_tstat64 function", "_tstati64 function", "_tstof function", "_tstoi function", "_tstoi64 function", "_tstol function", "_tstrdate function", "_tstrdate_s function", "_tstrtime function", "_tstrtime_s function", "_tsystem function", "_ttempnam function", "_ttmpnam function", "_ttmpnam_s function", "_ttoi function", "_ttoi64 function", "_ttol function", "_tunlink function", "_tutime function", "_tutime32 function", "_tutime64 function", "_tWinMain function", "_ui64tot function", "_ui64tot_s function", "_ultot function", "_ultot_s function", "_ungettc function", "_ungettch function", "_vftprintf function", "_vftprintf_s function", "_vsctprintf function", "_vsctprintf_s function", "_vsntprintf function", "_vsntprintf_s function", "_vstprintf function", "_vtprintf function", "_vtprintf_s function"] --- -# Routine mappings +# Generic-text function mappings -The generic-text routine mappings are defined in TCHAR.H. `_tccpy` and `_tclen` map to functions in the MBCS model; they're mapped to macros or inline functions in the SBCS and Unicode models for completeness. For information on a generic text routine, see the help article about the corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. +The generic-text routine mappings are defined in `TCHAR.H`. `_tccpy` and `_tclen` map to functions in the MBCS model; they're mapped to macros or inline functions in the SBCS and Unicode models for completeness. For information on a generic text routine, see the help article about the corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. More specific information about individual routines listed in the left column in the following table isn't available in this documentation. However, you can easily look up the information on a corresponding `SBCS`-, `_MBCS`-, or `_UNICODE`-related routine. Use the **Search** command on the **Help** menu to look up any generic-text routine listed below. For related information, see [Generic-text mappings in tchar.h](../text/generic-text-mappings-in-tchar-h.md). -### Generic-text routine mappings +### Function mappings | Generic-text routine name | `SBCS` (`_UNICODE` and `MBCS` not defined) | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| @@ -27,6 +29,7 @@ For related information, see [Generic-text mappings in tchar.h](../text/generic- | `_fputtchar` | `_fputchar` | `_fputchar` | `_fputwchar` | | `_fputts` | `fputs` | `fputs` | `fputws` | | `_ftprintf` | `fprintf` | `fprintf` | `fwprintf` | +| `_ftprintf_l` | `_fprintf_l` | `_fprintf_l` | `_fwprintf_l` | | `_ftprintf_s` | `fprintf_s` | `fprintf_s` | `fwprintf_s` | | `_ftscanf` | `fscanf` | `fscanf` | `fwscanf` | | `_ftscanf_s` | `fscanf_s` | `fscanf_s` | `fwscanf_s` | diff --git a/docs/c-runtime-library/security-features-in-the-crt.md b/docs/c-runtime-library/security-features-in-the-crt.md index d1dc77a81a..06117a37fd 100644 --- a/docs/c-runtime-library/security-features-in-the-crt.md +++ b/docs/c-runtime-library/security-features-in-the-crt.md @@ -5,7 +5,6 @@ ms.date: "09/29/2020" ms.topic: "conceptual" f1_keywords: ["_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_NONSTDC_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS"] helpviewer_keywords: ["security deprecation warnings [C++]", "CRT_NONSTDC_NO_DEPRECATE", "buffers [C++], buffer overruns", "deprecation warnings (security-related), disabling", "_CRT_NONSTDC_NO_WARNINGS", "security [CRT]", "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", "security-enhanced CRT", "CRT_SECURE_NO_WARNINGS", "CRT_SECURE_NO_DEPRECATE", "deprecation warnings (security-related)", "buffer overruns", "CRT_NONSTDC_NO_WARNINGS", "CRT, security enhancements", "parameters [C++], validation"] -ms.assetid: d9568b08-9514-49cd-b3dc-2454ded195a3 --- # Security Features in the CRT @@ -19,7 +18,7 @@ For example, the `strcpy` function can't tell if the string it copies is too lar ## Eliminating deprecation warnings -There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [`warning`](../preprocessor/warning.md) pragma. Either will disable deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features. +There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define `_CRT_SECURE_NO_WARNINGS` or use the [`warning`](../preprocessor/warning.md) pragma. Either disables deprecation warnings, but the security issues that caused the warnings still exist. It's better to leave deprecation warnings enabled and take advantage of the new CRT security features. In C++, the easiest way to eliminate the deprecation warnings is to use [Secure template overloads](./secure-template-overloads.md). The overloads eliminate deprecation warnings in many cases. They replace calls to deprecated functions with calls to secure versions of the functions. For example, consider this deprecated call to `strcpy`: @@ -54,13 +53,15 @@ Some of the security features include: You must pass the buffer size to any secure function that writes to a buffer. The secure versions validate that the buffer is large enough before writing to it. The validation helps avoid dangerous buffer overrun errors that could allow malicious code to execute. These functions usually return an `errno` error code and invoke the invalid parameter handler if the size of the buffer is too small. Functions that read from input buffers, such as `gets`, have secure versions that require you to specify a maximum size. + The debug versions of *some* security-enhanced CRT functions fill the buffer passed to them with a special character (0xFE). This fill character helps to find cases where the incorrect size was passed to the function. Unfortunately, it also reduces performance. To improve performance, use **`_CrtSetDebugFillThreshold`** to disable buffer-filling. For more information, and a list of functions that have this behavior, see [`_CrtSetDebugFillThreshold`](./reference/crtsetdebugfillthreshold.md). + - **Null termination** - Some functions that left potentially non-terminated strings have secure versions, which ensure that strings are properly null-terminated. + Some functions that left potentially nonterminated strings have secure versions, which ensure that strings are properly null-terminated. - **Enhanced error reporting** - The secure functions return error codes with more error information than was available with the pre-existing functions. The secure functions and many of the pre-existing functions now set `errno` and often return an `errno` code type as well, to provide better error reporting. + The secure functions return error codes with more error information than was available with the preexisting functions. The secure functions and many of the preexisting functions now set `errno` and often return an `errno` code type as well, to provide better error reporting. - **Filesystem security** diff --git a/docs/c-runtime-library/stream-i-o.md b/docs/c-runtime-library/stream-i-o.md index 180ecf2b1f..e91fcfdda2 100644 --- a/docs/c-runtime-library/stream-i-o.md +++ b/docs/c-runtime-library/stream-i-o.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Stream I/O" title: "Stream I/O" -ms.date: "11/04/2016" +description: "Learn more about: Stream I/O" +ms.date: 11/04/2016 helpviewer_keywords: ["I/O routines, stream I/O", "I/O [CRT], stream", "stream I/O"] -ms.assetid: dc7874d3-a91b-456a-9015-4748bb358217 --- # Stream I/O @@ -13,61 +12,61 @@ These functions process data in different sizes and formats, from single charact | Routine | Use | |---|---| -| [`clearerr`](./reference/clearerr.md), [`clearerr_s`](./reference/clearerr-s.md) | Clear error indicator for stream | -| [`fclose`](./reference/fclose-fcloseall.md) | Close stream | -| [`_fcloseall`](./reference/fclose-fcloseall.md) | Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`** | -| [`_fdopen`, `wfdopen`](./reference/fdopen-wfdopen.md) | Associate stream with file descriptor of open file | -| [`feof`](./reference/feof.md) | Test for end of file on stream | -| [`ferror`](./reference/ferror.md) | Test for error on stream | -| [`fflush`](./reference/fflush.md) | Flush stream to buffer or storage device | -| [`fgetc`, `fgetwc`](./reference/fgetc-fgetwc.md) | Read character from stream (function versions of **`getc`** and **`getwc`**) | -| [`_fgetchar`, `_fgetwchar`](./reference/fgetc-fgetwc.md) | Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**) | -| [`fgetpos`](./reference/fgetpos.md) | Get position indicator of stream | -| [`fgets`, `fgetws`](./reference/fgets-fgetws.md) | Read string from stream | -| [`_fileno`](./reference/fileno.md) | Get file descriptor associated with stream | -| [`_flushall`](./reference/flushall.md) | Flush all streams to buffer or storage device | -| [`fopen`, `_wfopen`](./reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](./reference/fopen-s-wfopen-s.md) | Open stream | -| [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](./reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](./reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md) | Write formatted data to stream | -| [`fputc`, `fputwc`](./reference/fputc-fputwc.md) | Write a character to a stream (function versions of **`putc`** and **`putwc`**) | -| [`_fputchar`, `_fputwchar`](./reference/fputc-fputwc.md) | Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**) | -| [`fputs`, `fputws`](./reference/fputs-fputws.md) | Write string to stream | -| [`fread`](./reference/fread.md) | Read unformatted data from stream | -| [`freopen`, `_wfreopen`](./reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](./reference/freopen-s-wfreopen-s.md) | Reassign `FILE` stream pointer to new file or device | -| [`fscanf`, `fwscanf`](./reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](./reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md) | Read formatted data from stream | -| [`fseek`, `_fseeki64`](./reference/fseek-fseeki64.md) | Move file position to given location | -| [`fsetpos`](./reference/fsetpos.md) | Set position indicator of stream | -| [`_fsopen`, `_wfsopen`](./reference/fsopen-wfsopen.md) | Open stream with file sharing | -| [`ftell`, `_ftelli64`](./reference/ftell-ftelli64.md) | Get current file position | -| [`fwrite`](./reference/fwrite.md) | Write unformatted data items to stream | -| [`getc`, `getwc`](./reference/getc-getwc.md) | Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**) | -| [`getchar`, `getwchar`](./reference/getc-getwc.md) | Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**) | -| [`_getmaxstdio`](./reference/getmaxstdio.md) | Returns the number of simultaneously open files permitted at the stream I/O level. | -| [`gets_s`, `_getws_s`](./reference/gets-s-getws-s.md) | Read line from **`stdin`** | -| [`_getw`](./reference/getw.md) | Read binary **`int`** from stream | -| [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](./reference/printf-printf-l-wprintf-wprintf-l.md),[`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](./reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md) | Write formatted data to **`stdout`** | -| [`putc`, `putwc`](./reference/putc-putwc.md) | Write character to a stream (macro versions of **`fputc`** and **`fputwc`**) | -| [`putchar`, `putwchar`](./reference/putc-putwc.md) | Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**) | -| [`puts`, `_putws`](./reference/puts-putws.md) | Write line to stream | -| [`_putw`](./reference/putw.md) | Write binary **`int`** to stream | -| [`rewind`](./reference/rewind.md) | Move file position to beginning of stream | -| [`_rmtmp`](./reference/rmtmp.md) | Remove temporary files created by **`tmpfile`** | -| [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](./reference/scanf-scanf-l-wscanf-wscanf-l.md),[`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](./reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) | Read formatted data from **`stdin`** | -| [`setbuf`](./reference/setbuf.md) | Control stream buffering | -| [`_setmaxstdio`](./reference/setmaxstdio.md) | Set a maximum for the number of simultaneously open files at the stream I/O level. | -| [`setvbuf`](./reference/setvbuf.md) | Control stream buffering and buffer size | -| [`_snprintf`, `_snwprintf`](./reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](./reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) | Write formatted data of specified length to string | -| [`_snscanf`, `_snwscanf`](./reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](./reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md) | Read formatted data of a specified length from the standard input stream. | -| [`sprintf`, `swprintf`](./reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](./reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) | Write formatted data to string | -| [`sscanf`, `swscanf`](./reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](./reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md) | Read formatted data from string | -| [`_tempnam`, `_wtempnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md) | Generate temporary filename in given directory | -| [`tmpfile`](./reference/tmpfile.md), [`tmpfile_s`](./reference/tmpfile-s.md) | Create temporary file | -| [`tmpnam`, `_wtmpnam`](./reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](./reference/tmpnam-s-wtmpnam-s.md) | Generate temporary filename | -| [`ungetc`, `ungetwc`](./reference/ungetc-ungetwc.md) | Push character back onto stream | -| [`_vcprintf`, `_vcwprintf`](./reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](./reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md) | Write formatted data to the console. | -| [`vfprintf`, `vfwprintf`](./reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](./reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md) | Write formatted data to stream | -| [`vprintf`, `vwprintf`](./reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md) | Write formatted data to **`stdout`** | -| [`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](./reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) | Write formatted data of specified length to buffer | -| [`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) | Write formatted data to buffer | +| [`clearerr`](reference/clearerr.md), [`clearerr_s`](reference/clearerr-s.md) | Clear error indicator for stream | +| [`fclose`](reference/fclose-fcloseall.md) | Close stream | +| [`_fcloseall`](reference/fclose-fcloseall.md) | Close all open streams except **`stdin`**, **`stdout`**, and **`stderr`** | +| [`_fdopen`, `wfdopen`](reference/fdopen-wfdopen.md) | Associate stream with file descriptor of open file | +| [`feof`](reference/feof.md) | Test for end of file on stream | +| [`ferror`](reference/ferror.md) | Test for error on stream | +| [`fflush`](reference/fflush.md) | Flush stream to buffer or storage device | +| [`fgetc`, `fgetwc`](reference/fgetc-fgetwc.md) | Read character from stream (function versions of **`getc`** and **`getwc`**) | +| [`_fgetchar`, `_fgetwchar`](reference/fgetc-fgetwc.md) | Read character from **`stdin`** (function versions of **`getchar`** and **`getwchar`**) | +| [`fgetpos`](reference/fgetpos.md) | Get position indicator of stream | +| [`fgets`, `fgetws`](reference/fgets-fgetws.md) | Read string from stream | +| [`_fileno`](reference/fileno.md) | Get file descriptor associated with stream | +| [`_flushall`](reference/flushall.md) | Flush all streams to buffer or storage device | +| [`fopen`, `_wfopen`](reference/fopen-wfopen.md), [`fopen_s`, `_wfopen_s`](reference/fopen-s-wfopen-s.md) | Open stream | +| [`fprintf`, `_fprintf_l`, `fwprintf`, `_fwprintf_l`](reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md), [`fprintf_s`, `_fprintf_s_l`, `fwprintf_s`, `_fwprintf_s_l`](reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md) | Write formatted data to stream | +| [`fputc`, `fputwc`](reference/fputc-fputwc.md) | Write a character to a stream (function versions of **`putc`** and **`putwc`**) | +| [`_fputchar`, `_fputwchar`](reference/fputc-fputwc.md) | Write character to **`stdout`** (function versions of **`putchar`** and **`putwchar`**) | +| [`fputs`, `fputws`](reference/fputs-fputws.md) | Write string to stream | +| [`fread`](reference/fread.md) | Read unformatted data from stream | +| [`freopen`, `_wfreopen`](reference/freopen-wfreopen.md), [`freopen_s`, `_wfreopen_s`](reference/freopen-s-wfreopen-s.md) | Reassign `FILE` stream pointer to new file or device | +| [`fscanf`, `fwscanf`](reference/fscanf-fscanf-l-fwscanf-fwscanf-l.md), [`fscanf_s`, `_fscanf_s_l`, `fwscanf_s`, `_fwscanf_s_l`](reference/fscanf-s-fscanf-s-l-fwscanf-s-fwscanf-s-l.md) | Read formatted data from stream | +| [`fseek`, `_fseeki64`](reference/fseek-fseeki64.md) | Move file position to given location | +| [`fsetpos`](reference/fsetpos.md) | Set position indicator of stream | +| [`_fsopen`, `_wfsopen`](reference/fsopen-wfsopen.md) | Open stream with file sharing | +| [`ftell`, `_ftelli64`](reference/ftell-ftelli64.md) | Get current file position | +| [`fwrite`](reference/fwrite.md) | Write unformatted data items to stream | +| [`getc`, `getwc`](reference/getc-getwc.md) | Read character from stream (macro versions of **`fgetc`** and **`fgetwc`**) | +| [`getchar`, `getwchar`](reference/getc-getwc.md) | Read character from **`stdin`** (macro versions of **`fgetchar`** and **`fgetwchar`**) | +| [`_getmaxstdio`](reference/getmaxstdio.md) | Returns the number of simultaneously open files permitted at the stream I/O level. | +| [`gets_s`, `_getws_s`](reference/gets-s-getws-s.md) | Read line from **`stdin`** | +| [`_getw`](reference/getw.md) | Read binary **`int`** from stream | +| [`printf`, `_printf_l`, `wprintf`, `_wprintf_l`](reference/printf-printf-l-wprintf-wprintf-l.md), [`printf_s`, `_printf_s_l`, `wprintf_s`, `_wprintf_s_l`](reference/printf-s-printf-s-l-wprintf-s-wprintf-s-l.md) | Write formatted data to **`stdout`** | +| [`putc`, `putwc`](reference/putc-putwc.md) | Write character to a stream (macro versions of **`fputc`** and **`fputwc`**) | +| [`putchar`, `putwchar`](reference/putc-putwc.md) | Write character to **`stdout`** (macro versions of **`fputchar`** and **`fputwchar`**) | +| [`puts`, `_putws`](reference/puts-putws.md) | Write line to stream | +| [`_putw`](reference/putw.md) | Write binary **`int`** to stream | +| [`rewind`](reference/rewind.md) | Move file position to beginning of stream | +| [`_rmtmp`](reference/rmtmp.md) | Remove temporary files created by **`tmpfile`** | +| [`scanf`, `_scanf_l`, `wscanf`, `_wscanf_l`](reference/scanf-scanf-l-wscanf-wscanf-l.md), [`scanf_s`, `_scanf_s_l`, `wscanf_s`, `_wscanf_s_l`](reference/scanf-s-scanf-s-l-wscanf-s-wscanf-s-l.md) | Read formatted data from **`stdin`** | +| [`setbuf`](reference/setbuf.md) | Control stream buffering | +| [`_setmaxstdio`](reference/setmaxstdio.md) | Set a maximum for the number of simultaneously open files at the stream I/O level. | +| [`setvbuf`](reference/setvbuf.md) | Control stream buffering and buffer size | +| [`_snprintf`, `_snwprintf`](reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md), [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) | Write formatted data of specified length to string | +| [`_snscanf`, `_snwscanf`](reference/snscanf-snscanf-l-snwscanf-snwscanf-l.md), [`_snscanf_s`, `_snscanf_s_l`, `_snwscanf_s`, `_snwscanf_s_l`](reference/snscanf-s-snscanf-s-l-snwscanf-s-snwscanf-s-l.md) | Read formatted data of a specified length from the standard input stream. | +| [`sprintf`, `swprintf`](reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l.md), [`sprintf_s`, `_sprintf_s_l`, `swprintf_s`, `_swprintf_s_l`](reference/sprintf-s-sprintf-s-l-swprintf-s-swprintf-s-l.md) | Write formatted data to string | +| [`sscanf`, `swscanf`](reference/sscanf-sscanf-l-swscanf-swscanf-l.md), [`sscanf_s`, _sscanf_s_l, `swscanf_s`, `_swscanf_s_l`](reference/sscanf-s-sscanf-s-l-swscanf-s-swscanf-s-l.md) | Read formatted data from string | +| [`_tempnam`, `_wtempnam`](reference/tempnam-wtempnam-tmpnam-wtmpnam.md) | Generate temporary filename in given directory | +| [`tmpfile`](reference/tmpfile.md), [`tmpfile_s`](reference/tmpfile-s.md) | Create temporary file | +| [`tmpnam`, `_wtmpnam`](reference/tempnam-wtempnam-tmpnam-wtmpnam.md), [`tmpnam_s`, `_wtmpnam_s`](reference/tmpnam-s-wtmpnam-s.md) | Generate temporary filename | +| [`ungetc`, `ungetwc`](reference/ungetc-ungetwc.md) | Push character back onto stream | +| [`_vcprintf`, `_vcwprintf`](reference/vcprintf-vcprintf-l-vcwprintf-vcwprintf-l.md), [`_vcprintf_s`, `_vcprintf_s_l`, `_vcwprintf_s`, `_vcwprintf_s_l`](reference/vcprintf-s-vcprintf-s-l-vcwprintf-s-vcwprintf-s-l.md) | Write formatted data to the console. | +| [`vfprintf`, `vfwprintf`](reference/vfprintf-vfprintf-l-vfwprintf-vfwprintf-l.md), [`vfprintf_s`, `_vfprintf_s_l`, `vfwprintf_s`, `_vfwprintf_s_l`](reference/vfprintf-s-vfprintf-s-l-vfwprintf-s-vfwprintf-s-l.md) | Write formatted data to stream | +| [`vprintf`, `vwprintf`](reference/vprintf-vprintf-l-vwprintf-vwprintf-l.md), [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md) | Write formatted data to **`stdout`** | +| [`_vsnprintf`, `_vsnwprintf`](reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md), [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) | Write formatted data of specified length to buffer | +| [`vsprintf`, `vswprintf`](reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md), [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) | Write formatted data to buffer | When a program begins execution, the startup code automatically opens several streams: standard input (pointed to by **`stdin`**), standard output (pointed to by **`stdout`**), and standard error (pointed to by **`stderr`**). These streams are directed to the console (keyboard and screen) by default. Use **`freopen`** to redirect **`stdin`**, **`stdout`**, or **`stderr`** to a disk file or a device. @@ -76,16 +75,15 @@ Files opened using the stream routines are buffered by default. The **`stdout`** There are two ways to commit buffer contents to disk: - Link with the file COMMODE.OBJ to set a global commit flag. The default setting of the global flag is **`n`**, for "no-commit." - - Set the mode flag to **`c`** with **`fopen`** or **`_fdopen`**. Any file specifically opened with either the **`c`** or the **`n`** flag behaves according to the flag, regardless of the state of the global commit/no-commit flag. -If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](./reference/setmaxstdio.md) for information on this limit. +If your program doesn't explicitly close a stream, the stream is automatically closed when the program terminates. However, you should close a stream when your program finishes with it, as the number of streams that can be open at one time is limited. See [`_setmaxstdio`](reference/setmaxstdio.md) for information on this limit. Input can follow output directly only with an intervening call to **`fflush`** or to a file-positioning function (**`fseek`**, **`fsetpos`**, or **`rewind`**). Input can be followed by output without an intervening call to a file-positioning function, if the input operation encounters the end of the file. ## See also -[Input and output](./input-and-output.md)\ -[Universal C runtime routines by category](./run-time-routines-by-category.md) +[Input and output](input-and-output.md)\ +[Universal C runtime routines by category](run-time-routines-by-category.md) diff --git a/docs/c-runtime-library/time-management.md b/docs/c-runtime-library/time-management.md index 784c4b009a..619798b3cc 100644 --- a/docs/c-runtime-library/time-management.md +++ b/docs/c-runtime-library/time-management.md @@ -1,42 +1,42 @@ --- -description: "Learn more about: Time Management" title: "Time Management" -ms.date: "11/04/2016" +description: "Learn more about: Time Management" +ms.date: 11/04/2016 helpviewer_keywords: ["dates, run-time library members", "time, time management", "date functions", "time functions"] --- # Time management Use these functions to get the current time and convert, adjust, and store it as necessary. The current time is the system time. -The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](./reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](./daylight-dstbias-timezone-and-tzname.md). +The **`_ftime`** and **`localtime`** routines use the **`TZ`** environment variable. If **`TZ`** isn't set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on **`TZ`**, see [`_tzset`](reference/tzset.md); also see [`_daylight`, `timezone`, and `_tzname`](daylight-dstbias-timezone-and-tzname.md). ### Time routines | Function | Use | |---|---| -| [`asctime`, `_wasctime`](./reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](./reference/asctime-s-wasctime-s.md) | Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure. | -| [`clock`](./reference/clock.md) | Return elapsed wall-clock time for process. | -| [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](./reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](./reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) | Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure. | -| [`difftime`, `_difftime32`, `_difftime64`](./reference/difftime-difftime32-difftime64.md) | Compute difference between two times. | -| [`_ftime`, `_ftime32`, `_ftime64`](./reference/ftime-ftime32-ftime64.md),[`_ftime_s`, `_ftime32_s`, _ftime64_s](./reference/ftime-s-ftime32-s-ftime64-s.md) | Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure. | -| [`_futime`, `_futime32`, `_futime64`](./reference/futime-futime32-futime64.md) | Set modification time on open file | -| [`gmtime`, `_gmtime32`, `_gmtime64`](./reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](./reference/gmtime-s-gmtime32-s-gmtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure. | -| [`localtime`, `_localtime32`, `_localtime64`](./reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](./reference/localtime-s-localtime32-s-localtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure. | -| [`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](./reference/mkgmtime-mkgmtime32-mkgmtime64.md) | Convert time to calendar value in Greenwich Mean Time. | -| [`mktime`, `_mktime32`, `_mktime64`](./reference/mktime-mktime32-mktime64.md) | Convert time to calendar value. | -| [`_strdate`, `_wstrdate`](./reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](./reference/strdate-s-wstrdate-s.md) | Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure. | -| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](./reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date-and-time string for international use. | -| [`_strtime`, `_wstrtime`](./reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](./reference/strtime-s-wstrtime-s.md) | Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure. | -| [`time`, `_time32`, `_time64`](./reference/time-time32-time64.md) | Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**. | -| [`_tzset`](./reference/tzset.md) | Set external time variables from environment time variable **`TZ`**. | -| [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](./reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) | Set modification time for specified file using either current time or time value stored in structure. | +| [`asctime`, `_wasctime`](reference/asctime-wasctime.md), [`asctime_s`, `_wasctime_s`](reference/asctime-s-wasctime-s.md) | Convert time from type **`struct tm`** to character string. The versions of these functions with the **`_s`** suffix are more secure. | +| [`clock`](reference/clock.md) | Return elapsed wall-clock time for process. | +| [`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64.md), [`_ctime_s`, `_ctime32_s`, `_ctime64_s`, `_wctime_s`, `_wctime32_s`, `_wctime64_s`](reference/ctime-s-ctime32-s-ctime64-s-wctime-s-wctime32-s-wctime64-s.md) | Convert time from type **`time_t`**, **`__time32_t`** or **`__time64_t`** to character string. The versions of these functions with the **`_s`** suffix are more secure. | +| [`difftime`, `_difftime32`, `_difftime64`](reference/difftime-difftime32-difftime64.md) | Compute difference between two times. | +| [`_ftime`, `_ftime32`, `_ftime64`](reference/ftime-ftime32-ftime64.md), [`_ftime_s`, `_ftime32_s`, _ftime64_s](reference/ftime-s-ftime32-s-ftime64-s.md) | Store current system time in variable of type **`struct _timeb`** or type **`struct __timeb64`** The versions of these functions with the **`_s`** suffix are more secure. | +| [`_futime`, `_futime32`, `_futime64`](reference/futime-futime32-futime64.md) | Set modification time on open file | +| [`gmtime`, `_gmtime32`, `_gmtime64`](reference/gmtime-gmtime32-gmtime64.md), [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](reference/gmtime-s-gmtime32-s-gmtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`**. The versions of these functions with the **`_s`** suffix are more secure. | +| [`localtime`, `_localtime32`, `_localtime64`](reference/localtime-localtime32-localtime64.md), [`localtime_s`, `_localtime32_s`, `_localtime64_s`](reference/localtime-s-localtime32-s-localtime64-s.md) | Convert time from type **`time_t`** to **`struct tm`** or from type **`__time64_t`** to **`struct tm`** with local correction. The versions of these functions with the **`_s`** suffix are more secure. | +| [`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](reference/mkgmtime-mkgmtime32-mkgmtime64.md) | Convert time to calendar value in Greenwich Mean Time. | +| [`mktime`, `_mktime32`, `_mktime64`](reference/mktime-mktime32-mktime64.md) | Convert time to calendar value. | +| [`_strdate`, `_wstrdate`](reference/strdate-wstrdate.md), [`_strdate_s`, `_wstrdate_s`](reference/strdate-s-wstrdate-s.md) | Return current system date as string. The versions of these functions with the **`_s`** suffix are more secure. | +| [`strftime`, `wcsftime`, `_strftime_l`, `_wcsftime_l`](reference/strftime-wcsftime-strftime-l-wcsftime-l.md) | Format date-and-time string for international use. | +| [`_strtime`, `_wstrtime`](reference/strtime-wstrtime.md), [`_strtime_s`, `_wstrtime_s`](reference/strtime-s-wstrtime-s.md) | Return current system time as string. The versions of these functions with the **`_s`** suffix are more secure. | +| [`time`, `_time32`, `_time64`](reference/time-time32-time64.md) | Get current system time as type **`time_t`**, **`__time32_t`** or as type **`__time64_t`**. | +| [`_tzset`](reference/tzset.md) | Set external time variables from environment time variable **`TZ`**. | +| [`_utime`, `_utime32`, `_utime64`, `_wutime`, `_wutime32`, `_wutime64`](reference/utime-utime32-utime64-wutime-wutime32-wutime64.md) | Set modification time for specified file using either current time or time value stored in structure. | > [!NOTE] > In all versions of Microsoft C/C++ except Microsoft C/C++ version 7.0, and in all versions of Visual C++, the time function returns the current time as the number of seconds elapsed since midnight on January 1, 1970. In Microsoft C/C++ version 7.0, **`time`** returned the current time as the number of seconds elapsed since midnight on December 31, 1899. > [!NOTE] -> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining `_USE_32BIT_TIME_T` changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard types](./standard-types.md) and comments in the documentation for the individual time functions. +> In versions of Visual C++ and Microsoft C/C++ before Visual Studio 2005, **`time_t`** was a **`long int`** (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. **`time_t`** is now equivalent to **`__time64_t`** by default, but defining `_USE_32BIT_TIME_T` changes **`time_t`** to **`__time32_t`** and forces many time functions to call versions that take the 32-bit **`time_t`**. For more information, see [Standard types](standard-types.md) and comments in the documentation for the individual time functions. ## See also -[Universal C runtime routines by category](./run-time-routines-by-category.md) +[Universal C runtime routines by category](run-time-routines-by-category.md) diff --git a/docs/c-runtime-library/toc.yml b/docs/c-runtime-library/toc.yml index b4497d6277..4eb9c708b3 100644 --- a/docs/c-runtime-library/toc.yml +++ b/docs/c-runtime-library/toc.yml @@ -385,7 +385,7 @@ items: href: ../c-runtime-library/data-type-mappings.md - name: Constant and global variable mappings href: ../c-runtime-library/constant-and-global-variable-mappings.md - - name: Routine mappings + - name: Generic-text function mappings href: ../c-runtime-library/routine-mappings.md - name: Locale names, languages, and country-region strings expanded: false @@ -475,9 +475,9 @@ items: href: ../c-runtime-library/reference/abs-labs-llabs-abs64.md - name: access (CRT) href: ../c-runtime-library/reference/access-crt.md - - name: _access, _waccess + - name: _access, _waccess, taccess_s href: ../c-runtime-library/reference/access-waccess.md - - name: _access_s, _waccess_s + - name: _access_s, _waccess_s, _taccess_s href: ../c-runtime-library/reference/access-s-waccess-s.md - name: acos, acosf, acosl href: ../c-runtime-library/reference/acos-acosf-acosl.md @@ -945,11 +945,11 @@ items: href: ../c-runtime-library/reference/fpieee-flt.md - name: _fpreset href: ../c-runtime-library/reference/fpreset.md - - name: fprintf, _fprintf_l, fwprintf, _fwprintf_l + - name: fprintf, _fprintf_l, fwprintf, _fwprintf_l, _ftprintf, _ftprintf_l href: ../c-runtime-library/reference/fprintf-fprintf-l-fwprintf-fwprintf-l.md - - name: _fprintf_p, _fprintf_p_l, _fwprintf_p, _fwprintf_p_l + - name: _fprintf_p, _fprintf_p_l, _ftprintf_p, _ftprintf_p_l, _fwprintf_p, _fwprintf_p_l href: ../c-runtime-library/reference/fprintf-p-fprintf-p-l-fwprintf-p-fwprintf-p-l.md - - name: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l + - name: fprintf_s, _fprintf_s_l, fwprintf_s, _fwprintf_s_l, _ftprintf, _ftprintf_l, _ftprintf_s, _ftprintf_s_l href: ../c-runtime-library/reference/fprintf-s-fprintf-s-l-fwprintf-s-fwprintf-s-l.md - name: fputc, fputwc href: ../c-runtime-library/reference/fputc-fputwc.md @@ -1457,7 +1457,7 @@ items: href: ../c-runtime-library/reference/putenv.md - name: _putenv, _wputenv href: ../c-runtime-library/reference/putenv-wputenv.md - - name: _putenv_s, _wputenv_s + - name: _putenv_s, _wputenv_s, _tputenv_s href: ../c-runtime-library/reference/putenv-s-wputenv-s.md - name: puts, _putws href: ../c-runtime-library/reference/puts-putws.md @@ -1737,7 +1737,7 @@ items: href: ../c-runtime-library/reference/strncoll-wcsncoll-mbsncoll-strncoll-l-wcsncoll-l-mbsncoll-l.md - name: strncpy, _strncpy_l, wcsncpy, _wcsncpy_l, _mbsncpy, _mbsncpy_l href: ../c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l.md - - name: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l + - name: strncpy_s, _strncpy_s_l, wcsncpy_s, _wcsncpy_s_l, _mbsncpy_s, _mbsncpy_s_l, _tcsncpy_s, _tcsncpy_s_l, _tcsnccpy_s, _tcsnccpy_s_l href: ../c-runtime-library/reference/strncpy-s-strncpy-s-l-wcsncpy-s-wcsncpy-s-l-mbsncpy-s-mbsncpy-s-l.md - name: _strnextc, _wcsnextc, _mbsnextc, _mbsnextc_l href: ../c-runtime-library/reference/strnextc-wcsnextc-mbsnextc-mbsnextc-l.md @@ -1755,7 +1755,7 @@ items: href: ../c-runtime-library/reference/strnset-wcsnset.md - name: _strnset, _strnset_l, _wcsnset, _wcsnset_l, _mbsnset, _mbsnset_l href: ../c-runtime-library/reference/strnset-strnset-l-wcsnset-wcsnset-l-mbsnset-mbsnset-l.md - - name: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l + - name: _strnset_s, _strnset_s_l, _wcsnset_s, _wcsnset_s_l, _mbsnset_s, _mbsnset_s_l, _tcsnset_s, _tcsncset_s, _tcsncset_s_l href: ../c-runtime-library/reference/strnset-s-strnset-s-l-wcsnset-s-wcsnset-s-l-mbsnset-s-mbsnset-s-l.md - name: strpbrk, wcspbrk, _mbspbrk, _mbspbrk_l href: ../c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l.md @@ -1929,7 +1929,7 @@ items: href: ../c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md - name: _vsprintf_p, _vsprintf_p_l, _vswprintf_p, _vswprintf_p_l href: ../c-runtime-library/reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md - - name: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l + - name: vsprintf_s, _vsprintf_s_l, vswprintf_s, _vswprintf_s_l, _vstprintf_s, _vstprintf_s_l href: ../c-runtime-library/reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md - name: vsscanf, vswscanf href: ../c-runtime-library/reference/vsscanf-vswscanf.md diff --git a/docs/c-runtime-library/unicode-the-wide-character-set.md b/docs/c-runtime-library/unicode-the-wide-character-set.md index a45fbb30f3..9fbde6648e 100644 --- a/docs/c-runtime-library/unicode-the-wide-character-set.md +++ b/docs/c-runtime-library/unicode-the-wide-character-set.md @@ -8,7 +8,7 @@ ms.assetid: b6a05a21-59a5-4d30-8c85-2dbe185f7a74 --- # Unicode: The wide-character set -A wide character is a 2-byte multilingual character code. Any character in use in modern computing worldwide, including technical symbols and special publishing characters, can be represented according to the Unicode specification as a wide character. Developed and maintained by a large consortium that includes Microsoft, the Unicode standard is now widely accepted. +A wide character is a 2-byte multilingual character code. Any character in use in modern computing worldwide, including technical symbols and special publishing characters, can be represented according to the Unicode specification as one or more wide characters. Developed and maintained by a large consortium that includes Microsoft, the Unicode standard is now widely accepted. A wide character is of type **`wchar_t`**. A wide-character string is represented as a **`wchar_t[]`** array. You point to the array with a `wchar_t*` pointer. diff --git a/docs/c-runtime-library/vprintf-functions.md b/docs/c-runtime-library/vprintf-functions.md index bc1cb41d24..6119ea7428 100644 --- a/docs/c-runtime-library/vprintf-functions.md +++ b/docs/c-runtime-library/vprintf-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: vprintf Functions" title: "vprintf Functions" +description: "Learn more about: vprintf Functions" ms.date: "11/04/2016" helpviewer_keywords: ["vprintf functions", "formatted text [C++]"] -ms.assetid: 02ac7c51-eab1-4bf0-bf4c-77065e3fa744 --- # `vprintf` functions @@ -17,7 +16,7 @@ Each of the `vprintf` functions takes a pointer to an argument list, then format [`_vprintf_p`, `_vprintf_p_l`, `_vwprintf_p`, `_vwprintf_p_l`](./reference/vprintf-p-vprintf-p-l-vwprintf-p-vwprintf-p-l.md)\ [`vprintf_s`, `_vprintf_s_l`, `vwprintf_s`, `_vwprintf_s_l`](./reference/vprintf-s-vprintf-s-l-vwprintf-s-vwprintf-s-l.md)\ [`_vscprintf`, `_vscprintf_l`, `_vscwprintf`, `_vscwprintf_l`](./reference/vscprintf-vscprintf-l-vscwprintf-vscwprintf-l.md)\ -[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) +[`_vsnprintf`, `_vsnwprintf`](./reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md)\ [`vsprintf`, `vswprintf`](./reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l.md)\ [`_vsprintf_p`, `_vsprintf_p_l`, `_vswprintf_p`, `_vswprintf_p_l`](./reference/vsprintf-p-vsprintf-p-l-vswprintf-p-vswprintf-p-l.md)\ [`vsprintf_s`, `_vsprintf_s_l`, `vswprintf_s`, `_vswprintf_s_l`](./reference/vsprintf-s-vsprintf-s-l-vswprintf-s-vswprintf-s-l.md) diff --git a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md index 8ae34ccfbc..f2c9b0519b 100644 --- a/docs/cloud/cloud-and-web-programming-in-visual-cpp.md +++ b/docs/cloud/cloud-and-web-programming-in-visual-cpp.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: Cloud and Web Programming in Visual C++" title: "Cloud and Web Programming in Visual C++" +description: "Learn more about: Cloud and Web Programming in Visual C++" ms.date: "05/14/2019" -ms.assetid: b63611f1-9723-44d0-ba7f-c3ebef341313 ms.topic: "overview" ms.custom: intro-overview --- @@ -43,7 +42,7 @@ In C++, you have several options for connecting to the web and the cloud. - [Windows::Web::Http::HttpClient](/uwp/api/windows.web.http.httpclient) - A Windows Runtime HTTP client class modeled on the .NET Framework class of the same name in the System.Web namespace. `HttpClient` fully supports asynchronous upload and download over HTTP, and pipeline filters that enable the insertion of custom HTTP handlers into the pipeline. The Windows SDK includes sample filters for metered networks, OAuth authentication, and more. For apps that target only Universal Windows Platform, we recommend that you use the `Windows::Web:HttpClient` class. + A Windows Runtime HTTP client class modeled on the .NET Framework class of the same name in the System.Web namespace. `HttpClient` fully supports asynchronous upload and download over HTTP, and pipeline filters that enable the insertion of custom HTTP handlers into the pipeline. The Windows SDK includes sample filters for metered networks, OAuth authentication, and more. For apps that target only Universal Windows Platform, we recommend that you use the `Windows::Web::Http::HttpClient` class. - [IXMLHTTPRequest2 interface](/windows/win32/api/msxml6/nn-msxml6-ixmlhttprequest2) @@ -55,6 +54,6 @@ In C++, you have several options for connecting to the web and the cloud. ## See also -[C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md)
-[Microsoft Azure C and C++ Developer Center](https://azure.microsoft.com/develop/cpp/)
+[C++ in Visual Studio](../overview/visual-cpp-in-visual-studio.md)\ +[Microsoft Azure C and C++ Developer Center](https://azure.microsoft.com/develop/cpp/)\ [Networks and web services (UWP)](/windows/uwp/networking/) diff --git a/docs/code-quality/annotating-locking-behavior.md b/docs/code-quality/annotating-locking-behavior.md index ddf60a045a..a362074bad 100644 --- a/docs/code-quality/annotating-locking-behavior.md +++ b/docs/code-quality/annotating-locking-behavior.md @@ -33,9 +33,9 @@ ms.assetid: 07769c25-9b97-4ab7-b175-d1c450308d7a To avoid concurrency bugs in your multithreaded program, always follow an appropriate locking discipline and use SAL annotations. -Concurrency bugs are notoriously hard to reproduce, diagnose, and debug because they're non-deterministic. Reasoning about thread interleaving is difficult at best, and becomes impractical when you're designing a body of code that has more than a few threads. Therefore, it's good practice to follow a locking discipline in your multithreaded programs. For example, obeying a lock order while acquiring multiple locks helps avoid deadlocks, and acquiring the proper guarding lock before accessing a shared resource helps prevent race conditions. +Concurrency bugs are notoriously hard to reproduce, diagnose, and debug because they're nondeterministic. Reasoning about thread interleaving is difficult at best, and becomes impractical when you're designing a body of code that has more than a few threads. Therefore, it's good practice to follow a locking discipline in your multithreaded programs. For example, obeying a lock order while acquiring multiple locks helps avoid deadlocks, and acquiring the proper guarding lock before accessing a shared resource helps prevent race conditions. -Unfortunately, seemingly simple locking rules can be surprisingly hard to follow in practice. A fundamental limitation in today's programming languages and compilers is that they do not directly support the specification and analysis of concurrency requirements. Programmers have to rely on informal code comments to express their intentions about how they use locks. +Unfortunately, seemingly simple locking rules can be surprisingly hard to follow in practice. A fundamental limitation in today's programming languages and compilers is that they don't directly support the specification and analysis of concurrency requirements. Programmers have to rely on informal code comments to express their intentions about how they use locks. Concurrency SAL annotations are designed to help you specify locking side effects, locking responsibility, data guardianship, lock order hierarchy, and other expected locking behavior. By making implicit rules explicit, SAL concurrency annotations provide a consistent way for you to document how your code uses locking rules. Concurrency annotations also enhance the ability of code analysis tools to find race conditions, deadlocks, mismatched synchronization operations, and other subtle concurrency errors. @@ -64,10 +64,10 @@ The following table lists the locking annotations. |`_Acquires_nonreentrant_lock_(expr)`|The lock that's named by `expr` is acquired. An error is reported if the lock is already held.| |`_Acquires_shared_lock_(expr)`|Annotates a function and indicates that in post state the function increments by one the shared lock count of the lock object that's named by `expr`.| |`_Create_lock_level_(name)`|A statement that declares the symbol `name` to be a lock level so that it may be used in the annotations `_Has_Lock_level_` and `_Lock_level_order_`.| -|`_Has_lock_kind_(kind)`|Annotates any object to refine the type information of a resource object. Sometimes a common type is used for different kinds of resources and the overloaded type isn't sufficient to distinguish the semantic requirements among various resources. Here's a list of pre-defined `kind` parameters:

`_Lock_kind_mutex_`
Lock kind ID for mutexes.

`_Lock_kind_event_`
Lock kind ID for events.

`_Lock_kind_semaphore_`
Lock kind ID for semaphores.

`_Lock_kind_spin_lock_`
Lock kind ID for spin locks.

`_Lock_kind_critical_section_`
Lock kind ID for critical sections.| +|`_Has_lock_kind_(kind)`|Annotates any object to refine the type information of a resource object. Sometimes a common type is used for different kinds of resources and the overloaded type isn't sufficient to distinguish the semantic requirements among various resources. Here's a list of predefined `kind` parameters:

`_Lock_kind_mutex_`
Lock kind ID for mutexes.

`_Lock_kind_event_`
Lock kind ID for events.

`_Lock_kind_semaphore_`
Lock kind ID for semaphores.

`_Lock_kind_spin_lock_`
Lock kind ID for spin locks.

`_Lock_kind_critical_section_`
Lock kind ID for critical sections.| |`_Has_lock_level_(name)`|Annotates a lock object and gives it the lock level of `name`.| |`_Lock_level_order_(name1, name2)`|A statement that gives the lock ordering between `name1` and `name2`. Locks that have level `name1` must be acquired before locks that have level `name2`.| -|`_Post_same_lock_(expr1, expr2)`|Annotates a function and indicates that in post state the two locks, `expr1` and `expr2`, are treated as if they're the same lock object.| +|`_Post_same_lock_(dst, src)`|Annotates a function and indicates that in post state the two locks, `dst` and `src`, are treated as if they're the same lock object, by applying lock properties from `src` to `dst`.| |`_Releases_exclusive_lock_(expr)`|Annotates a function and indicates that in post state the function decrements by one the exclusive lock count of the lock object that's named by `expr`.| |`_Releases_lock_(expr)`|Annotates a function and indicates that in post state the function decrements by one the lock count of the lock object that's named by `expr`.| |`_Releases_nonreentrant_lock_(expr)`|The lock that's named by `expr` is released. An error is reported if the lock isn't currently held.| @@ -97,17 +97,17 @@ The following table lists the annotations for shared data access. |----------------|-----------------| |`_Guarded_by_(expr)`|Annotates a variable and indicates that whenever the variable is accessed, the lock count of the lock object that's named by `expr` is at least one.| |`_Interlocked_`|Annotates a variable and is equivalent to `_Guarded_by_(_Global_interlock_)`.| -|`_Interlocked_operand_`|The annotated function parameter is the target operand of one of the various Interlocked functions. Those operands must have specific additional properties.| +|`_Interlocked_operand_`|The annotated function parameter is the target operand of one of the various Interlocked functions. Those operands must have other specific properties.| |`_Write_guarded_by_(expr)`|Annotates a variable and indicates that whenever the variable is modified, the lock count of the lock object that's named by `expr` is at least one.| ## Smart Lock and RAII Annotations -Smart locks typically wrap native locks and manage their lifetime. The following table lists annotations that can be used with smart locks and RAII coding patterns with support for `move` semantics. +Smart locks typically wrap native locks and manage their lifetime. The following table lists annotations that can be used with smart locks and Resource Acquisition Is Initialization (RAII) coding patterns with support for `move` semantics. |Annotation|Description| |----------------|-----------------| -|`_Analysis_assume_smart_lock_acquired_(lock)`|Tells the analyzer to assume that a smart lock has been acquired. This annotation expects a reference lock type as its parameter.| -|`_Analysis_assume_smart_lock_released_(lock)`|Tells the analyzer to assume that a smart lock has been released. This annotation expects a reference lock type as its parameter.| +|`_Analysis_assume_smart_lock_acquired_(lock)`|Tells the analyzer to assume that a smart lock was acquired. This annotation expects a reference lock type as its parameter.| +|`_Analysis_assume_smart_lock_released_(lock)`|Tells the analyzer to assume that a smart lock was released. This annotation expects a reference lock type as its parameter.| |`_Moves_lock_(target, source)`|Describes a `move constructor` operation, which transfers lock state from the `source` object to the `target`. The `target` is considered a newly constructed object, so any state it had before is lost and replaced by the `source` state. The `source` is also reset to a clean state with no lock counts or aliasing target, but aliases pointing to it remain unchanged.| |`_Replaces_lock_(target, source)`|Describes `move assignment operator` semantics where the target lock is released before transferring the state from the source. You can regard it as a combination of `_Moves_lock_(target, source)` preceded by a `_Releases_lock_(target)`.| |`_Swaps_locks_(left, right)`|Describes the standard `swap` behavior, which assumes that objects `left` and `right` exchange their state. The state exchanged includes lock count and aliasing target, if present. Aliases that point to the `left` and `right` objects remain unchanged.| diff --git a/docs/code-quality/annotating-structs-and-classes.md b/docs/code-quality/annotating-structs-and-classes.md index 32669912be..1c19f33cdd 100644 --- a/docs/code-quality/annotating-structs-and-classes.md +++ b/docs/code-quality/annotating-structs-and-classes.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Annotating Structs and Classes" title: Annotating Structs and Classes +description: "Learn more about: Annotating Structs and Classes" ms.date: 06/28/2019 ms.topic: "conceptual" f1_keywords: @@ -19,7 +19,6 @@ f1_keywords: - "_Field_size_full_" - "_Field_size_full_opt_" - "_Field_z_" -ms.assetid: b8278a4a-c86e-4845-aa2a-70da21a1dd52 --- # Annotating Structs and Classes @@ -52,13 +51,11 @@ You can annotate struct and class members by using annotations that act like inv Applies to struct or class declaration. Indicates that a valid object of that type may be larger than the declared type, with the number of bytes being specified by `size`. For example: ```cpp - typedef _Struct_size_bytes_(nSize) struct MyStruct { size_t nSize; ... }; - ``` The buffer size in bytes of a parameter `pM` of type `MyStruct *` is then taken to be: diff --git a/docs/code-quality/build-reliable-secure-programs.md b/docs/code-quality/build-reliable-secure-programs.md index 39cdc8e125..83f1605db1 100644 --- a/docs/code-quality/build-reliable-secure-programs.md +++ b/docs/code-quality/build-reliable-secure-programs.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Building reliable and secure C++ programs by applying NISTIR 8397 guidelines." title: Build reliable and secure C++ programs -ms.date: 09/28/2023 +description: "Learn more about: Building reliable and secure C++ programs by applying NISTIR 8397 guidelines." +ms.date: 04/25/2025 ms.topic: "conceptual" --- @@ -182,7 +182,7 @@ Remove the now-invalidated secrets from your source code, and replace them with **Azure DevOps (AzDO)** -AzDO users can scan their code through GitHub Advanced Security for Azure DevOps (GHAzDO). GHAzDO also allows users to prevent secret exposures by enabling Push Protection on their repositories, catching potential exposures before they're ever leaked. For more information on how to detect hardcoded secrets in code in Azure DevOps, see *Secret Scanning for Github Advanced Security for Azure DevOps* in each of the following links: +AzDO users can scan their code through GitHub Advanced Security for Azure DevOps (GHAzDO). GHAzDO also allows users to prevent secret exposures by enabling Push Protection on their repositories, catching potential exposures before they're ever leaked. For more information on how to detect hardcoded secrets in code in Azure DevOps, see *Secret Scanning for GitHub Advanced Security for Azure DevOps* in each of the following links: - [GitHub advanced security for Azure DevOps](https://azure.microsoft.com/products/devops/github-advanced-security) - [Secret Scanning for GitHub Advanced Security for Azure DevOps](/azure/devops/repos/security/github-advanced-security-secret-scanning) @@ -205,11 +205,11 @@ GitHub provides known patterns of secrets for partners and users that can be con **Additional resources** -- [Credential Scanning | Microsoft Code With Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/credential_scanning/). -- [detect-secrets: Credential scanning tool | GitHub](https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/recipes/detect-secrets/) - an aptly named module for detecting secrets within a code base. -- [Running detect-secrets in Azure Pipelines](https://microsoft.github.io/code-with-engineering-playbook/continuous-integration/dev-sec-ops/secret-management/recipes/detect-secrets-ado/). +- [Credential Scanning | Microsoft Code With Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/credential_scanning/). +- [detect-secrets: Credential scanning tool | GitHub](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/recipes/detect-secrets/) - an aptly named module for detecting secrets within a code base. +- [Running detect-secrets in Azure Pipelines](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/recipes/detect-secrets-ado/). - [Git-secrets | GitHub awslabs](https://github.com/awslabs/git-secrets) - prevents you from committing passwords and other sensitive information to a git repository. -- [Secrets Management | Microsoft Code with Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/continuous-delivery/secrets-management/) - provides general guidelines on how secrets should be managed. +- [Secrets Management | Microsoft Code with Engineering Playbook](https://microsoft.github.io/code-with-engineering-playbook/CI-CD/dev-sec-ops/secrets-management/) - provides general guidelines on how secrets should be managed. ## 2.5 Run with language- and OS-provided checks and protection @@ -281,7 +281,7 @@ Compiler settings should opt into sensitive information discovery prevention. In At the software level, confidential data might be transmitted to attackers if unexpectedly leaked. Failure to zero-initialize buffers and other buffer misuse might leak private confidential data to attackers that call trusted API. This class of problem best handled by enabling extra static analysis and using secure resource containers as described previously. -- [`/Qspectre` - Mitigate speculative execution side-channel attacks](https://aka.ms/SpectreMitigations) - Inserts barrier instructions that help prevent the disclosure of sensitive data produced by speculative execution. These mitigations should be enabled for code that stores sensitive data in memory and operates across a trust boundary. Microsoft always recommends measuring performance impact against appropriate benchmarks when enabling Spectre-mitigations due to the possibility of introducing runtime checks in performance-critical blocks or loops. These code paths can disable mitigations via the [`spectre(nomitigation)`](../cpp/spectre.md) `declspec` modifier. Projects that enable `/Qspectre`` should also link to libraries that are also compiled with these mitigations, including the Microsoft runtime libraries. +- [`/Qspectre` - Mitigate speculative execution side-channel attacks](https://aka.ms/SpectreMitigations) - Inserts barrier instructions that help prevent the disclosure of sensitive data produced by speculative execution. These mitigations should be enabled for code that stores sensitive data in memory and operates across a trust boundary. Microsoft always recommends measuring performance impact against appropriate benchmarks when enabling Spectre-mitigations due to the possibility of introducing runtime checks in performance-critical blocks or loops. These code paths can disable mitigations via the [`spectre(nomitigation)`](../cpp/spectre.md) `declspec` modifier. Projects that enable `/Qspectre` should also link to libraries that are also compiled with these mitigations, including the Microsoft runtime libraries. ## 2.6 Black box test cases @@ -354,7 +354,7 @@ Historical test cases, also known as regression test cases, prevent old issues f **Key qualities, and relation to other sections** -Since they test for bug regressions, these tests should be quick and easy to run, so they can run alongside the [Code Based Test Cases] and contribute to the overall code coverage of the product. Along with this, using real examples from customers to inspire new test cases is a great way to improve coverage and quality of tests. +Since they test for bug regressions, these tests should be quick and easy to run, so they can run alongside the [Code Based Test Cases](#27-code-based-test-cases) and contribute to the overall code coverage of the product. Along with this, using real examples from customers to inspire new test cases is a great way to improve coverage and quality of tests. **Visual Studio** @@ -395,7 +395,7 @@ When using both sanitizers such as [Address Sanitizer (ASan)](../sanitizers/asan **Azure and GitHub CI/CD** -Modify your build(s) to support continuous creation of executables that use LibFuzzer or AFL++. You can add extra computing resources required for fuzzing at services like OSS-Fuzz or OneFuzz. +Modify your build(s) to support continuous creation of executables that use LibFuzzer or AFL++. You can add extra computing resources required for fuzzing at services like OSS-Fuzz. ## 2.10 Web Application Scanning diff --git a/docs/code-quality/c26132.md b/docs/code-quality/c26132.md new file mode 100644 index 0000000000..390903a605 --- /dev/null +++ b/docs/code-quality/c26132.md @@ -0,0 +1,73 @@ +--- +title: Warning C26132 +description: Documentation on static analysis warning C26132 +author: Rastaban +ms.author: philc +ms.service: visual-cpp +ms.topic: article +ms.date: 02/11/2025 +--- +# Warning C26132 + +> Variable '*variable name*' should be protected by '*lock 1*', but '*lock 2*' is held instead. Possible annotation mismatch. + +The analyzer issues Warning C26132 when it detects that a lock, which is annotated to protect a value, isn't held while accessing the value. However, a related lock is held. The code may be thread-safe, so you might need to update the annotations. + +This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations. + +## Examples + +In the following example, C26132 is emitted when `data` is used. + + The annotation specifies that `customLock01` should protect the variable `data`, but `CustomLockAcquire` is responsible for acquiring the related lock `customLock01->cs`. + +```cpp +#include +struct CustomLock +{ + int cs; // "Critical Section" lock +}; + +_Acquires_exclusive_lock_(criticalSection->cs) // notice the `->` indirection +void CustomLockAcquire(CustomLock* criticalSection); + +_Releases_lock_(criticalSection->cs) // notice the `->` indirection +void CustomLockRelease(CustomLock* criticalSection); + +// global lock +CustomLock customLock01; + +void Initialize(_Guarded_by_(customLock01) int* data) +{ + CustomLockAcquire(&customLock01); + *data = 1; // C26132 + CustomLockRelease(&customLock01); +} +``` + +In this example, the `Initialize` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`. + +```cpp +#include +struct CustomLock +{ + int cs; // "Critical Section" lock +}; + +_Acquires_exclusive_lock_(criticalSection) +void CustomLockAcquire(CustomLock* criticalSection); + +_Releases_lock_(criticalSection) +void CustomLockRelease(CustomLock* criticalSection); + +// global lock +CustomLock customLock01; + +void Initialize(_Guarded_by_(customLock01) int* data) +{ + CustomLockAcquire(&customLock01); + *data = 1; + CustomLockRelease(&customLock01); +} +``` + diff --git a/docs/code-quality/c26133.md b/docs/code-quality/c26133.md new file mode 100644 index 0000000000..0074674044 --- /dev/null +++ b/docs/code-quality/c26133.md @@ -0,0 +1,76 @@ +--- +title: Warning C26133 +description: Documentation on static analysis warning C26133 +author: Rastaban +ms.author: philc +ms.service: visual-cpp +ms.topic: article +ms.date: 02/19/2025 +--- +# Warning C26133 + +> Caller failing to hold lock '*lock 1*' before calling function '*function name*', but '*lock 2*' is held instead. Possible annotation mismatch. + +Warning C26133 is issued when the analyzer detects that the lock required to call a function isn't held when the function is called. However, another lock that appears to be related is held. It's possible the code is thread-safe, and the annotations need to be updated. + +This diagnostic usually doesn't indicate a bug in the code, but rather a mismatch between the annotations and the actual locking behavior. If so, the diagnostic should be resolved as there may be other static analysis issues that aren't being reported due to the inconsistent annotations. + +## Examples + +In the following example, C26133 is emitted when `DoTaskWithCustomLock` is called. + +> warning C26133: Caller failing to hold lock 'customLock01' before calling function 'DoTaskWithCustomLock', but '(&customLock01)->cs' is held instead. Possible annotation mismatch. + +```cpp +#include + +struct CustomLock +{ + int cs; // "Critical Section" +}; + +_Acquires_exclusive_lock_(criticalSection->cs) // notice the `->` indirection +void CustomLockAcquire(CustomLock* criticalSection); + +_Releases_lock_(criticalSection->cs) // notice the `->` indirection +void CustomLockRelease(CustomLock* criticalSection); + +CustomLock customLock01; + +_Requires_lock_held_(customLock01) void DoTaskWithCustomLock(); + +void DoTask() +{ + CustomLockAcquire(&customLock01); + DoTaskWithCustomLock(); // C26133 + CustomLockRelease(&customLock01); +} +``` + +In this example, the `DoTask` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. The warning could also be fixed by changing the `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`. + +```cpp +#include + +struct CustomLock +{ + int cs; // "Critical Section" +}; + +_Acquires_exclusive_lock_(criticalSection) +void CustomLockAcquire(CustomLock* criticalSection); + +_Releases_lock_(criticalSection) +void CustomLockRelease(CustomLock* criticalSection); + +CustomLock customLock01; + +_Requires_lock_held_(customLock01) void DoTaskWithCustomLock(); + +void DoTask() +{ + CustomLockAcquire(&customLock01); + DoTaskWithCustomLock(); + CustomLockRelease(&customLock01); +} +``` \ No newline at end of file diff --git a/docs/code-quality/c26135.md b/docs/code-quality/c26135.md index bbd4c04054..96db147d01 100644 --- a/docs/code-quality/c26135.md +++ b/docs/code-quality/c26135.md @@ -25,14 +25,14 @@ typedef struct _DATA void MyEnter(DATA* p) { // Warning C26135: - // Missing side effect annotation _Acquires_lock_(&p->cs) + // Missing side effect annotation _Acquires_lock_(p->cs) EnterCriticalSection(&p->cs); } void MyLeave(DATA* p) { // warning C26135: - // Missing side effect annotation _Releases_lock_(&p->cs) + // Missing side effect annotation _Releases_lock_(p->cs) LeaveCriticalSection(&p->cs); } ``` diff --git a/docs/code-quality/c26401.md b/docs/code-quality/c26401.md index ef45225be5..023338c378 100644 --- a/docs/code-quality/c26401.md +++ b/docs/code-quality/c26401.md @@ -63,7 +63,7 @@ public: ref_count_--; if (ref_count_ == 0) { - [[gsl::suppress(i.11)]] + [[gsl::suppress("i.11")]] delete this; } } diff --git a/docs/code-quality/c26409.md b/docs/code-quality/c26409.md index 8939a08776..a0dc4a4f3d 100644 --- a/docs/code-quality/c26409.md +++ b/docs/code-quality/c26409.md @@ -1,10 +1,9 @@ --- -description: "Learn more about CppCoreCheck rule C26409: avoid explicit new and delete." title: Warning C26409 +description: "Learn more about CppCoreCheck rule C26409: avoid explicit new and delete." ms.date: 12/14/2020 f1_keywords: ["C26409", "NO_NEW_DELETE"] helpviewer_keywords: ["C26409"] -ms.assetid: a3b3a229-d566-4be3-bd28-2876ccc8dc37 --- # Warning C26409 @@ -13,7 +12,7 @@ ms.assetid: a3b3a229-d566-4be3-bd28-2876ccc8dc37 Even if code is clean of calls to `malloc` and `free`, we still suggest that you consider better options than explicit use of operators [`new` and `delete`](../cpp/new-and-delete-operators.md). **C++ Core Guidelines**:\ -[R.11: Avoid calling new and delete explicitly](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r11-avoid-calling-new-and-delete-explicitly) +[R.11: Avoid calling `new` and `delete` explicitly](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r11-avoid-calling-new-and-delete-explicitly) The ultimate fix is to use smart pointers and appropriate factory functions, such as [`std::make_unique`](../standard-library/memory-functions.md#make_unique). @@ -49,7 +48,7 @@ public: ref_count_--; if (ref_count_ == 0) { - [[gsl::suppress(i.11)]] + [[gsl::suppress("i.11")]] delete this; } } diff --git a/docs/code-quality/c26414.md b/docs/code-quality/c26414.md index 471b69d1d9..d33427adcb 100644 --- a/docs/code-quality/c26414.md +++ b/docs/code-quality/c26414.md @@ -4,14 +4,13 @@ description: "Reference for Visual Studio C++ Core Guidelines code analysis warn ms.date: 01/29/2020 f1_keywords: ["C26414", "RESET_LOCAL_SMART_PTR"] helpviewer_keywords: ["C26414"] -ms.assetid: dd875d0c-6752-4491-a533-3e8831795fbc --- # Warning C26414 > "Move, copy, reassign or reset a local smart pointer." **C++ Core Guidelines**:\ -[R.5: Prefer scoped objects, don't heap-allocate unnecessarily](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-scoped) +[R.5: Prefer scoped objects, don't heap-allocate unnecessarily](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r5-prefer-scoped-objects-dont-heap-allocate-unnecessarily) Smart pointers are convenient for dynamic resource management, but they're not always necessary. For example, it may be easier and more efficient to manage a local dynamic buffer by using a standard container. You may not need dynamic allocation at all for single objects, for example, if they never outlive their creator function. They can be replaced with local variables. Smart pointers become handy when a scenario requires a change of ownership. For example, when you reassign a dynamic resource multiple times, or in multiple paths. They're also useful for resources obtained from external code. And, when smart pointers are used to extend the lifetime of a resource. diff --git a/docs/code-quality/c26430.md b/docs/code-quality/c26430.md index ca0a31cf88..230352b2e9 100644 --- a/docs/code-quality/c26430.md +++ b/docs/code-quality/c26430.md @@ -27,8 +27,6 @@ A variable is marked as checked for null when it's used in the following context - in non-bitwise logical operations; - in comparison operations where one operand is a constant expression that evaluates to zero. -The rule doesn't have full data flow tracking. It can produce incorrect results in cases where indirect checks are used (such as when an intermediate variable holds a null value and is later used in a comparison). - Implicit null checks are assumed when a pointer value is assigned from: - an allocation performed with throwing `operator new`; @@ -67,3 +65,36 @@ void merge_states(gsl::not_null left, gsl::not_null `If you define or delete any default operation in the type 'type-name', define or delete them all (c.21).` **C++ Core Guidelines**:\ -[C.21: If you define or =delete any default operation, define or =delete them all](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all) +[C.21: If you define or `=delete` any copy, move, or destructor function, define or `=delete` them all](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c21-if-you-define-or-delete-any-copy-move-or-destructor-function-define-or-delete-them-all) Special operations such as constructors are assumed to alter the behavior of types so they rely more on language mechanisms to automatically enforce specific scenarios. The canonical example is resource management. If you explicitly define, default, or delete any of these special operations, it signals you want to avoid any special handling of a type. It's inconsistent to leave the other operations unspecified, that is, implicitly defined as deleted by the compiler. diff --git a/docs/code-quality/c26434.md b/docs/code-quality/c26434.md index 7db222af1a..0bdfe9d173 100644 --- a/docs/code-quality/c26434.md +++ b/docs/code-quality/c26434.md @@ -4,7 +4,6 @@ description: "Microsoft C++ Code Analysis warning C26434 for the C++ Core Guidel ms.date: 08/21/2020 f1_keywords: ["C26434", "DONT_HIDE_METHODS"] helpviewer_keywords: ["C26434"] -ms.assetid: 7f66477f-da66-444a-a6e3-44513d7d7e31 --- # Warning C26434 @@ -44,5 +43,4 @@ struct Derived : Base void not_virtual() noexcept {} // C26434, hides a non-virtual function virtual void not_virtual(int i) noexcept {} // C26434, and parameters ignored }; - ``` diff --git a/docs/code-quality/c26435.md b/docs/code-quality/c26435.md index f66dacda9a..ab4ec78c93 100644 --- a/docs/code-quality/c26435.md +++ b/docs/code-quality/c26435.md @@ -7,7 +7,7 @@ helpviewer_keywords: ["C26435"] --- # Warning C26435 -> Function '*symbol*' should specify exactly one of 'virtual', 'override', or 'final' (c.128) +> The virtual function '*symbol*' should specify exactly one of 'virtual', 'override', or 'final' (c.128) ## C++ Core Guidelines @@ -41,6 +41,9 @@ public: void Draw() override final { // C26435, only 'final' is necessary. //... } + virtual void DrawCircumference() final { // C26435, should be neither 'virtual' nor 'final'. + //... + } }; ``` diff --git a/docs/code-quality/c26437.md b/docs/code-quality/c26437.md index 5757f17f66..2f96db0776 100644 --- a/docs/code-quality/c26437.md +++ b/docs/code-quality/c26437.md @@ -4,14 +4,13 @@ description: "Learn more about: Warning C26437 DONT_SLICE" ms.date: 05/17/2023 f1_keywords: ["C26437", "DONT_SLICE"] helpviewer_keywords: ["C26437"] -ms.assetid: ed2f55bc-a6d8-4cc4-8069-5c96e581a96a --- # Warning C26437 > Do not slice. **C++ Core Guidelines**: -[ES.63: Don't slice](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-slice) +[ES.63: Don't slice](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es63-dont-slice) The language allows [slicing](https://en.wikipedia.org/wiki/Object_slicing) and can be viewed as a special case of a dangerous implicit cast. Even if it's done intentionally and doesn't lead to immediate issues, it's still highly discouraged. It makes code harder to change, by forcing extra requirements on related data types. It's especially true if types are polymorphic or involve resource management. diff --git a/docs/code-quality/c26439.md b/docs/code-quality/c26439.md index 68ee27f512..85e7499a1e 100644 --- a/docs/code-quality/c26439.md +++ b/docs/code-quality/c26439.md @@ -4,13 +4,12 @@ description: CppCoreCheck rule C26439 that enforces C++ Core Guidelines F.6 ms.date: 05/17/2023 f1_keywords: ["C26439", "SPECIAL_NOEXCEPT"] helpviewer_keywords: ["C26439"] -ms.assetid: 9df2a1b0-ea94-4884-9d28-c1522ec33a1b --- # Warning C26439 > This kind of function may not throw. Declare it 'noexcept'. -[**C++ Core Guidelines** F.6](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-noexcept): If your function must not throw, declare it `noexcept` +[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept) Some operations should never throw exceptions. Their implementations should be reliable and should handle possible errors conditions gracefully. They shouldn't use exceptions to indicate failure. This rule flags cases where such operations aren't explicitly marked as `noexcept`, which means that they may throw exceptions and consumers can't make assumptions about its reliability. @@ -63,5 +62,5 @@ struct S ## See also -[C26455](./c26455.md)\ -[**C++ Core Guidelines** F.6](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-noexcept) \ No newline at end of file +[C26455](c26455.md)\ +[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept) diff --git a/docs/code-quality/c26441.md b/docs/code-quality/c26441.md index 75b08a780d..c2f5dc91b8 100644 --- a/docs/code-quality/c26441.md +++ b/docs/code-quality/c26441.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["C26441"] ## C++ Core Guidelines -[CP.44](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cp44-remember-to-name-your-lock_guards-and-unique_locks): Remember to name your `lock_guard`s and `unique_lock`s +[CP.44: Remember to name your `lock_guard`s and `unique_lock`s](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cp44-remember-to-name-your-lock_guards-and-unique_locks) ## Remarks diff --git a/docs/code-quality/c26444.md b/docs/code-quality/c26444.md index 86c5a32949..cc020442fe 100644 --- a/docs/code-quality/c26444.md +++ b/docs/code-quality/c26444.md @@ -11,7 +11,7 @@ helpviewer_keywords: ["C26444"] ## C++ Core Guidelines -[ES.84: Don't (try to) declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-noname) +[ES.84: Don't try to declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es84-dont-try-to-declare-a-local-variable-with-no-name) An unnamed variable declaration creates a temporary object that is discarded at the end of the statement. Such temporary objects with nontrivial behavior may point to either inefficient code that allocates and immediately throws away resources or to the code that unintentionally ignores nonprimitive data. Sometimes it may also indicate plainly wrong declaration. @@ -46,4 +46,4 @@ void Foo() ## See also [C26441](C26441.md)\ -[ES.84: Don't (try to) declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-noname) +[ES.84: Don't try to declare a local variable with no name](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es84-dont-try-to-declare-a-local-variable-with-no-name) diff --git a/docs/code-quality/c26449.md b/docs/code-quality/c26449.md index 594025669c..85de9ef0c3 100644 --- a/docs/code-quality/c26449.md +++ b/docs/code-quality/c26449.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["C26449"] > `gsl::span` or `std::string_view` created from a temporary will be invalid when the temporary is invalidated (gsl.view) -C++ Core Guidelines: [GSL.view: Views](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-views). +C++ Core Guidelines: [GSL.view: Views](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#gslview-views). Spans and views are convenient and lightweight types that allow you to reference memory buffers. But they must be used carefully: while their interface looks similar to standard containers, their behavior is more like the behavior of pointers and references. They don't own data and must never be constructed from temporary buffers. This check focuses on cases where source data is temporary, while a span or view isn't. This rule can help to avoid subtle but dangerous mistakes made when legacy code gets modernized and adopts spans or views. There's another check that handles a slightly different scenario involving span references: [C26445 NO_SPAN_REF](c26445.md). diff --git a/docs/code-quality/c26450.md b/docs/code-quality/c26450.md index ec01abc830..66044efb23 100644 --- a/docs/code-quality/c26450.md +++ b/docs/code-quality/c26450.md @@ -43,8 +43,8 @@ long long multiply() ## See also -[26451](c26451.md)\ -[26452](c26452.md)\ -[26453](c26453.md)\ -[26454](c26454.md)\ -[ES.103: Don't overflow](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-overflow) +[C26451](c26451.md)\ +[C26452](c26452.md)\ +[C26453](c26453.md)\ +[C26454](c26454.md)\ +[ES.103: Don't overflow](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es103-dont-overflow) diff --git a/docs/code-quality/c26451.md b/docs/code-quality/c26451.md index 725ce91a6c..0067e42718 100644 --- a/docs/code-quality/c26451.md +++ b/docs/code-quality/c26451.md @@ -45,8 +45,8 @@ void leftshift(int i) noexcept ## See also -[26450](c26450.md)\ -[26452](c26452.md)\ -[26453](c26453.md)\ -[26454](c26454.md)\ +[C26450](c26450.md)\ +[C26452](c26452.md)\ +[C26453](c26453.md)\ +[C26454](c26454.md)\ [ES.103: Don't overflow](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-overflow) diff --git a/docs/code-quality/c26452.md b/docs/code-quality/c26452.md index d6f004eaa5..0f529f60ce 100644 --- a/docs/code-quality/c26452.md +++ b/docs/code-quality/c26452.md @@ -37,9 +37,9 @@ unsigned long long combine(unsigned lo, unsigned hi) ## See also -[26450](c26450.md)\ -[26451](c26451.md)\ -[26453](c26453.md)\ -[26454](c26454.md)\ -[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-unsigned)\ -[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-signed) +[C26450](c26450.md)\ +[C26451](c26451.md)\ +[C26453](c26453.md)\ +[C26454](c26454.md)\ +[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es101-use-unsigned-types-for-bit-manipulation)\ +[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es102-use-signed-types-for-arithmetic) diff --git a/docs/code-quality/c26453.md b/docs/code-quality/c26453.md index 7012f697ae..32a7064209 100644 --- a/docs/code-quality/c26453.md +++ b/docs/code-quality/c26453.md @@ -39,9 +39,9 @@ void leftshift(int shiftCount) ## See also -[26450](c26450.md)\ -[26451](c26451.md)\ -[26452](c26452.md)\ -[26454](c26454.md)\ -[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-unsigned)\ -[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-signed) +[C26450](c26450.md)\ +[C26451](c26451.md)\ +[C26452](c26452.md)\ +[C26454](c26454.md)\ +[ES.101: Use unsigned types for bit manipulation](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es101-use-unsigned-types-for-bit-manipulation)\ +[ES.102: Use signed types for arithmetic](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es102-use-signed-types-for-arithmetic) diff --git a/docs/code-quality/c26454.md b/docs/code-quality/c26454.md index 15940afe9e..77b21092ec 100644 --- a/docs/code-quality/c26454.md +++ b/docs/code-quality/c26454.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Arithmetic overflow: 'operator' operation produces a negative unsigned result at compile time" title: Warning C26454 +description: "Learn more about: Arithmetic overflow: 'operator' operation produces a negative unsigned result at compile time" ms.date: 01/08/2017 f1_keywords: ["C26454", "RESULT_OF_ARITHMETIC_OPERATION_NEGATIVE_UNSIGNED"] helpviewer_keywords: ["C26454"] @@ -37,8 +37,8 @@ unsigned int negativeunsigned() ## See also -[26450](c26450.md)\ -[26451](c26451.md)\ -[26452](c26452.md)\ -[26453](c26453.md)\ -[ES.106: Don't try to avoid negative values by using unsigned](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-nonnegative) +[C26450](c26450.md)\ +[C26451](c26451.md)\ +[C26452](c26452.md)\ +[C26453](c26453.md)\ +[ES.106: Don't try to avoid negative values by using `unsigned`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es106-dont-try-to-avoid-negative-values-by-using-unsigned) diff --git a/docs/code-quality/c26455.md b/docs/code-quality/c26455.md index ca27f3e0e2..617f0cedd5 100644 --- a/docs/code-quality/c26455.md +++ b/docs/code-quality/c26455.md @@ -4,7 +4,6 @@ description: "Learn more about the C26455 DEFAULT_CTOR_NOEXCEPT" ms.date: 04/29/2022 f1_keywords: ["C26455", "DEFAULT_CTOR_NOEXCEPT"] helpviewer_keywords: ["C26455"] -ms.assetid: 27e86063-d969-49d8-8912-dcc2dc57249f author: kylereedmsft ms.author: kylereed ms.custom: kr2b-contr-experiment @@ -24,4 +23,4 @@ Code analysis name: `DEFAULT_CTOR_NOEXCEPT` ## See also [C26439](./c26439.md)\ -[**C++ Core Guidelines** F.6](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-noexcept) +[F.6: If your function must not throw, declare it `noexcept`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f6-if-your-function-must-not-throw-declare-it-noexcept) diff --git a/docs/code-quality/c26478.md b/docs/code-quality/c26478.md index e9c680bfad..ddaff2f01b 100644 --- a/docs/code-quality/c26478.md +++ b/docs/code-quality/c26478.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C26478: Don't use std::move on constant variables. (es.56)" title: Warning C26478 +description: "Learn more about: Warning C26478: Don't use std::move on constant variables. (es.56)" ms.date: 10/12/2023 f1_keywords: ["C26478", "NO_MOVE_OP_ON_CONST"] helpviewer_keywords: ["C26478"] @@ -37,4 +37,4 @@ To fix the issue, remove the redundant `std::move`. ## See also -[ES.56 - Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-move) +[ES.56: Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope) diff --git a/docs/code-quality/c26479.md b/docs/code-quality/c26479.md index 336a12c33b..4612d6fea0 100644 --- a/docs/code-quality/c26479.md +++ b/docs/code-quality/c26479.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C26479: Don't use std::move to return a local variable. (f.48)" title: Warning C26479 +description: "Learn more about: Warning C26479: Don't use std::move to return a local variable. (f.48)" ms.date: 10/12/2023 f1_keywords: ["C26479", "NO_MOVE_RET_ON_LOCALS"] helpviewer_keywords: ["C26479"] @@ -38,5 +38,5 @@ S foo() ## See also -[F.48 - Don't return `std::move(local)`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-move-local) -[ES.56 - Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-move) +[F.48: Don't `return std::move(local)`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f48-dont-return-stdmovelocal)\ +[ES.56: Write `std::move()` only when you need to explicitly move an object to another scope](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es56-write-stdmove-only-when-you-need-to-explicitly-move-an-object-to-another-scope) diff --git a/docs/code-quality/c26483.md b/docs/code-quality/c26483.md index ea4c10c6b9..5e031b2448 100644 --- a/docs/code-quality/c26483.md +++ b/docs/code-quality/c26483.md @@ -1,9 +1,9 @@ --- title: Warning C26483 +description: CppCoreCheck rule C26483 that enforces C++ Core Guidelines Bounds.2 ms.date: 03/22/2018 f1_keywords: ["C26483", "STATIC_INDEX_OUT_OF_RANGE"] helpviewer_keywords: ["C26483"] -description: CppCoreCheck rule C26483 that enforces C++ Core Guidelines Bounds.2 --- # Warning C26483 @@ -24,5 +24,4 @@ void function() int arr2[] { 1, 2, 3 }; arr2[3] = 4; // C26483, 3 is outside the bounds of the array } - ``` diff --git a/docs/code-quality/c26488.md b/docs/code-quality/c26488.md index b3ae0ce888..a54608facb 100644 --- a/docs/code-quality/c26488.md +++ b/docs/code-quality/c26488.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C26488 LIFETIMES_DEREF_NULL_POINTER" title: Warning C26488 +description: "Learn more about: Warning C26488 LIFETIMES_DEREF_NULL_POINTER" ms.date: 12/14/2018 f1_keywords: ["C26488", "LIFETIMES_DEREF_NULL_POINTER"] helpviewer_keywords: ["C26488"] -ms.assetid: 2ade0d31-f259-49de-8676-cce6092fabfc author: kylereedmsft ms.author: kylereed --- @@ -28,9 +27,9 @@ void ex1() The Lifetime guidelines from the C++ core guidelines outline a contract that code can follow which will enable more thorough static memory leak and dangling pointer detection. The basic ideas behind the guidelines are: -1) Never dereference an invalid (dangling) or known-null pointer -2) Never return (either formal return or out parameter) any pointer from a function. -3) Never pass an invalid (dangling) pointer to any function. +1. Never dereference an invalid (dangling) or known-null pointer. +1. Never return (either formal return or out parameter) any pointer from a function. +1. Never pass an invalid (dangling) pointer to any function. ## See also diff --git a/docs/code-quality/c26489.md b/docs/code-quality/c26489.md index 2f252dc766..85df9e569a 100644 --- a/docs/code-quality/c26489.md +++ b/docs/code-quality/c26489.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C26489 LIFETIMES_DEREF_INVALID_POINTER" title: Warning C26489 +description: "Learn more about: Warning C26489 LIFETIMES_DEREF_INVALID_POINTER" ms.date: 12/14/2018 f1_keywords: ["C26489", "LIFETIMES_DEREF_INVALID_POINTER"] helpviewer_keywords: ["C26489"] -ms.assetid: 15983d4f-f615-42e7-8521-ee094b87d066 author: kylereedmsft ms.author: kylereed --- @@ -30,9 +29,9 @@ int ex1() The Lifetime guidelines from the C++ core guidelines outline a contract that code can follow which will enable more thorough static memory leak and dangling pointer detection. The basic ideas behind the guidelines are: -1) Never dereference an invalid (dangling) or known-null pointer -2) Never return (either formal return or out parameter) any pointer from a function. -3) Never pass an invalid (dangling) pointer to any function. +1. Never dereference an invalid (dangling) or known-null pointer. +1. Never return (either formal return or out parameter) any pointer from a function. +1. Never pass an invalid (dangling) pointer to any function. ## See also diff --git a/docs/code-quality/c26494.md b/docs/code-quality/c26494.md index 100acee105..7ed21fb002 100644 --- a/docs/code-quality/c26494.md +++ b/docs/code-quality/c26494.md @@ -37,5 +37,5 @@ void function() ## See also -[ES.20: Always initialize an object](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-always)\ -[C++ Core Guidelines Type.5](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#prosafety-type-safety-profile) +[ES.20: Always initialize an object](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object)\ +[Pro.safety: Type-safety profile](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#prosafety-type-safety-profile) diff --git a/docs/code-quality/c26498.md b/docs/code-quality/c26498.md index 8277d9601c..e495372145 100644 --- a/docs/code-quality/c26498.md +++ b/docs/code-quality/c26498.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["C26498"] > The function '*function*' is constexpr, mark variable '*variable*' constexpr if compile-time evaluation is desired (con.5) -This rule helps to enforce Con.5 from the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rconst-constexpr): use constexpr for values that can be computed at compile time. +This rule helps to enforce [Con.5: Use `constexpr` for values that can be computed at compile time](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con5-use-constexpr-for-values-that-can-be-computed-at-compile-time) in the C++ Core Guidelines. ## Remarks @@ -58,6 +58,6 @@ void foo() ## See also -[C26497](./c26407.md)\ -[C26814](./c26814.md)\ -[Con.5](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rconst-constexpr) \ No newline at end of file +[C26497](c26407.md)\ +[C26814](c26814.md)\ +[Con.5: Use `constexpr` for values that can be computed at compile time](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con5-use-constexpr-for-values-that-can-be-computed-at-compile-time) diff --git a/docs/code-quality/c26815.md b/docs/code-quality/c26815.md index 8778703ae4..5a8c319b65 100644 --- a/docs/code-quality/c26815.md +++ b/docs/code-quality/c26815.md @@ -78,4 +78,4 @@ void f() { ## See also [C26816](c26816.md)\ -[ES.65: Don't dereference an invalid pointer](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-deref) +[ES.65: Don't dereference an invalid pointer](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es65-dont-dereference-an-invalid-pointer) diff --git a/docs/code-quality/c26816.md b/docs/code-quality/c26816.md index f01ea3bc00..f60d02ef09 100644 --- a/docs/code-quality/c26816.md +++ b/docs/code-quality/c26816.md @@ -62,4 +62,4 @@ int f() { ## See also [C26815](c26815.md)\ -[ES.65: Don't dereference an invalid pointer](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-deref) +[ES.65: Don't dereference an invalid pointer](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es65-dont-dereference-an-invalid-pointer) diff --git a/docs/code-quality/c26817.md b/docs/code-quality/c26817.md index fd72d2a527..3e66b660cf 100644 --- a/docs/code-quality/c26817.md +++ b/docs/code-quality/c26817.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["C26817"] > Potentially expensive copy of variable *name* in range-for loop. Consider making it a const reference (es.71). -For more information, see [ES.71 notes](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-for-range) in the C++ Core Guidelines. +For more information, see [ES.71: Prefer a range-`for`-statement to a `for`-statement when there is a choice](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es71-prefer-a-range-for-statement-to-a-for-statement-when-there-is-a-choice) in the C++ Core Guidelines. ## Example diff --git a/docs/code-quality/c26819.md b/docs/code-quality/c26819.md index 34dcd15ac7..fea652f765 100644 --- a/docs/code-quality/c26819.md +++ b/docs/code-quality/c26819.md @@ -13,7 +13,7 @@ helpviewer_keywords: ["C26819"] This check covers implicit fallthrough in switch statements. Implicit fallthrough is when control flow transfers from one switch case directly into a following switch case without the use of the `[[fallthrough]];` statement. This warning is raised when an implicit fallthrough is detected in a switch case containing at least one statement. -For more information, see [ES.78: Don't rely on implicit fallthrough in `switch` statements](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-break) in the C++ Core Guidelines. +For more information, see [ES.78: Don't rely on implicit fallthrough in `switch` statements](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es78-dont-rely-on-implicit-fallthrough-in-switch-statements) in the C++ Core Guidelines. ## Example @@ -87,4 +87,4 @@ void foo(int a) ## See also -[ES.78: Don't rely on implicit fallthrough in `switch` statements](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-break) \ No newline at end of file +[ES.78: Don't rely on implicit fallthrough in `switch` statements](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es78-dont-rely-on-implicit-fallthrough-in-switch-statements) diff --git a/docs/code-quality/c26820.md b/docs/code-quality/c26820.md index 291f3abc21..133edaf130 100644 --- a/docs/code-quality/c26820.md +++ b/docs/code-quality/c26820.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["C26820"] > This is a potentially expensive copy operation. Consider using a reference unless a copy is required (p.9) -For more information, see [P.9: Don't waste time or space](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rp-waste) in the C++ Core Guidelines. +For more information, see [P.9: Don't waste time or space](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#p9-dont-waste-time-or-space) in the C++ Core Guidelines. This check covers nonobvious and easy-to-miss behavior when assigning a reference to a variable marked **`auto`**. The type of the **`auto`** variable is resolved to a value rather than a reference, and an implicit copy is made. diff --git a/docs/code-quality/c26826.md b/docs/code-quality/c26826.md index 8c0f827e9d..47fd2d9e8d 100644 --- a/docs/code-quality/c26826.md +++ b/docs/code-quality/c26826.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["C26826"] > Don't use C-style variable arguments (f.55). -For more information, see [F.55: Don't use `va_arg` arguments](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#F-varargs) in the C++ Core Guidelines. +For more information, see [F.55: Don't use `va_arg` arguments](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f55-dont-use-va_arg-arguments) in the C++ Core Guidelines. ## Remarks diff --git a/docs/code-quality/c26831.md b/docs/code-quality/c26831.md index 0fe737b017..fba6057d2f 100644 --- a/docs/code-quality/c26831.md +++ b/docs/code-quality/c26831.md @@ -58,4 +58,6 @@ void foo(int i, int j) ## See also [`C26832`](c26832.md)\ -[`C26833`](c26833.md) \ No newline at end of file +[`C26833`](c26833.md)\ +[`C26838`](c26838.md)\ +[`C26839`](c26839.md) \ No newline at end of file diff --git a/docs/code-quality/c26837.md b/docs/code-quality/c26837.md index 021978ff09..2be95d94db 100644 --- a/docs/code-quality/c26837.md +++ b/docs/code-quality/c26837.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C26837" title: Warning C26837 +description: "Learn more about: Warning C26837" ms.date: 11/29/2023 f1_keywords: ["C26837", "INTERLOCKED_COMPARE_EXCHANGE_MISUSE", "__WARNING_INTERLOCKED_COMPARE_EXCHANGE_MISUSE"] helpviewer_keywords: ["C26837"] @@ -34,7 +34,7 @@ The intent of this code is: 1. Check if this current value has the least significant bit set. 1. If it does have least significant bit set, clear the bit while preserving the other bits of the current value. -To accomplish this, a copy of the current value is read from the`plock` pointer and saved to a stack variable `lock`. `lock` is used three times: +To accomplish this, a copy of the current value is read from the `plock` pointer and saved to a stack variable `lock`. `lock` is used three times: 1. First, to check if the least-significant bit is set. 1. Second, as the `Comparand` value to `InterlockedCompareExchange64`. diff --git a/docs/code-quality/c26838.md b/docs/code-quality/c26838.md new file mode 100644 index 0000000000..652ec704cd --- /dev/null +++ b/docs/code-quality/c26838.md @@ -0,0 +1,62 @@ +--- +title: Warning C26838 +description: Learn about Microsoft C++ code analysis warning C26838. +author: Rastaban +ms.author: philc +ms.topic: reference +ms.date: 1/10/2025 +--- +# Warning C26838 + +> Allocation size is the result of a signed to unsigned narrowing conversion that could result in overflow if the signed value is negative. + +This warning was added in Visual Studio 2022 version 17.13. + +## Remarks + +Reports that the size specified for an allocation may be the result of the conversion of a possibly negative signed value to an unsigned value. For example: + +```cpp +void* CustomAlloc(size_t); + +int* CreateIntArray(int numberOfElements) +{ + int* p = (int*)CustomAlloc(numberOfElements * sizeof(int)); // Warning: C26838 + + return p; +} +``` + +The expression `numberOfElements * sizeof(int)`, `numberOfElements` is signed and `sizeof(int)` is unsigned. On 64-bit machines, `numberOfElements` is promoted to an unsigned value when multiplied +by `sizeof(int)`. When `numberOfElements` is negative, the resulting value may overflow or have unexpected results when passed to `CustomAlloc`. + +This check applies to common allocation functions like `new`, `malloc`, and `VirtualAlloc`. The check also applies to custom allocator functions that have `alloc` (case insensitive) in the function name. + +This check sometimes fails to recognize that certain checks can prevent overflows because the check is conservative. + +## Example + +To fix the previous code example in which `numberOfElements * sizeof(int)` might overflow due to a negative signed value, introduce a check to ensure it won't. For example: + +```cpp +void* CustomAlloc(size_t); + +int* CreateIntArray(int numberOfElements) +{ + if (numberOfElements < 0) + return nullptr; + + int* p = (int*)CustomAlloc(numberOfElements * sizeof(int)); + // ... + return p; +} +``` + +In the previous example, checking for a negative value addresses the `C26832` warning. Depending on the size of the types involved, this check may result in a different warning such as [`C26831`](c26831.md). For example, on a 32-bit system, both `int` and `size_t` are 32 bits, so the result of the multiplication can still overflow without negative values. + +## See also + +[`C26831`](c26831.md)\ +[`C26832`](c26832.md)\ +[`C26833`](c26833.md)\ +[`C26833`](c26839.md) \ No newline at end of file diff --git a/docs/code-quality/c26839.md b/docs/code-quality/c26839.md new file mode 100644 index 0000000000..96d47c6df2 --- /dev/null +++ b/docs/code-quality/c26839.md @@ -0,0 +1,53 @@ +--- +title: Warning C26839 +description: Learn about Microsoft C++ code analysis warning C26839. +author: Rastaban +ms.author: philc +ms.topic: reference +ms.date: 1/10/2025 +--- +# Warning C26839 + +> Array new allocation size is the result of a signed to unsigned narrowing conversion that could result in overflow if the signed value is negative. + +This warning was added in Visual Studio 2022 version 17.13. + +## Remarks + +Reports that the size specified for an array `new` allocation may be the result of the conversion of a possibly negative signed value to an unsigned value. For example: + +```cpp +int* CreateIntArray(int size) +{ + int* intArray = new int[size]; + return intArray; +} +``` + +The expression `new int[size]`, `size` is signed. The compiler converts the signed value to an unsigned value to calculate how many bytes to be allocated for the array. When `size` is negative, the result of that calculation may overflow or have unexpected results when passed to `new`. + +This check is the same as [`C26838`](c26838.md), but applies only to `new T[]`. + +This check sometimes fails to recognize that certain checks can prevent overflows because the check is conservative. + +## Example + +To fix the previous code example in which the size calculation might overflow due to a negative signed value, introduce a check to ensure it won't. For example: + +```cpp +int* CreateIntArray(int size) +{ + if (size < 0) + return nullptr; + + int* intArray = new int[size]; + return intArray; +} +``` + +## See also + +[`C26831`](c26831.md)\ +[`C26832`](c26832.md)\ +[`C26838`](c26833.md)\ +[`C26838`](c26838.md) \ No newline at end of file diff --git a/docs/code-quality/c28020.md b/docs/code-quality/c28020.md index d3597bd143..927e462bda 100644 --- a/docs/code-quality/c28020.md +++ b/docs/code-quality/c28020.md @@ -1,15 +1,32 @@ --- -description: "Learn more about: Warning C28020" title: Warning C28020 -ms.date: 11/04/2016 +description: "Learn more about: Warning C28020" +ms.date: 03/25/2025 f1_keywords: ["C28020"] helpviewer_keywords: ["C28020"] -ms.assetid: 3612185a-0858-4ba9-b795-4a0681073cf7 --- # Warning C28020 -> The expression '*expr*' is not true at this call +> The expression '*expr*' is not true at this call. This warning is reported when the `_Satisfies_` expression listed isn't true. Frequently, the warning indicates an incorrect parameter. If this warning occurs on a function declaration, the annotations indicate an impossible condition. + +## Example + +The following example generates C28020: + +```cpp +#include + +int func(_In_range_(0, 10) int value) +{ + return value; +} + +int main() +{ + func(11); // C28020 +} +``` diff --git a/docs/code-quality/c28112.md b/docs/code-quality/c28112.md index d717ffd596..530ab51bc0 100644 --- a/docs/code-quality/c28112.md +++ b/docs/code-quality/c28112.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C28112" title: Warning C28112 +description: "Learn more about: Warning C28112" ms.date: 08/25/2022 f1_keywords: ["C28112", "INTERLOCKED_ACCESS", "__WARNING_INTERLOCKED_ACCESS"] helpviewer_keywords: ["C28112"] -ms.assetid: 2720a5dc-84e9-4f78-a8c7-a320c9f9216b --- # Warning C28112 @@ -16,7 +15,7 @@ A variable that is accessed by using the Interlocked executive support routines, `InterlockedXxx` functions are intended to provide atomic operations, but are only atomic with respect to other `InterlockedXxx` functions. Although certain ordinary assignments, accesses, and comparisons to variables that are used by the Interlocked\* routines can be safely accessed by using a different function, the risk is great enough to justify examining each instance. -Code analysis name: INTERLOCKED_ACCESS +Code analysis name: `INTERLOCKED_ACCESS` ## Example diff --git a/docs/code-quality/c28159.md b/docs/code-quality/c28159.md index e17a31ee6f..05fbe31944 100644 --- a/docs/code-quality/c28159.md +++ b/docs/code-quality/c28159.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Warning C28159" title: Warning C28159 +description: "Learn more about: Warning C28159" ms.date: 09/08/2022 f1_keywords: ["C28159", "USE_OTHER_FUNCTION", "__WARNING_USE_OTHER_FUNCTION"] helpviewer_keywords: ["C28159"] -ms.assetid: fab6cd58-0985-4ef6-89a2-64ed04297437 --- # Warning C28159 -> Consider using `*function_name_1*` instead of `*function_name_2*`. Reason: *reason* +> Consider using *`function_name_1`* instead of *`function_name_2`*. Reason: *reason* This warning occurs when you use a function that is semantically equivalent to an alternative, preferred function call. @@ -16,7 +15,7 @@ This warning occurs when you use a function that is semantically equivalent to a C28159 is a general warning message; the annotation `__drv_preferredFunction` was used (possibly with a conditional `__drv_when`() annotation) to flag a bad coding practice. -Code analysis name: USE_OTHER_FUNCTION +Code analysis name: `USE_OTHER_FUNCTION` ## Example diff --git a/docs/code-quality/c28160.md b/docs/code-quality/c28160.md index 38ea9be0b1..eeee7046da 100644 --- a/docs/code-quality/c28160.md +++ b/docs/code-quality/c28160.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C28160" title: Warning C28160 +description: "Learn more about: Warning C28160" ms.date: 09/08/2022 f1_keywords: ["C28160", "ERROR", "__WARNING_ERROR"] helpviewer_keywords: ["C28160"] -ms.assetid: cab15f6b-909c-4cc8-81a0-c24ac7c91c7c --- # Warning C28160 @@ -16,4 +15,4 @@ This warning is reported when a `__drv_error` annotation has been encountered. This annotation is used to flag coding practices that should be fixed, and can be used with a `__drv_when` annotation to indicate specific combinations of parameters. -Code analysis name: ERROR +Code analysis name: `ERROR` diff --git a/docs/code-quality/c28196.md b/docs/code-quality/c28196.md index 4bd26b4162..388766230a 100644 --- a/docs/code-quality/c28196.md +++ b/docs/code-quality/c28196.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C28196" title: Warning C28196 +description: "Learn more about: Warning C28196" ms.date: 11/04/2016 f1_keywords: ["C28196", "RETURNING_BAD_RESULT", "__WARNING_RETURNING_BAD_RESULT"] helpviewer_keywords: ["C28196"] -ms.assetid: 5ee89e96-2796-4316-a64c-702463ca1374 --- # Warning C28196 @@ -51,4 +50,4 @@ Item *get_item(_In_reads_(len) Item *items, size_t len, size_t index) { ## See also [Annotating function parameters and return values](./annotating-function-parameters-and-return-values.md)\ -[Specifying When and Where an Annotation Applies](./specifying-when-and-where-an-annotation-applies.md)\ +[Specifying When and Where an Annotation Applies](./specifying-when-and-where-an-annotation-applies.md) diff --git a/docs/code-quality/c28310.md b/docs/code-quality/c28310.md index 4b85718201..30aa4d8244 100644 --- a/docs/code-quality/c28310.md +++ b/docs/code-quality/c28310.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C28310" title: Warning C28310 +description: "Learn more about: Warning C28310" ms.date: 11/04/2016 f1_keywords: ["C28310"] -ms.assetid: 51054ca8-01b6-454b-9853-f05f1c817b18 +helpviewer_keywords: ["C28310"] --- # Warning C28310 diff --git a/docs/code-quality/c28311.md b/docs/code-quality/c28311.md index 70e03e716e..9d72006cae 100644 --- a/docs/code-quality/c28311.md +++ b/docs/code-quality/c28311.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C28311" title: Warning C28311 +description: "Learn more about: Warning C28311" ms.date: 11/04/2016 f1_keywords: ["C28311"] -ms.assetid: 2c76e07a-4418-40ef-8a77-c62774bc3677 +helpviewer_keywords: ["C28311"] --- # Warning C28311 diff --git a/docs/code-quality/c28312.md b/docs/code-quality/c28312.md index 55f6154d54..852d5bec16 100644 --- a/docs/code-quality/c28312.md +++ b/docs/code-quality/c28312.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C28312" title: Warning C28312 +description: "Learn more about: Warning C28312" ms.date: 11/04/2016 f1_keywords: ["C28312"] -ms.assetid: 19828546-33c9-4373-b7df-2a362ca12637 +helpviewer_keywords: ["C28312"] --- # Warning C28312 diff --git a/docs/code-quality/c33001.md b/docs/code-quality/c33001.md index d3208941b4..679ffc1e04 100644 --- a/docs/code-quality/c33001.md +++ b/docs/code-quality/c33001.md @@ -13,14 +13,23 @@ helpviewer_keywords: ["C33001"] ## Remarks -This warning is triggered when an uninitialized `VARIANT` is passed to an API such as `VariantClear` -that expects an initialized `VARIANT`. +This warning is triggered when an uninitialized `VARIANT` is passed to an API, such as `VariantClear`, that clears the object. Initialize the `VARIANT` before passing it to these functions so it can be properly cleared. + +This warning applies to these functions: + +* `VariantClear` +* `PropVariantClear` +* `VariantCopy` +* `VariantCopyInd` +* `VariantChangeType` +* `VariantChangeTypeEx` +* `DestroyPropVariant` Code analysis name: `VARIANTCLEAR_UNINITIALIZED` ## Example -The following sample code causes warning C33001: +The following code causes warning C33001: ```cpp #include @@ -36,11 +45,11 @@ HRESULT foo(bool some_condition) //... } - VariantClear(&var); // C33001 + VariantClear(&var); // C33001 } ``` -These warnings are corrected by ensuring `VariantClear` is called only for a properly initialized `VARIANT`: +In this example, the warning is corrected by calling `VariantClear` only after `var` has been initialized: ```cpp #include @@ -54,12 +63,12 @@ HRESULT foo(bool some_condition) //... VariantInit(&var); //... - VariantClear(&var); // C33001 + VariantClear(&var); // OK } } ``` ## See also -[C33004](./c33004.md) +[C33004](./c33004.md)\ [C33005](./c33005.md) diff --git a/docs/code-quality/c33004.md b/docs/code-quality/c33004.md index 752103c945..44486d8ffc 100644 --- a/docs/code-quality/c33004.md +++ b/docs/code-quality/c33004.md @@ -49,5 +49,5 @@ void t2(_Out_ VARIANT* pv) ## See also -[C33001](./c33001.md) +[C33001](./c33001.md)\ [C33005](./c33005.md) diff --git a/docs/code-quality/c33005.md b/docs/code-quality/c33005.md index 8c056ba671..41509513e3 100644 --- a/docs/code-quality/c33005.md +++ b/docs/code-quality/c33005.md @@ -55,5 +55,5 @@ void foo() ## See also -[C33001](./c33001.md) +[C33001](./c33001.md)\ [C33004](./c33004.md) diff --git a/docs/code-quality/c6029.md b/docs/code-quality/c6029.md index 85829020b6..729f39ab08 100644 --- a/docs/code-quality/c6029.md +++ b/docs/code-quality/c6029.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C6029" title: Warning C6029 +description: "Learn more about: Warning C6029" ms.date: 2/07/2023 f1_keywords: ["C6029", "USING_TAINTED_DATA", "__WARNING_USING_TAINTED_DATA"] helpviewer_keywords: ["C6029"] @@ -35,7 +35,7 @@ void processData(FILE* file) } ``` -The fix for the issue depends on the nature of the data and the behavior of the annotated function that triggers the diagnostic. For more information, see the documentation for that function. A straightforward fix is to check the size before the second call to `std:fread`. In the next example, we throw an exception to terminate the function. Most real-world code would instead have an error recovery strategy that's specific to the scenario. +The fix for the issue depends on the nature of the data and the behavior of the annotated function that triggers the diagnostic. For more information, see the documentation for that function. A straightforward fix is to check the size before the second call to `std::fread`. In the next example, we throw an exception to terminate the function. Most real-world code would instead have an error recovery strategy that's specific to the scenario. ```cpp void processData(FILE* file) @@ -55,7 +55,7 @@ void processData(FILE* file) } ``` -In `std:fread` and similar functions, the code may need to read large amounts of data. To handle large data, you can allocate the size of the buffer dynamically after the size becomes known. Or, you can call `std:fread` multiple times as needed to read in the rest of the data. If you allocate the buffer dynamically, we recommend you put a limit on the size to avoid introducing an out-of-memory exploit for large values. We don't use this approach in our example because it's already bounded by the size of `uint8_t`. +In `std::fread` and similar functions, the code may need to read large amounts of data. To handle large data, you can allocate the size of the buffer dynamically after the size becomes known. Or, you can call `std::fread` multiple times as needed to read in the rest of the data. If you allocate the buffer dynamically, we recommend you put a limit on the size to avoid introducing an out-of-memory exploit for large values. We don't use this approach in our example because it's already bounded by the size of `uint8_t`. ```cpp void processDataDynamic(FILE* file) diff --git a/docs/code-quality/c6030.md b/docs/code-quality/c6030.md index 41d536acb3..d839858cfa 100644 --- a/docs/code-quality/c6030.md +++ b/docs/code-quality/c6030.md @@ -6,17 +6,18 @@ f1_keywords: ["C6030", "USE_ATTRIBUTE_NORETURN", "__WARNING_USE_ATTRIBUTE_NORETU helpviewer_keywords: ["C6030"] --- -# Warning C6030 +# Warning C6030 > Use attribute [[noreturn]] over __declspec(noreturn) in function '*function-name*' ## Remarks -This warning suggests using the C++11 standard attribute `[[noreturn]]` in place of the declspec variant `__declspec(noreturn)`. The standard attribute provides better cross-platform support because it doesn't rely on language extensions. +This warning suggests using the C++11 standard attribute [`[[noreturn]]`](../cpp/attributes.md#noreturn) in place of the declspec variant [`__declspec(noreturn)`](../cpp/noreturn.md). The standard attribute provides better cross-platform support because it doesn't rely on language extensions. This warning is off by default and isn't part of the `All Rules` rule set. To enable this warning, it must be added to the rule set file being used. This check is available in Visual Studio 2022 version 17.0 and later versions. + Code analysis name: `USE_ATTRIBUTE_NORETURN` ## Example @@ -24,15 +25,13 @@ Code analysis name: `USE_ATTRIBUTE_NORETURN` The following code generates C6030: ```cpp -__declspec(noreturn) void TerminateApplication(); - +__declspec(noreturn) void terminate_application(); ``` Fix the issue by using the `[[noreturn]]` attribute: ```cpp -[[ noreturn ]] void TerminateApplication(); - +[[noreturn]] void terminate_application(); ``` ## See also diff --git a/docs/code-quality/c6102.md b/docs/code-quality/c6102.md index d1dd840a69..9c35f2bc5a 100644 --- a/docs/code-quality/c6102.md +++ b/docs/code-quality/c6102.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6102" title: Warning C6102 +description: "Learn more about: Warning C6102" ms.date: 11/04/2016 f1_keywords: ["C6102"] -ms.assetid: cfd49a8c-df46-48de-8dcb-02ecf2450034 +helpviewer_keywords: ["C6102"] --- # Warning C6102 diff --git a/docs/code-quality/c6103.md b/docs/code-quality/c6103.md index d348b72bd5..6c9dfdcfcd 100644 --- a/docs/code-quality/c6103.md +++ b/docs/code-quality/c6103.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6103" title: Warning C6103 +description: "Learn more about: Warning C6103" ms.date: 11/04/2016 f1_keywords: ["C6103"] -ms.assetid: 22d1ab35-31a3-4ba9-8ef4-7a64bce66621 +helpviewer_keywords: ["C6103"] --- # Warning C6103 diff --git a/docs/code-quality/c6296.md b/docs/code-quality/c6296.md index c5b5b21acb..e6f7da0340 100644 --- a/docs/code-quality/c6296.md +++ b/docs/code-quality/c6296.md @@ -1,47 +1,35 @@ --- -description: "Learn more about: Warning C6296" title: Warning C6296 -ms.date: 11/04/2016 +description: "Learn more about: Warning C6296" +ms.date: 03/30/2025 f1_keywords: ["C6296", "LOOP_ONLY_EXECUTED_ONCE", "__WARNING_LOOP_ONLY_EXECUTED_ONCE"] helpviewer_keywords: ["C6296"] -ms.assetid: 226573e0-db18-4c44-8fc6-0bc09d1028bc --- # Warning C6296 -> Ill-defined for-loop: Loop body only executed once +> Ill-defined for-loop. Loop body only executed once. ## Remarks -This warning indicates that a for-loop might not function as intended. When the index is unsigned and a loop counts down from zero, its body is run only once. +This warning indicates that a for-loop might unintentionally execute only once. A loop with an unsigned index counting down from zero or a mistaken use of `==` might cause this warning. Code analysis name: `LOOP_ONLY_EXECUTED_ONCE` ## Example -The following code generates this warning: +The following example generates C6296. Each for-loop shown executes exactly once. ```cpp -void f( ) +int main() { - unsigned int i; + for (unsigned int i = 0; i < 10; i--) {} // C6296 + // Use the following line to resolve the warning: + // for (unsigned int i = 0; i < 10; i++) {} - for (i = 0; i < 100; i--) - { - // code ... - } -} -``` + for (int i = 0; i == 0; i++) {} // C6296 -To correct this warning, use the following code: - -```cpp -void f( ) -{ - unsigned int i; + for (int i = 0; i < 1; i++) {} // OK - for (i = 0; i < 100; i++) - { - // code ... - } + for (int i = 1; i > 0; i--) {} // OK } ``` diff --git a/docs/code-quality/c6331.md b/docs/code-quality/c6331.md index 8c3047f9cd..b0e322a1d4 100644 --- a/docs/code-quality/c6331.md +++ b/docs/code-quality/c6331.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Warning C6331" title: Warning C6331 +description: "Learn more about: Warning C6331" ms.date: 10/03/2022 f1_keywords: ["C6331", "VirtualFreeInvalidParam1", "__WARNING_VIRTUALFREEINVALIDPARAM1"] helpviewer_keywords: ["C6331"] -ms.assetid: cb1ecc2c-29a5-4c57-acf2-0954a4c047b1 --- # Warning C6331 -> Invalid parameter: passing MEM_RELEASE and MEM_DECOMMIT in conjunction to `*function*` is not allowed. This results in the failure of this call +> Invalid parameter: passing MEM_RELEASE and MEM_DECOMMIT in conjunction to *`function`* is not allowed. This results in the failure of this call This message indicates that an invalid parameter is passed to `VirtualFree` or `VirtualFreeEx`. `VirtualFree` and `VirtualFreeEx` both reject the flags (`MEM_RELEASE | MEM_DECOMMIT`) in combination. Therefore, the values `MEM_DECOMMIT` and `MEM_RELEASE` may not be used together in the same call. diff --git a/docs/code-quality/c6335.md b/docs/code-quality/c6335.md index 738a51f131..a5f62fe5fe 100644 --- a/docs/code-quality/c6335.md +++ b/docs/code-quality/c6335.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C6335" title: Warning C6335 +description: "Learn more about: Warning C6335" ms.date: 11/04/2016 f1_keywords: ["C6335", "LEAKING_PROCESS_HANDLE", "__WARNING_LEAKING_PROCESS_HANDLE"] helpviewer_keywords: ["C6335"] -ms.assetid: f81c0859-3d82-4182-8bf1-6c3b76c7486f --- # Warning C6335 @@ -54,7 +53,7 @@ void f( ) } ``` -To correct this warning, call `CloseHandle (pi.``hThread)` to close thread handle as shown in the following code: +To correct this warning, call `CloseHandle( pi.hThread )` to close thread handle as shown in the following code: ```cpp #include diff --git a/docs/code-quality/c6383.md b/docs/code-quality/c6383.md index 84bf8c2737..72d0ef8b4f 100644 --- a/docs/code-quality/c6383.md +++ b/docs/code-quality/c6383.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Warning C6383" title: Warning C6383 +description: "Learn more about: Warning C6383" ms.date: 09/07/2022 f1_keywords: ["C6383", "ELEMENTS_TO_BYTES", "__WARNING_ELEMENTS_TO_BYTES"] helpviewer_keywords: ["C6383"] -ms.assetid: f5ff7938-0fbe-4b71-b98f-098fe887799d --- # Warning C6383 -> Buffer overrun due to conversion of an element count into a byte count: an element count is expected for parameter `*parameter_name*` in call to `*function_name*` +> Buffer overrun due to conversion of an element count into a byte count: an element count is expected for parameter *`parameter_name`* in call to *`function_name`* This warning indicates that a non-constant byte count is being passed when an element count is instead required. diff --git a/docs/code-quality/c6386.md b/docs/code-quality/c6386.md index 2419833b70..7aa56f9f9f 100644 --- a/docs/code-quality/c6386.md +++ b/docs/code-quality/c6386.md @@ -1,10 +1,9 @@ --- description: "Learn more about: Warning C6386" title: Warning C6386 -ms.date: 11/04/2016 +ms.date: 4/30/2025 f1_keywords: ["C6386", "WRITE_OVERRUN", "__WARNING_WRITE_OVERRUN"] helpviewer_keywords: ["C6386"] -ms.assetid: 84e69fe8-8f03-4bb3-b194-e5551882e214 --- # Warning C6386 @@ -23,15 +22,14 @@ The following code generates both this warning and [C6201](../code-quality/c6201 ```cpp #define MAX 25 -void f ( ) +void f() { - char ar[MAX]; - // code ... - ar[MAX] = '\0'; + char a[MAX]; + a[MAX] = '\0'; // this writes one element past the end of the buffer } ``` -To correct both warnings, use the following code: +To correct the warning, use the following code which accounts for the fact that array indexes are zero-based. Thus `MAX - 1` is the last element in the buffer: ```cpp #define MAX 25 @@ -39,8 +37,7 @@ To correct both warnings, use the following code: void f ( ) { char a[MAX]; - // code ... - a[MAX - 1] = '\0'; + a[MAX-1] = '\0'; } ``` diff --git a/docs/code-quality/c6387.md b/docs/code-quality/c6387.md index d96f377b6d..a925d0b397 100644 --- a/docs/code-quality/c6387.md +++ b/docs/code-quality/c6387.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C6387" title: Warning C6387 +description: "Learn more about: Warning C6387" ms.date: 11/04/2016 f1_keywords: ["C6387", "INVALID_PARAM_VALUE_1", "__WARNING_INVALID_PARAM_VALUE_1"] helpviewer_keywords: ["C6387"] -ms.assetid: 3ea2fc4d-ffc3-4c3c-bfae-d42aa56235d8 --- # Warning C6387 @@ -27,7 +26,7 @@ _Post_ _Null_ char * g(); void f(_In_ char *pch); -void main() +int main() { char *pCh = g(); f(pCh); // Warning C6387 @@ -43,7 +42,7 @@ _Post_ _Notnull_ char * g(); void f(_In_ char *pch); -void main() +int main() { char *pCh = g(); f(pCh); diff --git a/docs/code-quality/c6393.md b/docs/code-quality/c6393.md index 07f0c540f0..a905c012a2 100644 --- a/docs/code-quality/c6393.md +++ b/docs/code-quality/c6393.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C6393" title: Warning C6393 +description: "Learn more about: Warning C6393" ms.date: 11/29/2023 f1_keywords: ["C6393", "LEAP_YEAR_INVALID_DATE_KEYED_LOOKUP", "__WARNING_LEAP_YEAR_INVALID_DATE_KEYED_LOOKUP"] helpviewer_keywords: ["C6393"] @@ -26,26 +26,25 @@ Code analysis name: `LEAP_YEAR_INVALID_DATE_KEYED_LOOKUP` The following code creates a lookup table for the day of the year, assuming 365 days per year. However, this doesn't work if the year is a leap year: ```cpp - -#include - -void foo(int year) -{ - const std::vector items(365); // C6393 - // Initialize items and use it... +#include + +void foo(int year) +{ + const std::vector items(365); // C6393 + // Initialize items and use it... } ``` To fix the problem, adjust the size of the lookup table as the table is created according to the result of appropriate leap year check: ```cpp -#include - -void foo(int year) -{ - bool isLeapYear = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); - const std::vector items(isLeapYear ? 366 : 365); - // Initialize items and use it... +#include + +void foo(int year) +{ + bool isLeapYear = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); + const std::vector items(isLeapYear ? 366 : 365); + // Initialize items and use it... } ``` diff --git a/docs/code-quality/c6394.md b/docs/code-quality/c6394.md index 7d5c7b4db2..d4a4fe6668 100644 --- a/docs/code-quality/c6394.md +++ b/docs/code-quality/c6394.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Warning C6394" title: Warning C6394 +description: "Learn more about: Warning C6394" ms.date: 11/29/2023 f1_keywords: ["C6394", "LEAP_YEAR_INVALID_DATE_KEYED_LOOKUP_MUTABLE", "__WARNING_LEAP_YEAR_INVALID_DATE_KEYED_LOOKUP_MUTABLE"] helpviewer_keywords: ["C6394"] @@ -52,7 +52,7 @@ void foo(int year) ## Heuristics -This rule is enforced by checking if a lookup table has an initial size of 365 elements, but can be expanded to 366. However, it doesn't check if the table’s size is adjusted through proper leap year check or not, and so is a low confidence warning. +This rule is enforced by checking if a lookup table has an initial size of 365 elements, but can be expanded to 366. However, it doesn't check if the table's size is adjusted through proper leap year check or not, and so is a low confidence warning. ## See also diff --git a/docs/code-quality/c6411.md b/docs/code-quality/c6411.md index a24d5c9118..a4a99565a8 100644 --- a/docs/code-quality/c6411.md +++ b/docs/code-quality/c6411.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6411" title: Warning C6411 +description: "Learn more about: Warning C6411" ms.date: 11/04/2016 f1_keywords: ["C6411", "POTENTIAL_READ_OVERRUN"] -ms.assetid: 6bbc1734-eec4-4ad6-9908-4ed2a5f025db +helpviewer_keywords: ["C6411"] --- # Warning C6411 diff --git a/docs/code-quality/c6412.md b/docs/code-quality/c6412.md index 5c29356882..230011ec6e 100644 --- a/docs/code-quality/c6412.md +++ b/docs/code-quality/c6412.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6412" title: Warning C6412 +description: "Learn more about: Warning C6412" ms.date: 11/04/2016 f1_keywords: ["C6412", "POTENTIAL_WRITE_OVERRUN"] -ms.assetid: 6498f045-1bdc-4428-9d95-d9498de207bb +helpviewer_keywords: ["C6412"] --- # Warning C6412 diff --git a/docs/code-quality/c6506.md b/docs/code-quality/c6506.md index df143e3c84..377aef7813 100644 --- a/docs/code-quality/c6506.md +++ b/docs/code-quality/c6506.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C6506" title: Warning C6506 +description: "Learn more about: Warning C6506" ms.date: 11/04/2016 f1_keywords: ["C6506", "BUFFER_SIZE_ON_NON_POINTER_OR_ARRAY", "__WARNING_BUFFER_SIZE_ON_NON_POINTER_OR_ARRAY"] helpviewer_keywords: ["C6506"] -ms.assetid: 20b87ee8-13ea-4d71-95a1-2b2d144d196a --- # Warning C6506 @@ -21,7 +20,7 @@ Code analysis name: `BUFFER_SIZE_ON_NON_POINTER_OR_ARRAY` The following code generates this warning: ```cpp -#include +#include void f(_Out_ char c) { c = 'd'; @@ -31,7 +30,7 @@ void f(_Out_ char c) To correct this warning, use a pointer or an array type, as shown in the following sample code: ```cpp -#include +#include void f(_Out_ char *c) { *c = 'd'; diff --git a/docs/code-quality/c6701.md b/docs/code-quality/c6701.md index bdbbdf6afa..386d29a099 100644 --- a/docs/code-quality/c6701.md +++ b/docs/code-quality/c6701.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Warning C6701" title: Warning C6701 +description: "Learn more about: Warning C6701" ms.date: 11/04/2016 f1_keywords: ["C6701"] -helpviewer_keywords: ["C67901"] -ms.assetid: c48484e2-542c-4f7b-93ea-98c6367cb3d9 +helpviewer_keywords: ["C6701"] --- # Warning C6701 diff --git a/docs/code-quality/c6993.md b/docs/code-quality/c6993.md index e4df96bfab..54f78c56c9 100644 --- a/docs/code-quality/c6993.md +++ b/docs/code-quality/c6993.md @@ -1,12 +1,14 @@ --- -description: "Learn more about: Warning C6993" title: Warning C6993 -ms.date: 11/04/2016 +description: "Learn more about: Warning C6993" +ms.date: 2/25/2025 f1_keywords: ["C6993"] -ms.assetid: 7ea93bc6-b934-4b6b-b71a-a56e765fb4cd +helpviewer_keywords: ["C6993"] --- # Warning C6993 > Code analysis ignores OpenMP constructs; analyzing single-threaded code -This warning indicates that the Code Analyzer has encountered Open MP pragmas that it can't analyze. +This warning indicates that the static analysis tools don't support Open MP pragmas. The static analysis tools could generate incorrect results because they assume the code is single-threaded, not multi-threaded. + +Your code doesn't necessarily need to be 'fixed' to resolve this diagnostic because this warning indicates what the toolset supports and not an issue with your code. \ No newline at end of file diff --git a/docs/code-quality/c6995.md b/docs/code-quality/c6995.md index 6e5736bd79..4ca022014e 100644 --- a/docs/code-quality/c6995.md +++ b/docs/code-quality/c6995.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6995" title: Warning C6995 +description: "Learn more about: Warning C6995" ms.date: 11/04/2016 f1_keywords: ["C6995"] -ms.assetid: 1e82e3ad-99fe-4a35-87d5-359c74b9658e +helpviewer_keywords: ["C6995"] --- # Warning C6995 diff --git a/docs/code-quality/c6997.md b/docs/code-quality/c6997.md index 4090bea051..8cbfc9bd5e 100644 --- a/docs/code-quality/c6997.md +++ b/docs/code-quality/c6997.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Warning C6997" title: Warning C6997 +description: "Learn more about: Warning C6997" ms.date: 11/04/2016 f1_keywords: ["C6997", "IGNORED_ANNOTATIONS"] -ms.assetid: 48fd86a3-d57b-4ecb-979a-5d3a4186482e +helpviewer_keywords: ["C6997"] --- # Warning C6997 diff --git a/docs/code-quality/index.yml b/docs/code-quality/index.yml index 7ae4caa668..337b3f5afa 100644 --- a/docs/code-quality/index.yml +++ b/docs/code-quality/index.yml @@ -8,6 +8,7 @@ metadata: description: Learn how Visual Studio can help you analyze C and C++ code quality. ms.topic: landing-page ms.date: 05/26/2020 + ms.author: twhitney ms.custom: intro-landing-hub # linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new diff --git a/docs/code-quality/quick-start-code-analysis-for-c-cpp.md b/docs/code-quality/quick-start-code-analysis-for-c-cpp.md index b54c5ce1d3..499af5c14a 100644 --- a/docs/code-quality/quick-start-code-analysis-for-c-cpp.md +++ b/docs/code-quality/quick-start-code-analysis-for-c-cpp.md @@ -19,7 +19,7 @@ You can improve the quality of your application by running code analysis regular 1. To run code analysis every time the project is built using the selected configuration, select the **Enable Code Analysis on Build** check box. You can also run code analysis manually by opening the **Analyze** menu and then choosing **Run Code Analysis on** *ProjectName* or **Run Code Analysis on File**. -1. Choose the [rule set](using-rule-sets-to-specify-the-cpp-rules-to-run.md) that you want to use or create a [custom rule set](using-rule-sets-to-specify-the-cpp-rules-to-run.md#to-create-a-rule-set-in-a-text-editor). If using LLVM/clang-cl, see [Using Clang-Tidy in Visual Studio](../code-quality/clang-tidy.md) to configure Clang-Tidy analysis options. +1. Choose the [rule set](using-rule-sets-to-specify-the-cpp-rules-to-run.md) that you want to use or create a [custom rule set](using-rule-sets-to-specify-the-cpp-rules-to-run.md#to-create-a-rule-set-in-a-text-editor). If using LLVM/clang-cl, see [Using Clang-Tidy in Visual Studio](clang-tidy.md) to configure Clang-Tidy analysis options. ### Standard C/C++ rule sets @@ -100,7 +100,7 @@ The Error List window lists the code analysis warnings found. The results are di For detailed information about the warning, including possible solutions to the issue, choose the warning ID in the Code column to display its corresponding online help article. -Double-click a warning to move the cursor to the line of code that caused the warning in the Visual Studio code editor. Or, press Enter on the selected warning. +Double-click a warning to move the cursor to the line of code that caused the warning in the code editor. Or, press Enter on the selected warning. After you understand the problem, you can resolve it in your code. Then, rerun code analysis to make sure that the warning no longer appears in the Error List. @@ -128,4 +128,4 @@ You can search long lists of warning messages and you can filter warnings in mul ## See also -- [Code analysis for C/C++](../code-quality/code-analysis-for-c-cpp-overview.md) +- [Code analysis for C/C++](code-analysis-for-c-cpp-overview.md) diff --git a/docs/code-quality/toc.yml b/docs/code-quality/toc.yml index 049d6ad622..61bafc57ca 100644 --- a/docs/code-quality/toc.yml +++ b/docs/code-quality/toc.yml @@ -591,6 +591,10 @@ items: href: ../code-quality/c26117.md - name: Warning C26130 href: ../code-quality/c26130.md + - name: Warning C26132 + href: c26132.md + - name: Warning C26133 + href: c26133.md - name: Warning C26135 href: ../code-quality/c26135.md - name: Warning C26138 @@ -633,6 +637,10 @@ items: href: ../code-quality/c26830.md - name: Warning C26831 href: ../code-quality/c26831.md + - name: Warning C26838 + href: ../code-quality/c26838.md + - name: Warning C26839 + href: ../code-quality/c26839.md - name: Warning C26832 href: ../code-quality/c26832.md - name: Warning C26833 diff --git a/docs/code-quality/understanding-sal.md b/docs/code-quality/understanding-sal.md index 8669d1689b..7e3c30bfd4 100644 --- a/docs/code-quality/understanding-sal.md +++ b/docs/code-quality/understanding-sal.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Understanding SAL" title: Understanding SAL +description: "Learn more about: Understanding SAL" ms.date: 11/04/2016 ms.topic: "conceptual" -ms.assetid: a94d6907-55f2-4874-9571-51d52d6edcfd --- # Understanding SAL @@ -94,9 +93,9 @@ These annotations help identify possible uninitialized values and invalid null p This section shows code examples for the basic SAL annotations. -### Using the Visual Studio Code Analysis Tool to Find Defects +### Using the Visual Studio code analysis tool to find defects -In the examples, the Visual Studio Code Analysis tool is used together with SAL annotations to find code defects. Here's how to do that. +In the examples, the Visual Studio code analysis tool is used together with SAL annotations to find code defects. Here's how to do that. #### To use Visual Studio code analysis tools and SAL @@ -145,7 +144,7 @@ void BadInCaller() } ``` -If you use Visual Studio Code Analysis on this example, it validates that the callers pass a non-Null pointer to an initialized buffer for `pInt`. In this case, `pInt` pointer cannot be NULL. +If you use Visual Studio code analysis on this example, it validates that the callers pass a non-Null pointer to an initialized buffer for `pInt`. In this case, `pInt` pointer cannot be NULL. ### Example: The \_In\_opt\_ Annotation @@ -172,7 +171,7 @@ void InOptCaller() } ``` -Visual Studio Code Analysis validates that the function checks for NULL before it accesses the buffer. +Visual Studio code analysis validates that the function checks for NULL before it accesses the buffer. ### Example: The \_Out\_ Annotation @@ -198,7 +197,7 @@ void OutCaller() } ``` -Visual Studio Code Analysis Tool validates that the caller passes a non-NULL pointer to a buffer for `pInt` and that the buffer is initialized by the function before it returns. +Visual Studio code analysis validates that the caller passes a non-NULL pointer to a buffer for `pInt` and that the buffer is initialized by the function before it returns. ### Example: The \_Out\_opt\_ Annotation @@ -225,7 +224,7 @@ void OutOptCaller() } ``` -Visual Studio Code Analysis validates that this function checks for NULL before `pInt` is dereferenced, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns. +Visual Studio code analysis validates that this function checks for NULL before `pInt` is dereferenced, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns. ### Example: The \_Inout\_ Annotation @@ -256,7 +255,7 @@ void BadInOutCaller() } ``` -Visual Studio Code Analysis validates that callers pass a non-NULL pointer to an initialized buffer for `pInt`, and that, before return, `pInt` is still non-NULL and the buffer is initialized. +Visual Studio code analysis validates that callers pass a non-NULL pointer to an initialized buffer for `pInt`, and that, before return, `pInt` is still non-NULL and the buffer is initialized. ### Example: The \_Inout\_opt\_ Annotation @@ -285,7 +284,7 @@ void InOutOptCaller() } ``` -Visual Studio Code Analysis validates that this function checks for NULL before it accesses the buffer, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns. +Visual Studio code analysis validates that this function checks for NULL before it accesses the buffer, and if `pInt` is not NULL, that the buffer is initialized by the function before it returns. ### Example: The \_Outptr\_ Annotation @@ -315,7 +314,7 @@ void OutPtrCaller() } ``` -Visual Studio Code Analysis validates that the caller passes a non-NULL pointer for `*pInt`, and that the buffer is initialized by the function before it returns. +Visual Studio code analysis validates that the caller passes a non-NULL pointer for `*pInt`, and that the buffer is initialized by the function before it returns. ### Example: The \_Outptr\_opt\_ Annotation @@ -347,7 +346,7 @@ void OutPtrOptCaller() } ``` -Visual Studio Code Analysis validates that this function checks for NULL before `*pInt` is dereferenced, and that the buffer is initialized by the function before it returns. +Visual Studio code analysis validates that this function checks for NULL before `*pInt` is dereferenced, and that the buffer is initialized by the function before it returns. ### Example: The \_Success\_ Annotation in Combination with \_Out\_ @@ -366,7 +365,7 @@ bool GetValue(_Out_ int *pInt, bool flag) } ``` -The `_Out_` annotation causes Visual Studio Code Analysis to validate that the caller passes a non-NULL pointer to a buffer for `pInt`, and that the buffer is initialized by the function before it returns. +The `_Out_` annotation causes Visual Studio code analysis to validate that the caller passes a non-NULL pointer to a buffer for `pInt`, and that the buffer is initialized by the function before it returns. ## SAL Best Practice @@ -384,7 +383,7 @@ Here are some guidelines: - Annotate value-range annotations so that Code Analysis can ensure buffer and pointer safety. -- Annotate locking rules and locking side effects. For more information, see [Annotating Locking Behavior](../code-quality/annotating-locking-behavior.md). +- Annotate locking rules and locking side effects. For more information, see [Annotating Locking Behavior](annotating-locking-behavior.md). - Annotate driver properties and other domain-specific properties. @@ -392,10 +391,10 @@ Or you can annotate all parameters to make your intent clear throughout and to m ## See also -- [Using SAL Annotations to Reduce C/C++ Code Defects](../code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects.md) -- [Annotating Function Parameters and Return Values](../code-quality/annotating-function-parameters-and-return-values.md) -- [Annotating Function Behavior](../code-quality/annotating-function-behavior.md) -- [Annotating Structs and Classes](../code-quality/annotating-structs-and-classes.md) -- [Annotating Locking Behavior](../code-quality/annotating-locking-behavior.md) -- [Specifying When and Where an Annotation Applies](../code-quality/specifying-when-and-where-an-annotation-applies.md) -- [Best Practices and Examples](../code-quality/best-practices-and-examples-sal.md) +- [Using SAL Annotations to Reduce C/C++ Code Defects](using-sal-annotations-to-reduce-c-cpp-code-defects.md) +- [Annotating Function Parameters and Return Values](annotating-function-parameters-and-return-values.md) +- [Annotating Function Behavior](annotating-function-behavior.md) +- [Annotating Structs and Classes](annotating-structs-and-classes.md) +- [Annotating Locking Behavior](annotating-locking-behavior.md) +- [Specifying When and Where an Annotation Applies](specifying-when-and-where-an-annotation-applies.md) +- [Best Practices and Examples](best-practices-and-examples-sal.md) diff --git a/docs/code-quality/using-the-cpp-core-guidelines-checkers.md b/docs/code-quality/using-the-cpp-core-guidelines-checkers.md index 3609f413ac..8ffa7df200 100644 --- a/docs/code-quality/using-the-cpp-core-guidelines-checkers.md +++ b/docs/code-quality/using-the-cpp-core-guidelines-checkers.md @@ -74,7 +74,7 @@ int main() int arr[10]; // warning C26494 int* p = arr; // warning C26485 - [[gsl::suppress(bounds.1)]] // This attribute suppresses Bounds rule #1 + [[gsl::suppress("bounds.1", justification : "This attribute suppresses Bounds rules #1")]] { int* q = p + 1; // warning C26481 (suppressed) p = q++; // warning C26481 (suppressed) @@ -104,7 +104,7 @@ c:\users\username\documents\visual studio 2015\projects\corecheckexample\coreche ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ``` -The C++ Core Guidelines are there to help you write better and safer code. However, you might find an instance where a rule or a profile shouldn't be applied. It's easy to suppress it directly in the code. You can use the `[[gsl::suppress]]` attribute to keep C++ Core Check from detecting and reporting any violation of a rule in the following code block. You can mark individual statements to suppress specific rules. You can even suppress the entire bounds profile by writing `[[gsl::suppress(bounds)]]` without including a specific rule number. +The C++ Core Guidelines are there to help you write better and safer code. However, you might find an instance where a rule or a profile shouldn't be applied. It's easy to suppress it directly in the code. You can use the `[[gsl::suppress]]` attribute to keep C++ Core Check from detecting and reporting any violation of a rule in the following code block. You can mark individual statements to suppress specific rules. You can even suppress the entire bounds profile by writing `[[gsl::suppress("bounds")]]` without including a specific rule number. ## Supported rule sets @@ -197,10 +197,10 @@ The Microsoft C++ compiler has limited support for the `[[gsl::suppress]]` attri ```cpp // Suppress only warnings from the 'r.11' rule in expression. -[[gsl::suppress(r.11)]] new int; +[[gsl::suppress("r.11")]] new int; // Suppress all warnings from the 'r' rule group (resource management) in block. -[[gsl::suppress(r)]] +[[gsl::suppress("r")]] { new int; } @@ -209,7 +209,7 @@ The Microsoft C++ compiler has limited support for the `[[gsl::suppress]]` attri // For declarations, you might need to use the surrounding block. // Macros are not expanded inside of attributes. // Use plain numbers instead of macros from the warnings.h. -[[gsl::suppress(26400)]] +[[gsl::suppress("26400")]] { int *p = new int; } @@ -317,11 +317,11 @@ Because of the way the code analysis rules get loaded within Visual Studio 2015, 1. In the **NuGet Package Manager** window, search for Microsoft.CppCoreCheck. - ![Nuget Package Manager window showing the CppCoreCheck package.](../code-quality/media/cppcorecheck_nuget_window.png) + ![Nuget Package Manager window showing the CppCoreCheck package.](media/cppcorecheck_nuget_window.png) 1. Select the Microsoft.CppCoreCheck package and then choose the **Install** button to add the rules to your project. - The NuGet package adds an MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio Code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules. + The NuGet package adds an MSBuild *`.targets`* file to your project that is invoked when you enable code analysis on your project. The *`.targets`* file adds the C++ Core Check rules as another extension to the Visual Studio code analysis tool. When the package is installed, you can use the Property Pages dialog to enable or disable the released and experimental rules. ::: moniker-end diff --git a/docs/cpp/arrays-cpp.md b/docs/cpp/arrays-cpp.md index e32eaab9fa..48563141ee 100644 --- a/docs/cpp/arrays-cpp.md +++ b/docs/cpp/arrays-cpp.md @@ -161,10 +161,9 @@ int i2[5][7]; It specifies an array of type **`int`**, conceptually arranged in a two-dimensional matrix of five rows and seven columns, as shown in the following figure: -:::image type="content" source="../cpp/media/vc38rc1.gif" alt-text="Conceptual layout of a multidimensional array."::: - +:::image type="complex" source="../cpp/media/vc38rc1.gif" alt-text="Conceptual layout of a multidimensional array."::: The image is a grid 7 cells wide and 5 cells high. Each cell contains the index of the cell. The first cell index is labeled 0,0. The next cell in that row is 0,1 and so on to the last cell in that row which is 0,6. The next row starts with the index 1,0. The cell after that has an index of 1,1. The last cell in that row is 1,6. This pattern repeats until the last row, which starts with the index 4,0. The last cell in the last row has an index of 4,6. -:::image-end +:::image-end::: You can declare multidimensioned arrays that have an initializer list (as described in [Initializers](../cpp/initializers.md)). In these declarations, the constant expression that specifies the bounds for the first dimension can be omitted. For example: diff --git a/docs/cpp/attributes.md b/docs/cpp/attributes.md index 5c3644f81c..b34a559f80 100644 --- a/docs/cpp/attributes.md +++ b/docs/cpp/attributes.md @@ -77,16 +77,18 @@ The `[[noreturn]]` attribute specifies that a function never returns; in other w ## Microsoft-specific attributes -### `[[gsl::suppress(rules)]]` +### `[[gsl::suppress( [, justification: ])]]` -The Microsoft-specific `[[gsl::suppress(rules)]]` attribute is used to suppress warnings from checkers that enforce [Guidelines Support Library (GSL)](https://github.com/Microsoft/GSL) rules in code. For example, consider this code snippet: +`` is a string that specifies the name of the rule to suppress. The optional `justification` field allows you to explain why a warning is being disabled or suppressed. This value will appear in the SARIF output when the `/analyze:log:includesuppressed` option is specified. Its value is a UTF-8 encoded narrow string literal. The `[[gsl::suppress]]` attribute is available in Visual Studio 2022 version 17.14 and later versions. + +The Microsoft-specific `[[gsl::suppress]]` attribute is used to suppress warnings from checkers that enforce [Guidelines Support Library (GSL)](https://github.com/Microsoft/GSL) rules in code. For example, consider this code snippet: ```cpp int main() { int arr[10]; // GSL warning C26494 will be fired int* p = arr; // GSL warning C26485 will be fired - [[gsl::suppress(bounds.1)]] // This attribute suppresses Bounds rule #1 + [[gsl::suppress("bounds.1", justification: "This attribute suppresses Bounds rule #1")]] { int* q = p + 1; // GSL warning C26481 suppressed p = q--; // GSL warning C26481 suppressed @@ -102,7 +104,7 @@ The example raises these warnings: - [C26481](../code-quality/c26481.md) (Bounds Rule 1: Don't use pointer arithmetic. Use span instead.) -The first two warnings fire when you compile this code with the CppCoreCheck code analysis tool installed and activated. But the third warning doesn't fire because of the attribute. You can suppress the entire bounds profile by writing `[[gsl::suppress(bounds)]]` without including a specific rule number. The C++ Core Guidelines are designed to help you write better and safer code. The suppress attribute makes it easy to turn off the warnings when they aren't wanted. +The first two warnings fire when you compile this code with the CppCoreCheck code analysis tool installed and activated. But the third warning doesn't fire because of the attribute. You can suppress the entire bounds profile by writing `[[gsl::suppress("bounds")]]` without including a specific rule number. The C++ Core Guidelines are designed to help you write better and safer code. The suppress attribute makes it easy to turn off the warnings when they aren't wanted. ### `[[msvc::flatten]]` @@ -159,7 +161,7 @@ void f() { ### `[[msvc::noinline]]` -When placed before a function declaration, the Microsoft-specific attribute `[[msvc::noinline]]` has the same meaning as `declspec(noinline)`. +When placed before a function declaration, the Microsoft-specific attribute `[[msvc::noinline]]` has the same meaning as `__declspec(noinline)`. ### `[[msvc::noinline_calls]]` diff --git a/docs/cpp/bstr-t-assign.md b/docs/cpp/bstr-t-assign.md index 565b248630..801be55d0a 100644 --- a/docs/cpp/bstr-t-assign.md +++ b/docs/cpp/bstr-t-assign.md @@ -1,11 +1,11 @@ --- -description: "Learn more about: _bstr_t::Assign" title: "_bstr_t::Assign" +description: "Learn more about: _bstr_t::Assign" ms.date: 02/02/2021 f1_keywords: ["_bstr_t::Assign"] helpviewer_keywords: ["Assign method [C++]"] --- -# _`bstr_t::Assign` +# `_bstr_t::Assign` **Microsoft Specific** diff --git a/docs/cpp/c-cpp-language-and-standard-libraries.md b/docs/cpp/c-cpp-language-and-standard-libraries.md index a6f866c446..59218ff5e3 100644 --- a/docs/cpp/c-cpp-language-and-standard-libraries.md +++ b/docs/cpp/c-cpp-language-and-standard-libraries.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: C/C++ language and standard libraries reference" title: "C/C++ language and standard libraries reference" -ms.date: "08/13/2019" -ms.assetid: c26a6682-961a-43ef-ad33-2adc612f69ac +description: "Learn more about: C/C++ language and standard libraries reference" +ms.date: 09/11/2024 ms.topic: "overview" ms.custom: intro-overview --- @@ -17,7 +16,7 @@ You'll also find documentation for the C runtime library, the C++ standard libra [C language](../c-language/c-language-reference.md)\ Reference content for the Microsoft implementation of the C language. -[C++ language](../cpp/cpp-language-reference.md)\ +[C++ language](cpp-language-reference.md)\ Reference content for the Microsoft implementation of the C++ language. [C/C++ preprocessor](../preprocessor/c-cpp-preprocessor-reference.md)\ @@ -61,10 +60,13 @@ Classes that simplify the writing of programs that use data parallelism or task [OpenMP](../parallel/openmp/openmp-in-visual-cpp.md)\ Reference for the Microsoft implementation of the OpenMP API. +[Proxy library](https://github.com/microsoft/proxy)\ +A header-only C++20 library for using polymorphism in C++ without inheritance. For API reference information, see [Proxy 3 Specifications](https://microsoft.github.io/proxy/docs/specifications.html) + [SafeInt library](../safeint/safeint-library.md)\ A portable library that can be used with MSVC, GCC, or Clang to help prevent integer overflows. -[Data Access Libraries](../data/data-access-in-cpp.md) +[Data Access Libraries](../data/data-access-in-cpp.md)\ Libraries to support data access using ATL or MFC, and legacy services such as OLE DB and ODBC. ## Related articles diff --git a/docs/cpp/casting.md b/docs/cpp/casting.md index 17830ed970..1a74c49398 100644 --- a/docs/cpp/casting.md +++ b/docs/cpp/casting.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Casting in C++" title: "Casting" +description: "Learn more about: Casting in C++" ms.date: 6/11/2024 helpviewer_keywords: ["casting [C++]", "coercion [C++]", "virtual functions [C++], in derived classes [C++]", "static cast operator", "dynamic cast operator", "polymorphic classes [C++]", "classes [C++], polymorphism"] ai-usage: ai-assisted @@ -9,21 +9,21 @@ ai-usage: ai-assisted In C++, if a class is derived from a base class containing one or more virtual functions, a pointer to that base class type can be used to call virtual functions in the derived class object. A class containing virtual functions is sometimes called a "polymorphic class." -![Diagram of a class hierarchy where C derives from B, which derives from A.](../cpp/media/vc38zz1.gif "Class hierarchy")
+![Diagram of a class hierarchy where C derives from B, which derives from A.](media/vc38zz1.gif "Class hierarchy")\ Class hierarchy An object of type `C` can be visualized as follows: -![Diagram of Class C with subobjects B and A.](../cpp/media/vc38zz2.gif "Class C with subobjects B and A")
+![Diagram of Class C with subobjects B and A.](media/vc38zz2.gif "Class C with subobjects B and A")\ Class C with subobjects B and A Given an instance of class `C`, there's a `B` subobject and an `A` subobject. The instance of `C`, including the `A` and `B` subobjects, is the "complete object." Because a derived class completely contains the definitions of all the base classes from which it's derived, it's safe to cast a pointer to any of its base classes (also called an upcast). Given a pointer to a base class, it may be safe to cast the pointer to an instance of a derived class (also called a downcast). -Using run-time type information, it's possible to check whether a pointer actually points to a complete object and can be safely cast to point to another object in its hierarchy. The [dynamic_cast](../cpp/dynamic-cast-operator.md) operator performs a run-time check to ensure that the operation is safe. It's better to design your class hierarchy so that you can use virtual functions to avoid the need for downcasting. However, if you must downcast, use `dynamic_cast` to ensure that the operation is safe. +Using run-time type information, it's possible to check whether a pointer actually points to a complete object and can be safely cast to point to another object in its hierarchy. The [dynamic_cast](dynamic-cast-operator.md) operator performs a run-time check to ensure that the operation is safe. It's better to design your class hierarchy so that you can use virtual functions to avoid the need for downcasting. However, if you must downcast, use `dynamic_cast` to ensure that the operation is safe. -For conversion of nonpolymorphic types, you can use the [static_cast](../cpp/static-cast-operator.md) operator (this topic explains the difference between static and dynamic casting conversions, and when it's appropriate to use each). +For conversion of nonpolymorphic types, you can use the [static_cast](static-cast-operator.md) operator (this topic explains the difference between static and dynamic casting conversions, and when it's appropriate to use each). The following example demonstrates the use of `dynamic_cast` and `static_cast`: @@ -72,9 +72,9 @@ int main() { This section covers the following topics: -- [Casting operators](../cpp/casting-operators.md)\ -- [Run-time type information](../cpp/run-time-type-information.md) +- [Casting operators](casting-operators.md) +- [Run-time type information](run-time-type-information.md) ## See also -[Expressions](../cpp/expressions-cpp.md) +[Expressions](expressions-cpp.md) diff --git a/docs/cpp/class-member-overview.md b/docs/cpp/class-member-overview.md index 54f6191224..3d97b74bea 100644 --- a/docs/cpp/class-member-overview.md +++ b/docs/cpp/class-member-overview.md @@ -17,7 +17,7 @@ The full list of member categories is as follows: - [Overview of member functions](overview-of-member-functions.md). -- [Mutable](static-members-cpp.md) and [static](static-members-cpp.md) data members, including built-in types and other user defined types. +- [Mutable](mutable-data-members-cpp.md) and [static](static-members-cpp.md) data members, including built-in types and other user defined types. - Operators diff --git a/docs/cpp/clrcall.md b/docs/cpp/clrcall.md index e0271e971a..c368132c78 100644 --- a/docs/cpp/clrcall.md +++ b/docs/cpp/clrcall.md @@ -38,7 +38,7 @@ int __clrcall Func1() { } // Func1 hasn't been used at this point (code has not been generated), -// so runtime returns the adddress of a stub to the function +// so runtime returns the address of a stub to the function int (__clrcall *pf)() = &Func1; // code calls the function, code generated at difference address diff --git a/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp b/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp index af736b0495..753367555e 100644 --- a/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp +++ b/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp @@ -1,4 +1,3 @@ - // Use make_shared function when possible. auto sp1 = make_shared(L"The Beatles", L"Im Happy Just to Dance With You"); diff --git a/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_6.cpp b/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_6.cpp index 551c3f2f5b..2c02d593fb 100644 --- a/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_6.cpp +++ b/docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_6.cpp @@ -1,4 +1,3 @@ - // Initialize two separate raw pointers. // Note that they contain the same values. auto song1 = new Song(L"Village People", L"YMCA"); diff --git a/docs/cpp/codesnippet/CPP/how-to-create-and-use-unique-ptr-instances_3.cpp b/docs/cpp/codesnippet/CPP/how-to-create-and-use-unique-ptr-instances_3.cpp index e7ad81c8d5..29baefa191 100644 --- a/docs/cpp/codesnippet/CPP/how-to-create-and-use-unique-ptr-instances_3.cpp +++ b/docs/cpp/codesnippet/CPP/how-to-create-and-use-unique-ptr-instances_3.cpp @@ -1,4 +1,3 @@ - class MyClass { private: diff --git a/docs/cpp/codesnippet/CPP/smart-pointers-modern-cpp_2.cpp b/docs/cpp/codesnippet/CPP/smart-pointers-modern-cpp_2.cpp index 10ac9aab95..2c7e2716ed 100644 --- a/docs/cpp/codesnippet/CPP/smart-pointers-modern-cpp_2.cpp +++ b/docs/cpp/codesnippet/CPP/smart-pointers-modern-cpp_2.cpp @@ -1,4 +1,3 @@ - class LargeObject { public: diff --git a/docs/cpp/com-ptr-t-extractors.md b/docs/cpp/com-ptr-t-extractors.md index 416c396712..305a593e87 100644 --- a/docs/cpp/com-ptr-t-extractors.md +++ b/docs/cpp/com-ptr-t-extractors.md @@ -4,7 +4,6 @@ description: "Describes the extraction operators for the _com_ptr_t class." ms.date: 07/07/2020 f1_keywords: ["_com_ptr_t::operatorInterface&", "_com_ptr_t::operatorbool", "_com_ptr_t::operator->", "_com_ptr_t::operator*"] helpviewer_keywords: ["operator Interface& [C++]", "* operator [C++], with specific objects", "operator& [C++]", "operator* [C++]", "-> operator [C++], with specific objects", "& operator [C++], with specific objects", "operator Interface* [C++]", "operator * [C++]", "operator->", "operator bool", "extractors, _com_ptr_t class", "extractors [C++]"] -ms.assetid: 194b9e0e-123c-49ff-a187-0a7fcd68145a --- # `_com_ptr_t` Extractors @@ -14,7 +13,7 @@ Extract the encapsulated COM interface pointer. ## Syntax -```c++ +```cpp operator Interface*( ) const throw( ); operator Interface&( ) const; Interface& operator*( ) const; diff --git a/docs/cpp/compiler-limits.md b/docs/cpp/compiler-limits.md index c1926cd274..4fcdd08cfc 100644 --- a/docs/cpp/compiler-limits.md +++ b/docs/cpp/compiler-limits.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Compiler Limits" title: "Compiler Limits" +description: "Learn more about: Compiler Limits" ms.date: "06/05/2023" helpviewer_keywords: ["cl.exe compiler, limits for language constructs"] --- @@ -22,7 +22,7 @@ The C++ standard recommends limits for various language constructs. The followin - Scope qualifications of one identifier - C++ standard: 256, Microsoft C++ compiler: 127. -- Nested **`extern`** specifications - C++ standard: 1024, Microsoft C++ compiler: 9 (not counting the implicit **`extern`** specification in global scope, or 10, if you count the implicit **`extern`** specification in global scope.. +- Nested **`extern`** specifications - C++ standard: 1024, Microsoft C++ compiler: 9 (not counting the implicit **`extern`** specification in global scope, or 10, if you count the implicit **`extern`** specification in global scope. - Template arguments in a template declaration - C++ standard: 1024, Microsoft C++ compiler: 2046. diff --git a/docs/cpp/const-and-volatile-pointers.md b/docs/cpp/const-and-volatile-pointers.md index cca4371b50..b786fcb6b4 100644 --- a/docs/cpp/const-and-volatile-pointers.md +++ b/docs/cpp/const-and-volatile-pointers.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: const and volatile pointers" title: "const and volatile pointers" +description: "Learn more about: const and volatile pointers" ms.date: "11/19/2019" helpviewer_keywords: ["volatile keyword [C++], and pointers", "pointers, and const", "pointers, and volatile", "const keyword [C++], volatile pointers"] -ms.assetid: 0c92dc6c-400e-4342-b345-63ddfe649d7e --- # const and volatile pointers @@ -117,5 +116,5 @@ int main() { ## See also -[Pointers](pointers-cpp.md) +[Pointers](pointers-cpp.md)\ [Raw pointers](raw-pointers.md) diff --git a/docs/cpp/cpp-language-reference.md b/docs/cpp/cpp-language-reference.md index f5316639df..7165a7aa29 100644 --- a/docs/cpp/cpp-language-reference.md +++ b/docs/cpp/cpp-language-reference.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: C++ Language Reference" title: "C++ Language Reference" +description: "Learn more about: C++ Language Reference" ms.custom: "index-page" -ms.date: "12/10/2019" +ms.date: 12/10/2019 helpviewer_keywords: ["C++, language reference"] -ms.assetid: 4be9cacb-c862-4391-894a-3a118c9c93ce --- # C++ Language Reference @@ -14,96 +13,95 @@ For an overview of Modern C++ programming practices, see [Welcome Back to C++](w See the following tables to quickly find a keyword or operator: -- [C++ Keywords](../cpp/keywords-cpp.md) - -- [C++ Operators](../cpp/cpp-built-in-operators-precedence-and-associativity.md) +- [C++ Keywords](keywords-cpp.md) +- [C++ Operators](cpp-built-in-operators-precedence-and-associativity.md) ## In This Section -[Lexical Conventions](../cpp/lexical-conventions.md)
+[Lexical Conventions](lexical-conventions.md)\ Fundamental lexical elements of a C++ program: tokens, comments, operators, keywords, punctuators, literals. Also, file translation, operator precedence/associativity. -[Basic Concepts](../cpp/basic-concepts-cpp.md)
+[Basic Concepts](basic-concepts-cpp.md)\ Scope, linkage, program startup and termination, storage classes, and types. -[Built-in types](fundamental-types-cpp.md) +[Built-in types](fundamental-types-cpp.md)\ The fundamental types that are built into the C++ compiler and their value ranges. -[Standard Conversions](../cpp/standard-conversions.md)
+[Standard Conversions](standard-conversions.md)\ Type conversions between built-in types. Also, arithmetic conversions and conversions among pointer, reference, and pointer-to-member types. -[Declarations and definitions](declarations-and-definitions-cpp.md) +[Declarations and definitions](declarations-and-definitions-cpp.md)\ Declaring and defining variables, types and functions. -[Operators, Precedence and Associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)
+[Operators, Precedence and Associativity](cpp-built-in-operators-precedence-and-associativity.md)\ The operators in C++. -[Expressions](../cpp/expressions-cpp.md)
+[Expressions](expressions-cpp.md)\ Types of expressions, semantics of expressions, reference topics on operators, casting and casting operators, run-time type information. -[Lambda Expressions](../cpp/lambda-expressions-in-cpp.md)
+[Lambda Expressions](lambda-expressions-in-cpp.md)\ A programming technique that implicitly defines a function object class and constructs a function object of that class type. -[Statements](../cpp/statements-cpp.md)
+[Statements](statements-cpp.md)\ Expression, null, compound, selection, iteration, jump, and declaration statements. -[Classes and structs](../cpp/classes-and-structs-cpp.md)
+[Classes and structs](classes-and-structs-cpp.md)\ Introduction to classes, structures, and unions. Also, member functions, special member functions, data members, bit fields, **`this`** pointer, nested classes. -[Unions](unions.md)
+[Unions](unions.md)\ User-defined types in which all members share the same memory location. -[Derived Classes](../cpp/inheritance-cpp.md)
+[Derived Classes](inheritance-cpp.md)\ Single and multiple inheritance, **`virtual`** functions, multiple base classes, **abstract** classes, scope rules. Also, the **`__super`** and **`__interface`** keywords. -[Member-Access Control](../cpp/member-access-control-cpp.md)
+[Member-Access Control](member-access-control-cpp.md)\ Controlling access to class members: **`public`**, **`private`**, and **`protected`** keywords. Friend functions and classes. -[Overloading](operator-overloading.md)
+[Overloading](operator-overloading.md)\ Overloaded operators, rules for operator overloading. -[Exception Handling](../cpp/exception-handling-in-visual-cpp.md)
+[Exception Handling](exception-handling-in-visual-cpp.md)\ C++ exception handling, structured exception handling (SEH), keywords used in writing exception handling statements. -[Assertion and User-Supplied Messages](../cpp/assertion-and-user-supplied-messages-cpp.md)
+[Assertion and User-Supplied Messages](assertion-and-user-supplied-messages-cpp.md)\ `#error` directive, the **`static_assert`** keyword, the `assert` macro. -[Templates](../cpp/templates-cpp.md)
+[Templates](templates-cpp.md)\ Template specifications, function templates, class templates, **`typename`** keyword, templates vs. macros, templates and smart pointers. -[Event Handling](../cpp/event-handling.md)
+[Event Handling](event-handling.md)\ Declaring events and event handlers. -[Microsoft-Specific Modifiers](../cpp/microsoft-specific-modifiers.md)
+[Microsoft-Specific Modifiers](microsoft-specific-modifiers.md)\ Modifiers specific to Microsoft C++. Memory addressing, calling conventions, **`naked`** functions, extended storage-class attributes (**`__declspec`**), **`__w64`**. -[Inline Assembler](../assembler/inline/inline-assembler.md)
+[Inline Assembler](../assembler/inline/inline-assembler.md)\ Using assembly language and C++ in **`__asm`** blocks. -[Compiler COM Support](../cpp/compiler-com-support.md)
+[Compiler COM Support](compiler-com-support.md)\ A reference to Microsoft-specific classes and global functions used to support COM types. -[Microsoft Extensions](../cpp/microsoft-extensions.md)
+[Microsoft Extensions](microsoft-extensions.md)\ Microsoft extensions to C++. -[Nonstandard Behavior](../cpp/nonstandard-behavior.md)
+[Nonstandard Behavior](nonstandard-behavior.md)\ Information about nonstandard behavior of the Microsoft C++ compiler. -[Welcome Back to C++](welcome-back-to-cpp-modern-cpp.md)
+[Welcome Back to C++](welcome-back-to-cpp-modern-cpp.md)\ An overview of modern C++ programming practices for writing safe, correct and efficient programs. ## Related Sections -[Component Extensions for Runtime Platforms](../extensions/component-extensions-for-runtime-platforms.md)
+[Component Extensions for Runtime Platforms](../extensions/component-extensions-for-runtime-platforms.md)\ Reference material on using the Microsoft C++ compiler to target .NET. -[C/C++ Building Reference](../build/reference/c-cpp-building-reference.md)
+[C/C++ Building Reference](../build/reference/c-cpp-building-reference.md)\ Compiler options, linker options, and other build tools. -[C/C++ Preprocessor Reference](../preprocessor/c-cpp-preprocessor-reference.md)
+[C/C++ Preprocessor Reference](../preprocessor/c-cpp-preprocessor-reference.md)\ Reference material on pragmas, preprocessor directives, predefined macros, and the preprocessor. -[Visual C++ Libraries](../standard-library/cpp-standard-library-reference.md)
+[Visual C++ Libraries](../standard-library/cpp-standard-library-reference.md)\ A list of links to the reference start pages for the various Microsoft C++ libraries. ## See also diff --git a/docs/cpp/declspec.md b/docs/cpp/declspec.md index 253de9e94d..443a140a7c 100644 --- a/docs/cpp/declspec.md +++ b/docs/cpp/declspec.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: `__declspec`" title: "__declspec" -ms.date: 03/01/2022 +description: "Learn more about: `__declspec`" +ms.date: 1/14/2025 f1_keywords: ["__declspec_cpp", "__declspec", "_declspec"] helpviewer_keywords: ["__declspec keyword [C++]"] --- @@ -9,7 +9,7 @@ helpviewer_keywords: ["__declspec keyword [C++]"] **Microsoft Specific** -The extended attribute syntax for specifying storage-class information uses the **`__declspec`** keyword, which specifies that an instance of a given type is to be stored with a Microsoft-specific storage-class attribute listed below. Examples of other storage-class modifiers include the **`static`** and **`extern`** keywords. However, these keywords are part of the ANSI specification of the C and C++ languages, and as such aren't covered by extended attribute syntax. The extended attribute syntax simplifies and standardizes Microsoft-specific extensions to the C and C++ languages. +The extended attribute syntax for specifying storage-class information uses the `__declspec` keyword, which specifies that an instance of a given type is to be stored with a Microsoft-specific storage-class attribute listed below. Examples of other storage-class modifiers include the `static` and `extern` keywords. However, these keywords are part of the ANSI specification of the C and C++ languages, and as such aren't covered by extended attribute syntax. The extended attribute syntax simplifies and standardizes Microsoft-specific extensions to the C and C++ languages. ## Grammar @@ -30,6 +30,7 @@ The extended attribute syntax for specifying storage-class information uses the  **`dllimport`**\  **`dllexport`**\  **`empty_bases`**\ + **`hybrid_patchable`**\  **`jitintrinsic`**\  **`naked`**\  **`noalias`**\ @@ -49,7 +50,7 @@ The extended attribute syntax for specifying storage-class information uses the White space separates the declaration modifier sequence. Examples appear in later sections. -Extended attribute grammar supports these Microsoft-specific storage-class attributes: [`align`](../cpp/align-cpp.md), [`allocate`](../cpp/allocate.md), [`allocator`](../cpp/allocator.md), [`appdomain`](../cpp/appdomain.md), [`code_seg`](../cpp/code-seg-declspec.md), [`deprecated`](../cpp/deprecated-cpp.md), [`dllexport`](../cpp/dllexport-dllimport.md), [`dllimport`](../cpp/dllexport-dllimport.md), [`empty_bases`](../cpp/empty-bases.md), [`jitintrinsic`](../cpp/jitintrinsic.md), [`naked`](../cpp/naked-cpp.md), [`noalias`](../cpp/noalias.md), [`noinline`](../cpp/noinline.md), [`noreturn`](../cpp/noreturn.md), [`nothrow`](../cpp/nothrow-cpp.md), [`novtable`](../cpp/novtable.md), [`no_sanitize_address`](../cpp/no-sanitize-address.md),[`process`](../cpp/process.md), [`restrict`](../cpp/restrict.md), [`safebuffers`](../cpp/safebuffers.md), [`selectany`](../cpp/selectany.md), [`spectre`](../cpp/spectre.md), and [`thread`](../cpp/thread.md). It also supports these COM-object attributes: [`property`](../cpp/property-cpp.md) and [`uuid`](../cpp/uuid-cpp.md). +Extended attribute grammar supports these Microsoft-specific storage-class attributes: [`align`](align-cpp.md), [`allocate`](allocate.md), [`allocator`](allocator.md), [`appdomain`](appdomain.md), [`code_seg`](code-seg-declspec.md), [`deprecated`](deprecated-cpp.md), [`dllexport`](dllexport-dllimport.md), [`dllimport`](dllexport-dllimport.md), [`empty_bases`](empty-bases.md), [`jitintrinsic`](jitintrinsic.md), [`naked`](naked-cpp.md), [`noalias`](noalias.md), [`noinline`](noinline.md), [`noreturn`](noreturn.md), [`nothrow`](nothrow-cpp.md), [`novtable`](novtable.md), [`no_sanitize_address`](no-sanitize-address.md), [`process`](process.md), [`restrict`](restrict.md), [`safebuffers`](safebuffers.md), [`selectany`](selectany.md), [`spectre`](spectre.md), and [`thread`](thread.md). It also supports these COM-object attributes: [`property`](property-cpp.md) and [`uuid`](uuid-cpp.md). The **`code_seg`**, **`dllexport`**, **`dllimport`**, **`empty_bases`**, **`naked`**, **`noalias`**, **`nothrow`**, **`no_sanitize_address`**, **`property`**, **`restrict`**, **`selectany`**, **`thread`**, and **`uuid`** storage-class attributes are properties only of the declaration of the object or function to which they're applied. The **`thread`** attribute affects data and objects only. The **`naked`** and **`spectre`** attributes affect functions only. The **`dllimport`** and **`dllexport`** attributes affect functions, data, and objects. The **`property`**, **`selectany`**, and **`uuid`** attributes affect COM objects. @@ -94,5 +95,5 @@ __declspec( thread ) int tls_i = 1; ## See also -[Keywords](../cpp/keywords-cpp.md)\ +[Keywords](keywords-cpp.md)\ [C extended storage-class attributes](../c-language/c-extended-storage-class-attributes.md) diff --git a/docs/cpp/equality-operators-equal-equal-and-exclpt-equal.md b/docs/cpp/equality-operators-equal-equal-and-exclpt-equal.md index 0b19a7b204..c0853757bb 100644 --- a/docs/cpp/equality-operators-equal-equal-and-exclpt-equal.md +++ b/docs/cpp/equality-operators-equal-equal-and-exclpt-equal.md @@ -1,10 +1,9 @@ --- title: "Equality operators: == and !=" description: "The C++ standard language equal-to and not-equal-to operator syntax and use." -ms.date: 07/23/2020 -f1_keywords: ["!=", "==", "not_eq_cpp"] -helpviewer_keywords: ["!= operator", "equality operator", "not equal to comparison operator", "equality operator [C++], syntax", "== operator", "not_eq operator", "equal to operator"] -ms.assetid: ba4e9659-2392-4fb4-be5a-910a2a6df45a +ms.date: 08/09/2024 +f1_keywords: ["!=", "=="] +helpviewer_keywords: ["!= operator", "equality operator", "not equal to operator", "equality operator [C++], syntax", "== operator", "equal to operator"] --- # Equality operators: `==` and `!=` @@ -15,38 +14,41 @@ ms.assetid: ba4e9659-2392-4fb4-be5a-910a2a6df45a ## Remarks -The binary equality operators compare their operands for strict equality or inequality. +The equal-to operator (**`==`**) returns **`true`** if both operands have the same value; otherwise **`false`**.\ +The not-equal-to operator (**`!=`**) returns **`true`** if the operands don't have the same value; otherwise **`false`**. -The equality operators, equal to (**`==`**) and not equal to (**`!=`**), have lower precedence than the relational operators, but they behave similarly. The result type for these operators is **`bool`**. - -The equal-to operator (**`==`**) returns **`true`** if both operands have the same value; otherwise, it returns **`false`**. The not-equal-to operator (**`!=`**) returns **`true`** if the operands don't have the same value; otherwise, it returns **`false`**. - -## Operator keyword for != - -C++ specifies **`not_eq`** as an alternative spelling for **`!=`**. (There's no alternative spelling for **`==`**.) In C, the alternative spelling is provided as a macro in the \ header. In C++, the alternative spelling is a keyword; use of \ or the C++ equivalent \ is deprecated. In Microsoft C++, the [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to enable the alternative spelling. +In C and C++, **`not_eq`** can be used as alternative to **`!=`**. For more information, see [`not-eq`](../c-runtime-library/reference/not-eq.md). ## Example ```cpp -// expre_Equality_Operators.cpp -// compile with: /EHsc #include -using namespace std; - -int main() { - cout << boolalpha - << "The true expression 3 != 2 yields: " - << (3 != 2) << endl - << "The false expression 20 == 10 yields: " - << (20 == 10) << endl; +int main() +{ + int x = 1, y = 1, z = 2; + + if (x == y) + { + std::cout << "Equal\n"; + } + + if (x != z) + { + std::cout << "Not equal\n"; + } } ``` -Equality operators can compare pointers to members of the same type. In such a comparison, pointer-to-member conversions are performed. Pointers to members can also be compared to a constant expression that evaluates to 0. +```output +Equal +Not equal +``` ## See also +[`not-eq`](../c-runtime-library/reference/not-eq.md)\ +[Operator overloading](../cpp/operator-overloading.md)\ [Expressions with binary operators](../cpp/expressions-with-binary-operators.md)\ [C++ built-in operators, precedence; and associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)\ [C relational and equality operators](../c-language/c-relational-and-equality-operators.md) diff --git a/docs/cpp/exception-specifications-throw-cpp.md b/docs/cpp/exception-specifications-throw-cpp.md index d63159cfaf..268e410d73 100644 --- a/docs/cpp/exception-specifications-throw-cpp.md +++ b/docs/cpp/exception-specifications-throw-cpp.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Exception specifications (throw, noexcept) (C++)" title: "Exception specifications (throw, noexcept) (C++)" +description: "Learn more about: Exception specifications (throw, noexcept) (C++)" ms.date: "01/18/2018" helpviewer_keywords: ["exceptions [C++], exception specifications", "throwing exceptions [C++], throw keyword", "C++ exception handling [C++], throwing exceptions", "throw keyword [C++]", "noexcept keyword [C++]"] -ms.assetid: 4d3276df-6f31-4c7f-8cab-b9d2d003a629 --- # Exception specifications (throw, noexcept) (C++) @@ -25,7 +24,7 @@ The following table summarizes the Microsoft C++ implementation of exception spe |Exception specification|Meaning| |-----------------------------|-------------| -|**`noexcept`**
`noexcept(true)`
`throw()`|The function does not throw an exception. In **`/std:c++14`** mode (which is the default), **`noexcept`** and `noexcept(true)` are equivalent. When an exception is thrown from a function that is declared **`noexcept`** or `noexcept(true)`, [`std::terminate`](../standard-library/exception-functions.md#terminate) is invoked. When an exception is thrown from a function declared as `throw()` in **`/std:c++14`** mode, the result is undefined behavior. No specific function is invoked. This is a divergence from the C++14 standard, which required the compiler to invoke [`std::unexpected`](../standard-library/exception-functions.md#unexpected).
**Visual Studio 2017 version 15.5 and later**: In **`/std:c++17`** mode , **`noexcept`**, `noexcept(true)`, and `throw()` are all equivalent. In **`/std:c++17`** mode, `throw()` is an alias for `noexcept(true)`. In **`/std:c++17`** mode and later, when an exception is thrown from a function declared with any of these specifications, [`std::terminate`](../standard-library/exception-functions.md#terminate) is invoked as required by the C++17 standard.| +|**`noexcept`**
`noexcept(true)`
`throw()`|The function does not throw an exception. In **`/std:c++14`** mode (which is the default), **`noexcept`** and `noexcept(true)` are equivalent. When an exception is thrown from a function that is declared **`noexcept`** or `noexcept(true)`, [`std::terminate`](../standard-library/exception-functions.md#terminate) is invoked. When an exception is thrown from a function declared as `throw()` in **`/std:c++14`** mode, the result is undefined behavior. No specific function is invoked. This is a divergence from the C++14 standard, which required the compiler to invoke [`std::unexpected`](../standard-library/exception-functions.md#unexpected).
**Visual Studio 2017 version 15.5 and later**: In **`/std:c++17`** mode, **`noexcept`**, `noexcept(true)`, and `throw()` are all equivalent. In **`/std:c++17`** mode, `throw()` is an alias for `noexcept(true)`. In **`/std:c++17`** mode and later, when an exception is thrown from a function declared with any of these specifications, [`std::terminate`](../standard-library/exception-functions.md#terminate) is invoked as required by the C++17 standard.| |`noexcept(false)`
`throw(...)`
No specification|The function can throw an exception of any type.| |`throw(type)`| (**C++14 and earlier**) The function can throw an exception of type `type`. The compiler accepts the syntax, but interprets it as `noexcept(false)`. In **`/std:c++17`** mode and later, the compiler issues warning C5040.| diff --git a/docs/cpp/function-overloading.md b/docs/cpp/function-overloading.md index 694aa6e3d1..8f8c24a61a 100644 --- a/docs/cpp/function-overloading.md +++ b/docs/cpp/function-overloading.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Function Overloading" title: "Function Overloading" +description: "Learn more about: Function Overloading" ms.date: 02/01/2023 helpviewer_keywords: ["function overloading [C++], about function overloading", "function overloading", "declaring functions [C++], overloading"] --- @@ -307,7 +307,7 @@ public: void Print( int i ) { -}; +} UDC udc; diff --git a/docs/cpp/functions-cpp.md b/docs/cpp/functions-cpp.md index 92c4ee5158..58670206a1 100644 --- a/docs/cpp/functions-cpp.md +++ b/docs/cpp/functions-cpp.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Functions (C++)" title: "Functions (C++)" -ms.date: "11/19/2018" +description: "Learn more about: Functions (C++)" +ms.date: 11/19/2018 helpviewer_keywords: ["defaults, arguments", "function definitions", "function definitions, about function definitions", "default arguments", "declarators, functions"] --- # Functions (C++) @@ -77,7 +77,6 @@ Optional parts of a function declaration are: ```cpp //Declare printf with C linkage. extern "C" int printf( const char *fmt, ... ); - ``` For more information, see [Translation units and linkage](../cpp/program-and-linkage-cpp.md). diff --git a/docs/cpp/functions-with-variable-argument-lists-cpp.md b/docs/cpp/functions-with-variable-argument-lists-cpp.md index 1fb884942d..9ded375dbc 100644 --- a/docs/cpp/functions-with-variable-argument-lists-cpp.md +++ b/docs/cpp/functions-with-variable-argument-lists-cpp.md @@ -1,66 +1,68 @@ --- description: "Learn more about: Functions with Variable Argument Lists (C++)" title: "Functions with Variable Argument Lists (C++)" -ms.date: "11/04/2016" +ms.date: 05/01/2025 helpviewer_keywords: ["arguments [C++], variable number of", "variable argument lists", "declarators, functions", "argument lists [C++], variable number of", "declaring functions [C++], variables", "function calls, variable number of arguments"] -ms.assetid: 27c2f83a-21dd-44c6-913c-2834cb944703 --- # Functions with Variable Argument Lists (C++) -Function declarations in which the last member of is the ellipsis (...) can take a variable number of arguments. In these cases, C++ provides type checking only for the explicitly declared arguments. You can use variable argument lists when you need to make a function so general that even the number and types of arguments can vary. The family of functions is an example of functions that use variable argument lists.`printf`*argument-declaration-list* +Function declarations that have ellipsis (...) as the last argument take a variable number of arguments. C++ provides type checking only for the explicitly declared arguments. You can use variable argument lists when the number and types of arguments to the function can vary. The `printf` family of functions is an example of functions that have variable argument lists. ## Functions with variable arguments -To access arguments after those declared, use the macros contained in the standard include file \ as described below. +To access arguments after those declared, use the macros contained in the standard include file `` as explained in this article. **Microsoft Specific** -Microsoft C++ allows the ellipsis to be specified as an argument if the ellipsis is the last argument and the ellipsis is preceded by a comma. Therefore, the declaration `int Func( int i, ... );` is legal, but `int Func( int i ... );` is not. +Microsoft C++ allows the ellipsis to be specified as an argument if the ellipsis is the last argument and a comma comes before the ellipsis. Therefore, the declaration `int Func( int i, ... );` is legal, but `int Func( int i ... );` isn't. **END Microsoft Specific** -Declaration of a function that takes a variable number of arguments requires at least one placeholder argument, even if it is not used. If this placeholder argument is not supplied, there is no way to access the remaining arguments. +Declaration of a function that takes a variable number of arguments requires at least one placeholder argument, even if it isn't used. If this placeholder argument isn't supplied, there's no way to access the remaining arguments. -When arguments of type **`char`** are passed as variable arguments, they are converted to type **`int`**. Similarly, when arguments of type **`float`** are passed as variable arguments, they are converted to type **`double`**. Arguments of other types are subject to the usual integral and floating-point promotions. See [Standard Conversions](standard-conversions.md) for more information. +When arguments of type **`char`** are passed as variable arguments, they're converted to type **`int`**. Similarly, when arguments of type **`float`** are passed as variable arguments, they're converted to type **`double`**. Arguments of other types are subject to the usual integral and floating-point promotions. For more information, see [Standard Conversions](standard-conversions.md). -Functions that require variable lists are declared by using the ellipsis (...) in the argument list. Use the types and macros that are described in the \ include file to access arguments that are passed by a variable list. For more information about these macros, see [va_arg, va_copy, va_end, va_start](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md). in the documentation for the C Run-Time Library. +Functions that require variable lists are declared by using the ellipsis (...) in the argument list. Use the types and macros that are described in the `` include file to access arguments that are passed by a variable list. For more information about these macros, see [va_arg, va_copy, va_end, va_start](../c-runtime-library/reference/va-arg-va-copy-va-end-va-start.md). -The following example shows how the macros work together with the type (declared in \): +The following example shows how to use the macros to process a variable argument list: ```cpp // variable_argument_lists.cpp + #include #include // Declaration, but not definition, of ShowVar. void ShowVar( char *szTypes, ... ); + int main() { ShowVar( "fcsi", 32.4f, 'a', "Test string", 4 ); } -// ShowVar takes a format string of the form -// "ifcs", where each character specifies the -// type of the argument in that position. +// ShowVar takes a format string of the form +// "ifcs", where each character specifies the +// type of the argument in that position. // -// i = int -// f = float -// c = char -// s = string (char *) +// i = int +// f = float +// c = char +// s = string (char *) // -// Following the format specification is a variable -// list of arguments. Each argument corresponds to -// a format character in the format string to which +// Following the format specification is a variable +// list of arguments. Each argument corresponds to +// a format character in the format string to which // the szTypes parameter points void ShowVar( char *szTypes, ... ) { va_list vl; int i; - // szTypes is the last argument specified; you must access - // all others using the variable-argument macros. + // szTypes is the last argument specified; you must access + // all others using the variable-argument macros. va_start( vl, szTypes ); // Step through the list. for( i = 0; szTypes[i] != '\0'; ++i ) { + union Printable_t { int i; float f; @@ -68,45 +70,44 @@ void ShowVar( char *szTypes, ... ) { char *s; } Printable; - switch( szTypes[i] ) { // Type to expect. + switch( szTypes[i] ) { // Type to expect case 'i': Printable.i = va_arg( vl, int ); printf_s( "%i\n", Printable.i ); - break; + break; case 'f': Printable.f = va_arg( vl, double ); printf_s( "%f\n", Printable.f ); - break; + break; case 'c': Printable.c = va_arg( vl, char ); printf_s( "%c\n", Printable.c ); - break; + break; case 's': Printable.s = va_arg( vl, char * ); printf_s( "%s\n", Printable.s ); - break; + break; default: - break; + break; } } va_end( vl ); } -//Output: -// 32.400002 -// a -// Test string +``` + +```Output +32.400002 +a +Test string ``` The previous example illustrates these important concepts: 1. You must establish a list marker as a variable of type `va_list` before any variable arguments are accessed. In the previous example, the marker is called `vl`. - 1. The individual arguments are accessed by using the `va_arg` macro. You must tell the `va_arg` macro the type of argument to retrieve so that it can transfer the correct number of bytes from the stack. If you specify an incorrect type of a size different from that supplied by the calling program to `va_arg`, the results are unpredictable. - 1. You should explicitly cast the result obtained by using the `va_arg` macro to the type that you want. - -You must call the macro to terminate variable-argument processing.`va_end` +1. You must call the `va_end` macro to terminate variable-argument processing. \ No newline at end of file diff --git a/docs/cpp/how-to-create-and-use-shared-ptr-instances.md b/docs/cpp/how-to-create-and-use-shared-ptr-instances.md index e98a1a2893..28e2e78d4a 100644 --- a/docs/cpp/how-to-create-and-use-shared-ptr-instances.md +++ b/docs/cpp/how-to-create-and-use-shared-ptr-instances.md @@ -2,7 +2,7 @@ description: "Learn more about: How to: Create and Use shared_ptr instances" title: "How to: Create and use shared_ptr instances" ms.custom: "how-to" -ms.date: "05/26/2023" +ms.date: "12/4/2024" ms.topic: "conceptual" --- # How to: Create and Use shared_ptr instances @@ -68,7 +68,7 @@ int main() ## Example 1 -Whenever possible, use the [make_shared](../standard-library/memory-functions.md#make_shared) function to create a `shared_ptr` when the memory resource is created for the first time. `make_shared` is exception-safe. It uses the same call to allocate the memory for the control block and the resource, which reduces the construction overhead. If you don't use `make_shared`, then you have to use an explicit **`new`** expression to create the object before you pass it to the `shared_ptr` constructor. The following example shows various ways to declare and initialize a `shared_ptr` together with a new object. +Whenever possible, use the [`make_shared`](../standard-library/memory-functions.md#make_shared) function to create a `shared_ptr` when the memory resource is created for the first time. `make_shared` is exception-safe. It uses the same call to allocate the memory for the control block and the resource, which reduces the construction overhead. If you don't use `make_shared`, then you have to use an explicit **`new`** expression to create the object before you pass it to the `shared_ptr` constructor. The following example shows various ways to declare and initialize a `shared_ptr` together with a new object. [!code-cpp[stl_smart_pointers#1](codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp)] @@ -98,7 +98,7 @@ You can pass a `shared_ptr` to another function in the following ways: - Pass the `shared_ptr` by reference or const reference. In this case, the reference count isn't incremented, and the callee can access the pointer as long as the caller doesn't go out of scope. Or, the callee can decide to create a `shared_ptr` based on the reference, and become a shared owner. Use this option when the caller has no knowledge of the callee, or when you must pass a `shared_ptr` and want to avoid the copy operation for performance reasons. -- Pass the underlying pointer or a reference to the underlying object. This enables the callee to use the object, but doesn't enable it to share ownership or extend the lifetime. If the callee creates a `shared_ptr` from the raw pointer, the new `shared_ptr` is independent from the original, and doesn't control the underlying resource. Use this option when the contract between the caller and callee clearly specifies that the caller retains ownership of the `shared_ptr` lifetime. +- Pass the underlying pointer or a reference to the underlying object. This enables the callee to use the object, but it doesn't share ownership of the object with the caller's `shared_ptr`. Beware the case of the callee creating a `shared_ptr` from the passed raw pointer because the callee's `shared_ptr` has an independent reference count from the caller's `shared_ptr`. When the `shared_ptr` in the callee goes out of scope, it will delete the object, leaving the pointer in the caller's 'shared_ptr' pointing at released memory. When the caller's `shared_ptr` then goes out of scope, a double-free results. Only use this option when the contract between the caller and callee clearly specifies that the caller retains ownership of the `shared_ptr` lifetime. - When you're deciding how to pass a `shared_ptr`, determine whether the callee has to share ownership of the underlying resource. An "owner" is an object or function that can keep the underlying resource alive for as long as it needs it. If the caller has to guarantee that the callee can extend the life of the pointer beyond its (the function's) lifetime, use the first option. If you don't care whether the callee extends the lifetime, then pass by reference and let the callee copy it or not. diff --git a/docs/cpp/hybrid-patchable.md b/docs/cpp/hybrid-patchable.md new file mode 100644 index 0000000000..49dc470455 --- /dev/null +++ b/docs/cpp/hybrid-patchable.md @@ -0,0 +1,49 @@ +--- +description: "Learn more about: hybrid_patchable (C++)" +title: "hybrid_patchable (C++)" +ms.date: 1/15/2025 +f1_keywords: ["hybrid_patchable"] +helpviewer_keywords: ["__declspec keyword [C++], hybrid_patchable", "hybrid_patchable __declspec keyword"] +--- +# `hybrid_patchable` (C++) + +**Microsoft Specific** + +Use `__declspec(hybrid_patchable)` to mark a function as a hybrid patchable function. This attribute generates a fast-forward sequence. Fast-forward sequences are small x64 functions which contain no real logic, and tail-call the real Arm64EC function. Because fast-forward sequences are primarily used for hooking, if they are unaltered, execution is transferred directly to the Arm64EC function. + +## Syntax + +> `__declspec(hybrid_patchable)` + +## Remarks + +`__declspec(hybrid_patchable)` is an ARM64EC-only feature. + +**Example:** + +```cpp +__declspec(hybrid_patchable) int Example() +{ + return 1; +} +``` + +Generates the following fast-forward sequence: + +``` +EXP+#Example: + 00000001400CE000: 48 8B C4 mov rax,rsp + 00000001400CE003: 48 89 58 20 mov qword ptr [rax+20h],rbx + 00000001400CE007: 55 push rbp + 00000001400CE008: 5D pop rbp + 00000001400CE009: E9 BA 7A F3 FF jmp #Example + 00000001400CE00E: CC int 3 + 00000001400CE00F: CC int 3 +``` + +**END Microsoft Specific** + +## See also + +[`__declspec`](../cpp/declspec.md)\ +[Fast-Forward sequences](/windows/arm/arm64ec-abi#fast-forward-sequences) \ No newline at end of file diff --git a/docs/cpp/if-else-statement-cpp.md b/docs/cpp/if-else-statement-cpp.md index c8252c9f23..21563cb749 100644 --- a/docs/cpp/if-else-statement-cpp.md +++ b/docs/cpp/if-else-statement-cpp.md @@ -164,7 +164,7 @@ setting shared_flag to false Error! Token must not be a keyword ``` -## if constexpr statements +## if constexpr statements Starting in C++17, you can use an **`if constexpr`** statement in function templates to make compile-time branching decisions without having to resort to multiple function overloads. **Microsoft-specific**: This form is available starting in Visual Studio 2017 version 15.3, and requires at least the [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) compiler option. diff --git a/docs/cpp/import-export-module.md b/docs/cpp/import-export-module.md index 349708fa55..ae7d37a4fe 100644 --- a/docs/cpp/import-export-module.md +++ b/docs/cpp/import-export-module.md @@ -1,13 +1,13 @@ --- title: "module, import, export" -ms.date: 02/14/2022 +ms.date: 02/13/2025 f1_keywords: ["module_cpp", "import_cpp", "export_cpp"] helpviewer_keywords: ["modules [C++]", "modules [C++], import", "modules [C++], export"] description: Use import and export declarations to access and to publish types and functions defined in the specified module. --- # `module`, `import`, `export` -The **`module`**, **`import`**, and **`export`** declarations are available in C++20 and require the [`/experimental:module`](../build/reference/experimental-module.md) compiler switch along with [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later (such as **`/std:c++latest`**). For more information, see [Overview of modules in C++](modules-cpp.md). +The **`module`**, **`import`**, and **`export`** declarations are available in C++20 and require the compiler switch [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later. For more information, see [Overview of modules in C++](modules-cpp.md). ## `module` @@ -19,7 +19,7 @@ module ModuleA; ## `export` -Use an **`export module`** declaration for the module's primary interface file, which must have extension *`.ixx`*: +Use an **`export module`** declaration for the module's primary interface file, which has an extension *`.ixx`* by default. If you want to use a different extension, use the [/interface](../build/reference/interface.md) switch to compile it as a module interface. ```cpp export module ModuleA; @@ -40,11 +40,9 @@ namespace ModuleA_NS } ``` -Non-exported names aren't visible to code that imports the module: +Nonexported names aren't visible to code that imports the module: ```cpp -//MyProgram.cpp - import ModuleA; int main() { @@ -64,9 +62,8 @@ Use an **`import`** declaration to make a module's names visible in your program module ModuleA; #include "custom-lib.h" -import std.core; -import std.regex; -import ModuleB; +import std; +import myModule; // begin declarations here: template @@ -114,4 +111,5 @@ import // Always an identifier, never a keyword ## See Also -[Overview of modules in C++](modules-cpp.md) +[Overview of modules in C++](modules-cpp.md)\ +[Import the C++ standard library using modules](tutorial-import-stl-named-module.md) \ No newline at end of file diff --git a/docs/cpp/index.yml b/docs/cpp/index.yml index c5f89b17cd..4ba7817947 100644 --- a/docs/cpp/index.yml +++ b/docs/cpp/index.yml @@ -7,6 +7,7 @@ metadata: description: C++ programming reference for users of Microsoft C++ and Visual Studio. ms.topic: landing-page ms.date: 03/22/2022 + ms.author: twhitney ms.custom: intro-landing-hub # linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new diff --git a/docs/cpp/inheritance-cpp.md b/docs/cpp/inheritance-cpp.md index c024fafdcf..14660d3866 100644 --- a/docs/cpp/inheritance-cpp.md +++ b/docs/cpp/inheritance-cpp.md @@ -1,50 +1,54 @@ --- -description: "Learn more about: Inheritance (C++)" -title: "Inheritance (C++)" +title: "Inheritance (C++)" +description: "Learn more about: Inheritance (C++)" ms.date: "11/04/2016" helpviewer_keywords: ["derived classes [C++]", "derived classes [C++], about derived classes", "classes [C++], derived"] -ms.assetid: 3534ca19-d9ed-4a40-be1b-b921ad0e6956 --- -# Inheritance (C++) +# Inheritance (C++) This section explains how to use derived classes to produce extensible programs. ## Overview -New classes can be derived from existing classes using a mechanism called "inheritance" (see the information beginning in [Single Inheritance](../cpp/single-inheritance.md)). Classes that are used for derivation are called "base classes" of a particular derived class. A derived class is declared using the following syntax: +New classes can be derived from existing classes using a mechanism called "inheritance" (see the information beginning in [Single Inheritance](single-inheritance.md)). Classes that are used for derivation are called "base classes" of a particular derived class. A derived class is declared using the following syntax: ```cpp -class Derived : [virtual] [access-specifier] Base +class DerivedSingleBase : [virtual] [access-specifier] Base { - // member list + // member list }; -class Derived : [virtual] [access-specifier] Base1, - [virtual] [access-specifier] Base2, . . . + +class DerivedMultipleBases : [virtual] [access-specifier] Base1, + [virtual] [access-specifier] Base2, ... { - // member list + // member list }; ``` -After the tag (name) for the class, a colon appears followed by a list of base specifications. The base classes so named must have been declared previously. The base specifications may contain an access specifier, which is one of the keywords **`public`**, **`protected`** or **`private`**. These access specifiers appear before the base class name and apply only to that base class. These specifiers control the derived class's permission to use to members of the base class. See [Member-Access Control](../cpp/member-access-control-cpp.md) for information on access to base class members. If the access specifier is omitted, the access to that base is considered **`private`**. The base specifications may contain the keyword **`virtual`** to indicate virtual inheritance. This keyword may appear before or after the access specifier, if any. If virtual inheritance is used, the base class is referred to as a virtual base class. +After the tag (name) for the class, a colon appears followed by a list of base specifications. The base classes so named must have been declared previously. The base specifications may contain an access specifier, which is one of the keywords [**`public`**](public-cpp.md), [**`protected`**](protected-cpp.md) or [**`private`**](private-cpp.md). These access specifiers appear before the base class name and apply only to that base class. These specifiers control the derived class's permission to use members of the base class. See [Member-Access Control](member-access-control-cpp.md) for information on access to base class members. If the access specifier is omitted, the access to that base is considered **`private`**. The base specifications may contain the keyword [**`virtual`**](virtual-cpp.md) to indicate virtual inheritance. This keyword may appear before or after the access specifier, if any. If virtual inheritance is used, the base class is referred to as a virtual base class. -Multiple base classes can be specified, separated by commas. If a single base class is specified, the inheritance model is [Single inheritance](../cpp/single-inheritance.md). If more than one base class is specified, the inheritance model is called [Multiple inheritance](../cpp/multiple-base-classes.md). +Multiple base classes can be specified, separated by commas. If a single base class is specified, the inheritance model is [Single inheritance](single-inheritance.md). If more than one base class is specified, the inheritance model is called [Multiple inheritance](multiple-base-classes.md). The following topics are included: -- [Single inheritance](../cpp/single-inheritance.md) +- [Single inheritance](single-inheritance.md) + +- [Multiple base classes](multiple-base-classes.md) + +- [Virtual functions](virtual-functions.md) -- [Multiple base classes](../cpp/multiple-base-classes.md) +- [Explicit overrides](explicit-overrides-cpp.md) -- [Virtual functions](../cpp/virtual-functions.md) +- [Abstract classes](abstract-classes-cpp.md) -- [Explicit overrides](../cpp/explicit-overrides-cpp.md) +- [Summary of scope rules](summary-of-scope-rules.md) -- [Abstract classes](../cpp/abstract-classes-cpp.md) +**Microsoft Specific** -- [Summary of scope rules](../cpp/summary-of-scope-rules.md) +The [`__super`](super.md) and [`__interface`](interface.md) keywords are documented in this section. -The [__super](../cpp/super.md) and [__interface](../cpp/interface.md) keywords are documented in this section. +**END Microsoft Specific** ## See also -[C++ Language Reference](../cpp/cpp-language-reference.md) +[C++ Language Reference](cpp-language-reference.md) diff --git a/docs/cpp/keywords-cpp.md b/docs/cpp/keywords-cpp.md index 5c0b32ebda..0bb5fff6c0 100644 --- a/docs/cpp/keywords-cpp.md +++ b/docs/cpp/keywords-cpp.md @@ -4,7 +4,6 @@ description: "Lists the C++ standard language keywords, Microsoft-specific keywo ms.custom: "index-page" ms.date: 07/25/2020 helpviewer_keywords: ["keywords [C++]"] -ms.assetid: d7ca94a8-f785-41ce-9f73-d3c4fd508489 --- # Keywords (C++) @@ -79,7 +78,7 @@ Keywords are predefined reserved identifiers that have special meanings. They ca [`private`](private-cpp.md)\ [`protected`](protected-cpp.md)\ [`public`](public-cpp.md)\ - [`register`](storage-classes-cpp.md#register) + [`register`](storage-classes-cpp.md#register)\ [`reinterpret_cast`](reinterpret-cast-operator.md)\ **`requires`** c\ [`return`](return-statement-cpp.md)\ @@ -287,5 +286,5 @@ These identifiers are extended attributes for the **`__declspec`** modifier. The ## See also -[Lexical conventions](lexical-conventions.md)
+[Lexical conventions](lexical-conventions.md)\ [C++ built-in operators, precedence, and associativity](cpp-built-in-operators-precedence-and-associativity.md) diff --git a/docs/cpp/m64.md b/docs/cpp/m64.md index 74c415036c..66800090f6 100644 --- a/docs/cpp/m64.md +++ b/docs/cpp/m64.md @@ -1,12 +1,11 @@ --- -description: "Learn more about: __m64" title: "__m64" +description: "Learn more about: __m64" ms.date: "11/04/2016" f1_keywords: ["__m64_cpp"] helpviewer_keywords: ["__m64 keyword [C++]"] -ms.assetid: df0410e8-67c9-4954-88c8-fe2653575252 --- -# __m64 +# `__m64` **Microsoft Specific** @@ -15,9 +14,10 @@ The **`__m64`** data type is for use with the MMX and 3DNow! intrinsics, and is ```cpp // data_types__m64.cpp #include + int main() { - __m64 x; + __m64 x; } ``` @@ -25,14 +25,14 @@ int main() You should not access the **`__m64`** fields directly. You can, however, see these types in the debugger. A variable of type **`__m64`** maps to the MM[0-7] registers. -Variables of type **_m64** are automatically aligned on 8-byte boundaries. +Variables of type **`__m64`** are automatically aligned on 8-byte boundaries. -The **`__m64`** data type is not supported on x64 processors. Applications that use __m64 as part of MMX intrinsics must be rewritten to use equivalent SSE and SSE2 intrinsics. +The **`__m64`** data type is not supported on x64 processors. Applications that use **`__m64`** as part of MMX intrinsics must be rewritten to use equivalent SSE and SSE2 intrinsics. **END Microsoft Specific** ## See also -[Keywords](../cpp/keywords-cpp.md)
-[Built-in types](../cpp/fundamental-types-cpp.md)
-[Data Type Ranges](../cpp/data-type-ranges.md) +[Keywords](keywords-cpp.md)\ +[Built-in types](fundamental-types-cpp.md)\ +[Data Type Ranges](data-type-ranges.md) diff --git a/docs/cpp/main-function-command-line-args.md b/docs/cpp/main-function-command-line-args.md index 9e632f6251..ac291e1374 100644 --- a/docs/cpp/main-function-command-line-args.md +++ b/docs/cpp/main-function-command-line-args.md @@ -169,7 +169,7 @@ Command-line arguments are handled by an internal routine in the runtime startup For more information on runtime startup linker options, see [Link options](../c-runtime-library/link-options.md). -## Customize C++ command-line processing +## Customize C++ command-line processing If your program doesn't take command-line arguments, you can suppress the command-line processing routine to save a small amount of space. To suppress its use, include the *`noarg.obj`* file (for both `main` and `wmain`) in your **`/link`** compiler options or your **`LINK`** command line. diff --git a/docs/cpp/microsoft-specific-modifiers.md b/docs/cpp/microsoft-specific-modifiers.md index 3d8fc86562..fda7e96615 100644 --- a/docs/cpp/microsoft-specific-modifiers.md +++ b/docs/cpp/microsoft-specific-modifiers.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: Microsoft-specific modifiers" title: "Microsoft-specific modifiers" +description: "Learn more about: Microsoft-specific modifiers" ms.date: "08/16/2018" -ms.assetid: 22c7178c-f854-47fa-9de6-07d23fda58e1 --- # Microsoft-specific modifiers @@ -29,7 +28,7 @@ Many of the Microsoft-specific keywords can be used to modify declarators to for |[__restrict](extension-restrict.md)|Similar to __declspec([restrict](restrict.md)), but for use on variables.|No| |[__stdcall](stdcall.md)|The name that follows specifies a function that observes the standard calling convention.|Yes| |[__w64](w64.md)|Marks a data type as being larger on a 64-bit compiler.|No| -|[__unaligned](unaligned.md)|Specifies that a pointer to a type or other data is not aligned..|No| +|[__unaligned](unaligned.md)|Specifies that a pointer to a type or other data is not aligned.|No| |[__vectorcall](vectorcall.md)|The name that follows declares a function that uses registers, including SSE registers, when available, instead of the stack for argument passing.|Yes| ## See also diff --git a/docs/cpp/modules-cpp.md b/docs/cpp/modules-cpp.md index bfdbfb7346..309913a75b 100644 --- a/docs/cpp/modules-cpp.md +++ b/docs/cpp/modules-cpp.md @@ -1,8 +1,8 @@ --- title: "Overview of modules in C++" -ms.date: 01/29/2024 -helpviewer_keywords: ["modules [C++]", "modules [C++], overview"] description: Modules in C++20 provide a modern alternative to header files. +ms.date: 04/17/2025 +helpviewer_keywords: ["modules [C++]", "modules [C++], overview"] --- # Overview of modules in C++ @@ -14,44 +14,15 @@ You can use modules side by side with header files. A C++ source file can `impor To contrast modules with other ways to import the standard library, see [Compare header units, modules, and precompiled headers](../build/compare-inclusion-methods.md). -## Enable modules in the Microsoft C++ compiler - -As of Visual Studio 2022 version 17.1, C++20 standard modules are fully implemented in the Microsoft C++ compiler. - -Before it was specified by the C++20 standard, Microsoft had experimental support for modules. The compiler also supported importing prebuilt Standard Library modules, described below. - -Starting with Visual Studio 2022 version 17.5, importing the Standard Library as a module is both standardized and fully implemented in the Microsoft C++ compiler. This section describes the older, experimental method, which is still supported. For information about the new standardized way to import the Standard Library using modules, see [Import the C++ standard library using modules](tutorial-import-stl-named-module.md). +Starting with Visual Studio 2022 version 17.5, importing the Standard Library as a module is both standardized and fully implemented in the Microsoft C++ compiler. To learn how to import the Standard Library using modules, see [Import the C++ standard library using modules](tutorial-import-stl-named-module.md). -You can use the modules feature to create single-partition modules and to import the Standard Library modules provided by Microsoft. To enable support for Standard Library modules, compile with [`/experimental:module`](../build/reference/experimental-module.md) and [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md). In a Visual Studio project, right-click the project node in **Solution Explorer** and choose **Properties**. Set the **Configuration** drop-down to **All Configurations**, then choose **Configuration Properties** > **C/C++** > **Language** > **Enable C++ Modules (experimental)**. +## Single-partition modules -A module and the code that consumes it must be compiled with the same compiler options. +A single-partition module is a module that consists of a single source file. The module interface and implementation are in the same file. -## Consume C++ Standard Library as modules (experimental) +The following single-partition module example shows a simple module definition in a source file called *`Example.ixx`*. The *`.ixx`* extension is the default extension for module interface files in Visual Studio. If you want to use a different extension, use the [/interface](../build/reference/interface.md) switch to compile it as a module interface. In this example, the interface file contains both the function definition and the declaration. You can also place the definitions in one or more separate module implementation files, as shown in a later example, but this is an example of a single-partition module. -This section describes the experimental implementation, which is still supported. The new standardized way of consuming the C++ Standard Library as modules is described in [Import the C++ standard library using modules](tutorial-import-stl-named-module.md). - -By importing the C++ Standard Library as modules rather than including it through header files, you can potentially speed up compilation times depending on the size of your project. The experimental library is split into the following named modules: - -- `std.regex` provides the content of header `` -- `std.filesystem` provides the content of header `` -- `std.memory` provides the content of header `` -- `std.threading` provides the contents of headers ``, ``, ``, ``, ``, and `` -- `std.core` provides everything else in the C++ Standard Library - -To consume these modules, add an import declaration to the top of the source code file. For example: - -```cpp -import std.core; -import std.regex; -``` - -To consume the Microsoft Standard Library modules, compile your program with the [`/EHsc`](../build/reference/eh-exception-handling-model.md) and [`/MD`](../build/reference/md-mt-ld-use-run-time-library.md) options. - -## Example - -The following example shows a simple module definition in a source file called *`Example.ixx`*. The *`.ixx`* extension is required for module interface files in Visual Studio. In this example, the interface file contains both the function definition and the declaration. However, you can also place the definitions in one or more separate module implementation files, as shown in a later example. - -The `export module Example;` statement indicates that this file is the primary interface for a module called `Example`. The **`export`** modifier on `f()` indicates that this function is visible when another program or module imports `Example`. +The `export module Example;` statement indicates that this file is the primary interface for a module called `Example`. The **`export`** modifier before `int f()` indicates that this function is visible when another program or module imports `Example`: ```cpp // Example.ixx @@ -61,12 +32,14 @@ export module Example; namespace Example_NS { - int f_internal() { - return ANSWER; - } + int f_internal() + { + return ANSWER; + } - export int f() { - return f_internal(); + export int f() + { + return f_internal(); } } ``` @@ -75,8 +48,8 @@ The file *`MyProgram.cpp`* uses **`import`** to access the name exported by `Exa ```cpp // MyProgram.cpp +import std; import Example; -import std.core; using namespace std; @@ -88,7 +61,7 @@ int main() } ``` -The `import` declaration can appear only at global scope. +The `import` declaration can appear only at global scope. A module and the code that consumes it must be compiled with the same compiler options. ## Module grammar @@ -133,15 +106,16 @@ The **`export`** keyword is only used in interface files. An implementation file The rules for namespaces in modules are the same as any other code. If a declaration within a namespace is exported, the enclosing namespace (excluding members that aren't explicitly exported in that namespace) is also implicitly exported. If a namespace is explicitly exported, all declarations within that namespace definition are exported. -When the compiler does argument-dependent lookup for overload resolutions in the importing translation unit, it considers functions declared in the same translation unit (including module interfaces) as where the type of the function's arguments are defined. +When the compiler does argument-dependent lookup for overload resolution in the importing translation unit, it considers functions declared in the same translation unit (including module interfaces) as where the type of the function's arguments is defined. ### Module partitions A module partition is similar to a module, except: + - It shares ownership of all declarations in the entire module. - All names exported by partition interface files are imported and exported by the primary interface file. - A partition's name must begin with the module name followed by a colon (`:`). -- Declarations in any of the partitions are visible within the entire module.\ +- Declarations in any of the partitions are visible within the entire module. - No special precautions are needed to avoid one-definition-rule (ODR) errors. You can declare a name (function, class, and so on) in one partition and define it in another. A partition implementation file begins like this, and is an internal partition from a C++ standards perspective: @@ -182,7 +156,7 @@ You can include header files in a module source file by putting an `#include` di #include "customlib.h" #include "anotherlib.h" -import std.core; +import std; import MyModuleB; //... rest of file @@ -192,9 +166,10 @@ You can use a traditional header file to control which modules are imported: ```cpp // MyProgram.h -import std.core; -#ifdef DEBUG_LOGGING -import std.filesystem; +#ifdef C_RUNTIME_GLOBALS +import std.compat; +#else +import std; #endif ``` @@ -209,6 +184,7 @@ import "myheader.h"; ## See also +[Import the C++ standard library using modules](tutorial-import-stl-named-module.md)\ [`module`, `import`, `export`](import-export-module.md)\ [Named modules tutorial](tutorial-named-modules-cpp.md)\ [Compare header units, modules, and precompiled headers](../build/compare-inclusion-methods.md) diff --git a/docs/cpp/overload-resolution-of-function-template-calls.md b/docs/cpp/overload-resolution-of-function-template-calls.md index 17455439ed..f8e8fc3031 100644 --- a/docs/cpp/overload-resolution-of-function-template-calls.md +++ b/docs/cpp/overload-resolution-of-function-template-calls.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Overload resolution of function template calls" title: "Overload resolution of function template calls" +description: "Learn more about: Overload resolution of function template calls" ms.date: 09/27/2022 helpviewer_keywords: ["function templates overload resolution"] -ms.assetid: a2918748-2cbb-4fc6-a176-e256f120bee4 --- # Overload resolution of function template calls @@ -26,7 +25,7 @@ template void f(T1, T2) { cout << "void f(T1, T2)" << endl; -}; +} int main() { @@ -58,7 +57,7 @@ template void f(T1, T2) { cout << "void f(T1, T2)" << endl; -}; +} int main() { diff --git a/docs/cpp/program-and-linkage-cpp.md b/docs/cpp/program-and-linkage-cpp.md index 85a25f8016..720e33de0f 100644 --- a/docs/cpp/program-and-linkage-cpp.md +++ b/docs/cpp/program-and-linkage-cpp.md @@ -11,7 +11,7 @@ In a C++ program, a *symbol*, for example a variable or function name, can be de The following example shows some declarations: ```cpp -int i; +extern int i; int f(int x); class C; ``` diff --git a/docs/cpp/raw-pointers.md b/docs/cpp/raw-pointers.md index 6b65cb30b1..c12c7051c6 100644 --- a/docs/cpp/raw-pointers.md +++ b/docs/cpp/raw-pointers.md @@ -334,7 +334,7 @@ int main() ## See also -[Smart pointers](smart-pointers-modern-cpp.md) -[Indirection Operator: *](indirection-operator-star.md)
-[Address-of Operator: &](address-of-operator-amp.md)
+[Smart pointers](smart-pointers-modern-cpp.md)\ +[Indirection Operator: *](indirection-operator-star.md)\ +[Address-of Operator: &](address-of-operator-amp.md)\ [Welcome back to C++](welcome-back-to-cpp-modern-cpp.md) diff --git a/docs/cpp/stdcall.md b/docs/cpp/stdcall.md index a6e9a50351..61ad524d75 100644 --- a/docs/cpp/stdcall.md +++ b/docs/cpp/stdcall.md @@ -13,6 +13,8 @@ The **`__stdcall`** calling convention is used to call Win32 API functions. The ## Syntax > *return-type* **`__stdcall`** *function-name*[**`(`** *argument-list* **`)`**] +> +> **`auto`** **`__stdcall`** *function-name*[**`(`** *argument-list* **`)`**] [ **`->`** *return-type* ] ## Remarks diff --git a/docs/cpp/string-and-character-literals-cpp.md b/docs/cpp/string-and-character-literals-cpp.md index 70addb2b9b..643fd31dae 100644 --- a/docs/cpp/string-and-character-literals-cpp.md +++ b/docs/cpp/string-and-character-literals-cpp.md @@ -331,7 +331,10 @@ const size_t byteSize = (wcslen(str) + 1) * sizeof(wchar_t); Notice that `strlen()` and `wcslen()` don't include the size of the terminating null character, whose size is equal to the element size of the string type: one byte on a `char*` or `char8_t*` string, two bytes on `wchar_t*` or `char16_t*` strings, and four bytes on `char32_t*` strings. -In versions of Visual Studio before Visual Studio 2022 version 17.0, the maximum length of a string literal is 65,535 bytes. This limit applies to both narrow string literals and wide string literals. In Visual Studio 2022 version 17.0 and later, this restriction is lifted and string length is limited by available resources. +Maximum length of a string literal after concatenation: + +* Visual Studio prior to 2022 version 17.0: the maximum length of a string literal after concatenation is 65,535 bytes. This applies to both narrow and wide string literals. +* From Visual Studio 2022 version 17.0 onwards: the maximum length of a string literal after concatenation is only limited by available memory. However, the size limit before concatenation is still 16,384 bytes ### Modifying string literals diff --git a/docs/cpp/this-pointer.md b/docs/cpp/this-pointer.md index 1c1ea8223a..1b560dd372 100644 --- a/docs/cpp/this-pointer.md +++ b/docs/cpp/this-pointer.md @@ -147,7 +147,7 @@ The **`this`** pointer can't be reassigned. The **`const`** or **`volatile`** qu | `void Func() volatile` | `volatile myClass *` | | `void Func() const volatile` | `const volatile myClass *` | -The following table explains more about `const` and `volatile``. +The following table explains more about `const` and `volatile`. ### Semantics of `this` modifiers diff --git a/docs/cpp/toc.yml b/docs/cpp/toc.yml index 03a00af04c..35e1c6921a 100644 --- a/docs/cpp/toc.yml +++ b/docs/cpp/toc.yml @@ -696,6 +696,8 @@ items: href: ../cpp/using-dllimport-and-dllexport-in-cpp-classes.md - name: empty_bases href: ../cpp/empty-bases.md + - name: hybrid_patchable + href: ../cpp/hybrid-patchable.md - name: jitintrinsic href: ../cpp/jitintrinsic.md - name: naked diff --git a/docs/cpp/transporting-exceptions-between-threads.md b/docs/cpp/transporting-exceptions-between-threads.md index 343b25f91f..bddcb01e69 100644 --- a/docs/cpp/transporting-exceptions-between-threads.md +++ b/docs/cpp/transporting-exceptions-between-threads.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Transporting exceptions between threads" title: "Transporting exceptions between threads" +description: "Learn more about: Transporting exceptions between threads" ms.date: 05/02/2023 helpviewer_keywords: ["std::current_exception", "transporting exceptions between threads", "std::copy_exception", "exception_ptr", "std::exception_ptr", "std::rethrow_exception", "current_exception", "transport exceptions between threads", "copy_exception", "rethrow_exception", "move exceptions between threads"] --- @@ -244,6 +244,6 @@ exception_ptr 1: Caught a myException exception. ## See also -[Exception Handling](../cpp/exception-handling-in-visual-cpp.md) +[Exception Handling](../cpp/exception-handling-in-visual-cpp.md)\ [`/EH` (Exception Handling Model)](../build/reference/eh-exception-handling-model.md)\ [`/clr` (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md) diff --git a/docs/cpp/tutorial-import-stl-named-module.md b/docs/cpp/tutorial-import-stl-named-module.md index de5eec7bcf..b2c961353f 100644 --- a/docs/cpp/tutorial-import-stl-named-module.md +++ b/docs/cpp/tutorial-import-stl-named-module.md @@ -24,7 +24,7 @@ This tutorial requires Visual Studio 2022 17.5 or later. ## Introduction to standard library modules -Header files suffer from semantics that can change depending on macro definitions, the order in which you include them, and they slow compilation. Modules solve these problems. +Header file semantics can change depending on macro definitions, the order in which you include them, and they slow compilation. Modules solve these problems. It's now possible to import the standard library as a module instead of as a tangle of header files. This is much faster and more robust than including header files or header units or precompiled headers (PCH). @@ -39,14 +39,12 @@ Because named modules don't expose macros, macros like `assert`, `errno`, `offse ## About C++ modules -Header files are how declarations and definitions have been shared between source files in C++. Prior to standard library modules, you'd include the part of the standard library you needed with a directive like `#include `. Header files are fragile and difficult to compose because their semantics may change depending on the order you include them, or whether certain macros are defined. They also slow compilation because they're reprocessed by every source file that includes them. +Header files are how declarations and definitions have been shared between source files in C++. Before standard library modules, you'd include the part of the standard library you needed with a directive like `#include `. Header files are fragile and difficult to compose because their semantics may change depending on the order you include them, or whether certain macros are defined. They also slow compilation because they're reprocessed by every source file that includes them. C++20 introduces a modern alternative called *modules*. In C++23, we were able to capitalize on module support to introduce named modules to represent the standard library. Like header files, modules allow you to share declarations and definitions across source files. But unlike header files, modules aren't fragile and are easier to compose because their semantics don't change due to macro definitions or the order in which you import them. The compiler can process modules much faster than it can process `#include` files, and uses less memory at compile time as well. Named modules don't expose macro definitions or private implementation details. -For in depth information about modules, see [Overview of modules in C++](modules-cpp.md) That article also discusses consuming the C++ standard library as modules, but uses an older and experimental way of doing it. - This article demonstrates the new and best way to consume the standard library. For more information about alternative ways to consume the standard library, see [Compare header units, modules, and precompiled headers](../build/compare-inclusion-methods.md). ## Import the standard library with `std` @@ -57,7 +55,7 @@ The statement `import std;` or `import std.compat;` imports the standard library ### Example: How to build and import `std` -1. Open a x86 Native Tools Command Prompt for VS: from the Windows **Start** menu, type *x86 native* and the prompt should appear in the list of apps. Ensure that the prompt is for Visual Studio 2022 version 17.5 or above. You'll get errors if you use the wrong version of the prompt. The examples used in this tutorial are for the CMD shell. +1. Open a x86 Native Tools Command Prompt for VS: from the Windows **Start** menu, type *x86 native* and the prompt should appear in the list of apps. Ensure that the prompt is for Visual Studio 2022 version 17.5 or above. You get errors if you use the wrong version of the prompt. The examples used in this tutorial are for the CMD shell. 1. Create a directory, such as `%USERPROFILE%\source\repos\STLModules`, and make it the current directory. If you choose a directory that you don't have write access to, you'll get errors during compilation. 1. Compile the `std` named module with the following command: diff --git a/docs/cpp/tutorial-named-modules-cpp.md b/docs/cpp/tutorial-named-modules-cpp.md index 89830e7764..776ac6f114 100644 --- a/docs/cpp/tutorial-named-modules-cpp.md +++ b/docs/cpp/tutorial-named-modules-cpp.md @@ -1,6 +1,6 @@ --- title: "Named modules tutorial in C++" -ms.date: 08/08/2022 +ms.date: 02/13/2025 ms.topic: "tutorial" author: "tylermsft" ms.author: "twhitney" @@ -9,7 +9,7 @@ description: Named modules in C++20 provide a modern alternative to header files --- # Named modules tutorial (C++) -This tutorial is about creating C++20 modules. Modules replace header files. You'll learn how modules are an improvement on header files. +This tutorial is about creating C++20 modules. Modules are a significant improvement on header files. In this tutorial, learn how to: @@ -22,13 +22,11 @@ In this tutorial, learn how to: This tutorial requires Visual Studio 2022 17.1.0 or later. -You might get IntelliSense errors while working on the code example in this tutorial. Work on the IntelliSense engine is catching up with the compiler. IntelliSense errors can be ignored and won't prevent the code example from building. To track progress on the IntelliSense work, see this [issue](https://developercommunity.visualstudio.com/t/When-importing-a-C20-module-or-header-/1550846). - ## What are C++ modules -Header files are how declarations and definitions are shared between source files in C++. Header files are fragile and difficult to compose. They may compile differently depending on the order you include them in, or on the macros that are or aren't defined. They can slow compilation time because they're reprocessed for each source file that includes them. +Header files are how declarations and definitions are shared between source files in C++. Header files are fragile and may compile differently depending on the order you include them in or on the macros that are or aren't defined. They can slow compilation time because they're reprocessed for each source file that includes them. -C++20 introduces a modern approach to componentizing C++ programs: *modules*. +C++20 introduces *modules* as a modern approach to componentizing C++ programs. Like header files, modules allow you to share declarations and definitions across source files. But unlike header files, modules don't leak macro definitions or private implementation details. @@ -50,7 +48,7 @@ Your code can consume modules in the same project, or any referenced projects, a ## Create the project -As we build a simple project, we'll look at various aspects of modules. The project will implement an API using a module instead of a header file. +The following project implements an API using a module instead of a header file. In Visual Studio 2022 or later, choose **Create a new project** and then the **Console App** (for C++) project type. If this project type isn't available, you may not have selected the **Desktop development with C++** workload when you installed Visual Studio. You can use the Visual Studio Installer to add the C++ workload. @@ -62,7 +60,7 @@ Because modules are a C++20 feature, use the [`/std:c++20` or `/std:c++latest`]( ## Create the primary module interface unit -A module consists of one or more files. One of these files must be what is called the *primary module interface unit*. It defines what the module exports; that is, what importers of the module will see. There can only be one primary module interface unit per module. +A module consists of one or more files. One of these files must be what is called the *primary module interface unit*. It defines what the module exports; that is, what importers of the module see. There can only be one primary module interface unit per module. To add a primary module interface unit, in **Solution Explorer**, right-click **Source Files** then select **Add** > **Module**. @@ -88,17 +86,17 @@ Replace the contents of *`BasicPlane.Figures.ixx`* file with: export module BasicPlane.Figures; // the export module keywords mark this file as a primary module interface unit ``` -This line identifies this file as the primary module interface and gives the module a name: `BasicPlane.Figures`. The period in the module name has no special meaning to the compiler. A period can be used to convey how your module is organized. If you have multiple module files that work together, you can use periods to indicate a separation of concerns. In this tutorial, we'll use periods to indicate different functional areas of the API. +This line identifies this file as the primary module interface and gives the module a name: `BasicPlane.Figures`. The period in the module name has no special meaning to the compiler. A period can be used to convey how your module is organized. If you have multiple module files that work together, you can use periods to indicate a separation of concerns. In this tutorial, periods indicate different functional areas of the API. This name is also where the "named" in "named module" comes from. The files that are part of this module use this name to identify themselves as part of the named module. A named module is the collection of module units with the same module name. We should talk about the API we'll implement for a moment before going further. It impacts the choices we make next. The API represents different shapes. We're only going to provide a couple shapes in this example: `Point` and `Rectangle`. `Point` is meant to be used as part of more complex shapes such as `Rectangle`. -To illustrate some features of modules, we'll factor this API into pieces. One piece will be the `Point` API. The other part will be `Rectangle`. Imagine that this API will grow into something more complex. The division is useful for separating concerns or easing code maintenance. +To illustrate some features of modules, we factor this API into parts. One part is the `Point` API. The other part is `Rectangle`. Imagine that this API could grow into something more complex. The division is useful for separating concerns or easing code maintenance. So far, we've created the primary module interface that will expose this API. Let's now build the `Point` API. We want it to be part of this module. For reasons of logical organization, and potential build efficiency, we want to make the code for this part of the API a *module partition* file. -Module partitions are useful for dividing the module implementation into manageable pieces. A module partition file is a piece, or component, of a module. What makes it unique is that it can be treated as an individual piece of the module--but only within the module. Module partitions can't be consumed outside of a module. +Module partitions are useful for dividing the module implementation into manageable parts. A module partition file is part of a module. What makes it unique is that it can be treated as an individual parts of the module--but only within the module. Module partitions can't be consumed outside of a module. When you import a partition into the primary module, all its declarations become visible to the primary module regardless of whether they're exported. Partitions can be imported into any partition interface, primary module interface, or module unit that belongs to the named module. @@ -108,7 +106,7 @@ When you import a partition into the primary module, all its declarations become To create a module partition file, in the **Solution Explorer** right-click **Source Files**, then select **Add** > **Module**. Name the file *`BasicPlane.Figures-Point.ixx`* and choose **Add**. -Because it's a module partition file, we've added a hyphen and the name of the partition to the module name. This convention aids the compiler in the command-line case because the compiler uses name lookup rules based on the module name to find the compiled *`.ifc`* file for the partition. This way you don't have to provide explicit `/reference` command-line arguments to find the partitions that belong to the module. It's also helpful for organizing the files that belong to a module by name because you can easily see which files belong to which modules. +Because it's a module partition file, we add a hyphen and the name of the partition to the module name. This convention aids the compiler in the command-line case because the compiler uses name lookup rules based on the module name to find the compiled *`.ifc`* file for the partition. This way you don't have to provide explicit `/reference` command-line arguments to find the partitions that belong to the module. It's also helpful for organizing the files that belong to a module by name because you can easily see which files belong to which modules. Replace the contents of *`BasicPlane.Figures-Point.ixx`* with: @@ -129,7 +127,7 @@ In this file, the `export` keyword makes `struct Point` visible to consumers. ### `Rectangle` module partition example -The next partition we'll define is `Rectangle`. Create another module file using the same steps as before: In **Solution Explorer**, right-click on **Source Files**, then select **Add** > **Module**. Name the file *`BasicPlane.Figures-Rectangle.ixx`* and select **Add**. +The next partition we define is `Rectangle`. Create another module file using the same steps as before: In **Solution Explorer**, right-click on **Source Files**, then select **Add** > **Module**. Name the file *`BasicPlane.Figures-Rectangle.ixx`* and select **Add**. Replace the contents of *`BasicPlane.Figures-Rectangle.ixx`* with: @@ -156,13 +154,13 @@ Next, `import :Point;` shows how to import a module partition. The `import` stat Next, the code exports the definition of `struct Rectangle` and declarations for some functions that return various properties of the rectangle. The `export` keyword indicates whether to make what it precedes visible to consumers of the module. It's used to make the functions `area`, `height`, and `width` visible outside of the module. -All definitions and declarations in a module partition are visible to the importing module unit whether they have the `export` keyword or not. The `export` keyword governs whether the definition, declaration, or typedef will be visible outside of the module when you export the partition in the primary module interface. +All definitions and declarations in a module partition are visible to the importing module unit whether they have the `export` keyword or not. The `export` keyword governs whether the definition, declaration, or typedef is visible outside of the module when you export the partition in the primary module interface. Names are made visible to consumers of a module in several ways: - Put the keyword `export` in front of each type, function, and so on, that you want to export. - If you put `export` in front of a namespace, for example `export namespace N { ... }`, everything defined within the braces is exported. But if elsewhere in the module you define `namespace N { struct S {...};}`, then `struct S` isn't available to consumers of the module. It's not available because that namespace declaration isn't prefaced by `export`, even though there's another namespace with the same name that is. -- If a type, function, and so on, shouldn't be exported, omit the `export` keyword. It will be visible to other files that are part of the module, but not to importers of the module. +- If a type, function, and so on, shouldn't be exported, omit the `export` keyword. It's visible to other files that are part of the module, but not to importers of the module. - Use `module :private;` to mark the beginning of the private module partition. The private module partition is a section of the module where declarations are only visible to that file. They aren't visible to files that import this module or to other files that are part of this module. Think of it as a section that is static local to the file. This section is visible only within the file. - To make an imported module or module partition visible, use `export import`. An example is shown in the next section. @@ -179,11 +177,11 @@ export import :Point; // bring in the Point partition, and export it to consumer export import :Rectangle; // bring in the Rectangle partition, and export it to consumers of this module ``` -The two lines that begin with `export import` are new here. When combined like this, these two keywords instruct the compiler to import the specified module and make it visible to consumers of this module. In this case, the colon (`:`) in the module name indicates that we are importing a module partition. +The two lines that begin with `export import` are new here. When combined like this, these two keywords instruct the compiler to import the specified module and make it visible to consumers of this module. In this case, the colon (`:`) in the module name indicates that we're importing a module partition. The imported names don't include the full module name. For example, the `:Point` partition was declared as `export module BasicPlane.Figures:Point`. Yet here we're importing `:Point`. Because we're in the primary module interface file for the module `BasicPlane.Figures`, the module name is implied, and only the partition name is specified. -So far, we've defined the primary module interface, which exposes the API surface we want to make available. But we've only declared, not defined, `area()`, `height()`, or `width()`. We'll do that next by creating a module implementation file. +So far, we've defined the primary module interface, which exposes the API surface we want to make available. But we've only declared, not defined, `area()`, `height()`, or `width()`. We do that next by creating a module implementation file. ## Create a module unit implementation file @@ -219,7 +217,7 @@ Anything you declare within an implementation unit is only visible to the module ## Import the module -Now we'll make use of the module we've defined. Open the *`ModulesTutorial.cpp`* file. It was created automatically as part of the project. It currently contains the function `main()`. Replace its contents with: +Now we make use of the module we've defined. Open the *`ModulesTutorial.cpp`* file. It was created automatically as part of the project. It currently contains the function `main()`. Replace its contents with: ```cpp #include @@ -237,7 +235,7 @@ int main() } ``` -The statement `import BasicPlane.Figures;` makes all the exported functions and types from the `BasicPlane.Figures` module visible to this file. It can come before or after any `#include` directives. +The statement `import BasicPlane.Figures;` makes all the exported functions and types from the `BasicPlane.Figures` module visible to this file. It comes after any `#include` directives. The app then uses the types and functions from the module to output the area and width of the defined rectangle: @@ -252,7 +250,7 @@ Let's now look in more detail at the various module files. ### Primary module interface -A module consists of one or more files. One of them defines the interface that importers will see. This file contains the *Primary module interface*. There can only be one primary module interface per module. As pointed out earlier, the exported module interface unit doesn't specify a module partition. +A module consists of one or more files. One of them defines the interface that importers see. This file contains the *Primary module interface*. There can only be one primary module interface per module. As pointed out earlier, the exported module interface unit doesn't specify a module partition. It has an *`.ixx`* extension by default. However, you can treat a source file with any extension as a module interface file. To do so, set the **Compile As** property in the **Advanced** tab for the source file's properties page to **Compile As Module (/interface)**: @@ -265,7 +263,7 @@ module; // optional. Defines the beginning of the global module fragment // #include directives go here but only apply to this file and // aren't shared with other module implementation files. -// Macro definitions aren't visible outside this file, or to importers. +// Macro definitions aren't visible outside this file or to importers. // import statements aren't allowed here. They go in the module preamble, below. export module [module-name]; // Required. Marks the beginning of the module preamble @@ -300,12 +298,13 @@ For a more in-depth look at module syntax, see [Modules](modules-cpp.md). Module implementation units belong to a named module. The named module they belong to is indicated by the `module [module-name]` statement in the file. Module implementation units provide implementation details that, for code hygiene or other reasons, you don't want to put in the primary module interface or in a module partition file. -Module implementation units are useful for breaking up a large module into smaller pieces, which can result in faster build times. This technique is covered briefly in the [Best practices](#module-best-practices) section. +Module implementation units are useful for breaking up a large module into smaller parts, which can result in faster build times. This technique is covered briefly in the [Best practices](#module-best-practices) section. Module implementation unit files have a *`.cpp`* extension. The basic outline of a module implementation unit file is: ```cpp -// optional #include or import statements. These only apply to this file +// optional #include statements. These only apply to this file +// optional import statements. These only apply to this file // imports in the associated module's interface are automatically available to this file module [module-name]; // required. Identifies which named module this implementation unit belongs to @@ -315,7 +314,7 @@ module [module-name]; // required. Identifies which named module this implementa ### Module partition files -Module partitions provide a way to componentize a module into different pieces, or *partitions*. Module partitions are meant to be imported only in files that are part of the named module. They can't be imported outside of the named module. +Module partitions provide a way to componentize a module into different parts, or *partitions*. Module partitions are meant to be imported only in files that are part of the named module. They can't be imported outside of the named module. A partition has an interface file, and zero or more implementation files. A module partition shares ownership of all the declarations in the entire module. @@ -358,7 +357,7 @@ A module and the code that imports it must be compiled with the same compiler op - The name of the file that contains the module primary interface is generally the name of the module. For example, given the module name `BasicPlane.Figures`, the name of the file containing the primary interface would be named *`BasicPlane.Figures.ixx`*. - The name of a module partition file is generally `-` where the name of the module is followed by a hyphen ('-') and then the name of the partition. For example, *`BasicPlane.Figures-Rectangle.ixx`* -If you're building from the command line and you use this naming convention for module partitions, then you won't have to explicitly add `/reference` for each module partition file. The compiler will look for them automatically based on the name of the module. The name of the compiled partition file (ending with an *`.ifc`* extension) is generated from the module name. Consider the module name `BasicPlane.Figures:Rectangle`: the compiler will anticipate that the corresponding compiled partition file for `Rectangle` is named `BasicPlane.Figures-Rectangle.ifc`. The compiler uses this naming scheme to make it easier to use module partitions by automatically finding the interface unit files for partitions. +If you're building from the command line and you use this naming convention for module partitions, then you won't have to explicitly add `/reference` for each module partition file. The compiler looks for them automatically based on the name of the module. The name of the compiled partition file is generated from the module name and ends in *`.ifc`*. Consider the module name `BasicPlane.Figures:Rectangle`: the compiler anticipates that the corresponding compiled partition file for `Rectangle` is named `BasicPlane.Figures-Rectangle.ifc`. The compiler uses this naming scheme to make it easier to use module partitions by automatically finding the interface unit files for partitions. You can name them using your own convention. But then you'll need to specify corresponding [`/reference`](../build/reference/module-reference.md) arguments to the command-line compiler. @@ -372,7 +371,7 @@ Module partitions make it easier to logically factor a large module. They can be ## Summary -In this tutorial, you've been introduced to the basics of C++20 modules. You've created a primary module interface, defined a module partition, and built a module implementation file. +In this tutorial, you were introduced to the basics of C++20 modules by creating a primary module interface, defined a module partition, and built a module implementation file. ## See also diff --git a/docs/cpp/type-conversions-and-type-safety-modern-cpp.md b/docs/cpp/type-conversions-and-type-safety-modern-cpp.md index 0d6fb436b4..dfa856f93b 100644 --- a/docs/cpp/type-conversions-and-type-safety-modern-cpp.md +++ b/docs/cpp/type-conversions-and-type-safety-modern-cpp.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Type conversions and type safety" title: "Type conversions and type safety" +description: "Learn more about: Type conversions and type safety" ms.date: "11/19/2019" ms.topic: "conceptual" -ms.assetid: 629b361a-2ce1-4700-8b5d-ab4f57b245d5 --- # Type conversions and type safety @@ -105,7 +104,7 @@ The C-style cast operator is identical to the call operator () and is therefore int i = d; // warning C4244 possible loss of data int j = static_cast(d); // No warning. string s = static_cast(d); // Error C2440:cannot convert from - // double to std:string + // double to std::string // No error but not necessarily safe. Base* b = new Base(); @@ -173,7 +172,7 @@ The C-style cast operator is identical to the call operator () and is therefore ## See also -[C++ type system](../cpp/cpp-type-system-modern-cpp.md)
-[Welcome back to C++](../cpp/welcome-back-to-cpp-modern-cpp.md)
-[C++ Language Reference](../cpp/cpp-language-reference.md)
+[C++ type system](../cpp/cpp-type-system-modern-cpp.md)\ +[Welcome back to C++](../cpp/welcome-back-to-cpp-modern-cpp.md)\ +[C++ Language Reference](../cpp/cpp-language-reference.md)\ [C++ Standard Library](../standard-library/cpp-standard-library-reference.md) diff --git a/docs/cpp/unhook.md b/docs/cpp/unhook.md index c281450faf..146b6502e0 100644 --- a/docs/cpp/unhook.md +++ b/docs/cpp/unhook.md @@ -64,7 +64,7 @@ A pointer to the event handler method to be unhooked from an event. The handler - Managed events: *`ReceiverClass`* is the event receiver class and *`HandlerMethod`* is the handler. -*`receiver`*(optional) +*`receiver`* (optional) A pointer to an instance of the event receiver class. If you don't specify a receiver, the default is the receiver class or structure in which **`__unhook`** is called. ## Usage diff --git a/docs/cpp/writing-an-exception-filter.md b/docs/cpp/writing-an-exception-filter.md index cf3e4b3781..dfa69fb7df 100644 --- a/docs/cpp/writing-an-exception-filter.md +++ b/docs/cpp/writing-an-exception-filter.md @@ -16,25 +16,29 @@ For example, the following code uses a function call in the *filter* expression: ```cpp // exceptions_Writing_an_Exception_Filter.cpp #include +int Eval_Exception(int); int main() { - int Eval_Exception( int ); - - __try {} - - __except ( Eval_Exception( GetExceptionCode( ))) { - ; - } - + __try { + ; + } + __except (Eval_Exception(GetExceptionCode())) { + ; + } +} +void HandleOverflow() { + // Gracefully recover } -void ResetVars( int ) {} -int Eval_Exception ( int n_except ) { - if ( n_except != STATUS_INTEGER_OVERFLOW && - n_except != STATUS_FLOAT_OVERFLOW ) // Pass on most exceptions - return EXCEPTION_CONTINUE_SEARCH; - - // Execute some code to clean up problem - ResetVars( 0 ); // initializes data to 0 - return EXCEPTION_CONTINUE_EXECUTION; +int Eval_Exception(int n_except) { + if ( + n_except != STATUS_INTEGER_OVERFLOW && + n_except != STATUS_FLOAT_OVERFLOW + ) { + // Pass on most exceptions + return EXCEPTION_CONTINUE_SEARCH; + } + // Execute some code to clean up problem + HandleOverflow(); + return EXCEPTION_CONTINUE_EXECUTION; } ``` @@ -42,7 +46,7 @@ It's a good idea to use a function call in the *filter* expression whenever *fil Note the use of [`GetExceptionCode`](/windows/win32/Debug/getexceptioncode) to determine the exception. This function must be called inside the filter expression of the **`__except`** statement. `Eval_Exception` can't call `GetExceptionCode`, but it must have the exception code passed to it. -This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`ResetVars` is only an example, not an API function) to reset some global variables. The **`__except`** statement block, which in this example is empty, can never be executed because `Eval_Exception` never returns `EXCEPTION_EXECUTE_HANDLER` (1). +This handler passes control to another handler unless the exception is an integer or floating-point overflow. If it is, the handler calls a function (`HandleOverflow` is only an example, not an API function) to appropriately try to recover from the exception. The **`__except`** statement block, which in this example is empty, can never be executed because `Eval_Exception` never returns `EXCEPTION_EXECUTE_HANDLER` (1). Using a function call is a good general-purpose technique for dealing with complex filter expressions. Two other C language features that are useful are: @@ -53,13 +57,13 @@ Using a function call is a good general-purpose technique for dealing with compl The conditional operator is frequently useful here. It can be used to check for a specific return code and then return one of two different values. For example, the filter in the following code recognizes the exception only if the exception is `STATUS_INTEGER_OVERFLOW`: ```cpp -__except( GetExceptionCode() == STATUS_INTEGER_OVERFLOW ? 1 : 0 ) { +__except (GetExceptionCode() == STATUS_INTEGER_OVERFLOW ? 1 : 0) ``` The purpose of the conditional operator in this case is mainly to provide clarity, because the following code produces the same results: ```cpp -__except( GetExceptionCode() == STATUS_INTEGER_OVERFLOW ) { +__except (GetExceptionCode() == STATUS_INTEGER_OVERFLOW) ``` The conditional operator is more useful in situations where you might want the filter to evaluate to -1, `EXCEPTION_CONTINUE_EXECUTION`. @@ -67,7 +71,7 @@ The conditional operator is more useful in situations where you might want the f The comma operator lets you execute multiple expressions in sequence. It then returns the value of the last expression. For example, the following code stores the exception code in a variable and then tests it: ```cpp -__except( nCode = GetExceptionCode(), nCode == STATUS_INTEGER_OVERFLOW ) +__except (nCode = GetExceptionCode(), nCode == STATUS_INTEGER_OVERFLOW) ``` ## See also diff --git a/docs/cppcx/codesnippet/CPP/partialclassexample/class1.h b/docs/cppcx/codesnippet/CPP/partialclassexample/class1.h index 52efa84e74..9e8425b3b8 100644 --- a/docs/cppcx/codesnippet/CPP/partialclassexample/class1.h +++ b/docs/cppcx/codesnippet/CPP/partialclassexample/class1.h @@ -21,7 +21,7 @@ namespace PartialClassExample /* // This is commented out because it causes - // a compile error in Delcaration #6 due to mc already being defined. + // a compile error in Declaration #6 due to mc already being defined. // the error is understood. The example is most effective showing // the various declaration rules all in one example like this. // diff --git a/docs/cppcx/collections-c-cx.md b/docs/cppcx/collections-c-cx.md index cd7de0aa56..3d3caad993 100644 --- a/docs/cppcx/collections-c-cx.md +++ b/docs/cppcx/collections-c-cx.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: Collections (C++/CX)" title: "Collections (C++/CX)" +description: "Learn more about: Collections (C++/CX)" ms.date: "11/19/2018" -ms.assetid: 914da30b-aac5-4cd7-9da3-a5ac08cdd72c --- # Collections (C++/CX) @@ -16,7 +15,7 @@ The Windows Runtime defines the interfaces for collections and related types, an - The [Platform::Collections::Map class](../cppcx/platform-collections-map-class.md) resembles the [std::map class](../standard-library/map-class.md). -- [Platform::Collections::VectorView class](../cppcx/platform-collections-vectorview-class.md) and[Platform::Collections::MapView class](../cppcx/platform-collections-mapview-class.md) are read-only versions of `Vector` and `Map`. +- [Platform::Collections::VectorView class](../cppcx/platform-collections-vectorview-class.md) and [Platform::Collections::MapView class](../cppcx/platform-collections-mapview-class.md) are read-only versions of `Vector` and `Map`. - Iterators are defined in the [Platform::Collections Namespace](../cppcx/platform-collections-namespace.md). These iterators satisfy the requirements for STL iterators and enable the use of [std::find](../standard-library/algorithm-functions.md#find), [std::count_if](../standard-library/algorithm-functions.md#count_if), and other STL algorithms on any [Windows::Foundation::Collections](/uwp/api/windows.foundation.collections) interface type or [Platform::Collections](../cppcx/platform-collections-namespace.md) concrete type. For example, this means that you can iterate a collection in a Windows Runtime component that's created in C# and apply an STL algorithm to it. @@ -44,7 +43,7 @@ If you have existing code that uses `std::vector` and you want to reuse it in a [!code-cpp[cx_collections#02](../cppcx/codesnippet/CPP/collections/class1.cpp#02)] -If you have a vector of strings that you must pass across the ABI at some future point, you must decide whether to create the strings initially as `std::wstring` types or as `Platform::String^` types. If you have to do a lot of processing on the strings, then use `wstring`. Otherwise, create the strings as `Platform::String^` types and avoid the cost of converting them later. You must also decide whether to put these strings into a `std:vector` or `Platform::Collections::Vector` internally. As a general practice, use `std::vector` and then create a `Platform::Vector` from it only when you pass the container across the ABI. +If you have a vector of strings that you must pass across the ABI at some future point, you must decide whether to create the strings initially as `std::wstring` types or as `Platform::String^` types. If you have to do a lot of processing on the strings, then use `wstring`. Otherwise, create the strings as `Platform::String^` types and avoid the cost of converting them later. You must also decide whether to put these strings into a `std::vector` or `Platform::Collections::Vector` internally. As a general practice, use `std::vector` and then create a `Platform::Vector` from it only when you pass the container across the ABI. ## Value types in Vector @@ -95,27 +94,27 @@ Collections fall into four categories: modifiable versions and read-only version Elements of a modifiable collection can be changed, but elements of a read-only collection, which is known as a *view*, can only be read. Elements of a [Platform::Collections::Vector](../cppcx/platform-collections-vector-class.md) or[Platform::Collections::VectorView](../cppcx/platform-collections-vectorview-class.md) collection can be accessed by using an iterator or the collection's [Vector::GetAt](../cppcx/platform-collections-vector-class.md#getat) and an index. Elements of an associative collection can be accessed by using the collection's [Map::Lookup](../cppcx/platform-collections-map-class.md#lookup) and a key. -[Platform::Collections::Map class](../cppcx/platform-collections-map-class.md)
+[Platform::Collections::Map class](../cppcx/platform-collections-map-class.md)\ A modifiable, associative collection. Map elements are key-value pairs. Looking up a key to retrieve its associated value, and iterating through all key-value pairs, are both supported. `Map` and `MapView` are templated on `>`; therefore, you can customize the comparator. Additionally, `Vector` and `VectorView` are templated on `>` so that you can customize the behavior of `IndexOf()`. This is important mostly for `Vector` and `VectorView` of value structs. For example, to create a Vector\, you must provide a custom comparator because DateTime does not overload the == operator. -[Platform::Collections::MapView class](../cppcx/platform-collections-mapview-class.md)
+[Platform::Collections::MapView class](../cppcx/platform-collections-mapview-class.md)\ A read-only version of a `Map`. -[Platform::Collections::Vector class](../cppcx/platform-collections-vector-class.md)
-A modifiable sequence collection. `Vector` supports constant-time random access and amortized-constant-time [Append](../cppcx/platform-collections-vector-class.md#append) operations.. +[Platform::Collections::Vector class](../cppcx/platform-collections-vector-class.md)\ +A modifiable sequence collection. `Vector` supports constant-time random access and amortized-constant-time [Append](../cppcx/platform-collections-vector-class.md#append) operations. -[Platform::Collections::VectorView class](../cppcx/platform-collections-vectorview-class.md)
+[Platform::Collections::VectorView class](../cppcx/platform-collections-vectorview-class.md)\ A read-only version of a `Vector`. -[Platform::Collections::InputIterator class](../cppcx/platform-collections-inputiterator-class.md)
+[Platform::Collections::InputIterator class](../cppcx/platform-collections-inputiterator-class.md)\ An STL iterator that satisfies the requirements of an STL input iterator. -[Platform::Collections::VectorIterator class](../cppcx/platform-collections-vectoriterator-class.md)
+[Platform::Collections::VectorIterator class](../cppcx/platform-collections-vectoriterator-class.md)\ An STL iterator that satisfies the requirements of an STL mutable random-access iterator. -[Platform::Collections::VectorViewIterator class](../cppcx/platform-collections-vectorviewiterator-class.md)
+[Platform::Collections::VectorViewIterator class](../cppcx/platform-collections-vectorviewiterator-class.md)\ An STL iterator that satisfies the requirements of an STL **`const`** random-access iterator. ### begin() and end() functions @@ -140,6 +139,6 @@ The [Windows::Foundation::Collections::VectorChangedEventHandler](/uwp/api/windo ## See also -[Type System](../cppcx/type-system-c-cx.md)
-[C++/CX Language Reference](../cppcx/visual-c-language-reference-c-cx.md)
+[Type System](../cppcx/type-system-c-cx.md)\ +[C++/CX Language Reference](../cppcx/visual-c-language-reference-c-cx.md)\ [Namespaces Reference](../cppcx/namespaces-reference-c-cx.md) diff --git a/docs/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md b/docs/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md index 602af8f276..9291df90cc 100644 --- a/docs/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md +++ b/docs/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps.md @@ -1,8 +1,7 @@ --- title: "CRT functions not supported in Universal Windows Platform apps" description: "Reference guide to CRT functions not supported in Universal Windows Platform apps." -ms.date: "04/16/2020" -ms.assetid: cbfc957d-6c60-48f4-97e3-1ed8526743b4 +ms.date: 04/16/2020 --- # CRT functions not supported in Universal Windows Platform apps @@ -47,4 +46,4 @@ Both the previously mentioned APIs and the following APIs are unavailable in Win |`_chdir` `_wchdir` `_getcwd` `_getdcwd` `_wgetcwd` `_wgetdcwd`|The concept of a working directory doesn't apply to Windows 8.x Store apps.|Use full paths instead.| |`_isleadbyte_l` `_ismbbalnum`, `_ismbbalnum_l`, `_ismbbalpha`, `_ismbbalpha` `_ismbbalpha_l` `_ismbbgraph` `_ismbbgraph_l` `_ismbbkalnum` `_ismbbkalnum_l` `_ismbbkana` `_ismbbkana_l` `_ismbbkprint` `_ismbbkprint_l` `_ismbbkpunct` `_ismbbkpunct_l` `_ismbblead` `_ismbblead_l` `_ismbbprint` `_ismbbprint_l` `_ismbbpunct` `_ismbbpunct_l` `_ismbbtrail` `_ismbbtrail_l` `_ismbslead` `_ismbslead_l` `_ismbstrail` `_ismbstrail_l` `_mbsdup` `isleadbyte`|Multi-byte strings are not supported in Windows 8.x Store apps.|Use Unicode strings instead.| |`_tzset`|Environment variables are not available to Windows 8.x Store apps.|No workaround.| -|`_get_heap_handle`, `_heapmin`|The corresponding Win32 APIs are not supported in Windows 8.x Store apps. And, apps can no longer create private heaps.|No workaround. However, ``_get_heap_handle`` is available in the DEBUG CRT, for debugging purposes only.| +|`_get_heap_handle`, `_heapmin`|The corresponding Win32 APIs are not supported in Windows 8.x Store apps. And, apps can no longer create private heaps.|No workaround. However, `_get_heap_handle` is available in the DEBUG CRT, for debugging purposes only.| diff --git a/docs/cppcx/delegates-c-cx.md b/docs/cppcx/delegates-c-cx.md index af0f96e6d6..3ea53942eb 100644 --- a/docs/cppcx/delegates-c-cx.md +++ b/docs/cppcx/delegates-c-cx.md @@ -18,7 +18,7 @@ Delegates are most commonly used in conjunction with events. An event has a dele event PrimeFoundHandler^ primeFoundEvent; ``` -When declaring delegates that will be exposed to clients across the Windows Runtime application binary interface, use [Windows::Foundation::TypedEventHandler\](/uwp/api/windows.foundation.typedeventhandler-2). This delegate has predefined proxy and stub binaries that enable it to be consumed by Javascript clients. +When declaring delegates that will be exposed to clients across the Windows Runtime application binary interface, use [Windows::Foundation::TypedEventHandler\](/uwp/api/windows.foundation.typedeventhandler-2). This delegate has predefined proxy and stub binaries that enable it to be consumed by JavaScript clients. ## Consuming delegates diff --git a/docs/cppcx/deprecating-types-and-members-c-cx.md b/docs/cppcx/deprecating-types-and-members-c-cx.md index 85471b58e5..8c17a5e3a8 100644 --- a/docs/cppcx/deprecating-types-and-members-c-cx.md +++ b/docs/cppcx/deprecating-types-and-members-c-cx.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Deprecating types and members (C++/CX)" title: "Deprecating types and members (C++/CX)" +description: "Learn more about: Deprecating types and members (C++/CX)" ms.date: 01/07/2022 no-loc: [ "class", "delegate", "enum", "field", "interface", "method", "property", "struct" ] --- @@ -13,7 +13,7 @@ C++/CX supports deprecation of Windows Runtime types and members for producers a ## Example -The following example shows how to deprecate your own public APIs—for example, in a Windows Runtime component. The second parameter, of type [`Windows:Foundation::Metadata::DeprecationType`](/uwp/api/windows.foundation.metadata.deprecationtype) specifies whether the API is being deprecated or removed. Currently only the `DeprecationType::Deprecated` value is supported. The third parameter in the attribute specifies the [`Windows::Foundation::Metadata::Platform`](/uwp/api/windows.foundation.metadata.platformattribute) to which the attribute applies. +The following example shows how to deprecate your own public APIs—for example, in a Windows Runtime component. The second parameter, of type [`Windows::Foundation::Metadata::DeprecationType`](/uwp/api/windows.foundation.metadata.deprecationtype) specifies whether the API is being deprecated or removed. Currently only the `DeprecationType::Deprecated` value is supported. The third parameter in the attribute specifies the [`Windows::Foundation::Metadata::Platform`](/uwp/api/windows.foundation.metadata.platformattribute) to which the attribute applies. ```cpp namespace wfm = Windows::Foundation::Metadata; diff --git a/docs/cppcx/fundamental-types-c-cx.md b/docs/cppcx/fundamental-types-c-cx.md index 4f1bd6c1d8..47155e3cdb 100644 --- a/docs/cppcx/fundamental-types-c-cx.md +++ b/docs/cppcx/fundamental-types-c-cx.md @@ -1,12 +1,11 @@ --- -description: "Learn more about: Fundamental types (C++/CX)" title: "Fundamental types (C++/CX)" +description: "Learn more about: Fundamental types (C++/CX)" ms.date: "01/22/2017" -ms.assetid: c9f82907-25f2-440b-91d6-afb8dbd46ea6 --- # Fundamental types (C++/CX) -In addition to the standard C++ built-in types, C++/CX supports the type system that's defined by the Windows Runtime architecture by providing typedefs for the Windows Runtime fundamental types that map to standard C++ types.. C++/CX implements Boolean, character, and numeric fundamental types. These typedefs are defined in the `default` namespace, which never needs to be specified explicitly. In addition, C++/CX provides wrappers and concrete implementations for certain Windows Runtime types and interfaces. +In addition to the standard C++ built-in types, C++/CX supports the type system that's defined by the Windows Runtime architecture by providing typedefs for the Windows Runtime fundamental types that map to standard C++ types. C++/CX implements Boolean, character, and numeric fundamental types. These typedefs are defined in the `default` namespace, which never needs to be specified explicitly. In addition, C++/CX provides wrappers and concrete implementations for certain Windows Runtime types and interfaces. ## Boolean and Character Types diff --git a/docs/cppcx/platform-accessdeniedexception-class.md b/docs/cppcx/platform-accessdeniedexception-class.md index bf6cbaed0b..cc50d74596 100644 --- a/docs/cppcx/platform-accessdeniedexception-class.md +++ b/docs/cppcx/platform-accessdeniedexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::AccessDeniedException Class" title: "Platform::AccessDeniedException Class" +description: "Learn more about: Platform::AccessDeniedException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::AccessDeniedException", "VCCORLIB/Platform::AccessDeniedException::AccessDeniedException"] helpviewer_keywords: ["Platform::AccessDeniedException"] -ms.assetid: 6ae2155b-7b16-4587-8d2d-da05eab4c7e9 --- # Platform::AccessDeniedException Class @@ -14,7 +13,7 @@ Thrown when access to a resource or feature is denied. ## Syntax ```cpp -public ref class AccessDeniedException : COMException, IException, IPrintable, IEquatable +public ref class AccessDeniedException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-changedstateexception-class.md b/docs/cppcx/platform-changedstateexception-class.md index b123e94431..6fc1201500 100644 --- a/docs/cppcx/platform-changedstateexception-class.md +++ b/docs/cppcx/platform-changedstateexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::ChangedStateException Class" title: "Platform::ChangedStateException Class" +description: "Learn more about: Platform::ChangedStateException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::ChangedStateException", "VCCORLIB/Platform::ChangedStateException::ChangedStateException"] helpviewer_keywords: ["Platform::ChangedStateException"] -ms.assetid: f894beac-9e80-4fac-ac25-89f1dbc0a6a4 --- # Platform::ChangedStateException Class @@ -14,7 +13,7 @@ Thrown when the internal state of an object has changed, thereby invalidating th ## Syntax ```cpp -public ref class ChangedStateException : COMException, IException, IPrintable, IEquatable +public ref class ChangedStateException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-classnotregisteredexception-class.md b/docs/cppcx/platform-classnotregisteredexception-class.md index 9fa2b99397..0108e2bff6 100644 --- a/docs/cppcx/platform-classnotregisteredexception-class.md +++ b/docs/cppcx/platform-classnotregisteredexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::ClassNotRegisteredException Class" title: "Platform::ClassNotRegisteredException Class" +description: "Learn more about: Platform::ClassNotRegisteredException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::ClassNotRegisteredException::ClassNotRegisteredException", "VCCORLIB/Platform::ClassNotRegisteredException"] helpviewer_keywords: ["Platform::ClassNotRegisteredException"] -ms.assetid: 8f8871d8-51b9-46e8-902e-ae023c9f1de9 --- # Platform::ClassNotRegisteredException Class @@ -14,7 +13,7 @@ Thrown when a COM class has not been registered. ## Syntax ```cpp -public ref class ClassNotRegisteredException : COMException, IException, IPrintable, IEquatable +public ref class ClassNotRegisteredException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-collections-map-class.md b/docs/cppcx/platform-collections-map-class.md index 21b981e5f6..473101cef0 100644 --- a/docs/cppcx/platform-collections-map-class.md +++ b/docs/cppcx/platform-collections-map-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::Collections::Map Class" title: "Platform::Collections::Map Class" -ms.date: "10/01/2019" +description: "Learn more about: Platform::Collections::Map Class" +ms.date: 10/01/2019 ms.topic: "reference" f1_keywords: ["COLLECTION/Platform::Collections::Map::Map", "COLLECTION/Platform::Collections::Map::Clear", "COLLECTION/Platform::Collections::Map::First", "COLLECTION/Platform::Collections::Map::GetView", "COLLECTION/Platform::Collections::Map::HasKey", "COLLECTION/Platform::Collections::Map::Insert", "COLLECTION/Platform::Collections::Map::Lookup", "COLLECTION/Platform::Collections::Map::Remove", "COLLECTION/Platform::Collections::Map::Size"] helpviewer_keywords: ["Map Class (C++/Cx)"] -ms.assetid: 2b8cf968-1167-4898-a149-1195b32c1785 --- # Platform::Collections::Map Class @@ -206,7 +205,7 @@ Initializes a new instance of the Map class. ```cpp explicit Map(const C& comp = C()); explicit Map(const StdMap& m); -explicit Map(StdMap&& m ; +explicit Map(StdMap&& m); template Map( InItfirst, diff --git a/docs/cppcx/platform-collections-namespace.md b/docs/cppcx/platform-collections-namespace.md index f079c117af..1cffd68521 100644 --- a/docs/cppcx/platform-collections-namespace.md +++ b/docs/cppcx/platform-collections-namespace.md @@ -9,7 +9,7 @@ ms.assetid: b5042864-5f22-40b7-b7a5-c0691f65cc47 --- # Platform::Collections Namespace -The Platform::Collections namespace contains the `Map`, `MapView`, `Vector`, and `VectorView` classes. These classes are concrete implementations of the corresponding interfaces that are defined in the [Windows::Foundation::Collections](/uwp/api/windows.foundation.collections) namespace. The concrete collection types are not portable across the ABI (for example when a Javascript or C# program calls into a C++ component), but they are implicitly convertible to their corresponding interface types. For example, if you implement a public method that populates and returns a collection, then use [Platform::Collections::Vector](../cppcx/platform-collections-vector-class.md) to implement the collection internally and use [Windows::Foundation::Collections::IVector](/uwp/api/windows.foundation.collections.ivector-1) as the return type. For more information, see [Collections](../cppcx/collections-c-cx.md) and [Creating Windows Runtime Components in C++](/windows/uwp/winrt-components/creating-windows-runtime-components-in-cpp). +The Platform::Collections namespace contains the `Map`, `MapView`, `Vector`, and `VectorView` classes. These classes are concrete implementations of the corresponding interfaces that are defined in the [Windows::Foundation::Collections](/uwp/api/windows.foundation.collections) namespace. The concrete collection types are not portable across the ABI (for example when a JavaScript or C# program calls into a C++ component), but they are implicitly convertible to their corresponding interface types. For example, if you implement a public method that populates and returns a collection, then use [Platform::Collections::Vector](../cppcx/platform-collections-vector-class.md) to implement the collection internally and use [Windows::Foundation::Collections::IVector](/uwp/api/windows.foundation.collections.ivector-1) as the return type. For more information, see [Collections](../cppcx/collections-c-cx.md) and [Creating Windows Runtime Components in C++](/windows/uwp/winrt-components/creating-windows-runtime-components-in-cpp). You can construct a Platform::Collections::Vector from a [std::vector](../standard-library/vector-class.md) and a [Platform::Collections::Map](../cppcx/platform-collections-map-class.md) from a [std::map](../standard-library/map-class.md). diff --git a/docs/cppcx/platform-comexception-class.md b/docs/cppcx/platform-comexception-class.md index 5c8363381c..e76f69daed 100644 --- a/docs/cppcx/platform-comexception-class.md +++ b/docs/cppcx/platform-comexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::COMException Class" title: "Platform::COMException Class" +description: "Learn more about: Platform::COMException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::COMException", "VCCORLIB/Platform::COMException::HResult", "VCCORLIB/Platform::COMException::Message"] helpviewer_keywords: ["Platform::COMException Class"] -ms.assetid: 44fda4e5-574f-4d12-ab5f-4ff3f277448d --- # Platform::COMException Class @@ -14,7 +13,7 @@ Represents COM errors that occur during application execution. COMException is t ## Syntax ```cpp -public ref class COMException : Exception, IException, IPrintable, IEquatable +public ref class COMException : Exception, IException, IPrintable, IEquatable ``` ### Members @@ -79,12 +78,12 @@ Intializes a new instance of the COMException class. ### Syntax ```cpp -COMException( int hresult ) +COMException(int hresult); ``` ### Parameters -*hresult*
+*hresult*\ The error HRESULT that is represented by the exception. ## COMException::HResult Property @@ -95,7 +94,7 @@ The HRESULT that corresponds to the exception. ```cpp public: - property int HResult { int get();} + property int HResult { int get(); } ``` ## Property Value @@ -113,7 +112,8 @@ Message that describes the exception. ### Syntax ```cpp -public:property String^ Message { String^ get();} +public: + property String^ Message { String^ get(); } ``` ### Property Value diff --git a/docs/cppcx/platform-details-heapallocationtrackinglevel-enumeration.md b/docs/cppcx/platform-details-heapallocationtrackinglevel-enumeration.md index 095d32d623..8e3e645bf9 100644 --- a/docs/cppcx/platform-details-heapallocationtrackinglevel-enumeration.md +++ b/docs/cppcx/platform-details-heapallocationtrackinglevel-enumeration.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::Details::HeapAllocationTrackingLevel Enumeration" title: "Platform::Details::HeapAllocationTrackingLevel Enumeration" -ms.date: "12/30/2016" +description: "Learn more about: Platform::Details::HeapAllocationTrackingLevel Enumeration" +ms.date: 12/30/2016 ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::Details::HeapAllocationTrackingLevel"] helpviewer_keywords: ["Platform::Details::HeapAllocationTrackingLevel Enumeration"] -ms.assetid: dc341bc0-b47b-4eb2-9445-fbaf788e7b1a --- # Platform::Details::HeapAllocationTrackingLevel Enumeration @@ -14,7 +13,7 @@ This enumeration is intended for internal use only, and is not intended to be us ## Syntax ```cpp -enumm class HeapAllocationTrackingLevel; +enum class HeapAllocationTrackingLevel; ``` ### Remarks diff --git a/docs/cppcx/platform-disconnectedexception-class.md b/docs/cppcx/platform-disconnectedexception-class.md index 332d47be88..5721f44c9a 100644 --- a/docs/cppcx/platform-disconnectedexception-class.md +++ b/docs/cppcx/platform-disconnectedexception-class.md @@ -1,20 +1,19 @@ --- -description: "Learn more about: Platform::DisconnectedException Class" title: "Platform::DisconnectedException Class" +description: "Learn more about: Platform::DisconnectedException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::DisconnectedException", "VCCORLIB/Platform::DisconnectedException::DisconnectedException"] helpviewer_keywords: ["Platform::DisconnectedException"] -ms.assetid: c25e0d64-5bff-4c21-88e5-c4ec2776fa7f --- # Platform::DisconnectedException Class -Thrown when a COM proxy object attempts to reference a COM server that no longer exists +Thrown when a COM proxy object attempts to reference a COM server that no longer exists. ## Syntax -``` -public ref class DisconnectedException : COMException, IException, IPrintable, IEquatable +```cpp +public ref class DisconnectedException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-exception-class.md b/docs/cppcx/platform-exception-class.md index 69631f3d54..4eb7e70d3d 100644 --- a/docs/cppcx/platform-exception-class.md +++ b/docs/cppcx/platform-exception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::Exception Class" title: "Platform::Exception Class" +description: "Learn more about: Platform::Exception Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::Exception::Exception", "VCCORLIB/Platform::Exception::CreateException", "VCCORLIB/Platform::Exception::HResult", "VCCORLIB/Platform::Exception::Message"] helpviewer_keywords: ["Platform::Exception Class"] -ms.assetid: ca1d5a67-3a5a-48fe-8099-f9c38a2d2dce --- # Platform::Exception Class @@ -14,7 +13,7 @@ Represents errors that occur during application execution. Custom exception clas ## Syntax ```cpp -public ref class Exception : Object, IException, IPrintable, IEquatable +public ref class Exception : Object, IException, IPrintable, IEquatable ``` ### Members @@ -31,7 +30,7 @@ The `Exception` class also has the following kinds of members. ### Methods -The `Exception` class inherits the `Equals()`, `Finalize()`,`GetHashCode()`,`GetType()`,`MemberwiseClose()`, and `ToString()` methods from the [Platform::Object Class](../cppcx/platform-object-class.md). The `Exception` class also has the following method. +The `Exception` class inherits the `Equals()`, `Finalize()`, `GetHashCode()`, `GetType()`, `MemberwiseClose()`, and `ToString()` methods from the [Platform::Object Class](../cppcx/platform-object-class.md). The `Exception` class also has the following method. |Member|Description| |------------|-----------------| @@ -69,10 +68,10 @@ Exception^ CreateException(int32 hr, Platform::String^ message); ### Parameters -*hr*
+*hr*\ An HRESULT value that you typically get from a call to a COM method. If the value is 0, which is equal to S_OK, this method throws [Platform::InvalidArgumentException](../cppcx/platform-invalidargumentexception-class.md) because COM methods that succeed should not throw exceptions. -*message*
+*message*\ A string that describes the error. ### Return Value @@ -98,10 +97,10 @@ Exception(int32 hresult, ::Platform::String^ message); ### Parameters -*hresult*
+*hresult*\ The error HRESULT that is represented by the exception. -*message*
+*message*\ A user-specified message, such as prescriptive text, that is associated with the exception. In general you should prefer the second overload in order to provide a descriptive message that is as specific as possible about how and why the error has occurred. ## Exception::HResult Property @@ -130,7 +129,8 @@ Message that describes the error. ### Syntax ```cpp -public:property String^ Message; +public: + property String^ Message; ``` ### Property Value diff --git a/docs/cppcx/platform-failureexception-class.md b/docs/cppcx/platform-failureexception-class.md index 02f7ca1cfb..24268a74b3 100644 --- a/docs/cppcx/platform-failureexception-class.md +++ b/docs/cppcx/platform-failureexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::FailureException Class" title: "Platform::FailureException Class" +description: "Learn more about: Platform::FailureException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::FailureException::FailureException", "VCCORLIB/Platform::FailureException"] helpviewer_keywords: ["Platform::FailureException"] -ms.assetid: 1729cd07-bfc2-448e-9db5-185d5cbf5b81 --- # Platform::FailureException Class @@ -14,7 +13,7 @@ Thrown when the operation has failed. It is the equivalent of the E_FAIL HRESULT ## Syntax ```cpp -public ref class FailureException : COMException, IException, IPrintable, IEquatable +public ref class FailureException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-guid-value-class.md b/docs/cppcx/platform-guid-value-class.md index 952645712c..825700de85 100644 --- a/docs/cppcx/platform-guid-value-class.md +++ b/docs/cppcx/platform-guid-value-class.md @@ -1,15 +1,14 @@ --- -description: "Learn more about: Platform::Guid value class" title: "Platform::Guid value class" +description: "Learn more about: Platform::Guid value class" ms.date: "01/15/2019" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::Guid"] helpviewer_keywords: ["Platform::Guid Struct"] -ms.assetid: 25c0bfb2-7f93-44d8-bdf4-ef4fbac3424a --- # Platform::Guid value class -Represents a [GUID](/windows/win32/api/guiddef/ns-guiddef-guid type in the Windows Runtime type system. +Represents a [GUID](/windows/win32/api/guiddef/ns-guiddef-guid) type in the Windows Runtime type system. ## Syntax @@ -74,43 +73,43 @@ Guid( ### Parameters -*a*
+*a*\ The first 4 bytes of the `GUID`. -*b*
+*b*\ The next 2 bytes of the `GUID`. -*c*
+*c*\ The next 2 bytes of the `GUID`. -*d*
+*d*\ The next byte of the `GUID`. -*e*
+*e*\ The next byte of the `GUID`. -*f*
+*f*\ The next byte of the `GUID`. -*g*
+*g*\ The next byte of the `GUID`. -*h*
+*h*\ The next byte of the `GUID`. -*i*
+*i*\ The next byte of the `GUID`. -*j*
+*j*\ The next byte of the `GUID`. -*k*
+*k*\ The next byte of the `GUID`. -*m*
+*m*\ A `GUID` in the form a [GUID structure](/windows/win32/api/guiddef/ns-guiddef-guid). -*n*
+*n*\ The remaining 8 bytes of the `GUID`. ## Guid::operator== Operator @@ -125,10 +124,10 @@ static bool Platform::Guid::operator==(Platform::Guid guid1, Platform::Guid guid ### Parameters -*guid1*
+*guid1*\ The first `Platform::Guid` to compare. -*guid2*
+*guid2*\ The second `Platform::Guid` to compare. ### Return Value @@ -152,10 +151,10 @@ static bool Platform::Guid::operator!=(Platform::Guid guid1, Platform::Guid guid ### Parameters -*guid1*
+*guid1*\ The first `Platform::Guid` to compare. -*guid2*
+*guid2*\ The second `Platform::Guid` to compare. ### Return Value @@ -174,10 +173,10 @@ static bool Platform::Guid::operator<(Platform::Guid guid1, Platform::Guid guid2 ### Parameters -*guid1*
+*guid1*\ The first `Platform::Guid` to compare. -*guid2*
+*guid2*\ The second `Platform::Guid` to compare. ### Return Value diff --git a/docs/cppcx/platform-intptr-value-class.md b/docs/cppcx/platform-intptr-value-class.md index de08c207cf..b08b50209b 100644 --- a/docs/cppcx/platform-intptr-value-class.md +++ b/docs/cppcx/platform-intptr-value-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::IntPtr value class" title: "Platform::IntPtr value class" +description: "Learn more about: Platform::IntPtr value class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/PlatformIntPtr::IntPtr", "VCCORLIB/PlatformIntPtr::op_explicit Operator", "VCCORLIB/PlatformIntPtr::ToInt32"] helpviewer_keywords: ["Platform::IntPtr Struct"] -ms.assetid: 6c0326e8-edfd-4e53-a963-240b845dcde8 --- # Platform::IntPtr value class @@ -37,7 +36,7 @@ IntPtr has the following members: **Metadata:** platform.winmd -## IntPtr::IntPtr Constructor +## IntPtr::IntPtr Constructor Initializes a new instance of an IntPtr with the specified value. @@ -52,7 +51,7 @@ IntPtr( __int64 handle-or-pointer ); IntPtr( void* value ); IntPtr( int 32-b *value*
A 64-bit handle or pointer, or a pointer to a 64-bit value, or a 32-bit value that can be converted to a 64-bit value. -## IntPtr::op_explicit Operator +## IntPtr::op_explicit Operator Converts the specified parameter to an IntPtr or a pointer to an IntPtr value. @@ -77,7 +76,7 @@ An IntPtr. The first and second operators return an IntPtr. The third operator returns a pointer to the value represented by the current IntPtr. -## IntPtr::ToInt32 Method +## IntPtr::ToInt32 Method Converts the current IntPtr value to a 32-bit integer. diff --git a/docs/cppcx/platform-invalidargumentexception-class.md b/docs/cppcx/platform-invalidargumentexception-class.md index 120bdd9d5c..040d608c66 100644 --- a/docs/cppcx/platform-invalidargumentexception-class.md +++ b/docs/cppcx/platform-invalidargumentexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::InvalidArgumentException Class" title: "Platform::InvalidArgumentException Class" +description: "Learn more about: Platform::InvalidArgumentException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::InvalidArgumentException", "VCCORLIB/Platform::InvalidArgumentException::InvalidArgumentException"] helpviewer_keywords: ["Platform::InvalidArgumentException"] -ms.assetid: 1a8d860b-3bcb-41a9-9346-6610616a0b46 --- # Platform::InvalidArgumentException Class @@ -14,7 +13,7 @@ Thrown when one of the arguments provided to a method is not valid. ## Syntax ```cpp -public ref class InvalidArgumentException : COMException, IException, IPrintable, IEquatable +public ref class InvalidArgumentException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-invalidcastexception-class.md b/docs/cppcx/platform-invalidcastexception-class.md index 4f9b3c4ba7..9e664b598b 100644 --- a/docs/cppcx/platform-invalidcastexception-class.md +++ b/docs/cppcx/platform-invalidcastexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::InvalidCastException Class" title: "Platform::InvalidCastException Class" +description: "Learn more about: Platform::InvalidCastException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::InvalidCastException::InvalidCastException", "VCCORLIB/Platform::InvalidCastException"] helpviewer_keywords: ["Platform::InvalidCastException"] -ms.assetid: 0215131d-1251-4913-9561-824410e045b6 --- # Platform::InvalidCastException Class @@ -14,7 +13,7 @@ Thrown when a cast or explicit conversion is invalid. ## Syntax ```cpp -public ref class InvalidCastException : COMException, IException, IPrintable, IEquatable +public ref class InvalidCastException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-metadata-runtimeclassname.md b/docs/cppcx/platform-metadata-runtimeclassname.md index d40541dd80..e7e5d3a056 100644 --- a/docs/cppcx/platform-metadata-runtimeclassname.md +++ b/docs/cppcx/platform-metadata-runtimeclassname.md @@ -1,15 +1,14 @@ --- -description: "Learn more about: Platform::Metadata::RuntimeClassName" title: "Platform::Metadata::RuntimeClassName" +description: "Learn more about: Platform::Metadata::RuntimeClassName" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::Metadata::RuntimeClassName"] helpviewer_keywords: ["RuntimeClassName", "Platform::Metadata::RuntimeClassName"] -ms.assetid: fdef8f85-ab94-4edd-ba50-ee0da9358ff6 --- # Platform::Metadata::RuntimeClassName -When applied to a class definition, ensures that a private class returns a valid name from the GetRuntimeClassName function.. +When applied to a class definition, ensures that a private class returns a valid name from the GetRuntimeClassName function. ## Syntax diff --git a/docs/cppcx/platform-notimplementedexception-class.md b/docs/cppcx/platform-notimplementedexception-class.md index 55e18d0b57..94f1c289d8 100644 --- a/docs/cppcx/platform-notimplementedexception-class.md +++ b/docs/cppcx/platform-notimplementedexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::NotImplementedException Class" title: "Platform::NotImplementedException Class" +description: "Learn more about: Platform::NotImplementedException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::NotImplementedException", "VCCORLIB/Platform::NotImplementedException::NotImplementedException"] helpviewer_keywords: ["Platform::NotImplementedException"] -ms.assetid: 6da26cc2-dde8-4aea-aa85-67aac55cf97b --- # Platform::NotImplementedException Class @@ -14,7 +13,7 @@ Thrown when an interface member is not been implemented in a derived type. ## Syntax ```cpp -public ref class NotImplementedException : COMException, IException, IPrintable, IEquatable +public ref class NotImplementedException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-nullreferenceexception-class.md b/docs/cppcx/platform-nullreferenceexception-class.md index c5924402c2..4fd3153854 100644 --- a/docs/cppcx/platform-nullreferenceexception-class.md +++ b/docs/cppcx/platform-nullreferenceexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::NullReferenceException Class" title: "Platform::NullReferenceException Class" +description: "Learn more about: Platform::NullReferenceException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::NullReferenceException", "VCCORLIB/Platform::NullReferenceException::NullReferenceException"] helpviewer_keywords: ["Platform::NullReferenceException"] -ms.assetid: be202577-d898-4716-83cd-e3556fe8a241 --- # Platform::NullReferenceException Class @@ -14,7 +13,7 @@ Thrown when there is an attempt to dereference a null object reference. ## Syntax ```cpp -public ref class NullReferenceException : COMException, IException, IPrintable, IEquatable +public ref class NullReferenceException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-object-class.md b/docs/cppcx/platform-object-class.md index eb270ad593..3964399163 100644 --- a/docs/cppcx/platform-object-class.md +++ b/docs/cppcx/platform-object-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::Object Class" title: "Platform::Object Class" +description: "Learn more about: Platform::Object Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::Object::Object", "VCCORLIB/Platform::Object::Equals", "VCCORLIB/Platform::Object::GetHashCode", "VCCORLIB/Platform::Object::ReferenceEquals", "VCCORLIB/Platform::ToString", "VCCORLIB/Platform::GetType"] helpviewer_keywords: ["Object class"] -ms.assetid: 709e84a8-0bff-471b-bc14-63e424080b5a --- # Platform::Object Class @@ -104,7 +103,7 @@ A [Platform::Type](../cppcx/platform-type-class.md) object that describes the ru The static [Type::GetTypeCode](../cppcx/platform-type-class.md#gettypecode) can be used to get a [Platform::TypeCode Enumeration](../cppcx/platform-typecode-enumeration.md) value that represents the current type. This is mostly useful for built-in types. The type code for any ref class besides [Platform::String](../cppcx/platform-string-class.md) is Object (1). -The [Windows::UI::Xaml::Interop::TypeName](/uwp/api/windows.ui.xaml.interop.typename) class is used in the Windows APIs as a language-independent way of passing type information between Windows components and apps. The T[Platform::Type Class](../cppcx/platform-type-class.md) has operators for converting between `Type` and `TypeName`. +The [Windows::UI::Xaml::Interop::TypeName](/uwp/api/windows.ui.xaml.interop.typename) class is used in the Windows APIs as a language-independent way of passing type information between Windows components and apps. The [Platform::Type Class](../cppcx/platform-type-class.md) has operators for converting between `Type` and `TypeName`. Use the [typeid](../extensions/typeid-cpp-component-extensions.md) operator to return a `Platform::Type` object for a class name, for example when navigating between XAML pages: @@ -173,6 +172,6 @@ public: ## See also -[Platform Namespace](platform-namespace-c-cx.md)
-[Platform::Type Class](platform-type-class.md)
+[Platform Namespace](platform-namespace-c-cx.md)\ +[Platform::Type Class](platform-type-class.md)\ [Type System](type-system-c-cx.md) diff --git a/docs/cppcx/platform-objectdisposedexception-class.md b/docs/cppcx/platform-objectdisposedexception-class.md index 36f7004267..0d9a905551 100644 --- a/docs/cppcx/platform-objectdisposedexception-class.md +++ b/docs/cppcx/platform-objectdisposedexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::ObjectDisposedException Class" title: "Platform::ObjectDisposedException Class" +description: "Learn more about: Platform::ObjectDisposedException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::ObjectDisposedException", "VCCORLIB/Platform::ObjectDisposedException::ObjectDisposedException"] helpviewer_keywords: ["Platform::ObjectDisposedException"] -ms.assetid: 68506fe4-d09c-4407-999f-1e3edb261d41 --- # Platform::ObjectDisposedException Class @@ -14,7 +13,7 @@ Thrown when an operation is performed on a disposed object. ## Syntax ```cpp -public ref class ObjectDisposedException : COMException, IException, IPrintable, IEquatable +public ref class ObjectDisposedException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-operationcanceledexception-class.md b/docs/cppcx/platform-operationcanceledexception-class.md index 0ada6f4496..99ce0bc558 100644 --- a/docs/cppcx/platform-operationcanceledexception-class.md +++ b/docs/cppcx/platform-operationcanceledexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::OperationCanceledException Class" title: "Platform::OperationCanceledException Class" +description: "Learn more about: Platform::OperationCanceledException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::OperationCanceledException::OperationCanceledException", "VCCORLIB/Platform::OperationCanceledException"] helpviewer_keywords: ["Platform::OperationCanceledException"] -ms.assetid: 5351bc20-5408-423a-8169-f09acc8a3fbb --- # Platform::OperationCanceledException Class @@ -14,7 +13,7 @@ Thrown when an operation is aborted. ## Syntax ```cpp -public ref class OperationCanceledException : COMException, IException, IPrintable, IEquatable +public ref class OperationCanceledException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-outofboundsexception-class.md b/docs/cppcx/platform-outofboundsexception-class.md index d8a878c891..2bca3dbbac 100644 --- a/docs/cppcx/platform-outofboundsexception-class.md +++ b/docs/cppcx/platform-outofboundsexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::OutOfBoundsException Class" title: "Platform::OutOfBoundsException Class" +description: "Learn more about: Platform::OutOfBoundsException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::OutOfBoundsException", "VCCORLIB/Platform::OutOfBoundsException::OutOfBoundsException"] helpviewer_keywords: ["Platform::OutOfBoundsException"] -ms.assetid: 96f8bf75-1207-4049-964b-7771822cadf3 --- # Platform::OutOfBoundsException Class @@ -14,7 +13,7 @@ Thrown when an operation attempts to access data outside the valid range. ## Syntax ```cpp -public ref class OutOfBoundsException : COMException, IException, IPrintable, IEquatable +public ref class OutOfBoundsException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-outofmemoryexception-class.md b/docs/cppcx/platform-outofmemoryexception-class.md index bf36a9f791..486396cf6a 100644 --- a/docs/cppcx/platform-outofmemoryexception-class.md +++ b/docs/cppcx/platform-outofmemoryexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::OutOfMemoryException Class" title: "Platform::OutOfMemoryException Class" +description: "Learn more about: Platform::OutOfMemoryException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::OutOfMemoryException", "VCCORLIB/Platform::OutOfMemoryException::OutOfMemoryException"] helpviewer_keywords: ["Platform::OutOfMemoryException"] -ms.assetid: 49c19f6b-f66c-4448-b861-91dcbf32de2c --- # Platform::OutOfMemoryException Class @@ -14,7 +13,7 @@ Thrown when there's insufficient memory to complete the operation. ## Syntax ```cpp -public ref class OutOfMemoryException : COMException, IException, IPrintable, IEquatable +public ref class OutOfMemoryException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/platform-wrongthreadexception-class.md b/docs/cppcx/platform-wrongthreadexception-class.md index 79320770d5..33c5039914 100644 --- a/docs/cppcx/platform-wrongthreadexception-class.md +++ b/docs/cppcx/platform-wrongthreadexception-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Platform::WrongThreadException Class" title: "Platform::WrongThreadException Class" +description: "Learn more about: Platform::WrongThreadException Class" ms.date: "12/30/2016" ms.topic: "reference" f1_keywords: ["VCCORLIB/Platform::WrongThreadException", "VCCORLIB/Platform::WrongThreadException::WrongThreadException"] helpviewer_keywords: ["Platform::WrongThreadException"] -ms.assetid: c193f97e-0392-4535-a4c4-0711e4e4a836 --- # Platform::WrongThreadException Class @@ -14,7 +13,7 @@ Thrown when a thread calls by way of an interface pointer for a proxy object tha ## Syntax ```cpp -public ref class WrongThreadException : COMException, IException, IPrintable, IEquatable +public ref class WrongThreadException : COMException, IException, IPrintable, IEquatable ``` ### Remarks diff --git a/docs/cppcx/value-classes-and-structs-c-cx.md b/docs/cppcx/value-classes-and-structs-c-cx.md index 4c4cd2cdc8..55d9691754 100644 --- a/docs/cppcx/value-classes-and-structs-c-cx.md +++ b/docs/cppcx/value-classes-and-structs-c-cx.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Value classes and structs (C++/CX)" title: "Value classes and structs (C++/CX)" +description: "Learn more about: Value classes and structs (C++/CX)" ms.date: "12/30/2016" helpviewer_keywords: ["value struct", "value class"] -ms.assetid: 262a0992-9721-4c02-8297-efc07d90e5a4 --- # Value classes and structs (C++/CX) @@ -48,7 +47,7 @@ A value struct or value class can contain as fields only fundamental numeric typ A value class or value struct that contains a `Platform::String^` or `IBox^` type as a member is not `memcpy`-able. -Because all members of a **`value class`** or **`value struct`** are public and are emitted into metadata, standard C++ types are not allowed as members. This is different from ref classes, which may contain **`private`** or **`internal`** standard C++ types.. +Because all members of a **`value class`** or **`value struct`** are public and are emitted into metadata, standard C++ types are not allowed as members. This is different from ref classes, which may contain **`private`** or **`internal`** standard C++ types. The following code fragment declares the `Coordinates` and `City` types as value structs. Notice that one of the `City` data members is a `GeoCoordinates` type. A **`value struct`** can contain other value structs as members. @@ -140,7 +139,7 @@ public: ## See also -[Type System (C++/CX)](../cppcx/type-system-c-cx.md)
-[C++/CX Language Reference](../cppcx/visual-c-language-reference-c-cx.md)
-[Namespaces Reference](../cppcx/namespaces-reference-c-cx.md)
+[Type System (C++/CX)](../cppcx/type-system-c-cx.md)\ +[C++/CX Language Reference](../cppcx/visual-c-language-reference-c-cx.md)\ +[Namespaces Reference](../cppcx/namespaces-reference-c-cx.md)\ [Ref classes and structs (C++/CX)](../cppcx/ref-classes-and-structs-c-cx.md) diff --git a/docs/cppcx/wrl/module-class.md b/docs/cppcx/wrl/module-class.md index e228f5e864..3cefc4e6d7 100644 --- a/docs/cppcx/wrl/module-class.md +++ b/docs/cppcx/wrl/module-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Module Class" title: "Module Class" -ms.date: "10/18/2018" +description: "Learn more about: Module Class" +ms.date: 10/18/2018 ms.topic: "reference" f1_keywords: ["module/Microsoft::WRL::Module", "module/Microsoft::WRL::Module::Create", "module/Microsoft::WRL::Module::DecrementObjectCount", "module/Microsoft::WRL::Module::GetActivationFactory", "module/Microsoft::WRL::Module::GetClassObject", "module/Microsoft::WRL::Module::GetModule", "module/Microsoft::WRL::Module::GetObjectCount", "module/Microsoft::WRL::Module::IncrementObjectCount", "module/Microsoft::WRL::Module::Module", "module/Microsoft::WRL::Module::objectCount_Data", "module/Microsoft::WRL::Module::RegisterCOMObject", "module/Microsoft::WRL::Module::RegisterObjects", "module/Microsoft::WRL::Module::RegisterWinRTObject", "module/Microsoft::WRL::Module::releaseNotifier_", "module/Microsoft::WRL::Module::Terminate", "module/Microsoft::WRL::Module::~Module", "module/Microsoft::WRL::Module::UnregisterCOMObject", "module/Microsoft::WRL::Module::UnregisterObjects", "module/Microsoft::WRL::Module::UnregisterWinRTObject"] helpviewer_keywords: ["Microsoft::WRL::Module class", "Microsoft::WRL::Module::Create method", "Microsoft::WRL::Module::DecrementObjectCount method", "Microsoft::WRL::Module::GetActivationFactory method", "Microsoft::WRL::Module::GetClassObject method", "Microsoft::WRL::Module::GetModule method", "Microsoft::WRL::Module::GetObjectCount method", "Microsoft::WRL::Module::IncrementObjectCount method", "Microsoft::WRL::Module::Module, constructor", "Microsoft::WRL::Module::objectCount_ data member", "Microsoft::WRL::Module::RegisterCOMObject method", "Microsoft::WRL::Module::RegisterObjects method", "Microsoft::WRL::Module::RegisterWinRTObject method", "Microsoft::WRL::Module::releaseNotifier_ data member", "Microsoft::WRL::Module::Terminate method", "Microsoft::WRL::Module::~Module, destructor", "Microsoft::WRL::Module::UnregisterCOMObject method", "Microsoft::WRL::Module::UnregisterObjects method", "Microsoft::WRL::Module::UnregisterWinRTObject method"] -ms.assetid: dd67e3b8-c2e1-4f53-8c0f-565a140ba649 --- # Module Class @@ -396,7 +395,7 @@ Unregisters one or more COM objects, which prevents other applications from conn virtual HRESULT UnregisterCOMObject( const wchar_t* serverName, DWORD* cookies, - unsigned int count + unsigned int count); ``` ### Parameters diff --git a/docs/cppcx/wrl/walkthrough-creating-a-windows-store-app-using-wrl-and-media-foundation.md b/docs/cppcx/wrl/walkthrough-creating-a-windows-store-app-using-wrl-and-media-foundation.md index a4f29be142..5ec81ffc80 100644 --- a/docs/cppcx/wrl/walkthrough-creating-a-windows-store-app-using-wrl-and-media-foundation.md +++ b/docs/cppcx/wrl/walkthrough-creating-a-windows-store-app-using-wrl-and-media-foundation.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Creating a UWP app using WRL and Media Foundation" title: "Walkthrough: Creating a UWP app using WRL and Media Foundation" +description: "Learn more about: Creating a UWP app using WRL and Media Foundation" ms.date: 04/15/2021 ms.topic: "reference" --- @@ -37,7 +37,7 @@ You can usually use C++/CX to create Windows Runtime components. However, someti - The `namespace` and `runtimeclass` attributes, and the `NTDDI_WIN8` [version](/windows/win32/Midl/version) attribute value are important parts of the MIDL definition for a Media Foundation component that uses WRL. -- [`Microsoft::WRL::RuntimeClass`](runtimeclass-class.md) is the base class for the custom Media Foundation component. The [`Microsoft::WRL::RuntimeClassType::WinRtClassicComMix]`(runtimeclasstype-enumeration.md) enum value, which is provided as a template argument, marks the class for use both as a Windows Runtime class and as a classic COM runtime class. +- [`Microsoft::WRL::RuntimeClass`](runtimeclass-class.md) is the base class for the custom Media Foundation component. The [`Microsoft::WRL::RuntimeClassType::WinRtClassicComMix`](runtimeclasstype-enumeration.md) enum value, which is provided as a template argument, marks the class for use both as a Windows Runtime class and as a classic COM runtime class. - The [`InspectableClass`](inspectableclass-macro.md) macro implements basic COM functionality such as reference counting and the `QueryInterface` method, and sets the runtime class name and trust level. diff --git a/docs/cross-platform/build-an-opengl-es-application-on-android-and-ios.md b/docs/cross-platform/build-an-opengl-es-application-on-android-and-ios.md index 43deedc3b7..bb6cc8a0cd 100644 --- a/docs/cross-platform/build-an-opengl-es-application-on-android-and-ios.md +++ b/docs/cross-platform/build-an-opengl-es-application-on-android-and-ios.md @@ -21,7 +21,7 @@ To build and test the iOS app, you'll need a Mac computer. Set it up according t ## Create a new OpenGLES Application project -In this tutorial, you first create a new OpenGL ES Application project. and then build and run the default app in an Android emulator. Next you build the app for iOS and run the app on an iOS device. +In this tutorial, you first create a new OpenGL ES Application project and then build and run it in an Android emulator. Next you build the app for iOS and run the app on an iOS device. ::: moniker range="msvc-150" @@ -53,7 +53,7 @@ In this tutorial, you first create a new OpenGL ES Application project. and then ::: moniker-end -The new OpenGL ES Application solution includes three library projects and two application projects. The Libraries folder includes a shared code project. And, two platform-specific projects that reference the shared code: +The new OpenGL ES Application solution includes three library projects and two application projects. The Libraries folder includes a shared code project, and two platform-specific projects that reference the shared code: - `MyOpenGLESApp.Android.NativeActivity` contains the references and glue code that implements your app as a Native Activity on Android. The entry points from the glue code are implemented in *main.cpp*, which includes the common shared code in `MyOpenGLESApp.Shared`. Precompiled headers are in *pch.h*. This Native Activity app project is compiled into a shared library (*.so*) file, which is picked up by the `MyOpenGLESApp.Android.Packaging` project. diff --git a/docs/cross-platform/media/cppmdd-options-ios-new.png b/docs/cross-platform/media/cppmdd-options-ios-new.png index de5661cf55..4a79c5d200 100644 Binary files a/docs/cross-platform/media/cppmdd-options-ios-new.png and b/docs/cross-platform/media/cppmdd-options-ios-new.png differ diff --git a/docs/data/changes-you-might-make-to-the-default-code-mfc-data-access.md b/docs/data/changes-you-might-make-to-the-default-code-mfc-data-access.md index e2555def69..d524c7ae40 100644 --- a/docs/data/changes-you-might-make-to-the-default-code-mfc-data-access.md +++ b/docs/data/changes-you-might-make-to-the-default-code-mfc-data-access.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Changes You Might Make to the Default Code (MFC Data Access)" title: "Changes You Might Make to the Default Code (MFC Data Access)" +description: "Learn more about: Changes You Might Make to the Default Code (MFC Data Access)" ms.date: "11/04/2016" helpviewer_keywords: ["record views [C++], customizing default code"] -ms.assetid: 9992ed37-a6bf-45a5-a572-5c14e42b6628 --- # Changes You Might Make to the Default Code (MFC Data Access) @@ -13,7 +12,7 @@ The [MFC Application Wizard](../mfc/reference/database-support-mfc-application-w - Parameterize the recordset. Specify the actual run-time parameter value after the filter. For more information, see [Recordset: Parameterizing a Recordset (ODBC)](../data/odbc/recordset-parameterizing-a-recordset-odbc.md) -- Pass a customized SQL string to the [Open](../mfc/reference/crecordset-class.md#open) member function. For a discussion of what you can accomplish with this technique , see [SQL: Customizing Your Recordset's SQL Statement (ODBC)](../data/odbc/sql-customizing-your-recordsets-sql-statement-odbc.md). +- Pass a customized SQL string to the [Open](../mfc/reference/crecordset-class.md#open) member function. For a discussion of what you can accomplish with this technique, see [SQL: Customizing Your Recordset's SQL Statement (ODBC)](../data/odbc/sql-customizing-your-recordsets-sql-statement-odbc.md). ## See also diff --git a/docs/data/data-access-in-cpp.md b/docs/data/data-access-in-cpp.md index 9ac4a72755..30bf416352 100644 --- a/docs/data/data-access-in-cpp.md +++ b/docs/data/data-access-in-cpp.md @@ -31,7 +31,7 @@ Connect to Azure SQL Database from C or C++ applications. [Azure Storage](/azure/storage/common/storage-introduction) is a cloud storage solution for modern applications that rely on durability, availability, and scalability to meet the needs of their customers. Connect to Azure Storage from C++ by using the Azure Storage Client Library for C++. [ODBC Driver for SQL Server](/sql/connect/odbc/microsoft-odbc-driver-for-sql-server)
-The latest ODBC driver provides robust data access to Microsoft SQL Server and Microsoft Azure SQL Database for C/C++ based applications. Provides support for features including always encrypted, Azure Active Directory, and AlwaysOn Availability Groups. Also available for MacOS and Linux. +The latest ODBC driver provides robust data access to Microsoft SQL Server and Microsoft Azure SQL Database for C/C++ based applications. Provides support for features including always encrypted, Azure Active Directory, and AlwaysOn Availability Groups. Also available for macOS and Linux. [OLE DB Driver for SQL Server](/sql/connect/oledb/oledb-driver-for-sql-server)
The latest OLE DB driver is a stand-alone data access application programming interface (API) that supports Microsoft SQL Server and Microsoft Azure SQL Database. diff --git a/docs/data/odbc/odbc-and-mfc.md b/docs/data/odbc/odbc-and-mfc.md index 5f25751635..8a647cef02 100644 --- a/docs/data/odbc/odbc-and-mfc.md +++ b/docs/data/odbc/odbc-and-mfc.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: ODBC and MFC" title: "ODBC and MFC" +description: "Learn more about: ODBC and MFC" ms.date: "11/04/2016" helpviewer_keywords: ["ODBC [C++], MFC", "connections [C++], databases", "connections [C++], data source", "databases [C++], connecting to", "data sources [C++], connecting to", "MFC [C++], ODBC and", "database connections [C++], MFC ODBC classes"] -ms.assetid: 98f02fd7-1235-437b-89a9-edfd0fc797f7 --- # ODBC and MFC > [!NOTE] -> To use the MFC database classes, you must have the appropriate ODBC driver for your data source. The lastest Microsoft ODBC driver for SQL Server is [Microsoft ODBC Driver 13 for SQL Server](https://www.microsoft.com/download/details.aspx?id=50420). Most database vendors provide an ODBC driver for Windows. +> To use the MFC database classes, you must have the appropriate ODBC driver for your data source. The lastest Microsoft ODBC driver for SQL Server is [Microsoft ODBC Driver 18 for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server). Most database vendors provide an ODBC driver for Windows. This topic introduces the main concepts of the Microsoft Foundation Classes (MFC) library's ODBC-based database classes and provides an overview of how the classes work together. For more information about ODBC and MFC, see the following topics: diff --git a/docs/data/oledb/cdbpropset-class.md b/docs/data/oledb/cdbpropset-class.md index 9086c09dde..858162faf3 100644 --- a/docs/data/oledb/cdbpropset-class.md +++ b/docs/data/oledb/cdbpropset-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CDBPropSet Class" title: "CDBPropSet Class" +description: "Learn more about: CDBPropSet Class" ms.date: "11/04/2016" f1_keywords: ["CDBPropSet", "ATL.CDBPropSet", "ATL::CDBPropSet", "CDBPropSet::AddProperty", "CDBPropSet.AddProperty", "AddProperty", "ATL::CDBPropSet::AddProperty", "ATL.CDBPropSet.AddProperty", "CDBPropSet.CDBPropSet", "CDBPropSet::CDBPropSet", "ATL::CDBPropSet::CDBPropSet", "ATL.CDBPropSet.CDBPropSet", "CDBPropSet.operator=", "ATL::CDBPropSet::operator=", "ATL.CDBPropSet.operator=", "CDBPropSet::operator=", "ATL.CDBPropSet.SetGUID", "CDBPropSet.SetGUID", "ATL::CDBPropSet::SetGUID", "CDBPropSet::SetGUID"] helpviewer_keywords: ["CDBPropSet class", "AddProperty method", "CDBPropSet class, constructor", "operator =, property sets", "= operator, with OLE DB templates", "operator=, property sets", "SetGUID method", "AddProperty method"] -ms.assetid: 54190149-c277-4679-b81a-ef484d4d1c00 --- # CDBPropSet Class @@ -144,8 +143,8 @@ CDBPropSet& operator =(CDBPropSet& propset) throw(); ## See also -[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
-[OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md)
-[CDBPropIDSet Class](../../data/oledb/cdbpropidset-class.md)
-[DBPROPSET Structure](/previous-versions/windows/desktop/ms714367(v=vs.85)) +[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)\ +[OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md)\ +[CDBPropIDSet Class](../../data/oledb/cdbpropidset-class.md)\ +[DBPROPSET Structure](/previous-versions/windows/desktop/ms714367(v=vs.85))\ [DBPROP Structure](/previous-versions/windows/desktop/ms717970(v=vs.85)) diff --git a/docs/data/oledb/crowset-class.md b/docs/data/oledb/crowset-class.md index d64fd3ebc5..d42f6d0f81 100644 --- a/docs/data/oledb/crowset-class.md +++ b/docs/data/oledb/crowset-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CRowset Class" title: "CRowset Class" +description: "Learn more about: CRowset Class" ms.date: "11/04/2016" f1_keywords: ["ATL.CRowset", "CRowset", "ATL::CRowset", "ATL::CRowset", "ATL.CRowset", "CRowset.AddRefRows", "CRowset.AddRefRows", "ATL.CRowset.AddRefRows", "AddRefRows", "CRowset::AddRefRows", "CRowset::AddRefRows", "ATL::CRowset::AddRefRows", "ATL.CRowset.AddRefRows", "ATL::CRowset::AddRefRows", "CRowset::Close", "ATL.CRowset.Close", "CRowset::Close", "CRowset.Close", "ATL.CRowset.Close", "ATL::CRowset::Close", "ATL::CRowset::Close", "CRowset.Close", "CRowset.Compare", "CRowset::Compare", "ATL.CRowset.Compare", "ATL::CRowset::Compare", "CRowset.Compare", "ATL::CRowset::Compare", "ATL.CRowset.Compare", "CRowset::Compare", "CRowset::CRowset", "CRowset.CRowset", "ATL::CRowset::CRowset", "ATL::CRowset::CRowset", "ATL.CRowset.CRowset", "CRowset.CRowset", "CRowset::CRowset", "ATL.CRowset.CRowset", "ATL::CRowset::Delete", "CRowset.Delete", "CRowset::Delete", "ATL.CRowset.Delete", "ATL::CRowset::Delete", "CRowset.Delete", "CRowset::Delete", "ATL.CRowset.Delete", "ATL.CRowset.FindNextRow", "CRowset.FindNextRow", "ATL::CRowset::FindNextRow", "CRowset::FindNextRow", "CRowset::FindNextRow", "CRowset.FindNextRow", "ATL.CRowset.FindNextRow", "ATL::CRowset::FindNextRow", "FindNextRow", "ATL::CRowset::GetApproximatePosition", "ATL::CRowset::GetApproximatePosition", "CRowset.GetApproximatePosition", "CRowset::GetApproximatePosition", "GetApproximatePosition", "ATL.CRowset.GetApproximatePosition", "CRowset::GetApproximatePosition", "CRowset::GetData", "ATL::CRowset::GetData", "ATL::CRowset::GetData", "ATL.CRowset.GetData", "CRowset.GetData", "CRowset::GetData", "CRowset.GetData", "ATL.CRowset.GetData", "CRowset::GetDataHere", "CRowset.GetDataHere", "CRowset.GetDataHere", "GetDataHere", "CRowset::GetDataHere", "ATL::CRowset::GetDataHere", "ATL::CRowset::GetDataHere", "ATL.CRowset.GetDataHere", "ATL.CRowset.GetDataHere", "ATL.CRowset.GetOriginalData", "CRowset::GetOriginalData", "ATL::CRowset::GetOriginalData", "ATL.CRowset.GetOriginalData", "CRowset::GetOriginalData", "ATL::CRowset::GetOriginalData", "CRowset.GetOriginalData", "CRowset.GetRowStatus", "ATL.CRowset.GetRowStatus", "ATL::CRowset::GetRowStatus", "CRowset::GetRowStatus", "ATL::CRowset::GetRowStatus", "CRowset::GetRowStatus", "ATL.CRowset.GetRowStatus", "CRowset.GetRowStatus", "ATL.CRowset.Insert", "CRowset.Insert", "CRowset.Insert", "CRowset::Insert", "ATL::CRowset::Insert", "ATL.CRowset.Insert", "CRowset::Insert", "ATL::CRowset::Insert", "CRowset::IsSameRow", "CRowset.IsSameRow", "ATL::CRowset::IsSameRow", "ATL.CRowset.IsSameRow", "CRowset::IsSameRow", "ATL.CRowset.IsSameRow", "CRowset.IsSameRow", "ATL::CRowset::IsSameRow", "CRowset::MoveFirst", "ATL::CRowset::MoveFirst", "CRowset.MoveFirst", "CRowset::MoveFirst", "CRowset.MoveFirst", "ATL.CRowset.MoveFirst", "ATL.CRowset.MoveFirst", "ATL::CRowset::MoveFirst", "ATL::CRowset::MoveLast", "CRowset::MoveLast", "ATL.CRowset.MoveLast", "ATL::CRowset::MoveLast", "CRowset.MoveLast", "CRowset::MoveLast", "ATL.CRowset.MoveLast", "CRowset.MoveLast", "ATL.CRowset.MoveNext", "ATL.CRowset.MoveNext", "ATL::CRowset::MoveNext", "CRowset.MoveNext", "CRowset.MoveNext", "CRowset::MoveNext", "CRowset::MoveNext", "ATL::CRowset::MoveNext", "CRowset.MovePrev", "CRowset.MovePrev", "CRowset::MovePrev", "ATL.CRowset.MovePrev", "ATL::CRowset::MovePrev", "ATL::CRowset::MovePrev", "ATL.CRowset.MovePrev", "CRowset::MovePrev", "ATL::CRowset::MoveToBookmark", "ATL::CRowset::MoveToBookmark", "ATL.CRowset.MoveToBookmark", "ATL.CRowset.MoveToBookmark", "CRowset::MoveToBookmark", "CRowset.MoveToBookmark", "CRowset::MoveToBookmark", "CRowset::MoveToRatio", "CRowset::MoveToRatio", "CRowset.MoveToRatio", "ATL.CRowset.MoveToRatio", "ATL::CRowset::MoveToRatio", "CRowset.MoveToRatio", "ATL.CRowset.MoveToRatio", "ATL::CRowset::MoveToRatio", "CRowset::ReleaseRows", "ATL::CRowset::ReleaseRows", "CRowset.ReleaseRows", "CRowset.ReleaseRows", "ATL.CRowset.ReleaseRows", "ATL.CRowset.ReleaseRows", "CRowset::ReleaseRows", "ATL::CRowset::ReleaseRows", "ATL.CRowset.SetData", "ATL::CRowset::SetData", "CRowset.SetData", "CRowset::SetData", "ATL.CRowset.SetData", "CRowset.SetData", "CRowset::SetData", "ATL::CRowset::SetData", "CRowset.Undo", "ATL::CRowset::Undo", "CRowset::Undo", "ATL.CRowset.Undo", "ATL.CRowset.Undo", "CRowset.Undo", "ATL::CRowset::Undo", "CRowset::Undo", "Undo", "CRowset.Update", "ATL.CRowset.Update", "ATL.CRowset.Update", "ATL::CRowset::Update", "CRowset::Update", "CRowset::Update", "CRowset.Update", "ATL::CRowset::Update", "CRowset::UpdateAll", "ATL.CRowset.UpdateAll", "CRowset.UpdateAll", "ATL.CRowset.UpdateAll", "UpdateAll", "CRowset.UpdateAl", "ATL::CRowset::UpdateAll", "CRowset::UpdateAll", "ATL::CRowset::UpdateAll"] helpviewer_keywords: ["CRowset class", "AddRefRows method", "Close method", "Compare method", "CRowset class, constructor", "Delete method", "FindNextRow method", "GetApproximatePosition method", "GetData method [OLE DB]", "GetDataHere method", "GetOriginalData method", "GetRowStatus method", "Insert method", "IsSameRow method", "MoveFirst method", "MoveLast method", "MoveNext method", "MovePrev method", "MoveToBookmark method", "MoveToRatio method", "ReleaseRows method", "SetData method", "Undo method", "Update method", "UpdateAll method"] -ms.assetid: b0228a90-b8dd-47cc-b397-8d4c15c1e7f4 --- # CRowset Class @@ -19,7 +18,7 @@ class CRowset ### Parameters -*TAccessor*
+*TAccessor*\ An accessor class. The default is `CAccessorBase`. ## Requirements @@ -36,14 +35,14 @@ An accessor class. The default is `CAccessorBase`. |[Close](#close)|Releases rows and the current `IRowset` interface.| |[Compare](#compare)|Compares two bookmarks using [IRowsetLocate::Compare](/previous-versions/windows/desktop/ms709539(v=vs.85)).| |[CRowset](#crowset)|Creates a new `CRowset` object and (optionally) associates it with an `IRowset` interface supplied as a parameter.| -|[Delete](#delete)|Deletes rows from the rowset using [IRowsetChange:DeleteRows](/previous-versions/windows/desktop/ms724362(v=vs.85)).| +|[Delete](#delete)|Deletes rows from the rowset using [IRowsetChange::DeleteRows](/previous-versions/windows/desktop/ms724362(v=vs.85)).| |[FindNextRow](#findnextrow)|Finds the next matching row after the specified bookmark.| |[GetApproximatePosition](#getapproximateposition)|Returns the approximate position of a row corresponding to a bookmark.| |[GetData](#getdata)|Retrieves data from the rowset's copy of the row.| |[GetDataHere](#getdatahere)|Retrieves data from the specified buffer.| |[GetOriginalData](#getoriginaldata)|Retrieves the data most recently fetched from or transmitted to the data source, ignoring pending changes.| |[GetRowStatus](#getrowstatus)|Returns the status of all rows.| -|[Insert](#insert)|Creates and inserts a new row using [IRowsetChange:InsertRow](/previous-versions/windows/desktop/ms716921(v=vs.85)).| +|[Insert](#insert)|Creates and inserts a new row using [IRowsetChange::InsertRow](/previous-versions/windows/desktop/ms716921(v=vs.85)).| |[IsSameRow](#issamerow)|Compares the specified row with the current row.| |[MoveFirst](#movefirst)|Repositions the next-fetch location to the initial position.| |[MoveLast](#movelast)|Moves to the last record.| @@ -52,7 +51,7 @@ An accessor class. The default is `CAccessorBase`. |[MoveToBookmark](#movetobookmark)|Fetches the row marked by a bookmark or the row at a specified offset from that bookmark.| |[MoveToRatio](#movetoratio)|Fetches rows starting from a fractional position in the rowset.| |[ReleaseRows](#releaserows)|Calls [IRowset::ReleaseRows](/previous-versions/windows/desktop/ms719771(v=vs.85)) to release the current row handle.| -|[SetData](#setdata)|Sets data values in one or more columns of a row using [IRowsetChange:SetData](/previous-versions/windows/desktop/ms721232(v=vs.85)).| +|[SetData](#setdata)|Sets data values in one or more columns of a row using [IRowsetChange::SetData](/previous-versions/windows/desktop/ms721232(v=vs.85)).| |[Undo](#undo)|Undoes any changes made to a row since the last fetch or [Update](#update).| |[Update](#update)|Transmits any pending changes made to the current row since the last fetch or update.| |[UpdateAll](#updateall)|Transmits any pending changes made to all rows since the last fetch or update.| @@ -109,13 +108,13 @@ HRESULT Compare(const CBookmarkBase& bookmark1, #### Parameters -*Bookmark1*
+*Bookmark1*\ [in] The first bookmark to compare. -*Bookmark2*
+*Bookmark2*\ [in] The second bookmark to compare. -*pComparison*
+*pComparison*\ [out] A pointer to the result of the comparison. ### Return Value @@ -142,7 +141,7 @@ CRowset(IRowset* pRowset); #### Parameters -*pRowset*
+*pRowset*\ [in] A pointer to an `IRowset` interface to be associated with this class. ## CRowset::Delete @@ -178,28 +177,28 @@ HRESULT FindNextRow(DBCOMPAREOP op, #### Parameters -*op*
+*op*\ [in] The operation to use in comparing row values. For values, see [IRowsetFind::FindNextRow](/previous-versions/windows/desktop/ms723091(v=vs.85)). -*pData*
+*pData*\ [in] A pointer to the value to be matched. -*wType*
+*wType*\ [in] Indicates the data type of the value part of the buffer. For information about type indicators, see [Data Types](/previous-versions/windows/desktop/ms723969(v=vs.85)) in the *OLE DB Programmer's Reference* in the Windows SDK. -*nLength*
+*nLength*\ [in] The length, in bytes, of the consumer data structure allocated for the data value. For details, see the description of `cbMaxLen` in [DBBINDING Structures](/previous-versions/windows/desktop/ms716845(v=vs.85)) in the *OLE DB Programmer's Reference.* -*bPrecision*
+*bPrecision*\ [in] The maximum precision used when getting data. Used only if *wType* is DBTYPE_NUMERIC. For more information, see [Conversions involving DBTYPE_NUMERIC or DBTYPE_DECIMAL](/previous-versions/windows/desktop/ms719714(v=vs.85)) in the *OLE DB Programmer's Reference*. -*bScale*
+*bScale*\ [in] The scale used when getting data. Used only if *wType* is DBTYPE_NUMERIC or DBTYPE_DECIMAL. For more information, see [Conversions involving DBTYPE_NUMERIC or DBTYPE_DECIMAL](/previous-versions/windows/desktop/ms719714(v=vs.85)) in the *OLE DB Programmer's Reference*. -*bSkipCurrent*
+*bSkipCurrent*\ [in] The number of rows from the bookmark at which to start a search. -*pBookmark*
+*pBookmark*\ [in] The bookmark for position at which to start a search. ### Return Value @@ -226,13 +225,13 @@ HRESULT GetApproximatePosition(const CBookmarkBase* pBookmark, #### Parameters -*pBookmark*
+*pBookmark*\ [in] A pointer to a bookmark that identifies the row whose position is to be found. NULL if only the row count is required. -*pPosition*
+*pPosition*\ [out] A pointer to the location where `GetApproximatePosition` returns the position of the row. NULL if the position is not required. -*pcRows*
+*pcRows*\ [out] A pointer to the location where `GetApproximatePosition` returns the total number of rows. NULL if the row count is not required. ### Return Value @@ -259,7 +258,7 @@ HRESULT GetData(int nAccessor) throw(); #### Parameters -*nAccessor*
+*nAccessor*\ [in] The (zero-offset) index number of the accessor to use for accessing the data. ### Return Value @@ -283,10 +282,10 @@ HRESULT GetDataHere(int nAccessor, #### Parameters -*nAccessor*
+*nAccessor*\ [in] The index number of the accessor to use for accessing the data. -*pBuffer*
+*pBuffer*\ [out] A buffer into which to place the data for the current record. ### Return Value @@ -329,7 +328,7 @@ HRESULT GetRowStatus(DBPENDINGSTATUS* pStatus) const throw(); #### Parameters -*pStatus*
+*pStatus*\ [out] A pointer to a location where `GetRowStatus` returns the status value. See DBPENDINGSTATUS in the OLE DB Programmer's Reference. ### Return Value @@ -353,10 +352,10 @@ HRESULT Insert(int nAccessor = 0, #### Parameters -*nAccessor*
+*nAccessor*\ [in] The number of the accessor to use for inserting the data. -*bGetHRow*
+*bGetHRow*\ [in] Indicates whether the handle for the inserted row is retrieved. ### Return Value @@ -389,7 +388,7 @@ HRESULT IsSameRow(HROW hRow) const throw(); #### Parameters -*hRow*
+*hRow*\ [in] A handle to the row to compare to the current row. ### Return Value @@ -449,10 +448,10 @@ HRESULT MoveNext(LONG lSkip, #### Parameters -*lSkip*
+*lSkip*\ [in] The number of rows to skip before fetching. -*bForward*
+*bForward*\ [in] Pass **`true`** to move forward to the next record, **`false`** to move backward. ### Return Value @@ -502,10 +501,10 @@ HRESULT MoveToBookmark(const CBookmarkBase& bookmark, #### Parameters -*bookmark*
+*bookmark*\ [in] A bookmark marking the location from which you want to fetch data. -*lSkip*
+*lSkip*\ [in] The number count of rows from the bookmark to the target row. If *lSkip* is zero, the first row fetched is the bookmarked row. If *lSkip* is 1, the first row fetched is the row after the bookmarked row. If *lSkip* is -1, the first row fetched is the row before the bookmarked row. ### Return Value @@ -531,13 +530,13 @@ HRESULT MoveToRatio(DBCOUNTITEM nNumerator, #### Parameters -*nNumerator*
+*nNumerator*\ [in] The numerator used to determine the fractional positional from which to fetch data. -*nDenominator*
+*nDenominator*\ [in] The denominator used to determine the fractional positional from which to fetch data. -*bForward*
+*bForward*\ [in] Indicates whether to move forward or backward. The default is forward. ### Return Value @@ -582,7 +581,7 @@ HRESULT SetData(int nAccessor) const throw(); #### Parameters -*nAccessor*
+*nAccessor*\ [in] The number of the accessor to use for accessing the data. ### Return Value @@ -611,13 +610,13 @@ HRESULT Undo(DBCOUNTITEM* pcRows = NULL, #### Parameters -*pcRows*
+*pcRows*\ [out] A pointer to the location where `Undo` returns the number of rows it attempted to undo if required. -*phRow*
+*phRow*\ [out] A pointer to the location where `Undo` returns an array of handles to all rows it attempted to undo if required. -*pStatus*
+*pStatus*\ [out] A pointer to the location where `Undo` returns the row status value. No status is returned if *pStatus* is null. ### Return Value @@ -642,13 +641,13 @@ HRESULT Update(DBCOUNTITEM* pcRows = NULL, #### Parameters -*pcRows*
+*pcRows*\ [out] A pointer to the location where `Update` returns the number of rows it attempted to update, if required. -*phRow*
+*phRow*\ [out] A pointer to the location where `Update` returns the handle of the row it attempted to update. No handle is returned if *phRow* is null. -*pStatus*
+*pStatus*\ [out] A pointer to the location where `Update` returns the row status value. No status is returned if *pStatus* is null. ### Return Value @@ -675,13 +674,13 @@ HRESULT UpdateAll(DBCOUNTITEM* pcRows = NULL, #### Parameters -*pcRows*
+*pcRows*\ [out] A pointer to the location where `UpdateAll` returns the number of rows it attempted to update, if required. -*pphRow*
+*pphRow*\ [out] A pointer to memory in which `UpdateAll` returns the handle of the row it attempted to update. No handle is returned if *pphRow* is null. -*ppStatus*
+*ppStatus*\ [out] A pointer to the location where `Update` returns the row status value. No status is returned if *ppStatus* is null. ### Remarks @@ -698,8 +697,8 @@ A standard HRESULT. ## See also -[DBViewer Sample](../../overview/visual-cpp-samples.md)
-[MultiRead Sample](../../overview/visual-cpp-samples.md)
-[MultiRead Attributes Sample](../../overview/visual-cpp-samples.md)
-[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
+[DBViewer Sample](../../overview/visual-cpp-samples.md)\ +[MultiRead Sample](../../overview/visual-cpp-samples.md)\ +[MultiRead Attributes Sample](../../overview/visual-cpp-samples.md)\ +[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)\ [OLE DB Consumer Templates Reference](../../data/oledb/ole-db-consumer-templates-reference.md) diff --git a/docs/data/oledb/irowsetlocateimpl-class.md b/docs/data/oledb/irowsetlocateimpl-class.md index 082de1f7b9..16872cbd1a 100644 --- a/docs/data/oledb/irowsetlocateimpl-class.md +++ b/docs/data/oledb/irowsetlocateimpl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: IRowsetLocateImpl Class" title: "IRowsetLocateImpl Class" +description: "Learn more about: IRowsetLocateImpl Class" ms.date: "11/04/2016" f1_keywords: ["IRowsetLocateImpl", "ATL.IRowsetLocateImpl.Compare", "IRowsetLocateImpl::Compare", "IRowsetLocateImpl.Compare", "ATL::IRowsetLocateImpl::Compare", "GetRowsAt", "IRowsetLocateImpl.GetRowsAt", "ATL::IRowsetLocateImpl::GetRowsAt", "IRowsetLocateImpl::GetRowsAt", "ATL.IRowsetLocateImpl.GetRowsAt", "IRowsetLocateImpl::GetRowsByBookmark", "IRowsetLocateImpl.GetRowsByBookmark", "GetRowsByBookmark", "IRowsetLocateImpl::Hash", "IRowsetLocateImpl.Hash", "m_rgBookmarks", "IRowsetLocateImpl::m_rgBookmarks", "ATL.IRowsetLocateImpl.m_rgBookmarks", "ATL::IRowsetLocateImpl::m_rgBookmarks", "IRowsetLocateImpl.m_rgBookmarks"] helpviewer_keywords: ["providers, bookmarks", "IRowsetLocateImpl class", "bookmarks, OLE DB", "Compare method", "GetRowsAt method", "GetRowsByBookmark method", "Hash method", "m_rgbookmarks"] -ms.assetid: a8aa3149-7ce8-4976-a680-2da193fd3234 --- # IRowsetLocateImpl Class @@ -202,8 +201,8 @@ CAtlArray m_rgBookmarks; ## See also -[OLE DB Provider Templates](../../data/oledb/ole-db-provider-templates-cpp.md)
-[OLE DB Provider Template Architecture](../../data/oledb/ole-db-provider-template-architecture.md)
-[IRowsetLocate:IRowset](/previous-versions/windows/desktop/ms721190(v=vs.85)) -[Provider Support for Bookmarks](../../data/oledb/provider-support-for-bookmarks.md)
+[OLE DB Provider Templates](../../data/oledb/ole-db-provider-templates-cpp.md)\ +[OLE DB Provider Template Architecture](../../data/oledb/ole-db-provider-template-architecture.md)\ +[IRowsetLocate:IRowset](/previous-versions/windows/desktop/ms721190(v=vs.85))\ +[Provider Support for Bookmarks](../../data/oledb/provider-support-for-bookmarks.md)\ [Bookmarks](/previous-versions/windows/desktop/ms709728(v=vs.85)) diff --git a/docs/data/oledb/irowsetnotifyimpl-class.md b/docs/data/oledb/irowsetnotifyimpl-class.md index 314202ddd9..8737941bcd 100644 --- a/docs/data/oledb/irowsetnotifyimpl-class.md +++ b/docs/data/oledb/irowsetnotifyimpl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: IRowsetNotifyImpl Class" title: "IRowsetNotifyImpl Class" +description: "Learn more about: IRowsetNotifyImpl Class" ms.date: "11/04/2016" f1_keywords: ["ATL.IRowsetNotifyImpl", "ATL::IRowsetNotifyImpl", "IRowsetNotifyImpl", "IRowsetNotifyImpl.OnFieldChange", "IRowsetNotifyImpl::OnFieldChange", "OnFieldChange", "IRowsetNotifyImpl::OnRowChange", "IRowsetNotifyImpl.OnRowChange", "OnRowChange", "OnRowsetChange", "IRowsetNotifyImpl::OnRowsetChange", "IRowsetNotifyImpl.OnRowsetChange"] helpviewer_keywords: ["IRowsetNotifyImpl class", "OnFieldChange method", "OnRowChange method", "OnRowsetChange method"] -ms.assetid: fbfd0cb2-38ff-4b42-899a-8de902f834b8 --- # IRowsetNotifyImpl Class @@ -121,6 +120,6 @@ This method wraps the [IRowsetNotify::OnRowsetChange](/previous-versions/windows ## See also -[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)
-[IRowsetNotify](/previous-versions/windows/desktop/ms712959(v=vs.85)) +[OLE DB Consumer Templates](../../data/oledb/ole-db-consumer-templates-cpp.md)\ +[IRowsetNotify](/previous-versions/windows/desktop/ms712959(v=vs.85))\ [IRowsetNotifyCP Class](../../data/oledb/irowsetnotifycp-class.md) diff --git a/docs/data/oledb/schema-rowset-classes-and-typedef-classes.md b/docs/data/oledb/schema-rowset-classes-and-typedef-classes.md index 574d95b2ac..f478250666 100644 --- a/docs/data/oledb/schema-rowset-classes-and-typedef-classes.md +++ b/docs/data/oledb/schema-rowset-classes-and-typedef-classes.md @@ -1,12 +1,9 @@ --- -description: "Learn more about: Schema Rowset Classes and Typedef Classes" title: "Schema Rowset Classes and Typedef Classes" -ms.date: "11/04/2016" +description: "Learn more about: Schema Rowset Classes and Typedef Classes" +ms.date: 11/04/2016 f1_keywords: ["CAssertionInfo", "CAssertions", "CCatalogInfo", "CCatalogs", "CCharacterSetInfo", "CCharacterSets", "CCheckConstraintInfo", "CCheckConstraints", "CCollationInfo", "CCollations", "CColumnDomainUsage", "CColumnDomainUsageInfo", "CColumnPrivilegeInfo", "CColumnPrivileges", "CColumns", "CColumnsInfo", "CConstraintColumnUsage", "CConstraintColumnUsageInfo", "CConstraintTableUsage", "CConstraintTableUsageInfo", "CForeignKeys", "CForeignKeysInfo", "CHARACTER_MAXIMUM_LENGTH", "CHARACTER_OCTET_LENGTH", "CHARACTER_SET_CATALOG", "CHARACTER_SET_NAME", "CHARACTER_SET_SCHEMA", "CHECK_CLAUSE", "CHECK_CONSTRAINTS", "CHECK_OPTION", "CIndexes", "CIndexInfo", "CKeyColumnInfo", "CKeyColumns", "CLUSTERED", "COLLATION", "COLLATION_CATALOG", "COLLATION_NAME", "COLLATION_SCHEMA", "COLLATIONS", "COLUMN_DEFAULT", "COLUMN_DOMAIN_USAGE", "COLUMN_FLAGS", "COLUMN_GUID", "COLUMN_HASDEFAULT", "COLUMN_PRIVILEGES", "COLUMN_PROPID", "COLUMN_SIZE", "CONSTRAINT_CATALOG", "CONSTRAINT_COLUMN_USAGE", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONSTRAINT_TABLE_USAGE", "CONSTRAINT_TYPE", "CPrimaryKeyInfo", "CPrimaryKeys", "CProcedureColumnInfo", "CProcedureColumns", "CProcedureInfo", "CProcedureParameters", "CProcedureParamInfo", "CProcedures", "CProviderInfo", "CProviderTypes", "CReferentialConstraintInfo", "CReferentialConstraints", "CSchemata", "CSchemataInfo", "CSQLLanguageInfo", "CSQLLanguages", "CStatisticInfo", "CStatistics", "CTableConstraintInfo", "CTableConstraints", "CTableInfo", "CTablePrivilegeInfo", "CTablePrivileges", "CTables", "CTranslationInfo", "CTranslations", "CUsagePrivilegeInfo", "CUsagePrivileges", "CViewColumnInfo", "CViewColumnUsage", "CViewInfo", "CViews", "CViewTableInfo", "CViewTableUsage", "DATA_TYPE", "DATETIME_PRECISION", "DEFAULT_CHARACTER_SET_CATALOG", "DEFAULT_CHARACTER_SET_NAME", "DEFAULT_CHARACTER_SET_SCHEMA", "DEFAULT_COLLATE_CATALOG", "DEFAULT_COLLATE_NAME", "DEFAULT_COLLATE_SCHEMA", "DELETE_RULE", "DOMAIN_CATALOG", "DOMAIN_NAME", "DOMAIN_SCHEMA", "FILL_FACTOR", "FILTER_CONDITION", "FIXED_PREC_SCALE", "FK_COLUMN_GUID", "FK_COLUMN_NAME", "FK_COLUMN_PROPID", "FK_TABLE_CATALOG", "FK_TABLE_NAME", "FK_TABLE_SCHEMA", "FORM_OF_USE", "GRANTEE", "GRANTOR", "INDEX_CATALOG", "INDEX_NAME", "INDEX_SCHEMA", "INITIAL_SIZE", "INITIALLY_DEFERRED", "IS_DEFERRABLE", "IS_GRANTABLE", "IS_LONG", "IS_NULLABLE", "IS_UPDATABLE", "LITERAL_SUFFIX", "LOCAL_TYPE_NAME", "m_bAutoUniqueValue", "m_bAutoUpdate", "m_bBestMatch", "m_bCaseSensitive", "m_bCheckOption", "m_bClustered", "m_bColumnHasDefault", "m_bFixedPrecScale", "m_bHasDefault", "m_bInitiallyDeferred", "m_bIsDeferrable", "m_bIsGrantable", "m_bIsLong", "m_bIsNullable", "m_bIsUpdatable", "m_bPrimaryKey", "m_bSortBookmarks", "m_bUnique", "m_bUnsignedAttribute", "m_guidColumn", "m_guidFKColumn", "m_guidPKColumn", "m_guidTable", "m_guidType", "m_nCardinality", "m_nCollation", "m_nColumnFlags", "m_nColumnPropID", "m_nColumnSize", "m_nDataType", "m_nDateTimePrecision", "m_nFillFactor", "m_nFKColumnPropID", "m_nInitialSize", "m_nMaxLength", "m_nMaxScale", "m_nNullCollation", "m_nNulls", "m_nNumCharacters", "m_nNumericPrecision", "m_nNumericScale", "m_nOctetLength", "m_nOrdinal", "m_nOrdinalPosition", "m_nPages", "m_nPKColumnPropID", "m_nPrecision", "m_nRowsetNumber", "m_nScale", "m_nSearchable", "m_szBindingStyle", "m_szCatalog", "m_szCharCatalog", "m_szCharName", "m_szCharSchema", "m_szCharSetCatalog", "m_szCharSetName", "m_szCharSetSchema", "m_szCheckClause", "m_szCollateCatalog", "m_szCollateName", "m_szCollateSchema", "m_szCollationCatalog", "m_szCollationName", "m_szCollationSchema", "m_szColumnDefault", "m_szColumnName", "m_szConformance", "m_szConstraintCatalog", "m_szConstraintName", "m_szConstraintSchema", "m_szCreateParams", "m_szDefault", "m_szDefinition", "m_szDeleteRule", "m_szDomainCatalog", "m_szDomainName", "m_szDomainSchema", "m_szFilterCondition", "m_szFKColumnName", "m_szFKTableCatalog", "m_szFKTableName", "m_szFKTableSchema", "m_szFormOfUse", "m_szGrantee", "m_szGrantor", "m_szImplementation", "m_szIndexCatalog", "m_szIndexName", "m_szIndexSchema", "m_szIntegrity", "m_szLiter alSuffix", "m_szLiteralPrefix", "m_szLocalTypeName", "m_szMatchOption", "m_szObjectCatalog", "m_szObjectName", "m_szObjectSchema", "m_szObjectType", "m_szOwner", "m_szPadAttribute", "m_szParameterName", "m_szPKColumnName", "m_szPKTableCatalog", "m_szPKTableName", "m_szPKTableSchema", "m_szPrivilegeType", "m_szProgrammingLanguage", "m_szSchema", "m_szSource", "m_szSourceCatalog", "m_szSourceName", "m_szSourceSchema", "m_szTableCatalog", "m_szTableName", "m_szTableSchema", "m_szTargetCatalog", "m_szTargetName", "m_szTargetSchema", "m_szType", "m_szTypeLib", "m_szTypeName", "m_szUniqueCatalog", "m_szUniqueName", "m_szUniqueSchema", "m_szUpdateRule", "m_szVersion", "m_szYear", "MATCH_OPTION", "MAXIMUM_SCALE", "MINIMUM_SCALE", "NULL_COLLATION", "NULLS", "NUMBER_OF_CHARACTERS", "NUMERIC_PRECISION", "NUMERIC_SCALE", "OBJECT_CATALOG", "OBJECT_NAME", "OBJECT_SCHEMA", "OBJECT_TYPE", "ORDINAL", "ORDINAL_POSITION", "TABLE_CATALOG", "TABLE_GUID", "TABLE_NAME", "TABLE_SCHEMA"] - - helpviewer_keywords: ["schema rowsets", "CAssertionInfo parameter class", "CAssertions typedef class", "CCatalogInfo parameter class", "CCatalogs typedef class", "CCharacterSetInfo parameter class", "CCharacterSets typedef class", "CCheckConstraintInfo parameter class", "CCheckConstraints typedef class", "CCollationInfo parameter class", "CCollations typedef class", "CColumnDomainUsage typedef class", "CColumnDomainUsageInfo parameter class", "CColumnPrivilegeInfo parameter class", "CColumnPrivileges typedef class", "CColumns typedef class", "CColumnsInfo parameter class", "CConstraintColumnUsage typedef class", "CConstraintColumnUsageInfo parameter class", "CConstraintTableUsage typedef class", "CConstraintTableUsageInfo parameter class", "CForeignKeys typedef class", "CForeignKeysInfo parameter class", "CHARACTER_MAXIMUM_LENGTH", "CHARACTER_OCTET_LENGTH", "CHARACTER_SET_CATALOG", "CHARACTER_SET_NAME", "CHARACTER_SET_SCHEMA", "CHECK_CLAUSE", "CHECK_CONSTRAINTS", "CHECK_OPTION", "CIndexes typedef class", "CIndexInfo parameter class", "CKeyColumnInfo parameter class", "CKeyColumns typedef class", "CLUSTERED", "COLLATION_CATALOG", "COLLATION_NAME", "COLLATION_SCHEMA", "COLLATIONS recordset", "COLUMN_DEFAULT", "COLUMN_DOMAIN_USAGE", "COLUMN_FLAGS", "COLUMN_GUID", "COLUMN_HASDEFAULT", "COLUMN_NAME", "COLUMN_PRIVILEGES", "COLUMN_PROPID", "CONSTRAINT_CATALOG", "CONSTRAINT_COLUMN_USAGE", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONSTRAINT_TABLE_USAGE", "CONSTRAINT_TYPE", "CPrimaryKeyInfo parameter class", "CPrimaryKeys typedef class", "CProcedureColumnInfo parameter class", "CProcedureColumns typedef class", "CProcedureInfo parameter class", "CProcedureParameters typedef class", "CProcedureParamInfo parameter class", "CProcedures typedef class", "CProviderInfo parameter class", "CProviderTypes typedef class", "CReferentialConstraintInfo parameter class", "CReferentialConstraints typedef class", "CSchemata typedef class", "CSchemataInfo parameter class", "CSQLLanguageInfo parameter class", "CSQLLanguages typedef class", "CStatisticInfo parameter class", "CStatistics typedef class", "CTableConstraintInfo parameter class", "CTableConstraints typedef class", "CTableInfo parameter class", "CTablePrivilegeInfo parameter class", "CTablePrivileges typedef class", "CTables typedef class", "CTranslationInfo parameter class", "CTranslations typedef class", "CUsagePrivilegeInfo parameter class", "CUsagePrivileges typedef class", "CViewColumnInfo parameter class", "CViewColumnUsage typedef class", "CViewInfo parameter class", "CViews typedef class", "CViewTableInfo parameter class", "CViewTableUsage typedef class", "DATA_TYPE", "DATETIME_PRECISION", "DEFAULT_CHARACTER_SET_CATALOG", "DEFAULT_CHARACTER_SET_NAME", "DEFAULT_CHARACTER_SET_SCHEMA", "DEFAULT_COLLATE_CATALOG", "DEFAULT_COLLATE_NAME", "DEFAULT_COLLATE_SCHEMA", "DELETE_RULE", "DESCRIPTION class data member", "DOMAIN_CATALOG", "DOMAIN_NAME", "DOMAIN_SCHEMA", "FILL_FACTOR", "FILTER_CONDITION", "FIXED_PREC_SCALE", "FK_COLUMN_GUID", "FK_COLUMN_NAME", "FK_COLUMN_PROPID", "FK_TABLE_CATALOG", "FK_TABLE_NAME", "FK_TABLE_SCHEMA", "FORM_OF_USE OLE DB column", "GRANTEE", "GRANTOR", "INDEX_CATALOG", "INDEX_NAME", "INDEX_SCHEMA", "INITIAL_SIZE", "INITIALLY_DEFERRED", "IS_DEFERRABLE", "IS_GRANTABLE", "IS_LONG", "IS_NULLABLE", "IS_UPDATABLE", "LITERAL_SUFFIX", "LOCAL_TYPE_NAME", "m_bAutoUniqueValue", "m_bAutoUpdate", "m_bBestMatch", "m_bCaseSensitive", "m_bCheckOption", "m_bClustered", "m_bColumnHasDefault", "m_bFixedPrecScale", "m_bHasDefault", "m_bInitiallyDeferred", "m_bIsDeferrable", "m_bIsGrantable", "m_bIsLong", "m_bIsNullable", "m_bIsUpdatable", "m_bPrimaryKey", "m_bSortBookmarks", "m_bUnique", "m_bUnsignedAttribute", "m_guidColumn", "m_guidFKColumn", "m_guidTable", "m_guidType", "m_nCardinality", "m_nCollation", "m_nColumnFlags", "m_nColumnPropID", "m_nColumnSize", "m_nDataType", "m_nDateTimePrecision", "m_nFillFactor", "m_nFKColumnPropID", "m_nInitialSize", "m_nMaxLength", "m_nMinScale", "m_nNullCollation", "m_nNulls", "m_nNumCharacters", "m_nNumericPrecision", "m_nNumericScale", "m_nOctetLength", "m_nOrdinal", "m_nOrdinalPosition", "m_nPages", "m_nPKColumnPropID", "m_nPrecision", "m_nRowsetNumber", "m_nScale", "m_nSearchable", "m_nType", "m_szBindingStyle", "m_szCatalog", "m_szCharCatalog", "m_szCharName", "m_szCharSchema", "m_szCharSetCatalog", "m_szCharSetName", "m_szCharSetSchema", "m_szCheckClause", "m_szCollateCatalog", "m_szCollateName", "m_szCollateSchema", "m_szCollationCatalog", "m_szCollationName", "m_szCollationSchema", "m_szColumnDefault", "m_szColumnName", "m_szConformance", "m_szConstraintCatalog", "m_szConstraintName", "m_szConstraintSchema", "m_szCreateParams", "m_szDefault", "m_szDefinition", "m_szDeleteRule", "m_szDescription", "m_szDomainCatalog", "m_szDomainName", "m_szDomainSchema", "m_szFilterCondition", "m_szFKColumnName", "m_szFKTableCatalog", "m_szFKTableName", "m_szFKTableSchema", "m_szFormOfUse", "m_szGrantee", "m_szGrantor", "m_szImplementation", "m_szIndexCatalog", "m_szIndexName", "m_szIndexSchema", "m_szIntegrity", "m_szLiteralPrefix", "m_szLocalTypeName", "m_szMatchOption", "m_szName", "m_szObjectCatalog", "m_szObjectName", "m_szObjectSchema", "m_szObjectType", "m_szOwner", "m_szPadAttribute", "m_szParameterName", "m_szPKColumnName", "m_szPKTableCatalog", "m_szPKTableName", "m_szPKTableSchema", "m_szPrivilegeType", "m_szPrivilegeType", "m_szProgrammingLanguage", "m_szSchema", "m_szSource", "m_szSourceCatalog", "m_szSourceName", "m_szSourceSchema", "m_szTableCatalog", "m_szTableName", "m_szTableSchema", "m_szTargetCatalog", "m_szTargetName", "m_szTargetSchema", "m_szType", "m_szTypeLib", "m_szTypeName", "m_szUniqueCatalog", "m_szUniqueName", "m_szUniqueSchema", "m_szUpdateRule", "m_szUpdateRule", "m_szVersion", "m_szYear", "MATCH_OPTION", "MAXIMUM_SCALE", "MINIMUM_SCALE", "NULL_COLLATION", "NULLS", "NUMBER_OF_CHARACTERS", "NUMERIC_PRECISION", "NUMERIC_SCALE", "OBJECT_CATALOG", "OBJECT_NAME", "OBJECT_SCHEMA", "OBJECT_TYPE", "ORDINAL data member", "ORDINAL_POSITION", "TABLE_CATALOG", "TABLE_GUID", "TABLE_NAME", "TABLE_SCHEMA"] -ms.assetid: 4bd881b3-26ca-4bdb-9226-d67560864f29 --- # Schema Rowset Classes and Typedef Classes diff --git a/docs/docfx.json b/docs/docfx.json index 3ee5ea465c..389b95cc45 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -40,7 +40,7 @@ "breadcrumb_path": "~/_breadcrumb/toc.yml",  "uhfHeaderId": "MSDocsHeader-CPP", "ROBOTS": "INDEX,FOLLOW", - "manager": "markl", + "manager": "coxford", "ms.date": "11/16/2016", "ms.topic": "conceptual", "audience": "developer", @@ -50,7 +50,6 @@ "cplusplus" ], "dev_langs": [ - "C++", "cpp" ], "searchScope": [ @@ -140,6 +139,7 @@ "cross-platform/**.md": "tools", "data/**.md": "data-access", "dotnet/**.md": "cli-lang", + "embedded/**.md": "tools", "error-messages/**.md": "errors-warnings", "extensions/**.md": "cli-lang", "get-started/**.md": "cpp-lang", @@ -167,7 +167,7 @@ "atl/**.md": "tylermsft", "atl-mfc-shared/**.md": "tylermsft", "build/**.md": "tylermsft", - "build-insights/**.md": "kevcadieux", + "build-insights/**.md": "tylermsft", "c-language/**.md": "tylermsft", "c-runtime-library/**.md": "tylermsft", "cloud/**.md": "tylermsft", @@ -204,7 +204,7 @@ "atl-mfc-shared/**.md": "twhitney", "attributes/**.md": "twhitney", "build/**.md": "twhitney", - "build-insights/**.md": "kevca", + "build-insights/**.md": "twhitney", "c-language/**.md": "twhitney", "c-runtime-library/**.md": "twhitney", "cloud/**.md": "twhitney", diff --git a/docs/dotnet/auto-gcroot-class.md b/docs/dotnet/auto-gcroot-class.md index 00b3976e16..073b6c06ab 100644 --- a/docs/dotnet/auto-gcroot-class.md +++ b/docs/dotnet/auto-gcroot-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: auto_gcroot Class" title: "auto_gcroot Class" +description: "Learn more about: auto_gcroot Class" ms.date: "01/16/2019" ms.topic: "reference" f1_keywords: ["msclr::auto_gcroot::auto_gcroot", "msclr::auto_gcroot::attach", "msclr::auto_gcroot::get", "msclr::auto_gcroot::release", "msclr::auto_gcroot::reset", "msclr::auto_gcroot::swap", "msclr::auto_gcroot::operator=", "msclr::auto_gcroot::operator->", "msclr::auto_gcroot::operator!", "msclr::auto_gcroot::operator auto_gcroot"] helpviewer_keywords: ["msclr::auto_gcroot"] -ms.assetid: b5790912-265d-463e-a486-47302e91042a --- # auto_gcroot Class @@ -20,7 +19,7 @@ class auto_gcroot; ### Parameters -*_element_type*
+*_element_type*\ The managed type to be embedded. ## Members @@ -30,8 +29,7 @@ The managed type to be embedded. |Name|Description| |---------|-----------| |[auto_gcroot::auto_gcroot](#auto-gcroot)|The `auto_gcroot` constructor.| -|[auto_gcroot::~auto_gcroot](#tilde-auto-gcroot)|The `auto_gcroot` destructor. -| +|[auto_gcroot::~auto_gcroot](#tilde-auto-gcroot)|The `auto_gcroot` destructor.| ### Public methods @@ -78,10 +76,10 @@ auto_gcroot( ### Parameters -*_ptr*
+*_ptr*\ The object to own. -*_right*
+*_right*\ An existing `auto_gcroot`. ### Remarks @@ -241,7 +239,7 @@ auto_gcroot<_element_type> & attach( ### Parameters -*_right*
+*_right*\ The object to attach, or an `auto_gcroot` containing the object to attach. ### Return value @@ -452,7 +450,7 @@ void reset( ### Parameters -*_new_ptr*
+*_new_ptr*\ (Optional) The new object. ### Example @@ -517,7 +515,7 @@ void swap( ### Parameters -*_right*
+*_right*\ The `auto_gcroot` with which to swap objects. ### Example @@ -615,7 +613,7 @@ auto_gcroot<_element_type> & operator=( ### Parameters -*_right*
+*_right*\ The object or `auto_gcroot` to be assigned to the current `auto_gcroot`. ### Return value diff --git a/docs/dotnet/data-access-using-adonet-cpp-cli.md b/docs/dotnet/data-access-using-adonet-cpp-cli.md index 73c3d4e6c8..69724de4d5 100644 --- a/docs/dotnet/data-access-using-adonet-cpp-cli.md +++ b/docs/dotnet/data-access-using-adonet-cpp-cli.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Data Access Using ADO.NET (C++/CLI)" title: "Data Access Using ADO.NET (C++/CLI)" +description: "Learn more about: Data Access Using ADO.NET (C++/CLI)" ms.date: "11/04/2016" helpviewer_keywords: ["ADO.NET [C++]", ".NET Framework [C++], data access", "databases [C++], accessing in C++", "data access [C++], ADO.NET", "data [C++], ADO.NET", "native strings [C++]", "ADO.NET [C++], marshaling ANSI strings", "strings [C++], ADO.NET", "BSTRs, strings", "ADO.NET [C++], marshaling BSTR strings", "strings [C++], marshaling BSTR strings", "ADO.NET [C++], marshaling Unicode strings", "Unicode [C++], strings", "strings [C++], Unicode", "VARIANT, marshaling", "ADO.NET [C++], marshaling VARIANT types", "VARIANT", "SAFEARRAY, marshaling", "ADO.NET [C++], marshaling SAFEARRAY types"] -ms.assetid: b0cd987d-1ea7-4f76-ba01-cbd52503d06d --- # Data Access Using ADO.NET (C++/CLI) @@ -152,7 +151,7 @@ The rest of the code in this example is native C++ code, as is indicated by the > [!NOTE] > The memory allocated by must be deallocated by calling either or `SysFreeString`. -``` cpp +```cpp // adonet_marshal_string_bstr.cpp // compile with: /clr /FU System.dll /FU System.Data.dll /FU System.Xml.dll #include diff --git a/docs/dotnet/deque-stl-clr.md b/docs/dotnet/deque-stl-clr.md index b7e7be166a..9961dd1c21 100644 --- a/docs/dotnet/deque-stl-clr.md +++ b/docs/dotnet/deque-stl-clr.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: deque (STL/CLR)" title: "deque (STL/CLR)" +description: "Learn more about: deque (STL/CLR)" ms.date: "11/04/2016" ms.topic: "reference" f1_keywords: ["cliext::deque", "cliext::deque::assign", "cliext::deque::at", "cliext::deque::back", "cliext::deque::back_item", "cliext::deque::begin", "cliext::deque::clear", "cliext::deque::const_iterator", "cliext::deque::const_reference", "cliext::deque::const_reverse_iterator", "cliext::deque::deque", "cliext::deque::difference_type", "cliext::deque::empty", "cliext::deque::end", "cliext::deque::erase", "cliext::deque::front", "cliext::deque::front_item", "cliext::deque::generic_container", "cliext::deque::generic_iterator", "cliext::deque::generic_reverse_iterator", "cliext::deque::generic_value", "cliext::deque::insert", "cliext::deque::iterator", "cliext::deque::operator!=", "cliext::deque::operator[]", "cliext::deque::pop_back", "cliext::deque::pop_front", "cliext::deque::push_back", "cliext::deque::push_front", "cliext::deque::rbegin", "cliext::deque::reference", "cliext::deque::rend", "cliext::deque::resize", "cliext::deque::reverse_iterator", "cliext::deque::size", "cliext::deque::size_type", "cliext::deque::swap", "cliext::deque::to_array", "cliext::deque::value_type", "cliext::deque::operator<", "cliext::deque::operator<=", "cliext::deque::operator=", "cliext::deque::operator==", "cliext::deque::operator>", "cliext::deque::operator>="] helpviewer_keywords: ["deque class [STL/CLR]", " header [STL/CLR]", " header [STL/CLR]", "assign member [STL/CLR]", "assign member [STL/CLR]", "at member [STL/CLR]", "back member [STL/CLR]", "back_item member [STL/CLR]", "begin member [STL/CLR]", "clear member [STL/CLR]", "const_iterator member [STL/CLR]", "const_reference member [STL/CLR]", "const_reverse_iterator member [STL/CLR]", "deque member [STL/CLR]", "difference_type member [STL/CLR]", "empty member [STL/CLR]", "end member [STL/CLR]", "erase member [STL/CLR]", "front member [STL/CLR]", "front_item member [STL/CLR]", "generic_container member [STL/CLR]", "generic_iterator member [STL/CLR]", "generic_reverse_iterator member [STL/CLR]", "generic_value member [STL/CLR]", "insert member [STL/CLR]", "iterator member [STL/CLR]", "operator!= member [STL/CLR]", "operator member [] [STL/CLR]", "pop_back member [STL/CLR]", "pop_front member [STL/CLR]", "push_back member [STL/CLR]", "push_front member [STL/CLR]", "rbegin member [STL/CLR]", "reference member [STL/CLR]", "rend member [STL/CLR]", "resize member [STL/CLR]", "reverse_iterator member [STL/CLR]", "size member [STL/CLR]", "size_type member [STL/CLR]", "swap member [STL/CLR]", "to_array member [STL/CLR]", "value_type member [STL/CLR]", "operator< member [STL/CLR]", "operator<= member [STL/CLR]", "operator= member [STL/CLR]", "operator== member [STL/CLR]", "operator> member [STL/CLR]", "operator>= member [STL/CLR]"] -ms.assetid: dd669da3-3c0e-45e9-8596-f6b483720941 --- # deque (STL/CLR) @@ -561,7 +560,7 @@ a b c ## deque::const_reverse_iterator (STL/CLR) -The type of a constant reverse iterator for the controlled sequence.. +The type of a constant reverse iterator for the controlled sequence. ### Syntax diff --git a/docs/dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md b/docs/dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md index 2109d30ace..5306b90a11 100644 --- a/docs/dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md +++ b/docs/dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md @@ -1,11 +1,15 @@ --- title: ".NET programming with C++/CLI" description: "Learn how to use C++/CLI to create .NET apps and components in Visual Studio." -ms.date: 10/28/2021 +ms.date: 05/02/2025 helpviewer_keywords: ["programming [C++], .NET programming", ".NET Framework [C++]", ".NET applications [C++]", "Visual C++, .NET programming"] --- # .NET programming with C++/CLI +C++/CLI supplanted Managed C++. C++/CLI is a language specification created by Microsoft that extends C++ to support .NET. It's only supported on Windows. It's not for writing [WinUI](/windows/apps/winui) or Universal Windows Platform [UWP](/windows/uwp/get-started/universal-application-platform-guide) Windows Runtime (WinRT) apps. It's for writing .NET applications and components that run on .NET. C++/CLI is a bridge between native C++ code and managed code. It allows you to use existing C++ libraries in .NET applications and to write new .NET applications in C++. + +Microsoft provides C++/WinRT for writing WinUI and WinRT apps. It's an entirely standard modern C++17 language projection for Windows Runtime (WinRT) APIs. For more information about using C++ with the Windows Runtime (WinRT), see [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/). + ::: moniker range="msvc-140" By default, CLR projects created with Visual Studio 2015 target .NET Framework 4.5.2. You can target .NET Framework 4.6 when you create a new project. In the **New Project** dialog, change the target framework in the dropdown at the top middle of the dialog. To change the target framework for an existing project, close the project, edit the project file (*`.vcxproj`*), and change the value of the Target Framework Version to 4.6. The changes take effect the next time you open the project. @@ -41,40 +45,23 @@ C++/CLI itself isn't installed by default when you install a Visual Studio C++ w ## In this section -[C++/CLI tasks](../dotnet/cpp-cli-tasks.md) - -[Native and .NET interoperability](../dotnet/native-and-dotnet-interoperability.md) - -[Pure and verifiable code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md) - -[Regular expressions (C++/CLI)](../dotnet/regular-expressions-cpp-cli.md) - -[File handling and I/O (C++/CLI)](../dotnet/file-handling-and-i-o-cpp-cli.md) - -[Graphics operations (C++/CLI)](../dotnet/graphics-operations-cpp-cli.md) - -[Windows operations (C++/CLI)](../dotnet/windows-operations-cpp-cli.md) - -[Data access using ADO.NET (C++/CLI)](../dotnet/data-access-using-adonet-cpp-cli.md) - -[Interoperability with other .NET languages (C++/CLI)](../dotnet/interoperability-with-other-dotnet-languages-cpp-cli.md) - -[Serialization (C++/CLI)](../dotnet/serialization-cpp-cli.md) - -[Managed types (C++/CLI)](../dotnet/managed-types-cpp-cli.md) - -[Reflection (C++/CLI)](../dotnet/reflection-cpp-cli.md) - -[Strong Name assemblies (assembly signing) (C++/CLI)](../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md) - -[Debug class (C++/CLI)](../dotnet/debug-class-cpp-cli.md) - -[STL/CLR library reference](../dotnet/stl-clr-library-reference.md) - -[C++ support library](../dotnet/cpp-support-library.md) - -[Exceptions in C++/CLI](../dotnet/exceptions-in-cpp-cli.md) - +[C++/CLI tasks](../dotnet/cpp-cli-tasks.md)\ +[Native and .NET interoperability](../dotnet/native-and-dotnet-interoperability.md)\ +[Pure and verifiable code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md)\ +[Regular expressions (C++/CLI)](../dotnet/regular-expressions-cpp-cli.md)\ +[File handling and I/O (C++/CLI)](../dotnet/file-handling-and-i-o-cpp-cli.md)\ +[Graphics operations (C++/CLI)](../dotnet/graphics-operations-cpp-cli.md)\ +[Windows operations (C++/CLI)](../dotnet/windows-operations-cpp-cli.md)\ +[Data access using ADO.NET (C++/CLI)](../dotnet/data-access-using-adonet-cpp-cli.md)\ +[Interoperability with other .NET languages (C++/CLI)](../dotnet/interoperability-with-other-dotnet-languages-cpp-cli.md)\ +[Serialization (C++/CLI)](../dotnet/serialization-cpp-cli.md)\ +[Managed types (C++/CLI)](../dotnet/managed-types-cpp-cli.md)\ +[Reflection (C++/CLI)](../dotnet/reflection-cpp-cli.md)\ +[Strong Name assemblies (assembly signing) (C++/CLI)](../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md)\ +[Debug class (C++/CLI)](../dotnet/debug-class-cpp-cli.md)\ +[STL/CLR library reference](../dotnet/stl-clr-library-reference.md)\ +[C++ support library](../dotnet/cpp-support-library.md)\ +[Exceptions in C++/CLI](../dotnet/exceptions-in-cpp-cli.md)\ [Boxing (C++/CLI)](../dotnet/boxing-cpp-cli.md) ## See also diff --git a/docs/dotnet/functional-stl-clr.md b/docs/dotnet/functional-stl-clr.md index fcb52b4c31..a47621cd29 100644 --- a/docs/dotnet/functional-stl-clr.md +++ b/docs/dotnet/functional-stl-clr.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: functional (STL/CLR)" title: "functional (STL/CLR)" +description: "Learn more about: functional (STL/CLR)" ms.date: 09/28/2022 ms.topic: "reference" f1_keywords: ["", "cliext::binary_delegate", "cliext::binary_delegate_noreturn", "cliext::binary_negate", "cliext::bind1st", "cliext::bind2nd", "cliext::binder1st", "cliext::binder2nd", "cliext::divides", "cliext::equal_to", "cliext::greater", "cliext::greater_equal", "cliext::less", "cliext::less_equal", "cliext::logical_and", "cliext::logical_not", "cliext::logical_or", "cliext::minus", "cliext::modulus", "cliext::multiplies", "cliext::negate", "cliext::not_equal_to", "cliext::not1", "cliext::not2", "cliext::plus", "cliext::unary_delegate", "cliext::unary_delegate_noreturn", "cliext::unary_negate"] helpviewer_keywords: [" header [STL/CLR]", " header [STL/CLR]", "functional functions [STL/CLR]", "binary_delegate function [STL/CLR]", "binary_delegate_noreturn function [STL/CLR]", "binary_negate function [STL/CLR]", "bind1st function [STL/CLR]", "bind2nd function [STL/CLR]", "binder1st function [STL/CLR]", "binder2nd function [STL/CLR]", "divides function [STL/CLR]", "equal_to function [STL/CLR]", "greater function [STL/CLR]", "greater_equal function [STL/CLR]", "less function [STL/CLR]", "less_equal function [STL/CLR]", "logical_and function [STL/CLR]", "logical_not function [STL/CLR]", "logical_or function [STL/CLR]", "minus function [STL/CLR]", "modulus function [STL/CLR]", "multiplies function [STL/CLR]", "negate function [STL/CLR]", "not_equal_to function [STL/CLR]", "not1 function [STL/CLR]", "not2 function [STL/CLR]", "plus function [STL/CLR]", "unary_delegate function [STL/CLR]", "unary_delegate_noreturn function [STL/CLR]", "unary_negate function [STL/CLR]"] -ms.assetid: 88738b8c-5d37-4375-970e-a4442bf5efde --- # `functional` (STL/CLR) @@ -499,7 +498,7 @@ public: typedef Fun stored_function_type; typedef typename Fun::first_argument_type first_argument_type; typedef typename Fun::second_argument_type second_argument_type; - typedef typename Fun:result_type result_type; + typedef typename Fun::result_type result_type; typedef Microsoft::VisualC::StlClr::UnaryDelegate< second_argument_type, result_type> delegate_type; @@ -604,7 +603,7 @@ public: typedef Fun stored_function_type; typedef typename Fun::first_argument_type first_argument_type; typedef typename Fun::second_argument_type second_argument_type; - typedef typename Fun:result_type result_type; + typedef typename Fun::result_type result_type; typedef Microsoft::VisualC::StlClr::UnaryDelegate< first_argument_type, result_type> delegate_type; diff --git a/docs/dotnet/hosting-a-windows-form-user-control-as-an-mfc-dialog-box.md b/docs/dotnet/hosting-a-windows-form-user-control-as-an-mfc-dialog-box.md index 14d59ab612..de752c26f9 100644 --- a/docs/dotnet/hosting-a-windows-form-user-control-as-an-mfc-dialog-box.md +++ b/docs/dotnet/hosting-a-windows-form-user-control-as-an-mfc-dialog-box.md @@ -1,15 +1,14 @@ --- -description: "Learn more about: Hosting a Windows Form User Control as an MFC Dialog Box" title: "Hosting a Windows Form User Control as an MFC Dialog Box" -ms.date: "11/04/2016" +description: "Learn more about: Hosting a Windows Form User Control as an MFC Dialog Box" +ms.date: 11/04/2016 helpviewer_keywords: ["MFC [C++], Windows Forms support", "Windows Forms [C++], hosting as MFC Dialog", "hosting Windows Forms control [C++]"] -ms.assetid: 0434a9d7-8b14-48e6-ad69-9ba9a684677a --- # Hosting a Windows Form User Control as an MFC Dialog Box -MFC provides the template class [CWinFormsDialog](../mfc/reference/cwinformsdialog-class.md) so that you can host a Windows Forms user control () in a modal or modeless MFC dialog box. `CWinFormsDialog` is derived from the MFC class [CDialog](../mfc/reference/cdialog-class.md), so the dialog box can be launched as modal or modeless. +MFC provides the template class [`CWinFormsDialog`](../mfc/reference/cwinformsdialog-class.md) so that you can host a Windows Forms user control () in a modal or modeless MFC dialog box. `CWinFormsDialog` is derived from the MFC class [`CDialog`](../mfc/reference/cdialog-class.md), so the dialog box can be launched as modal or modeless. -The process that `CWinFormsDialog` uses to host the user control is the similar to that described in [Hosting a Windows Form User Control in an MFC Dialog Box](../dotnet/hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md). However, `CWinFormsDialog` manages the initialization and hosting of the user control so that it does not have to be programmed manually. +The process that `CWinFormsDialog` uses to host the user control is similar to that described in [Hosting a Windows Form User Control in an MFC Dialog Box](hosting-a-windows-form-user-control-in-an-mfc-dialog-box.md). However, `CWinFormsDialog` manages the initialization and hosting of the user control so that it does not have to be programmed manually. ### To create the MFC host application @@ -17,7 +16,7 @@ The process that `CWinFormsDialog` uses to host the user control is the similar On the **File** menu, select **New**, and then click **Project**. In the **Visual C++** folder, select **MFC Application**. - In the **Name** box, enter `MFC03` and change the Solution setting to **Add to Solution**.Click **OK**. + In the **Name** box, enter `MFC03` and change the Solution setting to **Add to Solution**. Click **OK**. In the **MFC Application Wizard**, accept all the defaults, and then click **Finish**. This creates an MFC application with a Multiple Document Interface. @@ -29,21 +28,21 @@ The process that `CWinFormsDialog` uses to host the user control is the similar 1. Add a reference to the .NET control. - In **Solution Explorer**, right-click the **MFC03** project node and choose **Add**, **References**. In the **Property Page**, click **Add New Reference**, select WindowsControlLibrary1 (under the **Projects** tab), and click **OK**. This adds a reference in the form of a [/FU](../build/reference/fu-name-forced-hash-using-file.md) compiler option so that the program will compile; it also copies WindowsControlLibrary1.dll into the `MFC03` project directory so that the program will run. + In **Solution Explorer**, right-click the **MFC03** project node and choose **Add**, **References**. In the **Property Page**, click **Add New Reference**, select WindowsControlLibrary1 (under the **Projects** tab), and click **OK**. This adds a reference in the form of a [`/FU`](../build/reference/fu-name-forced-hash-using-file.md) compiler option so that the program will compile; it also copies `WindowsControlLibrary1.dll` into the `MFC03` project directory so that the program will run. 1. Add `#include ` to *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier), at the end of the existing `#include` statements. 1. Add a new class that subclasses `CDialog`. - Right click on project name and add an MFC class (called CHostForWinForm) that subclasses `CDialog`. Since you do not need the dialog box resource, you can delete the resource ID (select **Resource View**, expand the **Dialog** folder and delete `IDD_HOSTFORWINFORM` resource. Then, remove any references to the ID in code.). + Right click on project name and add an MFC class (called `CHostForWinForm`) that subclasses `CDialog`. Since you do not need the dialog box resource, you can delete the resource ID (select **Resource View**, expand the **Dialog** folder and delete `IDD_HOSTFORWINFORM` resource. Then, remove any references to the ID in code.). -1. Replace `CDialog` in CHostForWinForm.h and CHostForWinForm.cpp files with `CWinFormsDialog`. +1. Replace `CDialog` in `CHostForWinForm.h` and `CHostForWinForm.cpp` files with `CWinFormsDialog`. -1. Call DoModal on the CHostForWinForm class. +1. Call `DoModal` on the `CHostForWinForm` class. - In MFC03.cpp, add `#include "HostForWinForm.h"`. + In `MFC03.cpp`, add `#include "HostForWinForm.h"`. - Before the return statement in the definition of CMFC03App::InitInstance, add: + Before the return statement in the definition of `CMFC03App::InitInstance`, add: ```cpp CHostForWinForm m_HostForWinForm; @@ -58,15 +57,15 @@ The process that `CWinFormsDialog` uses to host the user control is the similar Next you will add code to monitor the state of a control on the Windows Forms from the MFC application. -1. Add a handler for OnInitDialog. +1. Add a handler for `OnInitDialog`. - Display the **Properties** window (F4). In **Class View**, select CHostForWinForm. In the **Properties** window, select overrides and in the row for OnInitDialog, click in the left hand column and select \< Add >. This adds the following line to CHostForWinForm.h: + Display the **Properties** window (F4). In **Class View**, select `CHostForWinForm`. In the **Properties** window, select overrides and in the row for `OnInitDialog`, click in the left hand column and select \< Add >. This adds the following line to `CHostForWinForm.h`: ```cpp virtual BOOL OnInitDialog(); ``` -1. Define OnInitDialog (in CHostForWinForm.cpp) as follows: +1. Define `OnInitDialog` (in `CHostForWinForm.cpp`) as follows: ```cpp BOOL CHostForWinForm::OnInitDialog() { @@ -76,7 +75,7 @@ The process that `CWinFormsDialog` uses to host the user control is the similar } ``` -1. Next add the OnButton1 handler. Add the following lines to the public section of the CHostForWinForm class in CHostForWinForm.h: +1. Next add the `OnButton1` handler. Add the following lines to the public section of the `CHostForWinForm` class in `CHostForWinForm.h`: ```cpp virtual void OnButton1( System::Object^ sender, System::EventArgs^ e ); @@ -86,7 +85,7 @@ The process that `CWinFormsDialog` uses to host the user control is the similar END_DELEGATE_MAP() ``` - In CHostForWinForm.cpp, add this definition: + In `CHostForWinForm.cpp`, add this definition: ```cpp void CHostForWinForm::OnButton1( System::Object^ sender, System::EventArgs^ e ) @@ -99,13 +98,13 @@ The process that `CWinFormsDialog` uses to host the user control is the similar Next you will add code to display from the MFC code the value in the text box on the Windows Form. -1. In the public section of the CHostForWinForm class in CHostForWinForm.h, add the following declaration: +1. In the public section of the `CHostForWinForm` class in `CHostForWinForm.h`, add the following declaration: ```cpp CString m_sEditBoxOnWinForm; ``` -1. In the definition of DoDataExchange in CHostForWinForm.cpp, add the following three lines to the end of the function: +1. In the definition of `DoDataExchange` in `CHostForWinForm.cpp`, add the following four lines to the end of the function: ```cpp if (pDX->m_bSaveAndValidate) @@ -114,7 +113,7 @@ The process that `CWinFormsDialog` uses to host the user control is the similar GetControl()->textBox1->Text = gcnew System::String(m_sEditBoxOnWinForm); ``` -1. In the definition of OnButton1 in CHostForWinForm.cpp, add the following three lines to the end of the function: +1. In the definition of `OnButton1` in `CHostForWinForm.cpp`, add the following three lines to the end of the function: ```cpp this->UpdateData(TRUE); @@ -126,5 +125,5 @@ The process that `CWinFormsDialog` uses to host the user control is the similar ## See also - -[Using a Windows Form User Control in MFC](../dotnet/using-a-windows-form-user-control-in-mfc.md) +\ +[Using a Windows Form User Control in MFC](using-a-windows-form-user-control-in-mfc.md) diff --git a/docs/dotnet/how-to-access-characters-in-a-system-string.md b/docs/dotnet/how-to-access-characters-in-a-system-string.md index 1dab0f2a63..c16e9e8720 100644 --- a/docs/dotnet/how-to-access-characters-in-a-system-string.md +++ b/docs/dotnet/how-to-access-characters-in-a-system-string.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: How to: Access Characters in a System::String" title: "How to: Access Characters in a System::String" +description: "Learn more about: How to: Access Characters in a System::String" +ms.date: 11/04/2016 ms.custom: "get-started-article" -ms.date: "11/04/2016" helpviewer_keywords: ["characters [C++], accessing in System::String", "examples [C++], strings", "strings [C++], accessing characters"] -ms.assetid: cfc89756-aef3-4988-907e-fb236dcb7087 --- # How to: Access Characters in a System::String @@ -21,7 +20,7 @@ If you pass `ppchar` to a native function, then it must be a pinning pointer; th ```cpp // PtrToStringChars.cpp // compile with: /clr -#include +#include using namespace System; int main() { @@ -54,7 +53,7 @@ size_t getlen(System::String ^ s) { // make sure it doesn't move during the unmanaged call pin_ptr pinchars = PtrToStringChars(s); return wcsnlen(pinchars, maxsize); -}; +} int main() { System::Console::WriteLine(getlen("testing")); diff --git a/docs/dotnet/how-to-declare-override-specifiers-in-native-compilations-cpp-cli.md b/docs/dotnet/how-to-declare-override-specifiers-in-native-compilations-cpp-cli.md index a9e25c2df5..3eeb84d31e 100644 --- a/docs/dotnet/how-to-declare-override-specifiers-in-native-compilations-cpp-cli.md +++ b/docs/dotnet/how-to-declare-override-specifiers-in-native-compilations-cpp-cli.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: How to: Declare Override Specifiers in Native Compilations (C++/CLI)" title: "How to: Declare Override Specifiers (C++/CLI)" +description: "Learn more about: How to: Declare Override Specifiers in Native Compilations (C++/CLI)" ms.date: "11/04/2016" helpviewer_keywords: ["override specifiers in native compilation, overriding"] -ms.assetid: d0551836-9ac7-41eb-a6e9-a4b3ef60767d --- # How to: Declare Override Specifiers in Native Compilations (C++/CLI) -[sealed](../extensions/sealed-cpp-component-extensions.md), [abstract](../extensions/abstract-cpp-component-extensions.md), and [override](../extensions/override-cpp-component-extensions.md) are available in compilations that do not use **/ZW** or [/clr](../build/reference/clr-common-language-runtime-compilation.md). +[`sealed`](../extensions/sealed-cpp-component-extensions.md), [`abstract`](../extensions/abstract-cpp-component-extensions.md), and [`override`](../extensions/override-cpp-component-extensions.md) are available in compilations that do not use **/ZW** or [`/clr`](../build/reference/clr-common-language-runtime-compilation.md). > [!NOTE] -> The ISO C++11 Standard language has the [override](../cpp/override-specifier.md) identifier and the [final](../cpp/final-specifier.md) identifier, and both are supported in Visual Studio Use `final` instead of **`sealed`** in code that is meant to be compiled as native-only. +> The ISO C++11 Standard language [`override`](../cpp/override-specifier.md) and [`final`](../cpp/final-specifier.md) specifiers are supported in Visual Studio. Use `final` instead of **`sealed`** in code that is meant to be compiled as native-only. ## Example: sealed is valid @@ -67,7 +66,7 @@ public: ### Description -This example shows that **`abstract`** is valid in native compilations. +This example shows that `abstract` is valid in native compilations. ### Code diff --git a/docs/dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md b/docs/dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md index 0850717e4c..a0b88ce253 100644 --- a/docs/dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md +++ b/docs/dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md @@ -3,7 +3,6 @@ title: "How to: Define and consume classes and structs (C++/CLI)" description: "How to create and use user-defined class and struct types in C++/CLI code." ms.date: 09/25/2020 helpviewer_keywords: ["structs [C++]", "classes [C++], instantiating"] -ms.assetid: 1c03cb0d-1459-4b5e-af65-97d6b3094fd7 --- # How to: Define and consume classes and structs (C++/CLI) @@ -467,7 +466,7 @@ in static constructor ## Semantics of the `this` pointer -When you're using C++\CLI to define types, the **`this`** pointer in a reference type is of type *handle*. The **`this`** pointer in a value type is of type *interior pointer*. +When you're using C++/CLI to define types, the **`this`** pointer in a reference type is of type *handle*. The **`this`** pointer in a value type is of type *interior pointer*. These different semantics of the **`this`** pointer can cause unexpected behavior when a default indexer is called. The next example shows the correct way to access a default indexer in both a ref type and a value type. @@ -636,7 +635,7 @@ The following sample demonstrates when a copy constructor isn't generated. ```cpp // compile with: /clr -#include +#include struct S { int i; diff --git a/docs/dotnet/how-to-define-and-use-delegates-cpp-cli.md b/docs/dotnet/how-to-define-and-use-delegates-cpp-cli.md index 3a2235ad91..eec4a6002e 100644 --- a/docs/dotnet/how-to-define-and-use-delegates-cpp-cli.md +++ b/docs/dotnet/how-to-define-and-use-delegates-cpp-cli.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: How to: Define and Use Delegates (C++/CLI)" title: "How to: Define and Use Delegates (C++/CLI)" -ms.date: "11/04/2016" +description: "Learn more about: How to: Define and Use Delegates (C++/CLI)" +ms.date: 11/04/2016 helpviewer_keywords: ["delegates"] -ms.assetid: 1cdf3420-89c1-47c0-b796-aa984020e0f8 --- # How to: Define and Use Delegates (C++/CLI) @@ -442,7 +441,7 @@ int main() { Del^ d = gcnew Del(r1, &R::f); d += gcnew Del(&R::f); d(r2); -}; +} ``` **Output** diff --git a/docs/dotnet/how-to-do-ddx-ddv-data-binding-with-windows-forms.md b/docs/dotnet/how-to-do-ddx-ddv-data-binding-with-windows-forms.md index 7d77830650..098179c4ef 100644 --- a/docs/dotnet/how-to-do-ddx-ddv-data-binding-with-windows-forms.md +++ b/docs/dotnet/how-to-do-ddx-ddv-data-binding-with-windows-forms.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: How to: Do DDX/DDV Data Binding with Windows Forms" title: "How to: Do DDX-DDV Data Binding with Windows Forms" +description: "Learn more about: How to: Do DDX/DDV Data Binding with Windows Forms" ms.custom: "get-started-article" ms.date: "11/04/2016" helpviewer_keywords: ["MFC [C++], hosting a Windows Forms Control", "Windows Forms [C++], MFC support"] -ms.assetid: b2957370-cf1f-4779-94ac-228cd393686c --- # How to: Do DDX/DDV Data Binding with Windows Forms @@ -53,7 +52,7 @@ void CMFC01Dlg::DoDataExchange(CDataExchange* pDX) ## Example: Add handler method -Now we will add the handler method for a click on the OK button. Click the **Resource View** tab. In Resource View, double-click on `IDD_MFC01_DIALOG`. The dialog resource appears in Resource Editor. Then double click the OK button.. +Now we will add the handler method for a click on the OK button. Click the **Resource View** tab. In Resource View, double-click on `IDD_MFC01_DIALOG`. The dialog resource appears in Resource Editor. Then double click the OK button. Define the handler as follows. @@ -77,6 +76,6 @@ You can now build and run the application. Notice that any text in the text box ## See also -[CWinFormsControl Class](../mfc/reference/cwinformscontrol-class.md)
-[DDX_ManagedControl](../mfc/reference/standard-dialog-data-exchange-routines.md#ddx_managedcontrol)
+[CWinFormsControl Class](../mfc/reference/cwinformscontrol-class.md)\ +[DDX_ManagedControl](../mfc/reference/standard-dialog-data-exchange-routines.md#ddx_managedcontrol)\ [CWnd::DoDataExchange](../mfc/reference/cwnd-class.md#dodataexchange) diff --git a/docs/dotnet/how-to-use-arrays-in-cpp-cli.md b/docs/dotnet/how-to-use-arrays-in-cpp-cli.md index 14f17299db..6bdeba25b0 100644 --- a/docs/dotnet/how-to-use-arrays-in-cpp-cli.md +++ b/docs/dotnet/how-to-use-arrays-in-cpp-cli.md @@ -221,7 +221,7 @@ public: }; int main() { - // Aggregate initialize a multidimension managed array. + // Aggregate initialize a multidimensional managed array. array^ gc1 = gcnew array{ {"one", "two"}, {"three", "four"} }; array^ gc2 = { {"one", "two"}, {"three", "four"} }; diff --git a/docs/dotnet/list-stl-clr.md b/docs/dotnet/list-stl-clr.md index 7069b4797c..fff82c19fd 100644 --- a/docs/dotnet/list-stl-clr.md +++ b/docs/dotnet/list-stl-clr.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: list (STL/CLR)" title: "list (STL/CLR)" +description: "Learn more about: list (STL/CLR)" ms.date: "11/04/2016" ms.topic: "reference" f1_keywords: ["cliext::list", "cliext::list::assign", "cliext::list::back", "cliext::list::back_item", "cliext::list::begin", "cliext::list::clear", "cliext::list::const_iterator", "cliext::list::const_reference", "cliext::list::const_reverse_iterator", "cliext::list::difference_type", "cliext::list::empty", "cliext::list::end", "cliext::list::erase", "cliext::list::front", "cliext::list::front_item", "cliext::list::generic_container", "cliext::list::generic_iterator", "cliext::list::generic_reverse_iterator", "cliext::list::generic_value", "cliext::list::insert", "cliext::list::iterator", "cliext::list::list", "cliext::list::merge", "cliext::list::operator=", "cliext::list::pop_back", "cliext::list::pop_front", "cliext::list::push_back", "cliext::list::push_front", "cliext::list::rbegin", "cliext::list::reference", "cliext::list::remove", "cliext::list::remove_if", "cliext::list::rend", "cliext::list::resize", "cliext::list::reverse", "cliext::list::reverse_iterator", "cliext::list::size", "cliext::list::size_type", "cliext::list::sort", "cliext::list::splice", "cliext::list::swap", "cliext::list::to_array", "cliext::list::unique", "cliext::list::value_type", "cliext::operator!=(list)", "cliext::operator<(list)", "cliext::operator<=(list)", "cliext::operator==(list)", "cliext::operator>(list)", "cliext::operator>=(list)"] helpviewer_keywords: [" header [STL/CLR]", "list class [STL/CLR]", " header [STL/CLR]", "assign member [STL/CLR]", "assign member [STL/CLR]", "back member [STL/CLR]", "back_item member [STL/CLR]", "begin member [STL/CLR]", "clear member [STL/CLR]", "const_iterator member [STL/CLR]", "const_reference member [STL/CLR]", "const_reverse_iterator member [STL/CLR]", "difference_type member [STL/CLR]", "empty member [STL/CLR]", "end member [STL/CLR]", "erase member [STL/CLR]", "front member [STL/CLR]", "front_item member [STL/CLR]", "generic_container member [STL/CLR]", "generic_iterator member [STL/CLR]", "generic_reverse_iterator member [STL/CLR]", "generic_value member [STL/CLR]", "insert member [STL/CLR]", "iterator member [STL/CLR]", "list member [STL/CLR]", "merge member [STL/CLR]", "operator= member [STL/CLR]", "pop_back member [STL/CLR]", "pop_front member [STL/CLR]", "push_back member [STL/CLR]", "push_front member [STL/CLR]", "rbegin member [STL/CLR]", "reference member [STL/CLR]", "remove member [STL/CLR]", "remove_if member [STL/CLR]", "rend member [STL/CLR]", "resize member [STL/CLR]", "reverse member [STL/CLR]", "reverse_iterator member [STL/CLR]", "size member [STL/CLR]", "size_type member [STL/CLR]", "sort member [STL/CLR]", "splice member [STL/CLR]", "swap member [STL/CLR]", "to_array member [STL/CLR]", "unique member [STL/CLR]", "value_type member [STL/CLR]", "operator!=(list) member [STL/CLR]", "operator<(list) member [STL/CLR]", "operator<=(list) member [STL/CLR]", "operator==(list) member [STL/CLR]", "operator>(list) member [STL/CLR]", "operator>=(list) member [STL/CLR]"] -ms.assetid: a70c45c8-a257-4f6b-8434-b27ff6685bac --- # list (STL/CLR) @@ -510,7 +509,7 @@ a b c ## list::const_reverse_iterator (STL/CLR) -The type of a constant reverse iterator for the controlled sequence.. +The type of a constant reverse iterator for the controlled sequence. ### Syntax diff --git a/docs/dotnet/queue-stl-clr.md b/docs/dotnet/queue-stl-clr.md index 4bd7aaf67e..d3bc7430b5 100644 --- a/docs/dotnet/queue-stl-clr.md +++ b/docs/dotnet/queue-stl-clr.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: queue (STL/CLR)" title: "queue (STL/CLR)" +description: "Learn more about: queue (STL/CLR)" ms.date: "4/20/2023" ms.topic: "reference" f1_keywords: ["cliext::queue", "cliext::queue::assign", "cliext::queue::back", "cliext::queue::back_item", "cliext::queue::const_reference", "cliext::queue::container_type", "cliext::queue::difference_type", "cliext::queue::empty", "cliext::queue::front", "cliext::queue::front_item", "cliext::queue::generic_container", "cliext::queue::generic_value", "cliext::queue::get_container", "cliext::queue::operator=", "cliext::queue::pop", "cliext::queue::push", "cliext::queue::queue", "cliext::queue::reference", "cliext::queue::size", "cliext::queue::size_type", "cliext::queue::to_array", "cliext::queue::value_type"] @@ -1417,7 +1417,7 @@ int main() c2.push(L'b'); c2.push(L'd'); -/ / display contents "a b d" + // display contents "a b d" for each (wchar_t elem in c2.get_container()) System::Console::Write("{0} ", elem); System::Console::WriteLine(); diff --git a/docs/dotnet/reflection-cpp-cli.md b/docs/dotnet/reflection-cpp-cli.md index 9b31b0a149..5cf26a76a1 100644 --- a/docs/dotnet/reflection-cpp-cli.md +++ b/docs/dotnet/reflection-cpp-cli.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Reflection (C++/CLI)" title: "Reflection (C++/CLI)" -ms.date: "11/04/2016" -helpviewer_keywords: ["typeid keyword [C++]", "reflection [C++}, about reflection", "metadata, reflection", "GetType method", ".NET Framework [C++], reflection", "data types [C++], reflection", "reflection [C++}", "plug-ins [C++]", "reflection [C++}, plug-ins", "assemblies [C++], enumerating data types in", "public types [C++]", "reflection [C++], external assemblies", "assemblies [C++]", "data types [C++], enumerating", "public members [C++]"] -ms.assetid: 46b6ff4a-e441-4022-8892-78e69422f230 +description: "Learn more about: Reflection (C++/CLI)" +ms.date: 11/04/2016 +helpviewer_keywords: ["typeid keyword [C++]", "reflection [C++], about reflection", "metadata, reflection", "GetType method", ".NET Framework [C++], reflection", "data types [C++], reflection", "reflection [C++]", "plug-ins [C++]", "reflection [C++], plug-ins", "assemblies [C++], enumerating data types in", "public types [C++]", "reflection [C++], external assemblies", "assemblies [C++]", "data types [C++], enumerating", "public members [C++]"] --- # Reflection (C++/CLI) diff --git a/docs/dotnet/vector-stl-clr.md b/docs/dotnet/vector-stl-clr.md index d325c77397..c6c3fd953c 100644 --- a/docs/dotnet/vector-stl-clr.md +++ b/docs/dotnet/vector-stl-clr.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: vector (STL/CLR)" title: "vector (STL/CLR)" +description: "Learn more about: vector (STL/CLR)" ms.date: "11/04/2016" ms.topic: "reference" f1_keywords: ["cliext::vector", "cliext::vector::assign", "cliext::vector::at", "cliext::vector::back", "cliext::vector::back_item", "cliext::vector::begin", "cliext::vector::capacity", "cliext::vector::clear", "cliext::vector::const_iterator", "cliext::vector::const_reference", "cliext::vector::const_reverse_iterator", "cliext::vector::difference_type", "cliext::vector::empty", "cliext::vector::end", "cliext::vector::erase", "cliext::vector::front", "cliext::vector::front_item", "cliext::vector::generic_container", "cliext::vector::generic_iterator", "cliext::vector::generic_reverse_iterator", "cliext::vector::generic_value", "cliext::vector::insert", "cliext::vector::iterator", "cliext::vector::operator=", "cliext::vector::operator", "cliext::vector::pop_back", "cliext::vector::push_back", "cliext::vector::rbegin", "cliext::vector::reference", "cliext::vector::rend", "cliext::vector::reserve", "cliext::vector::resize", "cliext::vector::reverse_iterator", "cliext::vector::size", "cliext::vector::size_type", "cliext::vector::swap", "cliext::vector::to_array", "cliext::vector::value_type", "cliext::vector::vector"] helpviewer_keywords: ["vector class [STL/CLR]", " header [STL/CLR]", " header [STL/CLR]", "operator!= member [STL/CLR]", "operator< member [STL/CLR]", "operator<= member [STL/CLR]", "operator== member [STL/CLR]", "operator> (vector) member [STL/CLR]", "operator>= member [STL/CLR]", "assign member [STL/CLR]", "at member [STL/CLR]", "back member [STL/CLR]", "back_item member [STL/CLR]", "begin member [STL/CLR]", "capacity member [STL/CLR]", "clear member [STL/CLR]", "const_iterator member [STL/CLR]", "const_reference member [STL/CLR]", "const_reverse_iterator member [STL/CLR]", "difference_type member [STL/CLR]", "empty member [STL/CLR]", "end member [STL/CLR]", "erase member [STL/CLR]", "front member [STL/CLR]", "front_item member [STL/CLR]", "generic_container member [STL/CLR]", "generic_iterator member [STL/CLR]", "generic_reverse_iterator member [STL/CLR]", "generic_value member [STL/CLR]", "insert member [STL/CLR]", "iterator member [STL/CLR]", "operator= member [STL/CLR]", "operator member [STL/CLR]", "pop_back member [STL/CLR]", "push_back member [STL/CLR]", "rbegin member [STL/CLR]", "reference member [STL/CLR]", "rend member [STL/CLR]", "reserve member [STL/CLR]", "resize member [STL/CLR]", "reverse_iterator member [STL/CLR]", "size member [STL/CLR]", "size_type member [STL/CLR]", "swap member [STL/CLR]", "to_array member [STL/CLR]", "value_type member [STL/CLR]", "vector member [STL/CLR]"] -ms.assetid: f90060d5-097a-4e9d-9a26-a634b5b9c6c2 --- # vector (STL/CLR) @@ -608,7 +607,7 @@ a b c ## vector::const_reverse_iterator (STL/CLR) -The type of a constant reverse iterator for the controlled sequence.. +The type of a constant reverse iterator for the controlled sequence. ### Syntax diff --git a/docs/embedded/rtos-view.md b/docs/embedded/rtos-view.md index 4428fc316a..e5e9b7da9b 100644 --- a/docs/embedded/rtos-view.md +++ b/docs/embedded/rtos-view.md @@ -18,7 +18,7 @@ The RTOS Object View allows users to view various components of an RTOS while de # [Visual Studio Code](#tab/visual-studio-code) -![RTOS View in VSCode](media/rtos-threads-vscode.png) +![RTOS View in VS Code](media/rtos-threads-vscode.png) --- diff --git a/docs/embedded/toc.yml b/docs/embedded/toc.yml index f05018c272..01279ba35c 100644 --- a/docs/embedded/toc.yml +++ b/docs/embedded/toc.yml @@ -1,5 +1,5 @@ items: -- name: Embedded development with Visual Studio and Visual Studio code +- name: Embedded development with Visual Studio and Visual Studio Code href: ./index.yml - name: Download and install the Embedded Tools href: download-and-install-the-embedded-tooling.md diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2006.md b/docs/error-messages/compiler-errors-1/compiler-error-c2006.md index a1a2874400..531f672d9b 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2006.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2006.md @@ -1,28 +1,22 @@ --- -description: "Learn more about: Compiler Error C2006" title: "Compiler Error C2006" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2006" +ms.date: "01/28/2025" f1_keywords: ["C2006"] helpviewer_keywords: ["C2006"] -ms.assetid: caaed6f7-ceb9-4742-8820-d66657c0b04d --- # Compiler Error C2006 -'directive' expected a filename, found 'token' +'directive': expected "FILENAME" or \ -Directives such as [#include](../../preprocessor/hash-include-directive-c-cpp.md) or [#import](../../preprocessor/hash-import-directive-cpp.md) require a filename. To resolve the error, make sure *token* is a valid filename. Also, put the filename in double quotes or angle brackets. +Directives such as [#include](../../preprocessor/hash-include-directive-c-cpp.md) or [#import](../../preprocessor/hash-import-directive-cpp.md) require a filename. To resolve the error, ensure the filename is valid and enclosed in either double quotes or angle brackets. The following sample generates C2006: ```cpp // C2006.cpp -#include stdio.h // C2006 -``` - -Possible resolution: - -```cpp -// C2006b.cpp // compile with: /c -#include +#include iostream // C2006 +#include 'iostream' // C2006 +#include // OK ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2095.md b/docs/error-messages/compiler-errors-1/compiler-error-c2095.md index 8224cfb3a8..0c20af59dd 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2095.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2095.md @@ -1,15 +1,14 @@ --- -description: "Learn more about: Compiler Error C2095" title: "Compiler Error C2095" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2095" +ms.date: 11/04/2016 f1_keywords: ["C2095"] helpviewer_keywords: ["C2095"] -ms.assetid: 44f8ada1-974f-4e81-a408-33ac6695aa53 --- # Compiler Error C2095 'function' : actual parameter has type 'void' : parameter 'number' -The parameter passed to the function is type **`void`**, which is not allowed. Use a pointer to void ( `void *`) instead. +The parameter passed to the function is type **`void`**, which is not allowed. Use a pointer to void (`void *`) instead. The `number` indicates which parameter is **`void`**. diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2100.md b/docs/error-messages/compiler-errors-1/compiler-error-c2100.md index 8c69129528..c2ec852188 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2100.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2100.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Error C2100" title: "Compiler Error C2100" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2100" +ms.date: 11/04/2016 f1_keywords: ["C2100"] helpviewer_keywords: ["C2100"] -ms.assetid: 9ed5ea11-9d55-4ddf-8b1a-162c74f3c390 --- # Compiler Error C2100 illegal indirection -Indirection operator ( `*` ) is applied to a nonpointer value. +Indirection operator (`*`) is applied to a nonpointer value. The following sample generates C2100: diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2110.md b/docs/error-messages/compiler-errors-1/compiler-error-c2110.md index 6136d130b1..42bfa8a939 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2110.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2110.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Error C2110" title: "Compiler Error C2110" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2110" +ms.date: 11/04/2016 f1_keywords: ["C2110"] helpviewer_keywords: ["C2110"] -ms.assetid: 48fd76ed-90d6-4a60-9c7b-f6ce9355b4ca --- # Compiler Error C2110 '+' : cannot add two pointers -An attempt was made to add two pointer values using the plus ( `+` ) operator. +An attempt was made to add two pointer values using the plus (`+`) operator. The following sample generates C2110: diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2111.md b/docs/error-messages/compiler-errors-1/compiler-error-c2111.md index 10ba943b72..d0d6444cac 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2111.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2111.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Error C2111" title: "Compiler Error C2111" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2111" +ms.date: 11/04/2016 f1_keywords: ["C2111"] helpviewer_keywords: ["C2111"] -ms.assetid: 38fd42ec-1480-4a44-aaca-ae4593ed5f50 --- # Compiler Error C2111 '+' : pointer addition requires integral operand -An attempt was made to add a nonintegral value to a pointer using the plus ( `+` ) operator. +An attempt was made to add a nonintegral value to a pointer using the plus (`+`) operator. The following sample generates C2111: diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2134.md b/docs/error-messages/compiler-errors-1/compiler-error-c2134.md index a46a383784..0436d94a76 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2134.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2134.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Compiler Error C2134" title: "Compiler Error C2134" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2134" +ms.date: 11/04/2016 f1_keywords: ["C2134"] -ms.assetid: d45cb3e8-0be4-4bd6-8be9-5f8d2384363f +helpviewer_keywords: ["C2134"] --- # Compiler Error C2134 @@ -18,7 +18,7 @@ The following sample generates C2134: // compile with: /c int A() { return 42; -}; +} constexpr int B() { return A(); // Error C2134: 'A': call does not result in a constant expression. @@ -31,7 +31,7 @@ Possible resolution: // C2134b.cpp constexpr int A() { // add constexpr to A, since it meets the requirements of constexpr. return 42; -}; +} constexpr int B() { return A(); // No error diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2153.md b/docs/error-messages/compiler-errors-1/compiler-error-c2153.md index 893455edab..2090da157a 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2153.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2153.md @@ -1,23 +1,26 @@ --- -description: "Learn more about: Compiler Error C2153" title: "Compiler Error C2153" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2153" +ms.date: "01/31/2025" f1_keywords: ["C2153"] helpviewer_keywords: ["C2153"] -ms.assetid: cfc50cb7-9a0f-4b5b-879a-d419c99f7be1 --- # Compiler Error C2153 -hex constants must have at least one hex digit +integer literals must have at least one digit -Hexadecimal constants 0x, 0X, and \x are not valid. At least one hex digit must follow x or X. +Hexadecimal and binary literals must contain at least one digit after the leading sequence (`0x`, `0X`, `0b`, or `0B`), otherwise the trailing character may be incorrectly interpreted as a suffix or literal operator. See [Integer literals](../../cpp/numeric-boolean-and-pointer-literals-cpp.md#integer-literals) for more information. The following sample generates C2153: ```cpp // C2153.cpp -int main() { - int a= 0x; // C2153 - int b= 0xA; // OK +int main() +{ + int a = 0x; // C2153 + int b = 0x0; // OK + + int c = 0b; // C2153 + int d = 0b0; // OK } ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2162.md b/docs/error-messages/compiler-errors-1/compiler-error-c2162.md index 9255eacdab..2cd9768016 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2162.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2162.md @@ -1,26 +1,23 @@ --- -description: "Learn more about: Compiler Error C2162" title: "Compiler Error C2162" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2162" +ms.date: "03/30/2025" f1_keywords: ["C2162"] helpviewer_keywords: ["C2162"] -ms.assetid: 34923628-d35e-48ab-9072-b95e3b5f6b45 --- # Compiler Error C2162 -expected macro formal parameter +> expected macro formal parameter -The token following a stringizing operator (#) is not a formal parameter name. +The token following a [stringizing operator (#)](../../preprocessor/stringizing-operator-hash.md) or a [charizing operator (#@)](../../preprocessor/charizing-operator-hash-at.md) is not a formal parameter. ## Example -The following sample generates C2162: +The following example generates C2162: ```cpp // C2162.cpp // compile with: /c -#include - -#define print(a) printf_s(b) // OK -#define print(a) printf_s(#b) // C2162 +#define make_string1(s) # // C2162 +#define make_string2(s) #s // OK ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2200.md b/docs/error-messages/compiler-errors-1/compiler-error-c2200.md index bc39dfceb8..c01937be6c 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2200.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2200.md @@ -1,13 +1,21 @@ --- -description: "Learn more about: Compiler Error C2200" title: "Compiler Error C2200" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2200" +ms.date: "02/15/2025" f1_keywords: ["C2200"] helpviewer_keywords: ["C2200"] -ms.assetid: a04139a6-ce18-404b-9bfd-2369fc0af3cb --- # Compiler Error C2200 -'function' : function has already been defined +'function': function has already been defined + +An [`alloc_text`](../../preprocessor/alloc-text.md) pragma uses a function name already defined. Ensure the `alloc_text` pragma appears after the function declaration but before its definition. + +The following sample generates C2200: -An `alloc_text` pragma uses a function name already defined. +```cpp +// C2200.cpp +// compile with: /c +extern "C" void func() {} +#pragma alloc_text("section", func) // C2200 +``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2217.md b/docs/error-messages/compiler-errors-1/compiler-error-c2217.md index bbe71cce5a..009e512bf1 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2217.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2217.md @@ -12,15 +12,9 @@ ms.assetid: 1ce1e3f5-4171-4376-804d-967f7e612935 The first function attribute requires the second attribute. -### To fix by checking the following possible causes - -1. Interrupt (`__interrupt`) function declared as `near`. Interrupt functions must be `far`. - -1. Interrupt function declared with **`__stdcall`**, or **`__fastcall`**. Interrupt functions must use C calling conventions. - ## Example -C2217 can also occur if you attempt to bind a delegate to a CLR function that takes a variable number of arguments. If the function also has e param array overload, use that instead. The following sample generates C2217. +C2217 can occur if you attempt to bind a delegate to a CLR function that takes a variable number of arguments. If the function also has a param array overload, use that instead. The following sample generates C2217. ```cpp // C2217.cpp diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2283.md b/docs/error-messages/compiler-errors-1/compiler-error-c2283.md index 2c01122914..52b1375800 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2283.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2283.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Error C2283" title: "Compiler Error C2283" +description: "Learn more about: Compiler Error C2283" ms.date: "11/04/2016" f1_keywords: ["C2283"] helpviewer_keywords: ["C2283"] -ms.assetid: 8a5b3175-b480-4598-a1f7-0b50504c5caa --- # Compiler Error C2283 -'identifier' : pure specifier or abstract override specifier not allowed on unnamed struct +> '*identifier*': pure specifier or abstract override specifier not allowed on unnamed struct A member function of an unnamed class or structure is declared with a pure specifier, which is not permitted. diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2394.md b/docs/error-messages/compiler-errors-1/compiler-error-c2394.md index 14b86fb044..7e5ede5979 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2394.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2394.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Error C2394" title: "Compiler Error C2394" +description: "Learn more about: Compiler Error C2394" ms.date: "11/04/2016" f1_keywords: ["C2394"] helpviewer_keywords: ["C2394"] -ms.assetid: 653fa9a0-29b3-48aa-bc01-82f98f717a2b --- # Compiler Error C2394 -'your_type::operator'op'" : CLR or WinRToperator not valid. At least one parameter must be of the following types: 'T^', 'T^%', 'T^&', where T = 'your_type' +'*type*::operator *operator*': CLR/WinRT operator not valid. At least one parameter must be of the following types: 'T^', 'T^%', 'T^&', where T = 'type' An operator in a Windows Runtime or managed type did not have at least one parameter whose type is the same as the type of the operator return value. diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2397.md b/docs/error-messages/compiler-errors-1/compiler-error-c2397.md index 271763d69f..56f0115468 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2397.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2397.md @@ -1,9 +1,9 @@ --- -description: "Learn more about: Compiler Error C2397" title: "Compiler Error C2397" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2397" +ms.date: 11/04/2016 f1_keywords: ["C2397"] -ms.assetid: b418cf5a-d50d-4a6c-98a7-994ae35046d1 +helpviewer_keywords: ["C2397"] --- # Compiler Error C2397 diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2433.md b/docs/error-messages/compiler-errors-1/compiler-error-c2433.md index 614e07b1be..75ec082785 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2433.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2433.md @@ -1,26 +1,24 @@ --- -description: "Learn more about: Compiler Error C2433" title: "Compiler Error C2433" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2433" +ms.date: 05/25/2025 f1_keywords: ["C2433"] helpviewer_keywords: ["C2433"] -ms.assetid: 7079fedd-6059-4125-82ef-ebe275f1f9d1 --- # Compiler Error C2433 -'identifier' : 'modifier' not permitted on data declarations +> '*identifier*': '*modifier*' not permitted on data declarations The **`friend`**, **`virtual`**, and **`inline`** modifiers cannot be used for data declarations. ## Example -The following sample generates C2433. +The following example generates C2433: ```cpp // C2433.cpp -class C{}; - -int main() { - inline C c; // C2433 +int main() +{ + virtual int i; // C2433 } ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2440.md b/docs/error-messages/compiler-errors-1/compiler-error-c2440.md index 218b5f7a3d..d12b621c4a 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2440.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2440.md @@ -1,18 +1,17 @@ --- -description: "Learn about type conversion errors that cause Compiler Error C2440." title: "Compiler Error C2440" +description: "Learn about type conversion errors that cause Compiler Error C2440." ms.date: 08/27/2021 f1_keywords: ["C2440"] helpviewer_keywords: ["C2440"] no-loc: ["struct", "const"] -ms.assetid: 36e6676c-f04f-4715-8ba1-f096c4bf3b44 --- # Compiler Error C2440 > '*initializing*' : cannot convert from '*type1*' to '*type2*'\ > '*conversion*' : cannot convert from '*type1*' to '*type2*' -The compiler can't implicitly convert from `*type1*` to `*type2*`, or can't use the specified cast or conversion operator. +The compiler can't implicitly convert from *`type1`* to *`type2`*, or can't use the specified cast or conversion operator. ## Remarks diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2466.md b/docs/error-messages/compiler-errors-1/compiler-error-c2466.md index ae382ccd5f..34e0cca594 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2466.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2466.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Error C2466" title: "Compiler Error C2466" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2466" +ms.date: "03/19/2025" f1_keywords: ["C2466"] helpviewer_keywords: ["C2466"] -ms.assetid: 75b251d1-7d0b-4a86-afca-26adedf74486 --- # Compiler Error C2466 -cannot allocate an array of constant size 0 +> cannot allocate an array of constant size 0 An array is allocated or declared with size zero. The constant expression for the array size must be an integer greater than zero. An array declaration with a zero subscript is legal only for a class, structure, or union member and only with Microsoft extensions ([/Ze](../../build/reference/za-ze-disable-language-extensions.md)). @@ -17,7 +16,6 @@ The following sample generates C2466: ```cpp // C2466.cpp // compile with: /c -int i[0]; // C2466 -int j[1]; // OK -char *p; +int arr1[0]; // C2466 +int arr2[1]; // OK ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2470.md b/docs/error-messages/compiler-errors-1/compiler-error-c2470.md index 1070a0128b..d0bc5eda5a 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2470.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2470.md @@ -1,26 +1,34 @@ --- -description: "Learn more about: Compiler Error C2470" title: "Compiler Error C2470" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2470" +ms.date: "03/29/2025" f1_keywords: ["C2470"] helpviewer_keywords: ["C2470"] -ms.assetid: e17d2cb8-b84c-447c-976a-625f0c96f3fe --- # Compiler Error C2470 -'function' : looks like a function definition, but there is no parameter list; skipping apparent body +> '*function*': looks like a function definition, but there is no parameter list; skipping apparent body A function definition is missing its argument list. -The following sample generates C2470: +## Example + +The following example generates C2470: ```cpp // C2470.cpp -int MyFunc {}; // C2470 -void MyFunc2() {}; //OK +// compile with: /c +template +class C +{ + int func(); +}; -int main(){ - MyFunc(); - MyFunc2(); +template +int C::func // C2470 +// Use the following line to resolve the error: +// int C::func() +{ + return 0; } ``` diff --git a/docs/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099.md b/docs/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099.md index eff111136b..d12d6a6217 100644 --- a/docs/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099.md +++ b/docs/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099.md @@ -2,8 +2,8 @@ description: "Learn more about: Compiler errors C2001 through C2099" title: "Compiler errors C2001 through C2099" ms.date: 08/24/2022 -f1_keywords: ["C2000", "C2029"] -helpviewer_keywords: ["C2000", "C2029"] +f1_keywords: ["C2029"] +helpviewer_keywords: ["C2029"] --- # Compiler errors C2001 through C2099 @@ -20,14 +20,14 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C2003](compiler-error-c2003.md) | expected 'defined id' | | [Compiler error C2004](compiler-error-c2004.md) | expected 'defined(id)' | | [Compiler error C2005](compiler-error-c2005.md) | #line expected a line number, found '*token*' | -| [Compiler error C2006](compiler-error-c2006.md) | '*directive*': expected a filename, found '*token*' | +| [Compiler error C2006](compiler-error-c2006.md) | '*directive*': expected `"FILENAME"` or `` | | [Compiler error C2007](compiler-error-c2007.md) | #define syntax | | [Compiler error C2008](compiler-error-c2008.md) | '*character*': unexpected in macro definition | -| [Compiler error C2009](compiler-error-c2009.md) | reuse of macro formal '*identifier*' | +| [Compiler error C2009](compiler-error-c2009.md) | cannot reuse macro parameter name '*identifier*' | | [Compiler error C2010](compiler-error-c2010.md) | '*character*': unexpected in macro formal parameter list | | [Compiler error C2011](compiler-error-c2011.md) | '*identifier*': '*type*' type redefinition | | [Compiler error C2012](compiler-error-c2012.md) | missing name following '<' | -| [Compiler error C2013](compiler-error-c2013.md) | missing '>' | +| [Compiler error C2013](compiler-error-c2013.md) | expected a '*token*' | | [Compiler error C2014](compiler-error-c2014.md) | preprocessor command must start as first nonwhite space | | [Compiler error C2015](compiler-error-c2015.md) | too many characters in constant | | [Compiler error C2016](compiler-error-c2016.md) | C requires that a struct or union has at least one member | @@ -89,7 +89,7 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C2072](compiler-error-c2072.md) | '*identifier*': initialization of a function | | [Compiler error C2073](compiler-error-c2073.md) | **(Obsolete)** '*identifier*': elements of partially initialized array must have a default constructor | | [Compiler error C2074](compiler-error-c2074.md) | '*identifier*': '*type*' initialization requires a brace-enclosed initializer list | -| [Compiler error C2075](compiler-error-c2075.md) | '*identifier*': array initialization requires a brace-enclosed initializer list | +| [Compiler error C2075](compiler-error-c2075.md) | '*identifier*': initialization requires a brace-enclosed initializer list | | [Compiler error C2076](compiler-error-c2076.md) | a brace-enclosed initializer list cannot be used in a new-expression whose type contains '*type*' | | [Compiler error C2077](compiler-error-c2077.md) | non-scalar field initializer '*identifier*' | | [Compiler error C2078](compiler-error-c2078.md) | too many initializers | @@ -102,11 +102,11 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C2085](compiler-error-c2085.md) | '*identifier*': not in formal parameter list | | [Compiler error C2086](compiler-error-c2086.md) | '*identifier*': redefinition | | [Compiler error C2087](compiler-error-c2087.md) | '*identifier*': missing subscript | -| [Compiler error C2088](compiler-error-c2088.md) | '*operator*': illegal for struct/class/union | +| [Compiler error C2088](compiler-error-c2088.md) | built-in operator '*operator*' cannot be applied to an operand of type '*class type*' | | [Compiler error C2089](compiler-error-c2089.md) | '*identifier*': '*type*' too large | | [Compiler error C2090](compiler-error-c2090.md) | function returns array | | [Compiler error C2091](compiler-error-c2091.md) | function returns function | -| [Compiler error C2092](compiler-error-c2092.md) | '*identifier*' array element type cannot be function | +| [Compiler error C2092](compiler-error-c2092.md) | '*identifier*' array element type cannot be function or abstract class type | | [Compiler error C2093](compiler-error-c2093.md) | '*identifier1*': cannot be initialized using address of automatic variable '*identifier2*' | | [Compiler error C2094](compiler-error-c2094.md) | label '*identifier*' was undefined | | [Compiler error C2095](compiler-error-c2095.md) | '*function*': actual parameter has type 'void': parameter *number* | diff --git a/docs/error-messages/compiler-errors-1/compiler-errors-c2100-through-c2199.md b/docs/error-messages/compiler-errors-1/compiler-errors-c2100-through-c2199.md index f6bbfd9917..ef2e8e4b3f 100644 --- a/docs/error-messages/compiler-errors-1/compiler-errors-c2100-through-c2199.md +++ b/docs/error-messages/compiler-errors-1/compiler-errors-c2100-through-c2199.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler errors C2100 through C2199" title: "Compiler errors C2100 through C2199" +description: "Learn more about: Compiler errors C2100 through C2199" ms.date: "04/21/2019" f1_keywords: ["C2119", "C2123", "C2125", "C2126", "C2127", "C2136", "C2176", "C2187", "C2189"] -helpviewer_keywords: ["C2119", "C2123", "C2125", "C2126", "C2127", "C2131", "C2136", "C2176", "C2187", "C2189"] -ms.assetid: 1ccab076-0954-4386-b959-d3112a6793ae +helpviewer_keywords: ["C2119", "C2123", "C2125", "C2126", "C2127", "C2136", "C2176", "C2187", "C2189"] --- # Compiler errors C2100 through C2199 @@ -16,7 +15,7 @@ The articles in this section of the documentation explain a subset of the error |Error|Message| |-----------|-------------| -|[Compiler error C2100](compiler-error-c2100.md)|illegal indirection| +|[Compiler error C2100](compiler-error-c2100.md)|you cannot dereference an operand of type '*type*'| |[Compiler error C2101](compiler-error-c2101.md)|'&' on constant| |[Compiler error C2102](compiler-error-c2102.md)|'&' requires l-value| |[Compiler error C2103](compiler-error-c2103.md)|'&' on register variable| @@ -32,11 +31,11 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2113](compiler-error-c2113.md)|'-': pointer can only be subtracted from another pointer| |[Compiler error C2114](compiler-error-c2114.md)|'*operator*': pointer on left; needs integral value on right| |[Compiler error C2115](compiler-error-c2115.md)|'*operator*': incompatible types| -|[Compiler error C2116](compiler-error-c2116.md)|function parameter lists differed| +|[Compiler error C2116](compiler-error-c2116.md)|'*name*': function parameter lists do not match between declarations| |[Compiler error C2117](compiler-error-c2117.md)|'*identifier*': array bounds overflow| |[Compiler error C2118](compiler-error-c2118.md)|negative subscript| |Compiler error C2119|'*identifier*': the type for '*type*' cannot be deduced from an empty initializer| -|[Compiler error C2120](compiler-error-c2120.md)|'void' illegal with all types| +|[Compiler error C2120](compiler-error-c2120.md)|'`void`' cannot be combined with any other type specifier| |[Compiler error C2121](compiler-error-c2121.md)|'#': invalid character: possibly the result of a macro expansion| |[Compiler error C2122](compiler-error-c2122.md)|'*identifier*': prototype parameter in name list illegal| |Compiler error C2123|'*identifier*': alias templates cannot be explicitly or partially specialized| @@ -51,7 +50,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2132](compiler-error-c2132.md)|syntax error: unexpected identifier| |[Compiler error C2133](compiler-error-c2133.md)|'*identifier*': unknown size| |[Compiler error C2134](compiler-error-c2134.md)|'*function*': call does not result in a constant expression| -|[Compiler error C2135](compiler-error-c2135.md)|'*operator*': illegal bit field operation| +|[Compiler error C2135](compiler-error-c2135.md)|'*identifier*': you cannot apply '*operator*' to a bit-field| |Compiler error C2136|authoring API contract not allowed| |[Compiler error C2137](compiler-error-c2137.md)|empty character constant| |[Compiler error C2138](compiler-error-c2138.md)|illegal to define an enumeration without any members| @@ -87,7 +86,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2168](compiler-error-c2168.md)|'*function*': too few actual parameters for intrinsic function| |[Compiler error C2169](compiler-error-c2169.md)|'*function*': intrinsic function, cannot be defined| |[Compiler error C2170](compiler-error-c2170.md)|'*identifier*': not declared as a function, cannot be intrinsic| -|[Compiler error C2171](compiler-error-c2171.md)|'*operator*': illegal on operands of type '*type*'| +|[Compiler error C2171](compiler-error-c2171.md)|operator '*operator*' cannot be applied to an operand of type '*type*'| |[Compiler error C2172](compiler-error-c2172.md)|'*function*': actual parameter is not a pointer: parameter *number*| |[Compiler error C2173](compiler-error-c2173.md)|'*function*': actual parameter is not a pointer: parameter *number*, parameter list *number*| |[Compiler error C2174](compiler-error-c2174.md)|'*function*': actual parameter has type 'void': parameter *number*, parameter list *number*| @@ -119,5 +118,5 @@ The articles in this section of the documentation explain a subset of the error ## See also -[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md) \ -[Compiler errors C2001 - C3999, C7000 - C7999](../compiler-errors-1/compiler-errors-c2000-c3999.md) +[C/C++ Compiler and build tools errors and warnings](c-cpp-build-errors.md)\ +[Compiler errors C2001 - C3999, C7000 - C7999](compiler-errors-c2000-c3999.md) diff --git a/docs/error-messages/compiler-errors-1/compiler-errors-c2200-through-c2299.md b/docs/error-messages/compiler-errors-1/compiler-errors-c2200-through-c2299.md index aeb9e58f33..061b94f169 100644 --- a/docs/error-messages/compiler-errors-1/compiler-errors-c2200-through-c2299.md +++ b/docs/error-messages/compiler-errors-1/compiler-errors-c2200-through-c2299.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler errors C2200 through C2299" title: "Compiler errors C2200 through C2299" +description: "Learn more about: Compiler errors C2200 through C2299" ms.date: "04/21/2019" -f1_keywords: ["C2202", "C2209", "C2210", "C2211", "C2214", "C2215", "C2221", "C2225", "C2230", "C2235", "C2237", "C2239", "C2240", "C2257", "C2260", "C2263", "C2265", "C2269", "C2278", "C2281", "C2282", "C2288", "C2291", "C2294"] -helpviewer_keywords: ["C2202", "C2209", "C2210", "C2211", "C2214", "C2215", "C2221", "C2225", "C2230", "C2235", "C2237", "C2239", "C2240", "C2257", "C2260", "C2263", "C2265", "C2269", "C2278", "C2281", "C2282", "C2288", "C2291", "C2294"] -ms.assetid: 9b36d11b-9510-4390-96f1-0c9235124d14 +f1_keywords: ["C2202", "C2209", "C2210", "C2211", "C2214", "C2215", "C2221", "C2225", "C2230", "C2235", "C2237", "C2239", "C2240", "C2257", "C2260", "C2263", "C2265", "C2269", "C2278", "C2281", "C2282", "C2284", "C2288", "C2291", "C2294"] +helpviewer_keywords: ["C2202", "C2209", "C2210", "C2211", "C2214", "C2215", "C2221", "C2225", "C2230", "C2235", "C2237", "C2239", "C2240", "C2257", "C2260", "C2263", "C2265", "C2269", "C2278", "C2281", "C2282", "C2284", "C2288", "C2291", "C2294"] --- # Compiler errors C2200 through C2299 @@ -36,7 +35,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2217](compiler-error-c2217.md)|'*attribute1*' requires '*attribute2*'| |[Compiler error C2218](compiler-error-c2218.md)|'*calltype*' cannot be used with '/arch:IA32'| |[Compiler error C2219](compiler-error-c2219.md)|syntax error: type qualifier must be after '*'| -|[Compiler error C2220](compiler-error-c2220.md)|warning treated as error - no '*filetype*' file generated| +|[Compiler error C2220](compiler-error-c2220.md)|the following warning is treated as an error| |Compiler error C2221|Obsolete.| |[Compiler error C2222](compiler-error-c2222.md)|unexpected type '*type*': a base-class or member was expected| |[Compiler error C2223](compiler-error-c2223.md)|left of '->*identifier*' must point to struct/union| @@ -51,7 +50,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2232](compiler-error-c2232.md)|'->*identifier*': left operand has 'class/struct/union' type, use '.'| |[Compiler error C2233](compiler-error-c2233.md)|'*identifier*': arrays of objects containing zero-size arrays are illegal| |[Compiler error C2234](compiler-error-c2234.md)|*identifier*': arrays of references are illegal| -|Compiler error C2235|Obsolete.| +|Compiler error C2235|mismatching target architecture for compiled module interface for '*architecture 1*' from '*architecture 2*'| |[Compiler error C2236](compiler-error-c2236.md)|unexpected token '*token*'. Did you forget a ';'?| |Compiler error C2237|multiple module declaration| |[Compiler error C2238](compiler-error-c2238.md)|unexpected token(s) preceding '*token*'| @@ -79,7 +78,7 @@ The articles in this section of the documentation explain a subset of the error |Compiler error C2260|'*specifier*': invalid InternalsVisibleToAttribute friend assembly specifier| |[Compiler error C2261](compiler-error-c2261.md)|'*string*': assembly reference is invalid and cannot be resolved| |[Compiler error C2262](compiler-error-c2262.md)|'*specifier*': InternalsVisibleTo declarations cannot have a version, culture, or processor architecture specified| -|Compiler error C2263|Obsolete.| +|Compiler error C2263|'*module name*': a translation unit cannot be imported into itself| |[Compiler error C2264](compiler-error-c2264.md)|'*function*': error in function definition or declaration; function not called| |Compiler error C2265|Obsolete.| |[Compiler error C2266](compiler-error-c2266.md)|'*identifier*': reference to a non-constant bounded array is illegal| @@ -91,20 +90,20 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2272](compiler-error-c2272.md)|'*function*': modifiers not allowed on static member functions| |[Compiler error C2273](compiler-error-c2273.md)|'*type*': illegal as right side of '->' operator| |[Compiler error C2274](compiler-error-c2274.md)|'*type*': illegal as right side of '.' operator| -|[Compiler error C2275](compiler-error-c2275.md)|'*type*': illegal use of this type as an expression| +|[Compiler error C2275](compiler-error-c2275.md)|'*type*': expected an expression instead of a type| |[Compiler error C2276](compiler-error-c2276.md)|'*operator*': illegal operation on bound member function expression| |[Compiler error C2277](compiler-error-c2277.md)|'*function*': cannot take address of this member function| -|Compiler error C2278|Obsolete.| +|Compiler error C2278|'*token*': unexpected token. Format is '`__has_cpp_attribute( identifier )`'| |[Compiler error C2279](compiler-error-c2279.md)|exception specification cannot appear in a typedef declaration| |[Compiler error C2280](compiler-error-c2280.md)|'*class*::*function*': attempting to reference a deleted function| |Compiler error C2281|'*class*::*function*': a function can only be deleted on the first declaration| |Compiler error C2282|'*function1*' cannot override '*function2*'| -|[Compiler error C2283](compiler-error-c2283.md)|'*identifer*': pure specifier or abstract override specifier not allowed on unnamed class/struct| +|[Compiler error C2283](compiler-error-c2283.md)|'*identifier*': pure specifier or abstract override specifier not allowed on unnamed struct| |Compiler error C2284|'*function*': illegal argument to intrinsic function, parameter *number*| |[Compiler error C2285](compiler-error-c2285.md)|pointers to members representation has already been determined - pragma ignored| |[Compiler error C2286](compiler-error-c2286.md)|pointers to members of '*identifier*' representation is already set to *inheritance* - declaration ignored| |[Compiler error C2287](compiler-error-c2287.md)|'*identifier*': inheritance representation: '*inheritiance*' is less general than the required '*inheritance*'| -|Compiler error C2288|Obsolete.| +|Compiler error C2288|preprocessing number '*number*' is not a valid integer or floating literal| |[Compiler error C2289](compiler-error-c2289.md)|same type qualifier used more than once| |[Compiler error C2290](compiler-error-c2290.md)|C++ 'asm' syntax ignored. Use __asm.| |Compiler error C2291|An anonymous namespace cannot be exported.| diff --git a/docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md b/docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md index d64bb155be..3abd7f9ea4 100644 --- a/docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md +++ b/docs/error-messages/compiler-errors-1/compiler-errors-c2300-through-c2399.md @@ -53,7 +53,7 @@ The articles in this section of the documentation explain a subset of the error |Compiler error C2335|'*identifier*': a type cannot be introduced in a function parameter list| |Compiler error C2336|'*type*': illegal type| |[Compiler error C2337](compiler-error-c2337.md)|'*attribute*': attribute not found| -|[Compiler error C2338](compiler-error-c2338.md)|*(error message from external provider)*| +|[Compiler error C2338](compiler-error-c2338.md)|static_assert failed: '*(error message from external provider)*'| |Compiler error C2339|'*identifier*': illegal type in embedded-IDL| |Compiler error C2340|'*identifier*': 'static' can only be used within a class definition| |[Compiler error C2341](compiler-error-c2341.md)|'*section*': segment must be defined using #pragma data_seg, code_seg or section prior to use| @@ -67,7 +67,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2349](compiler-error-c2349.md)|'*function*' cannot be compiled as managed: '*explanation*'; use #pragma unmanaged| |[Compiler error C2350](compiler-error-c2350.md)|'*identifier*' is not a static member| |[Compiler error C2351](compiler-error-c2351.md)|obsolete C++ constructor initialization syntax| -|[Compiler error C2352](compiler-error-c2352.md)|'*identifier*': illegal call of non-static member function| +|[Compiler error C2352](compiler-error-c2352.md)|'*identifier*': a call of a non-static member function requires an object| |[Compiler error C2353](compiler-error-c2353.md)|exception specification is not allowed| |Compiler error C2354|Obsolete.| |[Compiler error C2355](compiler-error-c2355.md)|'this': can only be referenced inside non-static member functions or non-static data member initializers| @@ -96,7 +96,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2378](compiler-error-c2378.md)|'*identifier*': redefinition; symbol cannot be overloaded with a typedef| |[Compiler error C2379](compiler-error-c2379.md)|formal parameter *number* has different type when promoted| |[Compiler error C2380](compiler-error-c2380.md)|type(s) preceding '*identifier*' (constructor with return type, or illegal redefinition of current class-name?)| -|[Compiler error C2381](compiler-error-c2381.md)|'*identifier*': redefinition; '__declspec(noreturn)' or '[[noreturn]]' differs| +|[Compiler error C2381](compiler-error-c2381.md)|'*identifier*': redefinition; '`noreturn`' differs| |[Compiler error C2382](compiler-error-c2382.md)|'*identifier*': redefinition; different exception specifications| |[Compiler error C2383](compiler-error-c2383.md)|'*identifier*': default-arguments are not allowed on this symbol| |[Compiler error C2384](compiler-error-c2384.md)|'*member*': cannot apply thread_local or __declspec(thread) to a member of a managed/WinRT class| diff --git a/docs/error-messages/compiler-errors-1/compiler-errors-c2400-through-c2499.md b/docs/error-messages/compiler-errors-1/compiler-errors-c2400-through-c2499.md index 3190212589..d7e931c1e4 100644 --- a/docs/error-messages/compiler-errors-1/compiler-errors-c2400-through-c2499.md +++ b/docs/error-messages/compiler-errors-1/compiler-errors-c2400-through-c2499.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler errors C2400 Through C2499" title: "Compiler errors C2400 Through C2499" +description: "Learn more about: Compiler errors C2400 Through C2499" ms.date: "04/21/2019" f1_keywords: ["C2416", "C2442", "C2453", "C2454", "C2455", "C2456", "C2468", "C2475", "C2478", "C2481", "C2497"] helpviewer_keywords: ["C2416", "C2442", "C2453", "C2454", "C2455", "C2456", "C2468", "C2475", "C2478", "C2481", "C2497"] -ms.assetid: f1f05572-af0b-497b-bde4-4c81ec01af3b --- # Compiler errors C2400 Through C2499 @@ -51,7 +50,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2432](compiler-error-c2432.md)|illegal reference to 16-bit data in '*context*'| |[Compiler error C2433](compiler-error-c2433.md)|'*identifier*': '*modifier*' not permitted on data declarations| |[Compiler error C2434](compiler-error-c2434.md)|'*symbol*': a symbol declared with `__declspec(process)` cannot be dynamically initialized in `/clr:pure` mode| -|[Compiler error C2435](compiler-error-c2435.md)|'var': dynamic initialization requires managed CRT, cannot compile with `/clr:safe`| +|[Compiler error C2435](compiler-error-c2435.md)|'*var*': dynamic initialization requires managed CRT, cannot compile with `/clr:safe`| |[Compiler error C2436](compiler-error-c2436.md)|'*identifier*': member function or nested class in constructor initializer list| |[Compiler error C2437](compiler-error-c2437.md)|'*identifier*': has already been initialized| |[Compiler error C2438](compiler-error-c2438.md)|'*identifier*': cannot initialize static class data via constructor| @@ -61,11 +60,12 @@ The articles in this section of the documentation explain a subset of the error |Compiler error C2442|'*identifier*': nested-namespace-definition cannot be inline or have attributes| |[Compiler error C2443](compiler-error-c2443.md)|operand size conflict| |[Compiler error C2444](compiler-error-c2444.md)|'*identifier*': used ANSI prototype, found 'type', expected '{' or ';'| +|Compiler error C2445|result type of conditional expression is ambiguous: types '*type 1*' and '*type 2*' can be converted to multiple common types| |[Compiler error C2446](compiler-error-c2446.md)|'*operator*': no conversion from '*type_1*' to '*type_2*'| |[Compiler error C2447](compiler-error-c2447.md)|'{': missing function header (old-style formal list?)| |[Compiler error C2448](compiler-error-c2448.md)|'*identifier*': function-style initializer appears to be a function definition| |[Compiler error C2449](compiler-error-c2449.md)|found '{' at file scope (missing function header?)| -|[Compiler error C2450](compiler-error-c2450.md)|switch expression of type '*type*' is illegal| +|[Compiler error C2450](compiler-error-c2450.md)|a `switch` expression of type '*type*' is illegal| |[Compiler error C2451](compiler-error-c2451.md)|conditional expression of type '*type*' is illegal| |[Compiler error C2452](compiler-error-c2452.md)|'*type*': invalid source type for `safe_cast`| |Compiler error C2453|'*type*': invalid target type for safe_cast| diff --git a/docs/error-messages/compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md b/docs/error-messages/compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md index 47a7d928d5..8ba3fceb81 100644 --- a/docs/error-messages/compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md +++ b/docs/error-messages/compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md @@ -1,12 +1,11 @@ --- -description: "Learn more about: Compiler fatal errors C999 through C1999" -title: "Compiler fatal errors C999 through C1999" -ms.date: 08/17/2022 -f1_keywords: ["C1006", "C1024", "C1027", "C1030", "C1032", "C1034", "C1036", "C1039", "C1040", "C1041", "C1042", "C1043", "C1044", "C1048", "C1056", "C1058", "C1059", "C1063", "C1069", "C1101", "C1102", "C1105", "C1110", "C1111", "C1112", "C1114", "C1118", "C1119", "C1127", "C1193", "C1194", "C1195", "C1198", "C1199", "C1203", "C1204", "C1212", "C1213", "C1214", "C1300", "C1301", "C1302", "C1303", "C1304", "C1306", "C1354", "C1355", "C1356", "C1357", "C1358", "C1384", "C1385", "C1451", "C1505", "C1507", "C1511", "C1604", "C1605", "C1901", "C1906", "C1907"] -helpviewer_keywords: ["C1006", "C1024", "C1027", "C1030", "C1032", "C1034", "C1036", "C1039", "C1040", "C1041", "C1042", "C1043", "C1044", "C1048", "C1056", "C1058", "C1059", "C1063", "C1069", "C1101", "C1102", "C1105", "C1110", "C1111", "C1112", "C1114", "C1118", "C1119", "C1127", "C1193", "C1194", "C1195", "C1198", "C1199", "C1203", "C1204", "C1212", "C1213", "C1214", "C1300", "C1301", "C1302", "C1303", "C1304", "C1306", "C1354", "C1355", "C1356", "C1357", "C1358", "C1384", "C1385", "C1451", "C1505", "C1507", "C1511", "C1604", "C1605", "C1901", "C1906", "C1907"] -ms.assetid: 6c8df109-7594-48ed-987a-97d9fe2b04af +title: "Compiler fatal errors C1001 through C1907" +description: "Learn more about: Compiler fatal errors C1001 through C1907" +ms.date: 01/24/2025 +f1_keywords: ["C1006", "C1024", "C1027", "C1030", "C1032", "C1034", "C1036", "C1039", "C1040", "C1041", "C1042", "C1043", "C1044", "C1048", "C1056", "C1058", "C1059", "C1063", "C1069", "C1101", "C1102", "C1105", "C1110", "C1111", "C1112", "C1114", "C1118", "C1119", "C1127", "C1193", "C1194", "C1195", "C1198", "C1199", "C1203", "C1204", "C1212", "C1213", "C1214", "C1300", "C1301", "C1302", "C1303", "C1304", "C1306", "C1354", "C1355", "C1356", "C1357", "C1358", "C1384", "C1385", "C1451", "C1505", "C1507", "C1511", "C1604", "C1605", "C1859", "C1901", "C1906", "C1907"] +helpviewer_keywords: ["C1006", "C1024", "C1027", "C1030", "C1032", "C1034", "C1036", "C1039", "C1040", "C1041", "C1042", "C1043", "C1044", "C1048", "C1056", "C1058", "C1059", "C1063", "C1069", "C1101", "C1102", "C1105", "C1110", "C1111", "C1112", "C1114", "C1118", "C1119", "C1127", "C1193", "C1194", "C1195", "C1198", "C1199", "C1203", "C1204", "C1212", "C1213", "C1214", "C1300", "C1301", "C1302", "C1303", "C1304", "C1306", "C1354", "C1355", "C1356", "C1357", "C1358", "C1384", "C1385", "C1451", "C1505", "C1507", "C1511", "C1604", "C1605", "C1859", "C1901", "C1906", "C1907"] --- -# Compiler fatal errors C999 through C1999 +# Compiler fatal errors C1001 through C1907 The articles in this section of the documentation explain a subset of the error messages that are generated by the Microsoft C/C++ compiler. @@ -27,7 +26,7 @@ The articles in this section of the documentation explain a subset of the error | [Fatal error C1009](fatal-error-c1009.md) | compiler limit: macros nested too deeply | | [Fatal error C1010](fatal-error-c1010.md) | unexpected end of file while looking for precompiled header. Did you forget to add '`#include <`*file*`>`' to your source? | | [Fatal error C1011](fatal-error-c1011.md) | cannot locate standard module interface. Did you install the library part of the C++ modules feature in VS setup? | -| [Fatal error C1012](fatal-error-c1012.md) | unmatched parenthesis: missing '*character*" | +| [Fatal error C1012](fatal-error-c1012.md) | unmatched parenthesis: missing '*character*' | | [Fatal error C1013](fatal-error-c1013.md) | compiler limit: too many open parentheses | | [Fatal error C1014](fatal-error-c1014.md) | too many include files: depth = *number* | | [Fatal error C1015](fatal-error-c1015.md) | header-names '*header-name*' and '*header-name*' identify the same header and cannot be used as both `/headerUnit:quoted` and `/headerUnit:angle` arguments; please provide this header-name only once | @@ -43,6 +42,7 @@ The articles in this section of the documentation explain a subset of the error | [Fatal error C1025](fatal-error-c1025-c1115.md) | too many nested lambdas | | [Fatal error C1026](fatal-error-c1026.md) | parser stack overflow, program too complex | | Fatal error C1027 | **(Obsolete)** Inconsistent values for /Ym between creation and use of precompiled header | +| Fatal error C1028 | missing IFC for analysis. Please rebuild *module* '*ifc filename*' with `/analyze`. | | Fatal error C1030 | WMMX types not allowed in the function signature by the calling convention | | Fatal error C1032 | `__eabi` requires VFP code generation (`/QRfpe-`) | | [Fatal error C1033](fatal-error-c1033.md) | cannot open program database '*file*' | @@ -102,6 +102,7 @@ The articles in this section of the documentation explain a subset of the error | [Fatal error C1092](fatal-error-c1092.md) | Edit and Continue does not support changes to data types; build required | | [Fatal error C1093](fatal-error-c1093.md) | API call '*function*' failed '*HRESULT*': '*description*' | | [Fatal error C1094](fatal-error-c1094.md) | '`-Zm`*number*': command line option is inconsistent with value used to build precompiled header ('`-Zm`*number*') | +| Fatal error C1095 | Failed to locate a free memory range. Use `/Yb` to specify a base address. | | [Fatal error C1098](fatal-error-c1098.md) | Version mismatch with Edit and Continue engine | | [Fatal error C1099](fatal-error-c1099.md) | Edit and Continue engine terminating compile | | [Fatal error C1100](fatal-error-c1100.md) | unable to initialize OLE: *error* | @@ -110,12 +111,13 @@ The articles in this section of the documentation explain a subset of the error | [Fatal error C1103](fatal-error-c1103.md) | fatal error importing progid: '*message*' | | [Fatal error C1104](fatal-error-c1104.md) | fatal error importing libid: '*message*' | | Fatal error C1105 | *message*: *HRESULT error* | +| Fatal error C1106 | compiler limit: only *number* function parameters are allowed | | [Fatal error C1107](fatal-error-c1107.md) | could not find assembly '*assembly*': please specify the assembly search path using `/AI` or by setting the `LIBPATH` environment variable | | [Fatal error C1108](fatal-error-c1108.md) | unable to find DLL: '*file*' | | [Fatal error C1109](fatal-error-c1109.md) | unable to find '*symbol*' in DLL '*file*' | | Fatal error C1110 | too many nested template/generic definitions | | Fatal error C1111 | too many template/generic parameters | -| Fatal error C1112 | compiler limit: '*number*' too many macro arguments, only *number* allowed | +| Fatal error C1112 | compiler limit: '*number*' too many macro arguments, only '*number*' allowed | | [Fatal error C1113](fatal-error-c1113.md) | `#using` failed on '*file*' | | Fatal error C1114 | '*file*': WinRT does not support `#using` of a managed assembly | | [Fatal error C1115](fatal-error-c1025-c1115.md) | too many nested lambdas | @@ -129,7 +131,7 @@ The articles in this section of the documentation explain a subset of the error | Fatal error C1127 | *Operation* requires *option* | | [Fatal error C1128](fatal-error-c1128.md) | number of sections exceeded object file format limit: compile with `/bigobj` | | [Fatal error C1189](fatal-error-c1189.md) | `#error`: *message* | -| [Fatal error C1190](fatal-error-c1190.md) | managed targeted code requires a '`/clr`' option | +| [Fatal error C1190](fatal-error-c1190.md) | `System::Object` not found, missing `/clr` option or missing import of standard assemblies? | | [Fatal error C1191](fatal-error-c1191.md) | '*file*' can only be imported at global scope | | [Fatal error C1192](fatal-error-c1192.md) | `#using` failed on '*file*' | | Fatal error C1193 | an error expected in *file*(*line*) not reached | @@ -153,6 +155,7 @@ The articles in this section of the documentation explain a subset of the error | Fatal error C1212 | Input file was modified by another process while building: '*filename*' | | Fatal error C1213 | Header units are unsupported without `/Zc:preprocessor` | | Fatal error C1214 | Modules conflict with non-standard behavior requested via '*option*' | +| Fatal error C1215 | Cannot open file '*filename*' corresponding to warning set '`-W`*warning set*' | | Fatal error C1300 | error accessing program database *file* (*message*) | | Fatal error C1301 | error accessing program database *file*, invalid format, please delete and rebuild | | Fatal error C1302 | no profile data for module '*module*' in profile database '*file*' | diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1012.md b/docs/error-messages/compiler-errors-1/fatal-error-c1012.md index 3de04be3d2..21849c9d15 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1012.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1012.md @@ -1,13 +1,21 @@ --- -description: "Learn more about: Fatal Error C1012" title: "Fatal Error C1012" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1012" +ms.date: "02/20/2025" f1_keywords: ["C1012"] helpviewer_keywords: ["C1012"] -ms.assetid: 92cc83a7-b5b8-4da8-a128-9b7ccb510496 --- # Fatal Error C1012 -unmatched parenthesis : missing character +unmatched parenthesis: missing 'character' The parentheses in a preprocessor directive do not match. + +The following sample generates C1012: + +```cpp +// C1012.cpp +// compile with: /c +#if (0 // C1012 +#endif +``` diff --git a/docs/error-messages/compiler-errors-1/fatal-error-C1015.md b/docs/error-messages/compiler-errors-1/fatal-error-c1015.md similarity index 100% rename from docs/error-messages/compiler-errors-1/fatal-error-C1015.md rename to docs/error-messages/compiler-errors-1/fatal-error-c1015.md index e407271389..71edb00f18 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-C1015.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1015.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Fatal Error C1015" title: "Fatal Error C1015" +description: "Learn more about: Fatal Error C1015" ms.date: 08/17/2022 f1_keywords: ["C1015"] helpviewer_keywords: ["C1015"] diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2574.md b/docs/error-messages/compiler-errors-2/compiler-error-c2574.md index 0581e78c1f..cc557824ff 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2574.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2574.md @@ -1,25 +1,30 @@ --- -description: "Learn more about: Compiler Error C2574" title: "Compiler Error C2574" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2574" +ms.date: 06/04/2025 f1_keywords: ["C2574"] helpviewer_keywords: ["C2574"] -ms.assetid: 3e1c5c18-ee8b-4dbb-bfc0-d3b8991af71b --- # Compiler Error C2574 -'destructor' : cannot be declared static +> '*function*': cannot be declared static + +## Remarks -Neither destructors nor constructors can be declared **`static`**. +Neither [constructors](../../cpp/constructors-cpp.md) nor [destructors](../../cpp/destructors-cpp.md) can be declared **`static`**. -The following sample generates C2574: +## Example + +The following example generates C2574: ```cpp // C2574.cpp // compile with: /c -class A { - virtual static ~A(); // C2574 - // try the following line instead - // virtual ~A(); +struct S +{ + static S() {} // C2574 + + // Try the following line instead: + // S() {} }; ``` diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2583.md b/docs/error-messages/compiler-errors-2/compiler-error-c2583.md index be529b59a7..e6a0d84075 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2583.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2583.md @@ -1,28 +1,30 @@ --- -description: "Learn more about: Compiler Error C2583" title: "Compiler Error C2583" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2583" +ms.date: 06/06/2025 f1_keywords: ["C2583"] helpviewer_keywords: ["C2583"] -ms.assetid: b1c952dc-872c-47e4-9fc8-4dd72bcee6f9 --- # Compiler Error C2583 -'identifier' : 'const/volatile' 'this' pointer is illegal for constructors/destructors +> '*identifier*': '*const/volatile*' 'this' pointer is illegal for constructors/destructors + +## Remarks + +A [constructor](../../cpp/constructors-cpp.md) or [destructor](../../cpp/destructors-cpp.md) can't be declared **`const`** or **`volatile`**. -A constructor or destructor is declared **`const`** or **`volatile`**. This is not allowed. +## Example -The following sample generates C2583: +The following example generates C2583: ```cpp // C2583.cpp // compile with: /c -class A { -public: - int i; - A() const; // C2583 +struct S +{ + S() const {} // C2583 - // try the following line instead - // A(); + // Try the following line instead: + // S() {} }; ``` diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2601.md b/docs/error-messages/compiler-errors-2/compiler-error-c2601.md index 451d97d15c..0a5225628f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2601.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2601.md @@ -1,28 +1,51 @@ --- -description: "Learn more about: Compiler Error C2601" title: "Compiler Error C2601" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2601" +ms.date: 06/04/2025 f1_keywords: ["C2601"] helpviewer_keywords: ["C2601"] -ms.assetid: 88275582-5f37-45d7-807d-05f06ba00965 --- # Compiler Error C2601 -'function' : local function definitions are illegal +> '*function*': local function definitions are illegal + +## Remarks Code tries to define a function within a function. -Or, there may be an extra brace in your source code before the location of the C2601 error. +Or, there may be an extra/missing brace before the location of the C2601 error. -The following sample generates C2601: +## Examples + +### Define function within a function + +[Lambda Expressions](../../cpp/lambda-expressions-in-cpp.md) may be used to emulate the behavior of local functions: ```cpp -// C2601.cpp -int main() { - int i = 0; +// C2601a.cpp +int main() +{ + int increment(int value) // C2601 + { + return value + 1; + } + + // Try the following line instead: + // auto increment = [](int value) { return value + 1; }; - void funcname(int j) { // C2601 - j++; - } + int two = increment(1); } ``` + +### Missing closing brace + +If a preceding function is missing a closing brace, the subsequent function is taken to be a local function: + +```cpp +// C2601b.cpp +void func() +{ +// missing '}' brace here + +int main() {} // C2601 +``` diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2640.md b/docs/error-messages/compiler-errors-2/compiler-error-c2640.md index c1467898ef..5014adb77d 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2640.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2640.md @@ -1,23 +1,25 @@ --- -description: "Learn more about: Compiler Error C2640" title: "Compiler Error C2640" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2640" +ms.date: "03/17/2025" f1_keywords: ["C2640"] helpviewer_keywords: ["C2640"] -ms.assetid: e4d137ab-ed1d-457c-9eec-b70d97f1b0b4 --- # Compiler Error C2640 -'identifier' : __based modifier illegal on reference +> 'abstract declarator': __based modifier illegal on reference -The **`__based`** modifier can be used on pointers only. +The [**`__based`**](../../cpp/based-pointers-cpp.md) modifier can be used on pointers only. The following sample generates C2640: ```cpp // C2640.cpp -void f(int i) { - void *vp; - int _based(vp) &vr = I; // C2640 +int* ptr; + +int main() +{ + int __based(ptr)& based_ref; // C2640 + int __based(ptr)* based_ptr; // OK } ``` diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2647.md b/docs/error-messages/compiler-errors-2/compiler-error-c2647.md index 20f2b56c02..736eee85d9 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2647.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2647.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Error C2647" title: "Compiler Error C2647" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2647" +ms.date: 11/04/2016 f1_keywords: ["C2647"] helpviewer_keywords: ["C2647"] -ms.assetid: 1034589e-bc3e-41a6-831f-2a1a4b8a2500 --- # Compiler Error C2647 'operator': cannot dereference a 'type1' on a 'type2' -The left operand of a pointer-to-member operator ( `->*` or `.*` ) cannot be implicitly converted to a type related to the right operator. +The left operand of a pointer-to-member operator (`->*` or `.*`) cannot be implicitly converted to a type related to the right operator. The following sample generates C2647: diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2653.md b/docs/error-messages/compiler-errors-2/compiler-error-c2653.md index b1cbd55778..dba63492f1 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2653.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2653.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C2653" title: "Compiler Error C2653" -ms.date: "11/30/2017" +description: "Learn more about: Compiler Error C2653" +ms.date: 11/30/2017 f1_keywords: ["C2653"] helpviewer_keywords: ["C2653"] -ms.assetid: 3f49e731-affd-43a0-a8d0-181db7650bc3 --- # Compiler Error C2653 @@ -14,7 +13,7 @@ The language syntax requires a class, structure, union, or namespace name here. This error can occur when you use a name that has not been declared as a class, structure, union, or namespace in front of a scope operator. To fix this issue, declare the name or include the header that declares the name before it is used. -C2653 is also possible if you try to define a *compound namespace*, a namespace that contains one or more scope-nested namespace names. Compound namespace definitions are not allowed in C++ prior to C++17. Compound namespaces are supported starting in Visual Studio 2015 Update 3 when you specify the [`/std:c++latest`](../../build/reference/std-specify-language-standard-version.md) compiler option. Starting in Visual Studio 2017 version 15.5, the compiler supports compound namespace definitions when the `[/std:c++17`](../../build/reference/std-specify-language-standard-version.md) or later option is specified. +C2653 is also possible if you try to define a *compound namespace*, a namespace that contains one or more scope-nested namespace names. Compound namespace definitions are not allowed in C++ prior to C++17. Compound namespaces are supported starting in Visual Studio 2015 Update 3 when you specify the [`/std:c++latest`](../../build/reference/std-specify-language-standard-version.md) compiler option. Starting in Visual Studio 2017 version 15.5, the compiler supports compound namespace definitions when the [`/std:c++17`](../../build/reference/std-specify-language-standard-version.md) or later option is specified. ## Examples diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2835.md b/docs/error-messages/compiler-errors-2/compiler-error-c2835.md index 4dbcb7c9d5..ae076c90af 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2835.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2835.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C2835" title: "Compiler Error C2835" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2835" +ms.date: 11/04/2016 f1_keywords: ["C2835"] helpviewer_keywords: ["C2835"] -ms.assetid: 41c70630-983f-4da2-8342-513cf48b0519 --- # Compiler Error C2835 @@ -22,12 +21,12 @@ public: A() { v_char = 'A'; - }; + } operator char(char a) { // C2835 // try the following line instead // operator char() { return v_char + 1; - }; + } }; int main() { diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2888.md b/docs/error-messages/compiler-errors-2/compiler-error-c2888.md index cfc30eecb9..eed0d34ea2 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2888.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2888.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C2888" title: "Compiler Error C2888" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2888" +ms.date: 11/04/2016 f1_keywords: ["C2888"] helpviewer_keywords: ["C2888"] -ms.assetid: 244f593e-ff25-4dad-b31f-84dafa3bc84a --- # Compiler Error C2888 @@ -23,7 +22,7 @@ namespace M { void f2(); } - void N::f1() {} // OK: namspace M encloses N + void N::f1() {} // OK: namespace M encloses N } namespace O { diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2893.md b/docs/error-messages/compiler-errors-2/compiler-error-c2893.md index 7e1fab4903..01cb21c042 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2893.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2893.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C2893" title: "Compiler Error C2893" +description: "Learn more about: Compiler Error C2893" ms.date: "11/04/2016" f1_keywords: ["C2893"] helpviewer_keywords: ["C2893"] -ms.assetid: ec0cbe43-005d-45da-8742-aaeb9b81d28e --- # Compiler Error C2893 @@ -21,7 +20,7 @@ C2893 occurs because `f`'s template parameter `T` is deduced to be `std::map +#include using namespace std; class MyClass {}; diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c2978.md b/docs/error-messages/compiler-errors-2/compiler-error-c2978.md index 4426147e9a..cf6adef493 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c2978.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c2978.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Error C2978" title: "Compiler Error C2978" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2978" +ms.date: 11/04/2016 f1_keywords: ["C2978"] helpviewer_keywords: ["C2978"] -ms.assetid: 5e7bee82-e266-4ccd-ad2e-ee89606ec5bf --- # Compiler Error C2978 syntax error : expected 'keyword1' or 'keyword2'; found type 'keyword3'; non-type parameters are not supported in generics -A generic class was declared incorrectly. See [Generics](../../extensions/generics-cpp-component-extensions.md)for more information. +A generic class was declared incorrectly. See [Generics](../../extensions/generics-cpp-component-extensions.md) for more information. ## Example diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3185.md b/docs/error-messages/compiler-errors-2/compiler-error-c3185.md index cad61481f3..315365082c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3185.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3185.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3185" title: "Compiler Error C3185" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3185" +ms.date: 11/04/2016 f1_keywords: ["C3185"] helpviewer_keywords: ["C3185"] -ms.assetid: 5bf96279-043c-4981-9d02-b4550071b192 --- # Compiler Error C3185 @@ -25,5 +24,5 @@ int main() { Base ^pb = pd; const type_info & t1 = typeid(pb); // C3185 System::Type ^ MyType = Base::typeid; // OK -}; +} ``` diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3536.md b/docs/error-messages/compiler-errors-2/compiler-error-c3536.md index 1701d26b5a..0e13e6df59 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3536.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3536.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3536" title: "Compiler Error C3536" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3536" +ms.date: 11/04/2016 f1_keywords: ["C3536"] helpviewer_keywords: ["C3536"] -ms.assetid: 8d866075-866b-49eb-9979-ee27b308f7e3 --- # Compiler Error C3536 @@ -31,7 +30,7 @@ int main() auto* d = &d; //C3536 auto& e = e; //C3536 return 0; -}; +} ``` ## See also diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3672.md b/docs/error-messages/compiler-errors-2/compiler-error-c3672.md index 3624f2563d..d217e41c36 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3672.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3672.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3672" title: "Compiler Error C3672" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3672" +ms.date: 11/04/2016 f1_keywords: ["C3672"] helpviewer_keywords: ["C3672"] -ms.assetid: da971041-1766-467a-aecf-1d8655c6cb7a --- # Compiler Error C3672 @@ -22,7 +21,7 @@ template void f(T* pT) { &pT->T::~T; // C3672 pT->T::~T(); // OK -}; +} int main() { int i; diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3861.md b/docs/error-messages/compiler-errors-2/compiler-error-c3861.md index 3675124e82..738a3e76f4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3861.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3861.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3861" title: "Compiler Error C3861" +description: "Learn more about: Compiler Error C3861" ms.date: 06/29/2022 f1_keywords: ["C3861"] helpviewer_keywords: ["C3861"] -ms.assetid: 0a1eee30-b3db-41b1-b1e5-35949c3924d7 --- # Compiler Error C3861 @@ -98,7 +97,7 @@ int main() { ### ADL and friend functions -The following sample generates C3767 because the compiler can't use argument dependent lookup for `FriendFunc`: +The following sample generates C3861 because the compiler can't use argument dependent lookup for `FriendFunc`: ```cpp namespace N { diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3867.md b/docs/error-messages/compiler-errors-2/compiler-error-c3867.md index 8a22a876fe..db31e6aef7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3867.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3867.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3867" title: "Compiler Error C3867" +description: "Learn more about: Compiler Error C3867" ms.date: "11/04/2016" f1_keywords: ["C3867"] helpviewer_keywords: ["C3867"] -ms.assetid: bc5de03f-e01a-4407-88c3-2c63f0016a1e --- # Compiler Error C3867 @@ -42,7 +41,7 @@ The following sample generates C3867 and shows how to fix it. ```cpp // C3867_2.cpp -#include +#include struct S { char *func() { diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3883.md b/docs/error-messages/compiler-errors-2/compiler-error-c3883.md index 5ffa8913d6..6ed6a89c19 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3883.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3883.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Error C3883" title: "Compiler Error C3883" +description: "Learn more about: Compiler Error C3883" ms.date: "11/04/2016" f1_keywords: ["C3883"] helpviewer_keywords: ["C3883"] -ms.assetid: cdd1c1f4-f268-4469-9c62-d52303114b0c --- # Compiler Error C3883 -'var' : an initonly static data member must be initialized +> '*member*': an initonly static data member must be initialized A variable marked with [initonly](../../dotnet/initonly-cpp-cli.md) was not initialized correctly. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c7688.md b/docs/error-messages/compiler-errors-2/compiler-error-c7688.md index 2caa56307c..8716a20d4f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c7688.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c7688.md @@ -13,7 +13,7 @@ helpviewer_keywords: ["C7688"] OpenMP restricts expressions in `#pragma omp atomic` constructs to scalar type. -Compiler error C7688 is new in Visual Studio 2022 version 17.4. In previous compiler versions, the compiler would emit error [C3048](./compiler-error-c3048.md). +Compiler error C7688 is new in Visual Studio 2022 version 17.4. In previous compiler versions, the compiler would emit error [C3048](compiler-error-c3048.md). ## Example diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c2500-through-c2599.md b/docs/error-messages/compiler-errors-2/compiler-errors-c2500-through-c2599.md index dc47e09a5b..62ed444ca7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c2500-through-c2599.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c2500-through-c2599.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler errors C2500 Through C2599" title: "Compiler errors C2500 Through C2599" -ms.date: "04/21/2019" +description: "Learn more about: Compiler errors C2500 Through C2599" +ms.date: 04/21/2019 f1_keywords: ["C2501", "C2508", "C2515", "C2519", "C2520", "C2522", "C2525", "C2527", "C2536", "C2538", "C2539", "C2546", "C2547", "C2559", "C2560", "C2564", "C2565", "C2576", "C2578", "C2580", "C2590", "C2591", "C2595", "C2596"] helpviewer_keywords: ["C2501", "C2508", "C2515", "C2519", "C2520", "C2522", "C2525", "C2527", "C2536", "C2538", "C2539", "C2546", "C2547", "C2559", "C2560", "C2564", "C2565", "C2576", "C2578", "C2580", "C2590", "C2591", "C2595", "C2596"] -ms.assetid: a869aaed-e9f6-49e3-b273-00ea7f45bed7 --- # Compiler errors C2500 Through C2599 @@ -34,7 +33,7 @@ The articles in this section of the documentation explain a subset of the error |Compiler error C2515|'*identifier*': 'vtguard' can only be applied to class declarations or definitions| |[Compiler error C2516](compiler-error-C2516.md)|'*class*': is not a legal base class| |[Compiler error C2517](compiler-error-C2517.md)|'*identifier*': right of '::' is undefined| -|[Compiler error C2518](compiler-error-C2518.md)|keyword '*keyword*' illegal in base class list; ignored| +|[Compiler error C2518](compiler-error-C2518.md)|keyword '*keyword*' is invalid in a base class list; expected a `class` name| |Compiler error C2519|'*identifier*': WinRT attributes may only contain public fields| |Compiler error C2520|'*class*': no non-explicit constructor available for implicit conversion| |[Compiler error C2521](compiler-error-C2521.md)|a destructor/finalizer does not take any arguments| @@ -64,12 +63,13 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2545](compiler-error-C2545.md)|'*operator*': unable to find overloaded operator| |Compiler error C2546|'*identifier*': when a type is defined in both a PIA and a no-PIA the PIA must be referenced first| |Compiler error C2547|'*identifier*': All parameters of a published method must be explicitly named on the declaration| -|[Compiler error C2548](compiler-error-C2548.md)|'*function*': missing default parameter for parameter *parameter*| +|[Compiler error C2548](compiler-error-C2548.md)|'*function*': missing default argument for parameter *parameter*| |[Compiler error C2549](compiler-error-C2549.md)|user-defined conversion cannot specify a return type| |[Compiler error C2550](compiler-error-C2550.md)|'*identifier*': constructor initializer lists are only allowed on constructor definitions| |[Compiler error C2551](compiler-error-C2551.md)|'void *' type needs explicit cast| |[Compiler error C2552](compiler-error-C2552.md)|'*identifier*': non-aggregates cannot be initialized with an initializer list| |[Compiler error C2553](compiler-error-C2553.md)|'*type* *derived_class*::*function*': overriding virtual function return type differs from '*type* *base_class*::*function*'| +|Compiler error C2554|'*variable*': 'constinit' only allowed on a variable declaration with static or thread storage duration| |[Compiler error C2555](compiler-error-C2555.md)|'*derived_class*::*function*': overriding virtual function return type differs and is not covariant from '*base_class*::*function*'| |[Compiler error C2556](compiler-error-C2556.md)|'*type1* *class*::*function*': overloaded function differs only by return type from '*type2* *class*::*function*'| |[Compiler error C2557](compiler-error-C2557.md)|'*identifier*': private and protected members cannot be initialized without a constructor| @@ -89,7 +89,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2571](compiler-error-C2571.md)|'*identifier*': virtual function cannot be in union '*union*'| |[Compiler error C2572](compiler-error-C2572.md)|'*function*': redefinition of default argument: parameter *number*| |[Compiler error C2573](compiler-error-C2573.md)|'*class*': cannot delete pointers to objects of this type; the class has no non-placement overload for 'operator delete'. Use ::delete, or add 'operator delete(void*)' to the class| -|[Compiler error C2574](compiler-error-C2574.md)|'*destructor*': cannot be declared static| +|[Compiler error C2574](compiler-error-C2574.md)|'*function*': cannot be declared static| |[Compiler error C2575](compiler-error-C2575.md)|'*identifier*': only member functions and bases can be virtual| |Compiler error C2576|'*identifier*': cannot introduce a new virtual method as 'public'. Consider making the method non-virtual, or change the accessibility to 'internal' or 'protected private'| |[Compiler error C2577](compiler-error-C2577.md)|'*identifier*': a destructor/finalizer cannot have a return type| @@ -98,7 +98,7 @@ The articles in this section of the documentation explain a subset of the error |Compiler error C2580|'*identifier*': multiple versions of a defaulted special member functions are not allowed| |[Compiler error C2581](compiler-error-C2581.md)|'*type*': static 'operator =' function is illegal| |[Compiler error C2582](compiler-error-C2582.md)|'operator *operator*' function is unavailable in '*type*'| -|[Compiler error C2583](compiler-error-C2583.md)|'*identifier*': 'const/volatile' 'this' pointer is illegal for constructors/destructors| +|[Compiler error C2583](compiler-error-C2583.md)|'*identifier*': '*const/volatile*' 'this' pointer is illegal for constructors/destructors| |[Compiler error C2584](compiler-error-C2584.md)|'*class*': direct base '*base_class2*' is inaccessible; already a base of '*base_class1*'| |[Compiler error C2585](compiler-error-C2585.md)|explicit conversion to '*type*' is ambiguous| |[Compiler error C2586](compiler-error-C2586.md)|incorrect user-defined conversion syntax: illegal indirections| diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c2600-through-c2699.md b/docs/error-messages/compiler-errors-2/compiler-errors-c2600-through-c2699.md index 4c6182230c..e8cbf106a7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c2600-through-c2699.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c2600-through-c2699.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler errors C2600 Through C2699" title: "Compiler errors C2600 Through C2699" +description: "Learn more about: Compiler errors C2600 Through C2699" ms.date: "04/21/2019" f1_keywords: ["C2604", "C2606", "C2607", "C2608", "C2609", "C2610", "C2615", "C2618", "C2620", "C2621", "C2622", "C2623", "C2625", "C2629", "C2631", "C2639", "C2641", "C2642", "C2643", "C2644", "C2684", "C2685", "C2686", "C2697"] helpviewer_keywords: ["C2604", "C2606", "C2607", "C2608", "C2609", "C2610", "C2615", "C2618", "C2620", "C2621", "C2622", "C2623", "C2625", "C2629", "C2631", "C2639", "C2641", "C2642", "C2643", "C2644", "C2684", "C2685", "C2686", "C2697"] -ms.assetid: 73c6319f-cbea-4a2f-913b-90dc1af61f64 --- # Compiler errors C2600 Through C2699 @@ -24,17 +23,17 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2605](compiler-error-c2605.md)|'*identifier*': this method is reserved within a managed/WinRT class| |Compiler error C2606|'*class1*': cannot re-implement '*member*', as it is inherited from runtime base '*class2*'| |Compiler error C2607|static assertion failed| -|Compiler error C2608|Obsolete.| -|Compiler error C2609|Obsolete.| +|Compiler error C2608|invalid token '*token*' in macro parameter list| +|Compiler error C2609|missing ')' in macro parameter list| |Compiler error C2610|'*class*::*member*': is not a special member function which can be defaulted| |[Compiler error C2611](compiler-error-c2611.md)|'*token*': illegal following '~' (expected identifier)| |[Compiler error C2612](compiler-error-c2612.md)|trailing '*character*' illegal in base/member initializer list| |[Compiler error C2613](compiler-error-c2613.md)|trailing '*character*' illegal in base class list| |[Compiler error C2614](compiler-error-c2614.md)|'*class*': illegal member initialization: '*identifier*' is not a base or member| -|Compiler error C2615|Obsolete.| +|Compiler error C2615|'`offsetof`' cannot be applied to non-class type '*type*'| |[Compiler error C2616](compiler-error-c2616.md)|'*conversion*': cannot implicitly convert a non-lvalue '*type1*' to a '*type2*' that is not const| |[Compiler error C2617](compiler-error-c2617.md)|'*function*': inconsistent return statement| -|Compiler error C2618|Obsolete.| +|Compiler error C2618|illegal member designator in `offsetof`| |[Compiler error C2619](compiler-error-c2619.md)|'*identifier*': a static data member is not allowed in an anonymous struct/union| |Compiler error C2620|Obsolete.| |Compiler error C2621|Obsolete.| @@ -55,12 +54,12 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2636](compiler-error-c2636.md)|'*identifier*': pointer to reference member is illegal| |[Compiler error C2637](compiler-error-c2637.md)|'*identifier*': cannot modify pointers to data members| |[Compiler error C2638](compiler-error-c2638.md)|'*identifier*': __based modifier illegal on pointer to member| -|Compiler error C2639|Obsolete.| -|[Compiler error C2640](compiler-error-c2640.md)|'*identifier*': __based modifier illegal on reference| -|Compiler error C2641|Obsolete.| -|Compiler error C2642|Obsolete.| -|Compiler error C2643|Obsolete.| -|Compiler error C2644|Obsolete.| +|Compiler error C2639|trailing return type '*type*' of deduction guide should be a specialization of '*class template*'| +|[Compiler error C2640](compiler-error-c2640.md)|'abstract declarator': __based modifier illegal on reference| +|Compiler error C2641|cannot deduce template arguments for '*template name*'| +|Compiler error C2642|two deduction guide declarations for the same class template cannot have equivalent parameter list and template head| +|Compiler error C2643|deduction guide should be declared in the same scope as the corresponding class template '*template name*'| +|Compiler error C2644|deduction guide should have the same access as the corresponding class template '*template name*'| |[Compiler error C2645](compiler-error-c2645.md)|no qualified name for pointer to member (found ':: *')| |[Compiler error C2646](compiler-error-c2646.md)|an anonymous struct/union at global or namespace scope must be declared static| |[Compiler error C2647](compiler-error-c2647.md)|'*operator*': cannot dereference a '*type1*' on a '*type2*'| @@ -79,11 +78,11 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2660](compiler-error-c2660.md)|'*function*': function does not take *number* arguments| |[Compiler error C2661](compiler-error-c2661.md)|'*function*': no overloaded function takes *number* arguments| |[Compiler error C2662](compiler-error-c2662.md)|'*function*': cannot convert 'this' pointer from '*type1*' to '*type2*'| -|[Compiler error C2663](compiler-error-c2663.md)|'*function*': *number* overloads have no legal conversion for 'this' pointer| +|[Compiler error C2663](compiler-error-c2663.md)|'*function*': no overloaded function has valid conversion for '`this`' pointer| |[Compiler error C2664](compiler-error-c2664.md)|'*function*': cannot convert argument *number* from '*type1*' to '*type2*'| -|[Compiler error C2665](compiler-error-c2665.md)|'*function*': none of the *number* overloads could convert all the argument types| -|[Compiler error C2666](compiler-error-c2666.md)|'*function*': *number* overloads have similar conversions| -|[Compiler error C2667](compiler-error-c2667.md)|'*function*': none of *number* overloads have a best conversion| +|[Compiler error C2665](compiler-error-c2665.md)|'*function*': no overloaded function could convert all the argument types| +|[Compiler error C2666](compiler-error-c2666.md)|'*function*': overloaded functions have similar conversions| +|[Compiler error C2667](compiler-error-c2667.md)|'*function*': no overloaded function has a best conversion| |[Compiler error C2668](compiler-error-c2668.md)|'*function*': ambiguous call to overloaded function| |[Compiler error C2669](compiler-error-c2669.md)|member function not allowed in anonymous union| |[Compiler error C2670](compiler-error-c2670.md)|'*function*': the function template cannot convert parameter *number* from type '*type*'| diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c2700-through-c2799.md b/docs/error-messages/compiler-errors-2/compiler-errors-c2700-through-c2799.md index 9d44ce11f4..1a597951d4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c2700-through-c2799.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c2700-through-c2799.md @@ -4,7 +4,6 @@ title: "Compiler errors C2700 Through C2799" ms.date: "04/21/2019" f1_keywords: ["C2716", "C2717", "C2727", "C2729", "C2737", "C2740", "C2741", "C2742", "C2744", "C2746", "C2747", "C2759", "C2763", "C2769", "C2772", "C2789", "C2796", "C2799"] helpviewer_keywords: ["C2716", "C2717", "C2727", "C2729", "C2737", "C2740", "C2741", "C2742", "C2744", "C2746", "C2747", "C2759", "C2763", "C2769", "C2772", "C2789", "C2796", "C2799"] -ms.assetid: 6ee257bb-94bc-42b9-af2c-3c73926afba4 --- # Compiler errors C2700 Through C2799 @@ -49,7 +48,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2730](compiler-error-c2730.md)|'*class*': cannot be a base class of itself| |[Compiler error C2731](compiler-error-c2731.md)|'*function*': function cannot be overloaded| |[Compiler error C2732](compiler-error-c2732.md)|linkage specification contradicts earlier specification for '*function*'| -|[Compiler error C2733](compiler-error-c2733.md)|'*function*': second C linkage of overloaded function not allowed| +|[Compiler error C2733](compiler-error-c2733.md)|'*function*': you cannot overload a function with '`extern "C"`' linkage| |[Compiler error C2734](compiler-error-c2734.md)|'*identifier*': 'const' object must be initialized if not 'extern'| |[Compiler error C2735](compiler-error-c2735.md)|'*keyword*' keyword is not permitted in formal parameter type specifier| |[Compiler error C2736](compiler-error-c2736.md)|'*keyword*' keyword is not permitted in cast| @@ -81,7 +80,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2762](compiler-error-c2762.md)|'*template*': invalid expression as a template argument for '*parameter*'| |Compiler error C2763|'*template*': invalid use of a string literal as a template argument for '*parameter*'| |[Compiler error C2764](compiler-error-c2764.md)|'*parameter*': template parameter not used or deducible in partial specialization '*specialization*'| -|[Compiler error C2765](compiler-error-c2765.md)|'*function*': an explicit specialization of a function template cannot have any default arguments| +|[Compiler error C2765](compiler-error-c2765.md)|'*function*': an explicit specialization or instantiation of a function template cannot have any default arguments| |[Compiler error C2766](compiler-error-c2766.md)|explicit specialization; '*specialization*' has already been defined| |[Compiler error C2767](compiler-error-c2767.md)|managed/WinRT array dimension mismatch: expected *number* argument(s) - *number* provided| |[Compiler error C2768](compiler-error-c2768.md)|'*function*': illegal use of explicit template arguments| @@ -113,7 +112,7 @@ The articles in this section of the documentation explain a subset of the error |[Compiler error C2794](compiler-error-c2794.md)|'*identifier*': is not a member of any direct or indirect base class of '*class*'| |[Compiler error C2795](compiler-error-c2795.md)|'super::*identifier*' is not a member function| |Compiler error C2796|'ref new' may only be used to create an instance of a WinRT type| -|[Compiler error C2797](compiler-error-c2797.md)|(Obsolete) '*identifier*': list initialization inside member initializer list or non-static data member initializer is not implemented| +|[Compiler error C2797](compiler-error-c2797.md)|'*identifier*': list initialization inside member initializer list or non-static data member initializer is not implemented| |[Compiler error C2798](compiler-error-c2798.md)|'super::*identifier*' is ambiguous| |Compiler error C2799|'*identifier*': an object of const-qualified class type without a user-provided default constructor must be initialized| diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c2800-through-c2899.md b/docs/error-messages/compiler-errors-2/compiler-errors-c2800-through-c2899.md index 3b351c5ffe..6ad3bb045b 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c2800-through-c2899.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c2800-through-c2899.md @@ -4,7 +4,6 @@ title: "Compiler errors C2800 Through C2899" ms.date: 06/01/2022 f1_keywords: ["C2816", "C2820", "C2822", "C2826", "C2832", "C2836", "C2837", "C2840", "C2841", "C2848", "C2851", "C2852", "C2853", "C2866", "C2880", "C2887", "C2889", "C2895", "C2899"] helpviewer_keywords: ["C2816", "C2820", "C2822", "C2826", "C2832", "C2836", "C2837", "C2840", "C2841", "C2848", "C2851", "C2852", "C2853", "C2866", "C2880", "C2887", "C2889", "C2895", "C2899"] -ms.assetid: e5de1e92-746a-4315-a331-c5d9efb76dbb --- # Compiler errors C2800 Through C2899 @@ -108,7 +107,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C2889 | '*class*': a managed/WinRT class type cannot be a virtual base class | | [Compiler error C2890](compiler-error-c2890.md) | '*class*': a ref class can only have one non-interface base class | | [Compiler error C2891](compiler-error-c2891.md) | '*parameter*': cannot take the address of a template parameter | -| [Compiler error C2892](compiler-error-c2892.md) | local class shall not have member templates | +| [Compiler error C2892](compiler-error-c2892.md) | a template cannot be a member of a local class | | [Compiler error C2893](compiler-error-c2893.md) | Failed to specialize function template '*template*' | | [Compiler error C2894](compiler-error-c2894.md) | templates cannot be declared to have 'C' linkage | | Compiler error C2895 | '*declaration*': cannot explicitly instantiate a function template that has been declared with dllimport | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c2900-through-c3499.md b/docs/error-messages/compiler-errors-2/compiler-errors-c2900-through-c3499.md index 9bb91a7e7c..2b2fb65959 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c2900-through-c3499.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c2900-through-c3499.md @@ -2,9 +2,8 @@ description: "Learn more about: Compiler errors C2900 Through C2999" title: "Compiler errors C2900 Through C2999" ms.date: 06/01/2022 -f1_keywords: ["C2900", "C2901", "C2905", "C2907", "C2915", "C2916", "C2922", "C2924", "C2925", "C2926", "C2938", "C2949", "C2950", "C2954", "C2956", "C2960", "C2961", "C2963", "C2964", "C2965", "C2966", "C2967", "C2968", "C2972", "C2980", "C2981", "C2982", "C2983", "C2984", "C2985", "C2986", "C2987", "C2997", "C2999"] -helpviewer_keywords: ["C2900", "C2901", "C2905", "C2907", "C2915", "C2916", "C2922", "C2924", "C2925", "C2926", "C2938", "C2949", "C2950", "C2954", "C2956", "C2960", "C2961", "C2963", "C2964", "C2965", "C2966", "C2967", "C2968", "C2972", "C2980", "C2981", "C2982", "C2983", "C2984", "C2985", "C2986", "C2987", "C2997", "C2999"] -ms.assetid: e3440738-e11b-4878-9ae3-6bc6c53ba461 +f1_keywords: ["C2900", "C2901", "C2905", "C2907", "C2915", "C2916", "C2922", "C2924", "C2925", "C2926", "C2938", "C2949", "C2950", "C2954", "C2960", "C2961", "C2963", "C2964", "C2965", "C2966", "C2967", "C2968", "C2972", "C2980", "C2981", "C2982", "C2983", "C2984", "C2985", "C2986", "C2987", "C2997"] +helpviewer_keywords: ["C2900", "C2901", "C2905", "C2907", "C2915", "C2916", "C2922", "C2924", "C2925", "C2926", "C2938", "C2949", "C2950", "C2954", "C2960", "C2961", "C2963", "C2964", "C2965", "C2966", "C2967", "C2968", "C2972", "C2980", "C2981", "C2982", "C2983", "C2984", "C2985", "C2986", "C2987", "C2997"] --- # Compiler errors C2900 Through C2999 @@ -99,10 +98,10 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C2980 | C++ exception handling is not supported with /kernel | | Compiler error C2981 | the dynamic form of '*keyword*' is not supported with /kernel | | Compiler error C2982 | '*declaration*': different __declspec(code_seg(...)) used: was '*identifier1*' now '*identifier2*' | -| Compiler error C2983 | '*declaration*': all declarations must have an identical __declspec(code_seg(...)) | +| Compiler error C2983 | '*name*': a definition must have the same `__declspec(code_seg(...))` as the prior declaration | | Compiler error C2984 | Obsolete. | | Compiler error C2985 | '*argument*': the argument to __declspec(code_seg(...)) must be a text section | -| Compiler error C2986 | '*identifier*': __declspec(code_seg(...)) can only be applied to a class or a function | +| Compiler error C2986 | '`__declspec(code_seg(...))`' can only be applied to a class or a function | | Compiler error C2987 | a declaration cannot have both __declspec(code_seg('*identifier*')) and __declspec(code_seg('*value*')) | | [Compiler error C2988](compiler-error-c2988.md) | unrecognizable template declaration/definition | | [Compiler error C2989](compiler-error-c2989.md) | '*class*': class template/generic has already been declared as a non-class template/generic | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3000-through-c3099.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3000-through-c3099.md index a4abebdc6d..bcdc2b953e 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3000-through-c3099.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3000-through-c3099.md @@ -2,9 +2,8 @@ description: "Learn more about: Compiler errors C3000 Through C3099" title: "Compiler errors C3000 Through C3099" ms.date: 06/01/2022 -f1_keywords: ["C3051", "C3061", "C3064", "C3067", "C3074", "C3078", "C3079", "C3081", "C3082", "C3086", "C3088", "C3089", "C3090", "C3091", "C3092", "C3093", "C3098"] -helpviewer_keywords: ["C3051", "C3061", "C3064", "C3067", "C3074", "C3078", "C3079", "C3081", "C3082", "C3086", "C3088", "C3089", "C3090", "C3091", "C3092", "C3093", "C3098"] -ms.assetid: 01b7b9cb-b351-4b5a-8cb0-1fcddb08d2ab +f1_keywords: ["C3000", "C3051", "C3061", "C3064", "C3067", "C3074", "C3078", "C3079", "C3081", "C3082", "C3086", "C3088", "C3089", "C3090", "C3091", "C3092", "C3093", "C3098"] +helpviewer_keywords: ["C3000", "C3051", "C3061", "C3064", "C3067", "C3074", "C3078", "C3079", "C3081", "C3082", "C3086", "C3088", "C3089", "C3090", "C3091", "C3092", "C3093", "C3098"] --- # Compiler errors C3000 Through C3099 @@ -64,11 +63,11 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3045](compiler-error-c3045.md) | Expected a compound statement following OpenMP 'sections' directive. Missing '{' | | [Compiler error C3046](compiler-error-c3046.md) | Missing structured block in an OpenMP '#pragma omp sections' region | | [Compiler error C3047](compiler-error-c3047.md) | Structured block in an OpenMP 'sections' region must be preceded by '#pragma omp section' (Obsolete in Visual Studio 2022.) | -| [Compiler error C3048](compiler-error-c3048.md) | Expression following '#pragma omp atomic' has improper form | +| [Compiler error C3048](compiler-error-c3048.md) | '`#pragma omp atomic`*statement*': expression or block-statement following pragma does not conform to the OpenMP specification | | [Compiler error C3049](compiler-error-c3049.md) | '*argument*': invalid argument in OpenMP 'default' clause | | [Compiler error C3050](compiler-error-c3050.md) | '*class*': a ref class cannot inherit from '*identifier*' | | Compiler error C3051 | Obsolete. | -| [Compiler error C3052](compiler-error-c3052.md) | '*identifier*': variable doesn't appear in a data-sharing clause under a default(none) clause | +| [Compiler error C3052](compiler-error-c3052.md) | '*identifier*': variable reference occurs under a `default(none)` clause and must have explicitly specified data sharing attributes | | [Compiler error C3053](compiler-error-c3053.md) | '*identifier*': 'threadprivate' is only valid for global or static data items | | [Compiler error C3054](compiler-error-c3054.md) | '#pragma omp parallel' is currently not supported in a generic class or function (Obsolete in Visual Studio 2022.) | | [Compiler error C3055](compiler-error-c3055.md) | '*identifier*': symbol cannot be referenced before it is used in 'threadprivate' directive | @@ -81,8 +80,8 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3062](compiler-error-c3062.md) | '*identifier*': enumerator requires value since the underlying type is '*type*' | | [Compiler error C3063](compiler-error-c3063.md) | operator '*operator*': all operands must have the same enumeration type | | Compiler error C3064 | '*identifier*': must be a simple type or resolve to one | -| [Compiler error C3065](compiler-error-c3065.md) | property declaration at non-class scope is not allowed | -| [Compiler error C3066](compiler-error-c3066.md) | there are multiple ways that an object of this type can be called with these arguments | +| [Compiler error C3065](compiler-error-c3065.md) | '`__declspec(`*specifier*`)`' at non-class scope is not allowed | +| [Compiler error C3066](compiler-error-c3066.md) | call to an object of this type is ambiguous | | Compiler error C3067 | an initializer list cannot be used with the built-in operator[] | | [Compiler error C3068](compiler-error-c3068.md) | '*identifier*': a 'naked' function cannot contain objects that would require unwinding if a C++ exception occurred | | [Compiler error C3069](compiler-error-c3069.md) | operator '*operator*': not allowed for enumeration type | @@ -94,7 +93,7 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3075](compiler-error-c3075.md) | '*identifier*': you cannot embed an instance of a reference type, '*type*', in a value-type | | [Compiler error C3076](compiler-error-c3076.md) | '*identifier*': you cannot embed an instance of a reference type, '*type*', in a native type | | [Compiler error C3077](compiler-error-c3077.md) | '*identifier*': a finalizer can only be a member of a reference type | -| Compiler error C3078 | array size must be specified in new expressions | +| Compiler error C3078 | array size must be specified in new expressions without an initializer | | Compiler error C3079 | an initializer list cannot be used as the right operand of this assignment operator | | [Compiler error C3080](compiler-error-c3080.md) | '*finalizer*': a finalizer cannot have a storage-class-specifier | | Compiler error C3081 | Obsolete. | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3100-through-c3199.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3100-through-c3199.md index 9bec78ffec..338e4eceb9 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3100-through-c3199.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3100-through-c3199.md @@ -2,9 +2,8 @@ description: "Learn more about: Compiler errors C3100 Through C3199" title: "Compiler errors C3100 Through C3199" ms.date: 06/01/2022 -f1_keywords: ["C3102", "C3105", "C3107", "C3108", "C3109", "C3111", "C3112", "C3119", "C3122", "C3123", "C3124", "C3125", "C3127", "C3128", "C3129", "C3143", "C3144", "C3146", "C3147", "C3148", "C3151", "C3158", "C3164", "C3165", "C3169", "C3177", "C3178", "C3184", "C3188", "C3191", "C3193"] -helpviewer_keywords: ["C3102", "C3105", "C3107", "C3108", "C3109", "C3111", "C3112", "C3119", "C3122", "C3123", "C3124", "C3125", "C3127", "C3128", "C3129", "C3143", "C3144", "C3146", "C3147", "C3148", "C3151", "C3158", "C3164", "C3165", "C3169", "C3177", "C3178", "C3184", "C3188", "C3191", "C3193"] -ms.assetid: 7bc40c2f-6a8d-488a-b665-f39375afee77 +f1_keywords: ["C3102", "C3105", "C3107", "C3108", "C3109", "C3111", "C3112", "C3119", "C3122", "C3123", "C3124", "C3125", "C3127", "C3128", "C3129", "C3143", "C3144", "C3146", "C3147", "C3148", "C3151", "C3158", "C3164", "C3165", "C3169", "C3177", "C3178", "C3184", "C3186", "C3188", "C3191", "C3193"] +helpviewer_keywords: ["C3102", "C3105", "C3107", "C3108", "C3109", "C3111", "C3112", "C3119", "C3122", "C3123", "C3124", "C3125", "C3127", "C3128", "C3129", "C3143", "C3144", "C3146", "C3147", "C3148", "C3151", "C3158", "C3164", "C3165", "C3169", "C3177", "C3178", "C3184", "C3186", "C3188", "C3191", "C3193"] --- # Compiler errors C3100 Through C3199 @@ -82,7 +81,7 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3163](compiler-error-c3163.md) | '*class*': attributes inconsistent with previous declaration | | Compiler error C3164 | Obsolete. | | Compiler error C3165 | '*value*': cannot convert to an integral or floating point value | -| [Compiler error C3166](compiler-error-c3166.md) | Obsolete. '*type*': a data member of a managed/WinRT class cannot have type '*pointer_type* to interior *managed_pointer_type*' | +| [Compiler error C3166](compiler-error-c3166.md) | '*type*': a data member of a managed/WinRT class cannot have type '*pointer_type* to interior *managed_pointer_type*' | | [Compiler error C3167](compiler-error-c3167.md) | Unable to initialize .NET Framework: make sure it is installed | | [Compiler error C3168](compiler-error-c3168.md) | '*type*': illegal underlying type for enum | | Compiler error C3169 | '*type*': cannot deduce type for 'auto' from '*type*' | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3200-through-c3299.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3200-through-c3299.md index e835858c67..87483c7cfe 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3200-through-c3299.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3200-through-c3299.md @@ -4,7 +4,6 @@ title: "Compiler errors C3200 Through C3299" ms.date: 06/01/2022 f1_keywords: ["C3220", "C3221", "C3245", "C3249", "C3250", "C3256", "C3257", "C3258", "C3259", "C3260", "C3261", "C3263", "C3267", "C3281", "C3294"] helpviewer_keywords: ["C3220", "C3221", "C3245", "C3249", "C3250", "C3256", "C3257", "C3258", "C3259", "C3260", "C3261", "C3263", "C3267", "C3281", "C3294"] -ms.assetid: 6b3104f6-63bc-4823-b6f3-b8a16be4b87f --- # Compiler errors C3200 Through C3299 @@ -64,7 +63,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C3245 | '*function*': use of a variable template requires template argument list | | [Compiler error C3246](compiler-error-c3246.md) | '*class*': cannot inherit from '*base_class*' as it has been declared as '*inheritance*' | | [Compiler error C3247](compiler-error-c3247.md) | '*coclass*': a coclass cannot inherit from another coclass '*base_class*' | -| [Compiler error C3248](compiler-error-c3248.md) | Obsolete. '*function*': function declared as 'sealed' cannot be overridden by '*function*' | +| [Compiler error C3248](compiler-error-c3248.md) | '*function*': function declared as '`sealed`' cannot be overridden by '*function*' | | Compiler error C3249 | illegal statement or sub-expression for '`constexpr`' function (Obsolete in Visual Studio 2022.) | | Compiler error C3250 | '*declaration*': declaration is not allowed in '`constexpr`' function body (Obsolete in Visual Studio 2022.) | | [Compiler error C3251](compiler-error-c3251.md) | cannot invoke base class method on a value type instance (Obsolete in Visual Studio 2022.) | @@ -77,7 +76,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C3258 | Obsolete. | | Compiler error C3259 | '`constexpr`' functions can only have one `return` statement (Obsolete in Visual Studio 2022.) | | Compiler error C3260 | '*token*': skipping unexpected token(s) before lambda body | -| Compiler error C3261 | a function returning a managed/WinRT array must have array brackets at the end of the declaration: '*identifier*(...) \[]' | +| Compiler error C3261 | a function returning a managed/WinRT array must have array brackets at the end of the declaration: '*identifier*(...) []' | | [Compiler error C3262](compiler-error-c3262.md) | invalid array indexing: *number* dimension(s) specified for *number*-dimensional '*type*' | | Compiler error C3263 | Obsolete. | | [Compiler error C3264](compiler-error-c3264.md) | '*identifier*': a class-constructor cannot have a return type | @@ -102,7 +101,7 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3283](compiler-error-c3283.md) | '*interface*': an interface cannot have an instance constructor | | [Compiler error C3284](compiler-error-c3284.md) | the constraints for generic parameter '*parameter*' of function '*declarator*' must match the constraints for generic parameter '*parameter*' of function '*declarator*' | | [Compiler error C3285](compiler-error-c3285.md) | for each statement cannot operate on variables of type '*type*' | -| [Compiler error C3286](compiler-error-c3286.md) | '*specifier*': an iteration variable cannot have any storage-class specifiers | +| [Compiler error C3286](compiler-error-c3286.md) | A for-range-declaration cannot have a storage class other than '`constexpr`' | | [Compiler error C3287](compiler-error-c3287.md) | the type '*type*' (return type of `GetEnumerator`) must have a suitable public `MoveNext` member function and public `Current` property | | [Compiler error C3288](compiler-error-c3288.md) | '*type*': illegal dereference of a handle type | | [Compiler error C3289](compiler-error-c3289.md) | '*identifier*': a trivial property cannot be indexed | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3300-through-c3399.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3300-through-c3399.md index fa4967f500..691f9c0e36 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3300-through-c3399.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3300-through-c3399.md @@ -54,7 +54,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C3336 | This operation must be performed at class scope | | Compiler error C3337 | '*identifier*': defaultvtable must be an event source for a coclass '*class*' | | Compiler error C3338 | '*identifier*': There can be at most one default interface that is also an event source for a coclass '*class*' | -| Compiler error C3339 | template parameter requires either 'class' or 'typename' after the parameter list | +| Compiler error C3339 | template template parameter requires either '`class`' or '`typename`' after the parameter list | | [Compiler error C3340](compiler-error-c3340.md) | '*identifier*': interface cannot be both 'restricted' and 'default' in coclass '*class*' | | Compiler error C3341 | '*interface*': a defaultvtable interface must be either 'dual' or 'custom' | | [Compiler error C3342](compiler-error-c3342.md) | '*identifier*': ambiguous attribute | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3400-through-c3499.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3400-through-c3499.md index ce25161b6d..688a5b80ca 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3400-through-c3499.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3400-through-c3499.md @@ -3,8 +3,7 @@ description: "Learn more about: Compiler errors C3400 Through C3499" title: "Compiler errors C3400 Through C3499" ms.date: 06/01/2022 f1_keywords: ["C3401", "C3402", "C3403", "C3404", "C3405", "C3406", "C3407", "C3410", "C3411", "C3416", "C3419", "C3422", "C3423", "C3424", "C3425", "C3426", "C3427", "C3428", "C3429", "C3430", "C3431", "C3432", "C3433", "C3434", "C3435", "C3436", "C3437", "C3438", "C3439", "C3440", "C3441", "C3442", "C3443", "C3444", "C3447", "C3448", "C3449", "C3471", "C3472", "C3473", "C3474", "C3475", "C3476", "C3477", "C3478", "C3479", "C3486", "C3494", "C3497"] -helpviewer_keywords: ["C3401", "C3402", "C3403", "C3404", "C3405", "C3406", "C3407", "C3410", "C3411", "C3416", "C3419", "C3422", "C3424", "C3425", "C3426", "C3427", "C3428", "C3429", "C3430", "C3431", "C3432", "C3433", "C3434", "C3435", "C3436", "C3437", "C3438", "C3439", "C3440", "C3441", "C3442", "C3443", "C3444", "C3471", "C3472", "C3473", "C3474", "C3475", "C3476", "C3477", "C3478", "C3479", "C3486", "C3494", "C3497"] -ms.assetid: a5651dfb-c402-4e01-b3ae-28f371e51d6a +helpviewer_keywords: ["C3401", "C3402", "C3403", "C3404", "C3405", "C3406", "C3407", "C3410", "C3411", "C3416", "C3419", "C3422", "C3423", "C3424", "C3425", "C3426", "C3427", "C3428", "C3429", "C3430", "C3431", "C3432", "C3433", "C3434", "C3435", "C3436", "C3437", "C3438", "C3439", "C3440", "C3441", "C3442", "C3443", "C3444", "C3447", "C3448", "C3449", "C3471", "C3472", "C3473", "C3474", "C3475", "C3476", "C3477", "C3478", "C3479", "C3486", "C3494", "C3497"] --- # Compiler errors C3400 Through C3499 @@ -44,7 +43,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C3425 | cannot throw pointer to object of incomplete type '*type*' | | Compiler error C3426 | cannot throw object of incomplete type '*type*' | | Compiler error C3427 | '*context*': '*keyword*' cannot be used with layout_version(*number*) | -| Compiler error C3428 | '*context*': '*keyword*' can only be applied to class declarations or definitions | +| Compiler error C3428 | '`__declspec(`*keyword*`)`' can only be applied to class declarations or definitions | | Compiler error C3429 | '*context*': '*keyword*' cannot be applied to a union | | Compiler error C3430 | a scoped enumeration must have a name | | Compiler error C3431 | '*identifier*': *type1* cannot be redeclared as *type2* | @@ -93,8 +92,8 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C3474 | could not open output file '*filename*' | | Compiler error C3475 | syntax error in input file '*filename*' | | Compiler error C3476 | could not open file '*filename*' for input | -| Compiler error C3477 | a lambda cannot appear in an unevaluated context | -| Compiler error C3478 | '*identifier*': an array cannot be captured by copy | +| Compiler error C3477 | a lambda can only appear in an unevaluated context with '*C++ version*' or later | +| Compiler error C3478 | '*identifier*': an array of unknown bounds cannot be captured by copy | | Compiler error C3479 | SAL annotations on lambdas are not supported | | [Compiler error C3480](compiler-error-c3480.md) | '*variable*': a lambda capture variable must be from an enclosing function scope | | [Compiler error C3481](compiler-error-c3481.md) | '*identifier*': lambda capture variable not found | @@ -104,16 +103,16 @@ The articles in this section of the documentation explain a subset of the error | [Compiler error C3485](compiler-error-c3485.md) | a lambda definition cannot have any cv-qualifiers (Obsolete in Visual Studio 2022.) | | Compiler error C3486 | a parameter for a lambda cannot have a default argument (Obsolete in Visual Studio 2022.) | | [Compiler error C3487](compiler-error-c3487.md) | '*type*': all return expressions must deduce to the same type: previously it was '*type*' | -| [Compiler error C3488](compiler-error-c3488.md) | '&*identifier*' is not allowed when the default capture mode is by-reference | -| [Compiler error C3489](compiler-error-c3489.md) | '&*identifier*' is required when the default capture mode is by copy | +| [Compiler error C3488](compiler-error-c3488.md) | '`&`*identifier*' cannot be explicitly captured when the default capture mode is by reference (`&`) | +| [Compiler error C3489](compiler-error-c3489.md) | '`&`*identifier*' is required when the default capture mode is by copy (`=`) | | [Compiler error C3490](compiler-error-c3490.md) | '*identifier*' cannot be modified because it is being accessed through a const object | | [Compiler error C3491](compiler-error-c3491.md) | '*identifier*': a by copy capture cannot be modified in a non-mutable lambda | | [Compiler error C3492](compiler-error-c3492.md) | '*identifier*': you cannot capture a member of an anonymous union | | [Compiler error C3493](compiler-error-c3493.md) | '*identifier*' cannot be implicitly captured because no default capture mode has been specified | | Compiler error C3494 | 'this' cannot be explicitly captured because an enclosing capture mode does not allow it | -| [Compiler error C3495](compiler-error-c3495.md) | '*identifier*': identifier in capture must be a variable with automatic storage duration declared in the reaching scope of the lambda | -| [Compiler error C3496](compiler-error-c3496.md) | 'this' is always captured by value: '&' ignored | -| Compiler error C3497 | you cannot construct an instance of a lambda | +| [Compiler error C3495](compiler-error-c3495.md) | '*identifier*': a simple capture must be a variable with automatic storage duration declared in the reaching scope of the lambda | +| [Compiler error C3496](compiler-error-c3496.md) | '`this`' is always captured by copy: '`&`' ignored | +| Compiler error C3497 | cannot construct an instance of this lambda | | [Compiler error C3498](compiler-error-c3498.md) | '*identifier*': you cannot capture a variable that has a managed/WinRT type | | [Compiler error C3499](compiler-error-c3499.md) | a lambda that has been specified to have a void return type cannot return a value | diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c3500-through-c3999.md b/docs/error-messages/compiler-errors-2/compiler-errors-c3500-through-c3999.md index 1d3dffd179..e1469d0230 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c3500-through-c3999.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c3500-through-c3999.md @@ -1,8 +1,9 @@ --- -description: "Learn more about: Compiler errors C3500 through C3999" title: "Compiler errors C3500 through C3999" +description: "Learn more about: Compiler errors C3500 through C3999" ms.date: 05/25/2022 -f1_keywords: ["C3502", "C3503", "C3504", "C3511", "C3512", "C3513", "C3514", "C3515", "C3516", "C3517", "C3518", "C3520", "C3521", "C3522", "C3523", "C3524", "C3525", "C3526", "C3527", "C3528", "C3529", "C3534", "C3542", "C3543", "C3544", "C3545", "C3546", "C3547", "C3548", "C3549", "C3557", "C3558", "C3559", "C3560", "C3561", "C3562", "C3563", "C3564", "C3565", "C3566", "C3567", "C3568", "C3569", "C3570", "C3571", "C3572", "C3573", "C3574", "C3575", "C3576", "C3577", "C3578", "C3579", "C3580", "C3581", "C3582", "C3583", "C3584", "C3585", "C3586", "C3587", "C3588", "C3589", "C3590", "C3591", "C3592", "C3593", "C3594", "C3595", "C3596", "C3597", "C3598", "C3599", "C3600", "C3601", "C3602", "C3604", "C3605", "C3606", "C3613", "C3614", "C3616", "C3617", "C3620", "C3621", "C3635", "C3636", "C3639", "C3643", "C3649", "C3658", "C3659", "C3660", "C3663", "C3664", "C3667", "C3674", "C3676", "C3677", "C3678", "C3679", "C3680", "C3681", "C3682", "C3683", "C3684", "C3685", "C3686", "C3687", "C3688", "C3689", "C3690", "C3691", "C3692", "C3693", "C3694", "C3695", "C3696", "C3700", "C3716", "C3720", "C3725", "C3726", "C3729", "C3730", "C3735", "C3742", "C3746", "C3750", "C3751", "C3756", "C3757", "C3758", "C3759", "C3760", "C3770", "C3773", "C3774", "C3775", "C3776", "C3777", "C3778", "C3780", "C3781", "C3782", "C3783", "C3784", "C3785", "C3786", "C3787", "C3788", "C3789", "C3790", "C3791", "C3792", "C3793", "C3794", "C3795", "C3796", "C3801", "C3802", "C3806", "C3810", "C3811", "C3814", "C3819", "C3822", "C3823", "C3826", "C3827", "C3829", "C3837", "C3840", "C3841", "C3843", "C3844", "C3845", "C3847", "C3863", "C3870", "C3871", "C3875", "C3876", "C3877", "C3878", "C3879", "C3881", "C3882", "C3884", "C3885", "C3897", "C3905", "C3906", "C3907", "C3916", "C3921", "C3924", "C3925", "C3926", "C3927", "C3928", "C3930", "C3931", "C3932", "C3933", "C3934", "C3935", "C3936", "C3937", "C3938", "C3939", "C3940", "C3941", "C3945", "C3946", "C3947", "C3948", "C3949", "C3950", "C3951", "C3952", "C3953", "C3954", "C3955", "C3956", "C3957", "C3958", "C3959", "C3960", "C3961", "C3962", "C3963", "C3964", "C3965", "C3966", "C3967", "C3968", "C3969", "C3970", "C3971", "C3972", "C3973", "C3974", "C3975", "C3976", "C3977", "C3978", "C3979", "C3980", "C3981", "C3982", "C3983", "C3984", "C3985", "C3986", "C3987", "C3988", "C3989", "C3990", "C3991", "C3992", "C3993", "C3994", "C3995", "C3996", "C3997", "C3998", "C3999"] +f1_keywords: ["C3502", "C3503", "C3504", "C3511", "C3512", "C3513", "C3514", "C3515", "C3516", "C3517", "C3518", "C3520", "C3521", "C3522", "C3523", "C3524", "C3525", "C3526", "C3527", "C3528", "C3529", "C3534", "C3542", "C3543", "C3544", "C3545", "C3546", "C3547", "C3548", "C3549", "C3557", "C3558", "C3559", "C3560", "C3561", "C3562", "C3563", "C3564", "C3565", "C3566", "C3567", "C3568", "C3569", "C3570", "C3571", "C3572", "C3573", "C3574", "C3575", "C3576", "C3577", "C3578", "C3579", "C3580", "C3581", "C3582", "C3583", "C3584", "C3585", "C3586", "C3587", "C3588", "C3589", "C3590", "C3591", "C3592", "C3593", "C3594", "C3595", "C3596", "C3597", "C3598", "C3599", "C3600", "C3601", "C3602", "C3604", "C3605", "C3606", "C3613", "C3614", "C3616", "C3617", "C3620", "C3621", "C3629", "C3635", "C3636", "C3639", "C3643", "C3647", "C3649", "C3658", "C3659", "C3660", "C3663", "C3664", "C3667", "C3674", "C3676", "C3677", "C3678", "C3679", "C3680", "C3681", "C3682", "C3683", "C3684", "C3685", "C3686", "C3687", "C3688", "C3689", "C3690", "C3691", "C3692", "C3693", "C3694", "C3695", "C3696", "C3700", "C3716", "C3720", "C3725", "C3726", "C3729", "C3730", "C3735", "C3742", "C3746", "C3750", "C3751", "C3756", "C3757", "C3758", "C3759", "C3760", "C3770", "C3773", "C3774", "C3775", "C3776", "C3777", "C3778", "C3780", "C3781", "C3782", "C3783", "C3784", "C3785", "C3786", "C3787", "C3788", "C3789", "C3790", "C3791", "C3792", "C3793", "C3794", "C3795", "C3796", "C3801", "C3802", "C3806", "C3810", "C3811", "C3814", "C3819", "C3822", "C3823", "C3826", "C3827", "C3829", "C3835", "C3837", "C3840", "C3841", "C3843", "C3844", "C3845", "C3847", "C3863", "C3864", "C3870", "C3871", "C3875", "C3876", "C3877", "C3878", "C3879", "C3881", "C3882", "C3884", "C3885", "C3897", "C3905", "C3906", "C3907", "C3916", "C3921", "C3924", "C3925", "C3926", "C3927", "C3928", "C3930", "C3931", "C3932", "C3933", "C3934", "C3935", "C3936", "C3937", "C3938", "C3939", "C3940", "C3941", "C3945", "C3946", "C3947", "C3948", "C3949", "C3950", "C3951", "C3952", "C3953", "C3954", "C3955", "C3956", "C3957", "C3958", "C3959", "C3960", "C3961", "C3962", "C3963", "C3964", "C3965", "C3966", "C3967", "C3968", "C3969", "C3970", "C3971", "C3972", "C3973", "C3974", "C3975", "C3976", "C3977", "C3978", "C3979", "C3980", "C3981", "C3982", "C3983", "C3984", "C3985", "C3986", "C3987", "C3988", "C3989", "C3990", "C3991", "C3992", "C3993", "C3994", "C3995", "C3996", "C3997", "C3998"] +helpviewer_keywords: ["C3502", "C3503", "C3504", "C3511", "C3512", "C3513", "C3514", "C3515", "C3516", "C3517", "C3518", "C3520", "C3521", "C3522", "C3523", "C3524", "C3525", "C3526", "C3527", "C3528", "C3529", "C3534", "C3542", "C3543", "C3544", "C3545", "C3546", "C3547", "C3548", "C3549", "C3557", "C3558", "C3559", "C3560", "C3561", "C3562", "C3563", "C3564", "C3565", "C3566", "C3567", "C3568", "C3569", "C3570", "C3571", "C3572", "C3573", "C3574", "C3575", "C3576", "C3577", "C3578", "C3579", "C3580", "C3581", "C3582", "C3583", "C3584", "C3585", "C3586", "C3587", "C3588", "C3589", "C3590", "C3591", "C3592", "C3593", "C3594", "C3595", "C3596", "C3597", "C3598", "C3599", "C3600", "C3601", "C3602", "C3604", "C3605", "C3606", "C3613", "C3614", "C3616", "C3617", "C3620", "C3621", "C3629", "C3635", "C3636", "C3639", "C3643", "C3647", "C3649", "C3658", "C3659", "C3660", "C3663", "C3664", "C3667", "C3674", "C3676", "C3677", "C3678", "C3679", "C3680", "C3681", "C3682", "C3683", "C3684", "C3685", "C3686", "C3687", "C3688", "C3689", "C3690", "C3691", "C3692", "C3693", "C3694", "C3695", "C3696", "C3700", "C3716", "C3720", "C3725", "C3726", "C3729", "C3730", "C3735", "C3742", "C3746", "C3750", "C3751", "C3756", "C3757", "C3758", "C3759", "C3760", "C3770", "C3773", "C3774", "C3775", "C3776", "C3777", "C3778", "C3780", "C3781", "C3782", "C3783", "C3784", "C3785", "C3786", "C3787", "C3788", "C3789", "C3790", "C3791", "C3792", "C3793", "C3794", "C3795", "C3796", "C3801", "C3802", "C3806", "C3810", "C3811", "C3814", "C3819", "C3822", "C3823", "C3826", "C3827", "C3829", "C3835", "C3837", "C3840", "C3841", "C3843", "C3844", "C3845", "C3847", "C3863", "C3864", "C3870", "C3871", "C3875", "C3876", "C3877", "C3878", "C3879", "C3881", "C3882", "C3884", "C3885", "C3897", "C3905", "C3906", "C3907", "C3916", "C3921", "C3924", "C3925", "C3926", "C3927", "C3928", "C3930", "C3931", "C3932", "C3933", "C3934", "C3935", "C3936", "C3937", "C3938", "C3939", "C3940", "C3941", "C3945", "C3946", "C3947", "C3948", "C3949", "C3950", "C3951", "C3952", "C3953", "C3954", "C3955", "C3956", "C3957", "C3958", "C3959", "C3960", "C3961", "C3962", "C3963", "C3964", "C3965", "C3966", "C3967", "C3968", "C3969", "C3970", "C3971", "C3972", "C3973", "C3974", "C3975", "C3976", "C3977", "C3978", "C3979", "C3980", "C3981", "C3982", "C3983", "C3984", "C3985", "C3986", "C3987", "C3988", "C3989", "C3990", "C3991", "C3992", "C3993", "C3994", "C3995", "C3996", "C3997", "C3998"] --- # Compiler errors C3500 through C3999 @@ -104,7 +105,7 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3587|dynamic_cast is unsupported in amp restricted code| |Compiler error C3588|casting from '*type1*' to '*type2*' is unsupported in amp restricted code| |Compiler error C3589|'*string*': unsupported usage of string literals in amp restricted code| -|Compiler error C3590|'*token*': by-reference capture or 'this' capture is unsupported if the lambda is amp restricted| +|Compiler error C3590|capture of '*value*' is unsupported if the lambda is amp restricted| |Compiler error C3591|typeid operator is unsupported in amp restricted code| |Compiler error C3592|Inline native assembly ('__asm') is unsupported in amp restricted code| |Compiler error C3593|'goto' is unsupported in amp restricted code| @@ -262,7 +263,7 @@ The articles in this section explain a subset of the error messages generated by |[Compiler error C3747](compiler-error-c3747.md)|missing default template/generic parameter: parameter *number*| |[Compiler error C3748](compiler-error-c3748.md)|'*interface*': unmanaged interfaces may not fire events| |[Compiler error C3749](compiler-error-c3749.md)|'*attribute*': a custom attribute may not be used inside a function| -|Compiler error C3750|'*token*': unexpected token in attribute list| +|Compiler error C3750|'*token*': unexpected token in attribute specifier| |Compiler error C3751|'*identifier*': unexpected identifier in attribute list| |[Compiler error C3752](compiler-error-c3752.md)|'*attribute*': cannot classify attribute; '*keyword*' should not be used in this context| |[Compiler error C3753](compiler-error-c3753.md)|a generic property is not allowed| @@ -285,7 +286,7 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3770|'*type*': is not a valid base class| |[Compiler error C3771](compiler-error-c3771.md)|'*identifier*': friend declaration cannot be found in the nearest namespace scope| |[Compiler error C3772](compiler-error-c3772.md)|'*identifier*': invalid friend template declaration| -|Compiler error C3773|please use /await compiler switch to enable coroutines| +|Compiler error C3773|Use of '*feature*' in this context is a non-conforming extension in `C++`*version*| |Compiler error C3774|cannot find '*scope*::*identifier*': Please include *header_name* header| |Compiler error C3775|return type of '*function*' should not be '*type*'| |Compiler error C3776|cannot return an expression of type void in a coroutine with non-void eventual return type| @@ -296,7 +297,7 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3781|'*keyword*': cannot be a used in a coroutine of type '*type*'. Either *keyword* or *keyword* must be present in associated promise_type| |Compiler error C3782|*type*: a coroutine's promise cannot contain both *keyword* and *keyword*| |Compiler error C3783|'*identifier*': cannot be a coroutine| -|Compiler error C3784|*keyword* expression cannot appear in this context| +|Compiler error C3784|*keyword* cannot appear in this context| |Compiler error C3785|the first template argument to 'std::integer_sequence' must be an integer type| |Compiler error C3786|the second template argument to 'std::make_integer_sequence' must be an integer constant greater than or equal to zero| |Compiler error C3787|cannot deduce the return type of this coroutine| @@ -341,7 +342,7 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3826|Obsolete.| |Compiler error C3827|standard attribute 'deprecated' may have either no arguments or one string literal describing the reason| |[Compiler error C3828](compiler-error-c3828.md)|placement arguments cannot be specified for a '*keyword*' expression for type '*type*'| -|Compiler error C3829|standard attribute 'noreturn' may only be applied to functions| +|Compiler error C3829|attribute `[[`*attribute name*`]]` may only be applied to a function declaration| |[Compiler error C3830](compiler-error-c3830.md)|'*type1*': cannot inherit from '*type2*', value types can only inherit from interface classes| |[Compiler error C3831](compiler-error-c3831.md)|'*identifier*': '*type*' cannot have a pinned data member or a member function returning a pinning pointer| |[Compiler error C3832](compiler-error-c3832.md)|'*typelib*': type library looks as if it was built for 32-bit pointers; please change the 'ptrsize' qualifier| @@ -376,7 +377,7 @@ The articles in this section explain a subset of the error messages generated by |[Compiler error C3861](compiler-error-c3861.md)|'*identifier*': identifier not found| |[Compiler error C3862](compiler-error-c3862.md)|'*function*': cannot compile an unmanaged function with `/clr:pure` or `/clr:safe`| |Compiler error C3863|array type '*type*' is not assignable| -|Compiler error C3864|Obsolete.| +|Compiler error C3864|'*context*': requires clause is incompatible with the declaration| |[Compiler error C3865](compiler-error-c3865.md)|'*keyword*': can only be used on native member functions| |[Compiler error C3866](compiler-error-c3866.md)|destructor/finalizer call missing argument list| |[Compiler error C3867](compiler-error-c3867.md)|'*function*': non-standard syntax; use '&' to create a pointer to member| @@ -390,17 +391,18 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3875|call of non-static member function missing argument list| | Compiler error C3876 | hexadecimal floating literal requires an exponent | | Compiler error C3877 | invalid type argument to the TypeForwardedTo attribute | -| Compiler error C3878 | syntax error: unexpected token '%1$L' following '%2s' | +| Compiler error C3878 | syntax error: unexpected token '*name*' following '*context*' | |Compiler error C3879|'*member*': cannot be an initonly data member| |[Compiler error C3880](compiler-error-c3880.md)|'*member*': cannot be a literal data member| |Compiler error C3881|can only inherit constructor from direct base| |Compiler error C3882|'*class*': constructor has already been inherited from '*class*'| -|Compiler error C3883|'*member*': an initonly static data member must be initialized| +|[Compiler error C3883](compiler-error-c3883.md)|'*member*': an initonly static data member must be initialized| |Compiler error C3884|'*type*': An array of unknown size cannot be value-initialized| |Compiler error C3885|'*type*': An array of unknown size cannot be initialized with an empty initializer list| |[Compiler error C3886](compiler-error-c3886.md)|'*member*': a literal data member must be initialized| |[Compiler error C3887](compiler-error-c3887.md)|'*member*': the initializer for a literal data member must be a constant expression| |[Compiler error C3888](compiler-error-c3888.md)|'*member*': the const expression associated with this literal data member is not supported by C++/CLI| +|Compiler error C3889|call to object of class type '*type*': no matching call operator found| |[Compiler error C3890](compiler-error-c3890.md)|'*member*': you cannot take the address of a literal data member| |[Compiler error C3891](compiler-error-c3891.md)|'*member*': a literal data member cannot be used as a l-value| |[Compiler error C3892](compiler-error-c3892.md)|'*variable*': you cannot assign to a variable that is const| @@ -433,12 +435,14 @@ The articles in this section explain a subset of the error messages generated by |[Compiler error C3919](compiler-error-c3919.md)|'*function*': function must have type '*return_type* (*type*)'| |[Compiler error C3920](compiler-error-c3920.md)|'*operator*': cannot define a postfix increment/decrement CLR/WinRT operator Calling the postfix CLR/WinRT operator will call the corresponding prefix CLR/WinRT operator (op_Increment/op_Decrement), but with postfix semantics| |Compiler error C3921|Obsolete.| +|Compiler error C3922|'*name*': argument must be a constant expression| |[Compiler error C3923](compiler-error-c3923.md)|'*member*': local class, struct or union definitions are not allowed in a member function of a managed/WinRT class| |Compiler error C3924|error in argument #*number* of delegate constructor call '*constructor*':| |Compiler error C3925|expected a loop (`for`, `while`, or `do`) following '*directive_name*' directive| |Compiler error C3926|invalid constant in 'parallel' directive| |Compiler error C3927|'->': trailing return type is not allowed after a non-function declarator| |Compiler error C3928|'->': trailing return type is not allowed after a parenthesized declarator| +|Compiler error C3929|'`collapse(`*count*`)`' specified but found only *value* loops following '`#pragma omp for`'| |Compiler error C3930|'*function*': no overloaded function has restriction specifiers that are compatible with the ambient context '*context*'| |Compiler error C3931|'*type*': cannot call a function that has restriction specifiers that are incompatible with the ambient context| |Compiler error C3932|Obsolete.| @@ -451,6 +455,9 @@ The articles in this section explain a subset of the error messages generated by |Compiler error C3939|'*identifier*': pointer to member functions, function pointers, references to functions with 'amp' restriction specifier are not allowed| |Compiler error C3940|'*identifier*': identifier not found - possible mismatch between compiler and library versions. Please ensure vccorlib.h/.lib, vccorlib120.dll and c1xx.dll match| |Compiler error C3941|'*condition*': requires '/clr' command line option| +|Compiler error C3942|'`#pragma omp atomic capture`': expression on right of '`=`' must be an lvalue-expression of scalar type| +|Compiler error C3943|'`#pragma omp atomic`': operator '*operator*' is overloaded; only built-in operators are allowed| +|Compiler error C3944|'`#pragma omp atomic`': lvalue expression required as left operand of '*operator*'| |Compiler error C3945|'*type*': unable to throw or catch a winrt object which doesn't derive from Platform::Exception| |Compiler error C3946|'*type*': typeid cannot be applied to this type| |Compiler error C3947|'*typeid*': typeid cannot be applied to a pack expansion| @@ -508,5 +515,5 @@ The articles in this section explain a subset of the error messages generated by ## See also -[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md) \ +[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md)\ [Compiler errors C2000 - C3999, C7000 - C7999](../compiler-errors-1/compiler-errors-c2000-c3999.md) diff --git a/docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md b/docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md index 9bd380066b..0ed99e5e5f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md +++ b/docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md @@ -2,8 +2,8 @@ description: "Learn more about: Compiler errors C7500 through C7999" title: "Compiler errors C7500 through C7999" ms.date: 10/13/2023 -f1_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7696", "C7700", "C7701", "C7702", "C7703", "C7704"] -helpviewer_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7696", "C7700", "C7701", "C7702", "C7703", "C7704"] +f1_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7686", "C7700", "C7701", "C7702", "C7703", "C7704"] +helpviewer_keywords: ["C7500", "C7501", "C7502", "C7503", "C7504", "C7505", "C7506", "C7507", "C7508", "C7509", "C7511", "C7512", "C7513", "C7514", "C7515", "C7516", "C7517", "C7518", "C7519", "C7520", "C7521", "C7522", "C7523", "C7524", "C7525", "C7526", "C7527", "C7528", "C7529", "C7530", "C7531", "C7532", "C7533", "C7534", "C7535", "C7537", "C7538", "C7539", "C7540", "C7541", "C7542", "C7543", "C7544", "C7545", "C7546", "C7547", "C7548", "C7549", "C7550", "C7551", "C7552", "C7554", "C7555", "C7556", "C7557", "C7558", "C7559", "C7560", "C7561", "C7562", "C7563", "C7564", "C7565", "C7566", "C7567", "C7568", "C7569", "C7570", "C7571", "C7572", "C7573", "C7574", "C7575", "C7576", "C7577", "C7578", "C7579", "C7580", "C7581", "C7582", "C7583", "C7584", "C7585", "C7586", "C7587", "C7588", "C7589", "C7590", "C7591", "C7592", "C7593", "C7594", "C7595", "C7596", "C7597", "C7599", "C7600", "C7601", "C7602", "C7603", "C7604", "C7605", "C7606", "C7607", "C7608", "C7609", "C7610", "C7611", "C7612", "C7613", "C7614", "C7615", "C7616", "C7617", "C7618", "C7619", "C7620", "C7621", "C7622", "C7623", "C7624", "C7625", "C7627", "C7628", "C7629", "C7630", "C7631", "C7632", "C7633", "C7634", "C7635", "C7636", "C7637", "C7638", "C7639", "C7640", "C7641", "C7642", "C7643", "C7644", "C7645", "C7646", "C7647", "C7648", "C7649", "C7650", "C7651", "C7652", "C7653", "C7654", "C7655", "C7656", "C7657", "C7658", "C7659", "C7660", "C7661", "C7662", "C7686", "C7700", "C7701", "C7702", "C7703", "C7704"] --- # Compiler errors C7500 through C7999 @@ -42,7 +42,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7524 | 'inline' specifier cannot appear on a block-scope declaration or non-static data member | | Compiler error C7525 | inline variables require at least '%1$M' | | Compiler error C7526 | '%$I': inline variable is undefined | -| Compiler error C7527 | '%$I': template parameter name cannot be redeclared | +| Compiler error C7527 | '*identifier*': a template parameter name cannot be reused within its scope | | Compiler error C7528 | '%1$S': A default constructor or its exception specification cannot be used within a data member initializer of the same class | | Compiler error C7529 | multiple using-declarators require at least '%1$M' | | Compiler error C7530 | applying a pack-expansion to a using-declaration requires at least '%1$M' | @@ -58,7 +58,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7540 | '%1$I': member cannot have the same name as the enclosing class | | Compiler error C7541 | '%1$I': C++17 inline static data members are not compatible with managed types | | Compiler error C7542 | '%1$S': expected a type | -| Compiler error C7543 | likelihood attributes can only be applied to statements and labels | +| Compiler error C7543 | attribute `[[`*attribute*`]]` can only be applied to statements and labels | | Compiler error C7544 | standard attributes '%1$s' and '%2$s' are mutually exclusive | | Compiler error C7545 | attribute '%sno_unique_address' can only be applied to a non-static data member that is not a bitfield | | Compiler error C7546 | binary operator '<=>': unsupported operand types '%$T' and '%$T' | @@ -113,6 +113,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7595 | '%1$S': call to immediate function is not a constant expression | | Compiler error C7596 | '%1$S': cannot take address of immediate function outside of an immediate invocation | | Compiler error C7597 | '%1$D': 'consteval': overriding function must match overridden function | +| Compiler error C7598 | the constraint expression cannot use the concept name '*identifier*'| | Compiler error C7599 | '%1$S': a trailing requires clause is only allowed on a templated function | | Compiler error C7600 | '%1$S': the concept designated by a type constraint shall be a type concept | | Compiler error C7601 | the associated constraints are not satisfied | @@ -123,7 +124,7 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7606 | '%1$S': concept cannot be explicitly instantiated, explicitly specialized or partially specialized | | Compiler error C7607 | atomic constraint should be a constant expression of type 'bool', not '%1$T' | | Compiler error C7608 | atomic constraint should be a constant expression | -| Compiler error C7609 | '%1$S': type constraint expects a concept name | +| Compiler error C7609 | '*identifier*': expected a concept name for type constraint | | Compiler error C7610 | operator '%$L': not allowed between enumeration types and floating-point types | | Compiler error C7611 | operator '%$L': not allowed for array types | | Compiler error C7612 | could not find header unit for '%s' | @@ -163,8 +164,8 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7646 | destroying operator delete functions cannot be array delete operators 'operator delete[]' | | Compiler error C7647 | destroying operator delete functions must be usual deallocation functions | | Compiler error C7648 | a conversion function cannot have a trailing return type | -| Compiler error C7649 | attribute 'xfg::rename' may only be applied to structs, classes and virtual methods | -| Compiler error C7650 | attribute 'xfg::rename' must be passed a string argument | +| Compiler error C7649 | attribute '`[[xfg::rename]]`' may only be applied to structs, classes and virtual methods | +| Compiler error C7650 | attribute '`[[xfg::rename]]`' must be passed a string argument | | Compiler error C7651 | %1$I cannot be used with /await. Use '%2$M' or later for standard coroutine support | | Compiler error C7652 | if a member function has a trailing requires clause then another member function with the same signature, ignoring any trailing requires clause, cannot be virtual | | Compiler error C7653 | '%1$S': failed to select a destructor for the class | @@ -173,17 +174,79 @@ The articles in this section of the documentation explain a subset of the error | Compiler error C7656 | private module fragment cannot be redeclared | | Compiler error C7657 | private module fragment cannot be declared before a module declaration | | Compiler error C7658 | '%1$S': the initializer must be the address of a variable | -| Compiler error C7659 | attribute 'xfg::rename' may not be applied to nested class hierarchies | +| Compiler error C7659 | attribute '`[[xfg::rename]]`' may not be applied to nested class hierarchies | | Compiler error C7660 | '%s': requires '%s' command line option(s) | | Compiler error C7661 | header-name '%s' has an ambiguous resolution to header '%s' | | Compiler error C7662 | '%$S': a coroutine cannot be constexpr or consteval | +| Compiler error C7665 | '*operator*': you cannot assign to '`this`' as it is not an lvalue | +| Compiler error C7666 | you cannot apply '*operator*' to '`this`' as it is not an lvalue | +| Compiler error C7667 | no global `operator delete` function found | +| Compiler error C7668 | a function with an explicit object parameter must be a member function | +| Compiler error C7669 | a function with an explicit object parameter cannot be declared '`static`' | +| Compiler error C7670 | only the first parameter may be an explicit object parameter | +| Compiler error C7671 | a member function with an explicit object parameter may only have one such parameter | +| Compiler error C7672 | a member function with an explicit object parameter may not have trailing implicit object parameter specifiers | +| Compiler error C7673 | explicit object member functions requires at least '*C++ language version*' | +| Compiler error C7674 | member function '*function 1*' with explicit object parameter of type '*type 1*' cannot overload member function '*function 2*' with implicit object parameter of type '*type 2*' | +| Compiler error C7675 | cannot overload static member function with member function declaring the same non-object parameter types | +| Compiler error C7676 | member functions with an explicit object parameter cannot be defaulted | +| Compiler error C7677 | constructors cannot contain an explicit object parameter | +| Compiler error C7678 | member functions with an explicit object parameter cannot be virtual | +| Compiler error C7679 | an explicit object parameter cannot be a parameter pack | +| Compiler error C7680 | only function parameters may be explicit object parameters | +| Compiler error C7682 | '*declaration*': a non-defining declaration of an enumeration with a fixed underlying type is only permitted as a standalone declaration | +| Compiler error C7683 | you cannot create a reference to '`void`' | +| Compiler error C7684 | module name '*name*' has an ambiguous resolution to IFC | +| Compiler error C7685 | there is no type named '*identifier*' in '*type*' | +| Compiler error C7686 | attribute `[[msvc::constexpr]]` cannot be applied to a '`constexpr`' or '`consteval`' function | +| Compiler error C7687 | attribute `[[`*attribute*`]]` may only be applied to statements and functions | | [Compiler error C7688](compiler-error-c7688.md) | '`#pragma omp atomic`': expected an expression of scalar type | -| Compiler error C7686 | TOML parse error | +| Compiler error C7689 | attribute `[[msvc::intrinsic]]` cannot be applied to explicit specializations | +| Compiler error C7690 | attribute `[[msvc::intrinsic]]` cannot be applied to a recursive function | +| Compiler error C7691 | '`__super`' is not supported as '`/allowSuper-`' was specified | +| Compiler error C7692 | '*name*': rewritten candidate function was excluded from overload resolution because a corresponding `operator!=` declared in the same scope | +| Compiler error C7693 | constraints are not supported for managed types and constructs | +| Compiler error C7694 | managed type '*type*' used in a constraint definition or evaluation or in an entity that uses constraints | +| Compiler error C7695 | coroutine promise type '*type*' cannot be abstract | +| Compiler error C7696 | TOML parse error: *error name*; see '*TOML filename*' | +| Compiler error C7697 | '*header unit*' is not a recognized header-name lookup | +| Compiler error C7698 | '`__declspec(`*name*`(...))`' requires a single string argument | +| Compiler error C7699 | file mapping must be unique. Both '*name 1*' and '*name 2*' map to '*filename*' | | Compiler error C7700 | type '%$T' in _Generic association compatible with previous association type '%$T' | | Compiler error C7701 | default _Generic association previously specified | | Compiler error C7702 | no compatible type for '%$T' in _Generic association list | | Compiler error C7703 | inline nested namespaces requires at least '%1$M' | | Compiler error C7704 | '_Alignas' specifier can be used on variables and structure fields only | +| Compiler error C7705 | '`_Atomic`' type '*typename*' cannot be an array or function | +| Compiler error C7706 | '`_Atomic`' type '*typename*' cannot be atomic or CVR qualified | +| Compiler error C7707 | call to '*function*': argument type '*type*' must be a pointer to an atomic type | +| Compiler error C7708 | '*variable*': '`thread_local`' is only valid on variables at file or block scope | +| Compiler error C7709 | '*variable*': '`thread_local`' variables at block scope must be marked `static` | +| Compiler error C7710 | '*variable*': bit-fields cannot be atomic | +| Compiler error C7711 | '`_Atomic`' cannot be applied to incomplete type '*type*' | +| Compiler error C7712 | address argument to atomic operation must be a pointer to an atomic integer, '*type*' is not valid | +| Compiler error C7713 | a statement-expression may only appear inside a function body | +| Compiler error C7714 | the syntax for a 'statement-expression' is '`__extension__ ({ S1; ... ; Sn; })`' | +| Compiler error C7720 | bound for nested loop to be collapsed does not conform to the OpenMP specification | +| Compiler error C7730 | '`#`*directive*' directive requires '*language version*' or later | +| Compiler error C7731 | '*name*' is not allowed on a constructor declaration | +| Compiler error C7732 | expected an expression before '`]`' | +| Compiler error C7733 | the built-in subscript operator expects a single expression | +| Compiler error C7734 | '`size_t`' literal is out of range of possible '`size_t`' values | +| Compiler error C7735 | a lambda cannot be both '`static`' and '`mutable`' | +| Compiler error C7736 | a static lambda must have an empty capture-clause | +| Compiler error C7737 | a lambda with an explicit object parameter shall be neither '`mutable`' nor '`static`' | +| Compiler error C7738 | '`if consteval`' requires a compound statement | +| Compiler error C7739 | cannot jump from this `goto` statement to its label | +| Compiler error C7740 | cannot jump to case label | +| Compiler error C7741 | ABI inconsistency: '*function*' was originally assumed to use '`C`' return semantics but now it requires '`C++`' return semantics | +| Compiler error C7800 | duplicate explicit instantiation definition of '*name*' | +| Compiler error C7801 | '*function*': if one declaration of '*identifier*' has the '`[[msvc::disptach]]`' attribute then all functions must have the attribute | +| Compiler error C7802 | '*identifier*': a capability must resolve to an enumerator | +| Compiler error C7803 | '*identifier*': a capability must be associated with a non-overloaded, non-virtual function | +| Compiler error C7804 | '*identifier*': cannot find a matching default dispatch function | +| Compiler error C7806 | support for the '`msvc::dispatch`' attribute requires '`/experimental:loadTimeSelection`' | +| Compiler error C7807 | expecting a narrow string literal | ## See also diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4430.md b/docs/error-messages/compiler-warnings/compiler-warning-c4430.md index 15c04e3b0f..6814fb10c3 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4430.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4430.md @@ -1,36 +1,33 @@ --- -description: "Learn more about: Compiler Warning C4430" -title: "Compiler Warning C4430" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1, error) C4430" +title: "Compiler warning (level 1, error) C4430" +ms.date: 04/22/2025 f1_keywords: ["C4430"] helpviewer_keywords: ["C4430"] -ms.assetid: 12efbfff-aa58-4a86-a7d6-2c6a12d01dd3 --- -# Compiler Warning C4430 +# Compiler Warning (level 1, Error) C4430 -missing type specifier - int assumed. Note: C++ does not support default-int +> missing type specifier - int assumed. Note: C++ does not support default-int -This error can be generated as a result of compiler conformance work that was done for Visual Studio 2005: all declarations must explicitly specify the type; int is no longer assumed. +This warning is issued when a type specifier is missing in a declaration. The compiler used to assume the type was `int` in this case. But due to compiler conformance work done for Visual Studio 2005, all declarations must explicitly specify the type. -C4430 is always issued as an error. You can turn off this warning with the `#pragma warning` or **/wd**; see [warning](../../preprocessor/warning.md) or [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md) for more information. +C4430 is always issued as an error. You can turn off this warning with the `#pragma warning` or `/wd`. For more information, see [`warning`](../../preprocessor/warning.md) or [`/w`, `/W0`, `/W1`, `/W2`, `/W3`, `/W4`, `/w1`, `/w2`, `/w3`, `/w4`, `/Wall`, `/wd`, `/we`, `/wo`, `/Wv`, `/WX` (Warning Level)](../../build/reference/compiler-option-warning-level.md). ## Example -The following sample generates C4430. +The following sample generates C4430: ```cpp -// C4430.cpp // compile with: /c struct CMyClass { CUndeclared m_myClass; // C4430 - int m_myClass; // OK }; typedef struct { - POINT(); // C4430 - // try the following line instead - // int POINT(); + someFunction(); // C4430 unsigned x; unsigned y; } POINT; ``` + +To fix this code, you'd need to define the type `CUndeclared` and the function `someFunction` prior to their use. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-c4439.md b/docs/error-messages/compiler-warnings/compiler-warning-c4439.md index f8d402b838..9608a6c02c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-c4439.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-c4439.md @@ -1,22 +1,21 @@ --- -description: "Learn more about: Compiler Warning C4439" -title: "Compiler Warning C4439" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1, error) C4439" +title: "Compiler warning (level 1, error) C4439" +ms.date: "1/22/2025" f1_keywords: ["C4439"] helpviewer_keywords: ["C4439"] -ms.assetid: 9449958f-f407-4824-829b-9e092f2af97d --- -# Compiler Warning C4439 +# Compiler warning C4439 -'function' : function definition with a managed type in the signature must have a __clrcall calling convention +> '*function name*': function definition with a managed type in the signature must have a `__clrcall` calling convention The compiler implicitly replaced a calling convention with [`__clrcall`](../../cpp/clrcall.md). To resolve this warning, remove the **`__cdecl`** or **`__stdcall`** calling convention. -C4439 is always issued as an error. You can turn off this warning with the `#pragma warning` or **`/wd`**; see [warning](../../preprocessor/warning.md) or [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md) for more information. +C4439 is always issued as an error. You can turn off this warning with the `#pragma warning` or **`/wd`**. For more information, see [`warning`](../../preprocessor/warning.md) or [`/w`, `/W0`, `/W1`, `/W2`, `/W3`, `/W4`, `/w1`, `/w2`, `/w3`, `/w4`, `/Wall`, `/wd`, `/we`, `/wo`, `/Wv`, `/WX` (Warning Level)](../../build/reference/compiler-option-warning-level.md). ## Example -The following sample generates C4439. +The following sample generates C4439: ```cpp // C4439.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4251.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4251.md index 5045a15a4c..1056b7868c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4251.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4251.md @@ -1,13 +1,13 @@ --- -description: "Learn more about: Compiler Warning (level 2) C4251" title: "Compiler Warning (level 2) C4251" +description: "Learn more about: Compiler Warning (level 2) C4251" ms.date: 12/01/2023 f1_keywords: ["C4251"] helpviewer_keywords: ["C4251"] --- # Compiler Warning (level 2) C4251 -> '*type*' : class '*type1*' needs to have dll-interface to be used by clients of class '*type2*' +> '*type*': '*type1*' needs to have dll-interface to be used by clients of '*type2*' ## Remarks diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4269.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4269.md index 3a8fdd16f4..faa8737853 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4269.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4269.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4269" title: "Compiler Warning (level 1) C4269" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4269" +ms.date: 11/04/2016 f1_keywords: ["C4269"] helpviewer_keywords: ["C4269"] -ms.assetid: 96c97bbc-068a-4b65-8cd8-4ed5dca04c15 --- # Compiler Warning (level 1) C4269 @@ -24,7 +23,7 @@ public: void g() { const X x1; // C4269 -}; +} ``` Since this instance of the class is generated on the stack, the initial value of `m_data` can be anything. Also, since it is a **`const`** instance, the value of `m_data` can never be changed. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4436.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4436.md index 2e6e126ead..9b3e694ede 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4436.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4436.md @@ -1,35 +1,31 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4436" -title: "Compiler Warning (level 1) C4436" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1 and level 4) C4436" +title: "Compiler warning (level 1 and level 4) C4436" +ms.date: "1/22/2025" f1_keywords: ["C4436"] helpviewer_keywords: ["C4436"] -ms.assetid: 2b54a1fc-c9c6-4cc9-90be-faa44fc715d5 --- -# Compiler Warning (level 1) C4436 +# Compiler warning (level 1) C4436 -dynamic_cast from virtual base 'class1' to 'class2' in constructor or destructor could fail with partially-constructed object Compile with /vd2 or define 'class2' with #pragma vtordisp(2) in effect +> `dynamic_cast` from virtual base '*base_class*' to '*derived_class*' in constructor or destructor could fail with partially-constructed object -The compiler has encountered a **`dynamic_cast`** operation with the following characteristics. +A `dynamic_cast` operation is used when: - The cast is from a base class pointer to a derived class pointer. - - The derived class virtually inherits the base class. +- The derived class doesn't have a `vtordisp` field for the virtual base. +- The cast is found in a constructor or destructor of the derived class, or a class that inherits from the derived class. -- The derived class does not have a `vtordisp` field for the virtual base. - -- The cast is found in a constructor or destructor of the derived class, or some class which further inherits from the derived class. - -The warning indicates the **`dynamic_cast`** might not perform correctly, if it is operating on a partially-constructed object. That happens if the derived constructor/destructor is operating on a sub-object of some further derived object. If the derived class named in the warning is never further derived, the warning can be ignored. +This warning indicates that the `dynamic_cast` might not perform correctly if it is applied to a partially constructed object. Which happens if the derived constructor/destructor is operating on a subobject of some further derived object. If the derived class named in the warning isn't further derived, you can ignore the warning. ## Example -The following sample generates C4436 and demonstrates the code generation issue that arises from the missing `vtordisp` field. +The following sample generates C4436 and demonstrates the code generation issue due to the missing `vtordisp` field: ```cpp // C4436.cpp // To see the warning and runtime assert, compile with: /W1 -// To eliminate the warning and assert, compile with: /W1 /vd2 +// To eliminate the warning and assert, compile with: /W1 /vd2 // or compile with: /W1 /DFIX #include @@ -48,7 +44,7 @@ struct B : virtual A { A* a = static_cast(this); B* b = dynamic_cast(a); // C4436 - assert(this == b); // assert unless compiled with /vd2 + assert(this == b); // asserts unless compiled with /vd2 } }; #if defined(FIX) @@ -68,6 +64,6 @@ int main() ## See also -[dynamic_cast Operator](../../cpp/dynamic-cast-operator.md)
-[vtordisp](../../preprocessor/vtordisp.md)
-[Compiler Warning (level 4) C4437](../../error-messages/compiler-warnings/compiler-warning-level-4-c4437.md) +[`dynamic_cast` Operator](../../cpp/dynamic-cast-operator.md)\ +[`vtordisp`](../../preprocessor/vtordisp.md)\ +[Compiler Warning (level 1 and level 4, off) C4437](compiler-warning-level-4-c4437.md) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4556.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4556.md index 371adf13d2..1d14bf8eb5 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4556.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4556.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4556" title: "Compiler Warning (level 1) C4556" -ms.date: "08/27/2018" +description: "Learn more about: Compiler Warning (level 1) C4556" +ms.date: "03/28/2025" f1_keywords: ["C4556"] helpviewer_keywords: ["C4556"] -ms.assetid: e4c0e296-b747-4db1-9608-30b8b74feac2 --- # Compiler Warning (level 1) C4556 -> value of intrinsic immediate argument '*value*' is out of range '*lowerbound* - *upperbound*' +> value of intrinsic immediate argument '*value*' is out of range '*lower_bound* - *upper_bound*' ## Remarks @@ -16,21 +15,18 @@ An intrinsic matches a hardware instruction. The hardware instruction has a fixe ## Example -The following sample generates C4556: +The following example generates C4556: ```cpp // C4556.cpp // compile with: /W1 -// processor: x86 IPF +// processor: x86 #include -void test() -{ - __m64 m; - _m_pextrw(m, 5); // C4556 -} - int main() { + __m64 m = _mm_setzero_si64(); + _m_pextrw(m, 5); // C4556 + _mm_empty(); } ``` diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md index 279721640b..696cc4eacd 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Warning (Level 1) C4789" title: "Compiler Warning (Level 1) C4789" +description: "Learn more about: Compiler Warning (Level 1) C4789" ms.date: 08/30/2022 f1_keywords: ["C4789"] helpviewer_keywords: ["C4789"] -ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234 --- # Compiler Warning (Level 1) C4789 @@ -19,9 +18,7 @@ ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234 The warning occurs if the copy uses the intrinsic form of one of these CRT functions: - [`strcpy`](../../c-runtime-library/reference/strcpy-wcscpy-mbscpy.md) - - [`memset`](../../c-runtime-library/reference/memset-wmemset.md) - - [`memcpy`](../../c-runtime-library/reference/memcpy-wmemcpy.md), [`wmemcpy`](../../c-runtime-library/reference/memcpy-wmemcpy.md) The warning also appears when you cast a parameter to a larger data type, and then make a copy assignment from an lvalue reference. @@ -31,7 +28,7 @@ Visual C++ might generate this warning for a code path that never executes. You ```cpp #pragma warning( push ) #pragma warning( disable : 4789 ) -// unused code that generates compiler warning C4789` +// unused code that generates compiler warning C4789 #pragma warning( pop ) ``` @@ -41,7 +38,7 @@ The [`/sdl` (Enable Additional Security Checks)](../../build/reference/sdl-enabl ## Examples -The following sample generates C4789. +The following sample generates C4789: ```cpp // C4789.cpp @@ -63,7 +60,7 @@ int main() } ``` -The following sample also generates C4789. +The following sample also generates C4789: ```cpp // C4789b.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4799.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4799.md index ec6ba0260e..a5c280ad86 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4799.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4799.md @@ -1,17 +1,35 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4799" title: "Compiler Warning (level 1) C4799" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4799" +ms.date: "03/28/2025" f1_keywords: ["C4799"] helpviewer_keywords: ["C4799"] -ms.assetid: 8ecbd06f-c778-4371-a2fb-c690b6743ec8 --- # Compiler Warning (level 1) C4799 -> No EMMS at end of function '*function*' +> function '*function*' has no EMMS instruction -The function has at least one MMX instruction, but does not have an `EMMS` instruction. When a multimedia instruction is used, an `EMMS` instruction or `_mm_empty` intrinsic should also be used to clear the multimedia tag word at the end of the MMX code. +The function has at least one MMX instruction, but does not have an `EMMS` instruction. When a multimedia instruction is used, an `EMMS` instruction or [`_mm_empty`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_empty) intrinsic should also be used to clear the multimedia tag word at the end of the MMX code. -You may get C4799 when using ivec.h, indicating that the code does not use properly execute the EMMS instruction before returning. This is a false warning for these headers. You may turn these off by defining _SILENCE_IVEC_C4799 in ivec.h. However, be aware that this will also keep the compiler from giving correct warnings of this type. +You may get C4799 when using `ivec.h`, indicating that the code does not properly execute the `EMMS` instruction before returning. This is a false warning for these headers. You may turn these off by defining `_SILENCE_IVEC_C4799` in `ivec.h`. However, be aware that this will also keep the compiler from giving correct warnings of this type. For related information, see [Intel's MMX Instruction Set](../../assembler/inline/intel-s-mmx-instruction-set.md). + +## Example + +The following example generates C4799: + +```cpp +// C4799.cpp +// compile with: /W1 +// processor: x86 +#include + +int main() +{ + __m64 m = _mm_setzero_si64(); + + // Uncomment the following line to resolve the warning: + // _mm_empty(); +} // C4799 +``` diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md index 40fd5f1901..813ec5943a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: Compiler Warning (level 2) C4099" title: "Compiler Warning (level 2) C4099" +description: "Learn more about: Compiler Warning (level 2) C4099" ms.date: "11/04/2016" f1_keywords: ["C4099"] helpviewer_keywords: ["C4099"] -ms.assetid: 00bb803d-cae7-4ab8-8969-b46f54139ac8 --- # Compiler Warning (level 2) C4099 -'identifier' : type name first seen using 'objecttype1' now seen using 'objecttype2' +> '*identifier*': type name first seen using '*object_type1*' now seen using '*object_type2*' An object declared as a structure is defined as a class, or an object declared as a class is defined as a structure. The compiler uses the type given in the definition. @@ -20,5 +19,5 @@ The following sample generates C4099. // C4099.cpp // compile with: /W2 /c struct A; -class A {}; // C4099, use different identifer or use same object type +class A {}; // C4099, use different identifier or use same object type ``` diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4146.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4146.md index 3540ce83ae..5cf2284477 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4146.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4146.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Compiler warning (level 2) C4146" title: "Compiler warning (level 2) C4146" -ms.date: 08/30/2022 +ms.date: 04/22/2025 f1_keywords: ["C4146"] helpviewer_keywords: ["C4146"] --- @@ -9,21 +9,20 @@ helpviewer_keywords: ["C4146"] > unary minus operator applied to unsigned type, result still unsigned -Unsigned types can hold only non-negative values, so unary minus (negation) usually doesn't make sense when applied to an unsigned type. Both the operand and the result are non-negative. +Unsigned types only hold non-negative values. So unary minus (negation) usually doesn't make sense when applied to an unsigned type. Both the operand and the result are non-negative. ## Remarks -When you express a negative integer literal, the **`-`** in front of the value is parsed as a [unary negation](../../cpp/unary-plus-and-negation-operators-plus-and.md) operator. The compiler applies the operator after it parses the numeric value. If the numeric value fits in the range of an unsigned integer type, but not the corresponding signed integer type, the compiler interprets the value as unsigned. An unsigned value is unchanged by the unary negation operator. +When you express a negative integer literal, the **`-`** in front of the value is parsed as a [unary negation](../../cpp/unary-plus-and-negation-operators-plus-and.md) operator. The compiler applies the operator after it parses the numeric value. If the numeric value fits in the range of an unsigned integer type, but not the corresponding signed integer type, the compiler interprets the value as unsigned. -This warning often occurs when you try to express the minimum **`int`** value, -2147483648, or the minimum **`long long`** value, -9223372036854775808. These values can't be written as -2147483648 or -9223372036854775808ll, respectively. The reason is because the compiler processes the expression in two stages: first, it parses the numeric value, then it applies the negation operator. For example, when the compiler parses -2147483648, it follows these steps: +This warning often occurs when you try to express the minimum **`int`** value, -2147483648, or the minimum **`long long`** value, -9223372036854775808. These values can't be written as -2147483648 or -9223372036854775808ll. The reason is because the compiler processes the expression in two stages: first, it parses the numeric value, then it applies the negation operator. For example, when the compiler parses -2147483648, it follows these steps: 1. The number 2147483648 is evaluated. Because it's greater than the maximum **`int`** value of 2147483647, but still fits in an **`unsigned int`**, the type of 2147483648 is **`unsigned int`**. - 1. Unary minus is applied to the unsigned value, with an unsigned result, which also happens to be 2147483648. The unsigned type of the result can cause unexpected behavior. If the result is used in a comparison, then an unsigned comparison might be used, for example, when the other operand is an **`int`**. -You can avoid C4146 by using `INT_MIN` or `LLONG_MIN` from *``* or the C++ equivalent, *``*. These values have signed types. +You can avoid **C4146** by using `INT_MIN` or `LLONG_MIN` from *``* or the C++ equivalent, *``*. These values have signed types. The [`/sdl` (Enable Additional Security Checks)](../../build/reference/sdl-enable-additional-security-checks.md) compiler option elevates this warning to an error. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4150.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4150.md index 9d0fbe858c..3fcab81522 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4150.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4150.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 2) C4150" title: Compiler warning (level 2) C4150 -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 2) C4150" +ms.date: 11/04/2016 f1_keywords: ["C4150"] helpviewer_keywords: ["C4150"] --- @@ -75,7 +75,6 @@ void NoDestruct( IncClass* pIncClass ) { delete pIncClass; } - ``` ## See also diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4307.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4307.md index 0bfaf97272..c2561f469e 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4307.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4307.md @@ -8,7 +8,7 @@ ms.assetid: 7cca11e9-be61-49e4-8b15-88b84f0cbf07 --- # Compiler Warning (level 2) C4307 -'operator' : integral constant overflow +'operator' : signed integral constant overflow The operator is used in an expression that results in an integer constant overflowing the space allocated for it. You may need to use a larger type for the constant. A **`signed int`** holds a smaller value than an **`unsigned int`** because the **`signed int`** uses one bit to represent the sign. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4412.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4412.md index 2c6d5bb4fa..3ef99e9709 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4412.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4412.md @@ -1,35 +1,33 @@ --- -description: "Learn more about: Compiler Warning (level 2) C4412" -title: "Compiler Warning (level 2) C4412" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 2, off) C4412" +title: "Compiler warning (level 2, off) C4412" +ms.date: "1/22/2025" f1_keywords: ["C4412"] helpviewer_keywords: ["C4412"] -ms.assetid: f28dc531-1a98-497b-a366-0a13e1bc81c7 --- -# Compiler Warning (level 2) C4412 +# Compiler warning (level 2, off) C4412 -> '*function*' : function signature contains type '*type*'; C++ objects are unsafe to pass between pure code and mixed or native. +> '*function*': function signature contains type '*type*'; C++ objects are unsafe to pass between pure code and mixed or native. ## Remarks -The **/clr:pure** compiler option is deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017. If you have code that needs to be pure, we recommend that you port it to C#. +The `/clr:pure` compiler option is deprecated in Visual Studio 2015, and unsupported starting in Visual Studio 2017. If you have code that needs to be CLR pure, we recommend that you port it to C#. -The compiler detected a potentially unsafe situation that could result in a runtime error: a call is being made from a **/clr:pure** compiland to a function that was imported via dllimport and the function signature contains an unsafe type. A type is unsafe if it contains a member function or has a data member that is an unsafe type or an indirection to an unsafe type. +The compiler detected a potentially unsafe situation that could result in a runtime error: a call is being made from code compiled with `/clr:pure` to a function imported via `dllimport`, and the function signature contains an unsafe type. A type is unsafe if it contains a member function or has a data member that is an unsafe type or an indirection to an unsafe type. -This is unsafe because of the difference in the default calling conventions between pure and native code (or mixed native and managed). When importing (via `dllimport`) a function into a **/clr:pure** compiland, ensure that the declarations of each type in the signature are identical to those in the compiland that exports the function (being especially careful about differences in implicit calling conventions). +This pattern is unsafe because of the difference in the default calling conventions between pure and native code (or mixed native and managed). When importing a function via `dllimport` into code compiled with `/clr:pure`, ensure that the declarations of each type in the signature are identical to the signature in the compiland that exports the function (being especially careful about differences in implicit calling conventions). -A virtual member function is especially prone to give unexpected results. However, even a non-virtual function should be tested to ensure that you get the correct results. If you are sure that you are getting the correct results, you can ignore this warning. +A virtual member function is especially prone to give unexpected results. However, even a nonvirtual function should be tested to ensure that you get the correct results. This warning can be ignored once you ensure the result is correct. -C4412 is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) and [dllexport, dllimport](../../cpp/dllexport-dllimport.md) for more information. +C4412 is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) and [`dllexport`, `dllimport`](../../cpp/dllexport-dllimport.md). To resolve this warning, remove all functions from the type. -## Examples +## Example -The following sample generates C4412. +The following sample generates C4412: ```cpp -// C4412.cpp // compile with: /c /W2 /clr:pure #pragma warning (default : 4412) @@ -52,7 +50,7 @@ int main() { } ``` -The following sample is a header file that declares two types. The `Unsafe` type is unsafe because it has a member function. +The following sample is a header file that declares two types. The `Unsafe` type is unsafe because it has a member function: ```cpp // C4412.h @@ -70,7 +68,7 @@ struct Safe { }; ``` -This sample exports functions with the types defined in the header file. +This sample exports functions with the types defined in the header file: ```cpp // C4412_2.cpp @@ -85,9 +83,9 @@ __declspec(dllexport) Unsafe * __cdecl func() { return new Unsafe; } __declspec(dllexport) Safe * __cdecl func2() { return new Safe; } ``` -The default calling convention in a **/clr:pure** compilation is different from a native compilation. When C4412.h is included, `Test` defaults to `__clrcall`. If you compile and run this program (do not use **/c**), the program will throw an exception. +The default calling convention in a `/clr:pure` compilation is different from a native compilation. When `C4412.h` is included, `Test` defaults to `__clrcall`. -The following sample generates C4412. +The following sample generates C4412 and throws an exception at runtime: ```cpp // C4412_3.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4191.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4191.md index fc3a8e001c..46b90ba9e2 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4191.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4191.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 3, off) C4191" title: "Compiler Warning (level 3, off) C4191" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3, off) C4191" +ms.date: 11/04/2016 f1_keywords: ["C4191"] helpviewer_keywords: ["C4191"] --- @@ -46,5 +46,5 @@ int main() { fnptr1 fp3 = (fnptr1) &f2; // C4191 fnptr2 fp4 = (fnptr2) &f1; // C4191 -}; +} ``` diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4243.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4243.md index ea6813c8f3..8fab32eef4 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4243.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4243.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4243" title: "Compiler Warning (level 3) C4243" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3) C4243" +ms.date: 11/04/2016 f1_keywords: ["C4243"] helpviewer_keywords: ["C4243"] -ms.assetid: ca72f9ad-ce0b-43a9-a68c-106e1f8b90ef --- # Compiler Warning (level 3) C4243 @@ -21,7 +20,7 @@ The following sample generates C4243: struct B { int f() { return 0; - }; + } }; struct D : private B {}; diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md index 189fa4462c..b4b8cfae66 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md @@ -1,27 +1,25 @@ --- description: "Learn more about: Compiler Warning (level 4) C4100" title: "Compiler Warning (level 4) C4100" -ms.date: "11/04/2016" +ms.date: 04/22/2025 f1_keywords: ["C4100"] helpviewer_keywords: ["C4100"] -ms.assetid: 478ed97d-e502-49e4-9afb-ac2a6c61194b --- # Compiler Warning (level 4) C4100 -'identifier' : unreferenced formal parameter +> 'identifier' : unreferenced formal parameter The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. -C4100 can also be issued when code calls a destructor on a otherwise unreferenced parameter of primitive type. This is a limitation of the Microsoft C++ compiler. +C4100 can also be issued when code calls a destructor on an otherwise unreferenced parameter of primitive type. The following sample generates C4100: ```cpp // C4100.cpp // compile with: /W4 -void func(int i) { // C4100, delete the unreferenced parameter to - //resolve the warning - // i; // or, add a reference like this +void func(int i) { // C4100, delete the unreferenced parameter to resolve the warning + // i; // Or uncomment this line to add a reference } int main() diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4205.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4205.md index 82848a4a96..2deee61561 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4205.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4205.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4205" title: "Compiler Warning (level 4) C4205" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4) C4205" +ms.date: 11/04/2016 f1_keywords: ["C4205"] helpviewer_keywords: ["C4205"] -ms.assetid: 39b5108c-7230-41b4-b2fe-2293eb6aae28 --- # Compiler Warning (level 4) C4205 @@ -20,7 +19,7 @@ With Microsoft extensions (/Ze), **`static`** functions can be declared inside a void func1() { static int func2(); // C4205 -}; +} int main() { diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4254.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4254.md index 7a9386692c..dbcbdcc801 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4254.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4254.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 4, off) C4254" title: "Compiler Warning (level 4, off) C4254" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4, off) C4254" +ms.date: 11/04/2016 f1_keywords: ["C4254"] helpviewer_keywords: ["C4254"] --- @@ -31,5 +31,5 @@ int main() { x->a = 4; x->a = x->b; // OK x->b = x->a; // C4254 -}; +} ``` diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4400.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4400.md index 071fc9c192..a97330018c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4400.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4400.md @@ -1,16 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4400" -title: "Compiler Warning (level 4) C4400" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4, error) C4400" +title: "Compiler warning (level 4, error) C4400" +ms.date: "1/22/2025" f1_keywords: ["C4400"] helpviewer_keywords: ["C4400"] -ms.assetid: f135fe98-4f92-4e07-9d71-2621b36ee755 --- -# Compiler Warning (level 4) C4400 +# Compiler warning (level 4, error) C4400 -'type' : const/volatile qualifiers on this type are not supported +> '*type*': `const`/`volatile` qualifiers on this type are not supported -The [const](../../cpp/const-cpp.md)and [volatile](../../cpp/volatile-cpp.md)qualifiers will not work with variables of common language runtime types. +The [`const`](../../cpp/const-cpp.md) and [`volatile`](../../cpp/volatile-cpp.md) qualifiers don't work with common language runtime typed variables. ## Example diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4435.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4435.md index c60d859b88..8b30d0111b 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4435.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4435.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4435" -title: "Compiler Warning (level 4) C4435" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4, off) C4435" +title: "Compiler Warning (level 4, off) C4435" +ms.date: "1/22/2025" f1_keywords: ["C4435"] helpviewer_keywords: ["C4435"] -ms.assetid: a04524af-2b71-4ff9-9729-d9d1d1904ed7 --- -# Compiler Warning (level 4) C4435 +# Compiler warning (level 4, off) C4435 -'class1' : Object layout under /vd2 will change due to virtual base 'class2' +> '*derived_class*': Object layout under `/vd2` will change due to virtual base '*base_class*' -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). -Under the default compile option of /vd1, the derived class does not have a `vtordisp` field for the indicated virtual base. If /vd2 or `#pragma vtordisp(2)` is in effect, a `vtordisp` field will be present, changing the object layout. This can lead to binary compatibility problems if interacting modules are compiled with different `vtordisp` settings. +Under the default compile option of `/vd1`, the derived class doesn't have a `vtordisp` field for the indicated virtual base. If `/vd2` or `#pragma vtordisp(2)` is in effect, a `vtordisp` field is present, changing the object layout. This difference can lead to binary compatibility problems if interacting modules are compiled with different `vtordisp` settings. ## Example @@ -34,5 +33,5 @@ class B : public virtual A // C4435 ## See also -[vtordisp](../../preprocessor/vtordisp.md)
-[/vd (Disable Construction Displacements)](../../build/reference/vd-disable-construction-displacements.md) +[`vtordisp`](../../preprocessor/vtordisp.md)\ +[`/vd` (Disable Construction Displacements)](../../build/reference/vd-disable-construction-displacements.md) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4437.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4437.md index a2207a1ad8..6a5a36565b 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4437.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4437.md @@ -1,32 +1,28 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4437" -title: "Compiler Warning (level 4) C4437" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1 and level 4, off) C4437" +title: "Compiler warning (level 1 and level 4, off) C4437" +ms.date: "1/22/2025" f1_keywords: ["C4437"] helpviewer_keywords: ["C4437"] -ms.assetid: dc07e350-20eb-474c-a7ad-f841ae7ec339 --- -# Compiler Warning (level 4) C4437 +# Compiler warning (level 1 and level 4, off) C4437 -dynamic_cast from virtual base 'class1' to 'class2' could fail in some contexts Compile with /vd2 or define 'class2' with #pragma vtordisp(2) in effect +> `dynamic_cast` from virtual base '*base_class*' to '*derived_class*' could fail in some contexts -This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information. +This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md). -The compiler has encountered a **`dynamic_cast`** operation with the following characteristics. +A `dynamic_cast` operation is used when: - The cast is from a base class pointer to a derived class pointer. - - The derived class virtually inherits the base class. +- The derived class doesn't have a `vtordisp` field for the virtual base. +- The cast is found in a constructor or destructor of the derived class, or a class that inherits from the derived class. Otherwise, compiler warning [C4436](compiler-warning-level-1-c4436.md) is emitted issued of C4435. -- The derived class does not have a `vtordisp` field for the virtual base. - -- The cast is not found in a constructor or destructor of the derived class, or some class which further inherits from the derived class (otherwise, compiler warning C4436 will be issued). - -The warning indicates that the **`dynamic_cast`** might not perform correctly if it is operating on a partially-constructed object. This situation occurs when the enclosing function is called from a constructor or destructor of a class that inherits the derived class that is named in the warning. If the derived class that is named in the warning is never further derived, or the enclosing function is not called during object construction or destruction, the warning can be ignored. +This warning indicates that the `dynamic_cast` might not perform correctly when applied to a partially constructed object. This situation occurs when the enclosing function is called from a constructor or destructor of a class that inherits from *derived_class*. You can ignore the error if *derived_class* is never further derived, or the enclosing function isn't called during object construction or destruction. ## Example -The following sample generates C4437 and demonstrates the code generation issue that arises from the missing `vtordisp` field. +The following sample generates C4437 and demonstrates the code generation issue that arises from the missing `vtordisp` field: ```cpp // C4437.cpp @@ -76,6 +72,6 @@ int main() ## See also -[dynamic_cast Operator](../../cpp/dynamic-cast-operator.md)
-[vtordisp](../../preprocessor/vtordisp.md)
-[Compiler Warning (level 1) C4436](../../error-messages/compiler-warnings/compiler-warning-level-1-c4436.md) +[`dynamic_cast` Operator](../../cpp/dynamic-cast-operator.md)\ +[`vtordisp`](../../preprocessor/vtordisp.md)\ +[Compiler Warning (level 1) C4436](compiler-warning-level-1-c4436.md) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4706.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4706.md index 6fa2feebb0..d31d01fd41 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4706.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4706.md @@ -1,70 +1,65 @@ --- description: "Learn more about: Compiler Warning (level 4) C4706" title: "Compiler Warning (level 4) C4706" -ms.date: "11/04/2016" +ms.date: "3/5/2025" f1_keywords: ["C4706"] helpviewer_keywords: ["C4706"] -ms.assetid: 89cd3f4f-812c-4a4b-9426-65a5a6d1b99c --- # Compiler Warning (level 4) C4706 -assignment within conditional expression +> assignment used as a condition -The test value in a conditional expression was the result of an assignment. +The test value in a conditional expression is the result of an assignment. An assignment has a value (the value on the left side of the assignment) that can be used legally in another expression, including a test expression. The following sample generates C4706: ```cpp -// C4706a.cpp // compile with: /W4 int main() { int a = 0, b = 0; - if ( a = b ) // C4706 + if (a = b) // C4706 { } } ``` -The warning will occur even if you double the parentheses around the test condition: +Suppress the warning with `((`*expression*`))`. For example: ```cpp -// C4706b.cpp // compile with: /W4 int main() { int a = 0, b = 0; - if ( ( a = b ) ) // C4706 + if ((a = b)) // No warning { } } ``` -If your intention is to test a relation and not to make an assignment, use the `==` operator. For example, the following line tests whether a and b are equal: +If your intention is to test a relation, not to make an assignment, use the `==` operator. For example, the following tests whether a and b are equal: ```cpp -// C4706c.cpp // compile with: /W4 int main() { int a = 0, b = 0; - if ( a == b ) + if (a == b) { } } ``` -If you intend to make your test value the result of an assignment, test to ensure that the assignment is non-zero or not null. For example, the following code will not generate this warning: +If you intend to make your test value the result of an assignment, test to ensure that the assignment is non-zero or non-null. For example, the following code doesn't generate this warning: ```cpp -// C4706d.cpp // compile with: /W4 int main() { int a = 0, b = 0; - if ( ( a = b ) != 0 ) + if ((a = b) != 0) { } } diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md b/docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md index 87f1ff8efc..f68e772b83 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-by-compiler-version.md @@ -12,48 +12,50 @@ These versions of the compiler introduced new warnings: | Product | Compiler version number | |--|--| -| Visual Studio 2002 | 13.00.9466 | -| Visual Studio 2003 | 13.10.3077 | -| Visual Studio 2005 | 14.00.50727.762 | -| Visual Studio 2008 | 15.00.21022.08 | -| Visual Studio 2010 | 16.00.40219.01 | -| Visual Studio 2012 | 17.00.51106.1 | -| Visual Studio 2013 | 18.00.21005.1 | -| Visual Studio 2015 RTM | 19.00.23026.0 | -| Visual Studio 2015 Update 1 | 19.00.23506.0 | -| Visual Studio 2015 Update 2 | 19.00.23918.0 | -| Visual Studio 2015 Update 3 | 19.00.24215.1 | -| Visual Studio 2017 RTM | 19.10.25017.0 | -| Visual Studio 2017 version 15.3 | 19.11.25506.0 | -| Visual Studio 2017 version 15.5 | 19.12.25830.0 | -| Visual Studio 2017 version 15.6 | 19.13.26128.0 | -| Visual Studio 2017 version 15.7 | 19.14.26428.0 | -| Visual Studio 2017 version 15.8 | 19.15.26726.0 | -| Visual Studio 2017 version 15.9 | 19.16.26926.0 | -| Visual Studio 2019 RTM | 19.20.27004.0 | -| Visual Studio 2019 version 16.1 | 19.21.27702.0 | -| Visual Studio 2019 version 16.2 | 19.22.27905.0 | -| Visual Studio 2019 version 16.3 | 19.23.28105.0 | -| Visual Studio 2019 version 16.4 | 19.24.28314.0 | -| Visual Studio 2019 version 16.5 | 19.25.28610.0 | -| Visual Studio 2019 version 16.6 | 19.26.28805.0 | -| Visual Studio 2019 version 16.7 | 19.27.29112.0 | -| Visual Studio 2019 version 16.8 | 19.28.29333.0 | -| Visual Studio 2019 version 16.9 | 19.28.29700.0 | -| Visual Studio 2019 version 16.10 | 19.29.30000.0 | -| Visual Studio 2019 version 16.11 | 19.29.30100.0 | -| Visual Studio 2022 version 17.0 RTW | 19.30 | -| Visual Studio 2022 version 17.1 | 19.31 | -| Visual Studio 2022 version 17.2 | 19.32 | -| Visual Studio 2022 version 17.3 | 19.33 | -| Visual Studio 2022 version 17.4 | 19.34 | -| Visual Studio 2022 version 17.5 | 19.35 | -| Visual Studio 2022 version 17.6 | 19.36 | -| Visual Studio 2022 version 17.7 | 19.37 | -| Visual Studio 2022 version 17.8 | 19.38 | -| Visual Studio 2022 version 17.9 | 19.39 | +| Visual Studio 2022 version 17.13 | 19.43 | +| Visual Studio 2022 version 17.12 | 19.42 | +| Visual Studio 2022 version 17.11 | 19.41 | | Visual Studio 2022 version 17.10 | 19.40 | - +| Visual Studio 2022 version 17.9 | 19.39 | +| Visual Studio 2022 version 17.8 | 19.38 | +| Visual Studio 2022 version 17.7 | 19.37 | +| Visual Studio 2022 version 17.6 | 19.36 | +| Visual Studio 2022 version 17.5 | 19.35 | +| Visual Studio 2022 version 17.4 | 19.34 | +| Visual Studio 2022 version 17.3 | 19.33 | +| Visual Studio 2022 version 17.2 | 19.32 | +| Visual Studio 2022 version 17.1 | 19.31 | +| Visual Studio 2022 version 17.0 RTW | 19.30 | +| Visual Studio 2019 version 16.11 | 19.29.30100.0 | +| Visual Studio 2019 version 16.10 | 19.29.30000.0 | +| Visual Studio 2019 version 16.9 | 19.28.29700.0 | +| Visual Studio 2019 version 16.8 | 19.28.29333.0 | +| Visual Studio 2019 version 16.7 | 19.27.29112.0 | +| Visual Studio 2019 version 16.6 | 19.26.28805.0 | +| Visual Studio 2019 version 16.5 | 19.25.28610.0 | +| Visual Studio 2019 version 16.4 | 19.24.28314.0 | +| Visual Studio 2019 version 16.3 | 19.23.28105.0 | +| Visual Studio 2019 version 16.2 | 19.22.27905.0 | +| Visual Studio 2019 version 16.1 | 19.21.27702.0 | +| Visual Studio 2019 RTM | 19.20.27004.0 | +| Visual Studio 2017 version 15.9 | 19.16.26926.0 | +| Visual Studio 2017 version 15.8 | 19.15.26726.0 | +| Visual Studio 2017 version 15.7 | 19.14.26428.0 | +| Visual Studio 2017 version 15.6 | 19.13.26128.0 | +| Visual Studio 2017 version 15.5 | 19.12.25830.0 | +| Visual Studio 2017 version 15.3 | 19.11.25506.0 | +| Visual Studio 2017 RTM | 19.10.25017.0 | +| Visual Studio 2015 Update 3 | 19.00.24215.1 | +| Visual Studio 2015 Update 2 | 19.00.23918.0 | +| Visual Studio 2015 Update 1 | 19.00.23506.0 | +| Visual Studio 2015 RTM | 19.00.23026.0 | +| Visual Studio 2013 | 18.00.21005.1 | +| Visual Studio 2012 | 17.00.51106.1 | +| Visual Studio 2010 | 16.00.40219.01 | +| Visual Studio 2008 | 15.00.21022.08 | +| Visual Studio 2005 | 14.00.50727.762 | +| Visual Studio 2003 | 13.10.3077 | +| Visual Studio 2002 | 13.00.9466 | You can specify only the major number, the major and minor numbers, or the major, minor, and build numbers to the **`/Wv`** option. The compiler reports all warnings that match versions that begin with the specified number. It suppresses all warnings for versions greater than the specified number. For example, **`/Wv:17`** reports warnings introduced in or before any version of Visual Studio 2012, and suppresses warnings introduced by any compiler from Visual Studio 2013 (version 18) or later. To suppress warnings introduced in Visual Studio 2015 update 2 and later, you can use **`/Wv:19.00.23506`**. Use **`/Wv:19.11`** to report the warnings introduced in any version of Visual Studio before Visual Studio 2017 version 15.5, but suppress warnings introduced in Visual Studio 2017 version 15.5 and later. @@ -61,9 +63,35 @@ The following sections list the warnings introduced by each version of Visual C+ ::: moniker range=">= msvc-170" +## Warnings introduced in Visual Studio 2022 version 17.13 (compiler version 19.43) + +These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.42`**. + +| Warning | Message | +|--|--| +|C5277| type trait optimization for '*class name*' is disabled +|C5308| Modifying reserved macro name '*macro name*' may cause undefined behavior +|C5309| literal suffix '*name*' requires at least '*language version*' + +## Warnings introduced in Visual Studio 2022 version 17.12 (compiler version 19.42) + +These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.41`**. + +| Warning | Message | +|--|--| +|C5086| Arch setting *arch* and vector length *number* are not allowed. Using the default vector length - *number*. +|C5276| `/experimental:ifcDebugRecords` currently requires `/Z7` to be enabled. Please recompile with `/Z7` enabled. +|C5306| parameter array behavior change: overload '*identifier 1*' resolved to '*identifier 2*'; previously, it would have resolved to '*identifier 3*'. Use `/clr:ECMAParamArray` to revert to old behavior +|C5307| '*function*': argument (*argument number*) converted from '*type 1*' to '*type 2*'. Missing '`L`' encoding-prefix for character literal? + + +## Warnings introduced in Visual Studio 2022 version 17.11 (compiler version 19.41) + +There were no new warnings introduced in 17.11 + ## Warnings introduced in Visual Studio 2022 version 17.10 (compiler version 19.40) -These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.40`**. +These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.39`**. | Warning | Message | |--|--| @@ -78,7 +106,7 @@ These warnings, and all warnings in later versions, are suppressed by using the ## Warnings introduced in Visual Studio 2022 version 17.9 (compiler version 19.39) -These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.39`**. +These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.38`**. | Warning | Message | |--|--| @@ -87,7 +115,7 @@ These warnings, and all warnings in later versions, are suppressed by using the ## Warnings introduced in Visual Studio 2022 version 17.8 (compiler version 19.38) -These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.38`**. +These warnings, and all warnings in later versions, are suppressed by using the compiler option **`/Wv:19.37`**. | Warning | Message | |--|--| @@ -925,7 +953,7 @@ These warnings, and all warnings in later versions, are suppressed by using the | [C4792](compiler-warning-level-3-c4792.md) | `function 'function' declared using sysimport and referenced from native code; import library required to link` | | [C4794](compiler-warning-level-1-c4794.md) | `segment of thread local storage variable 'name' changed from 'segment' to 'segment'` | | C4798 | `native code generated for p-code function 'name' with exception handler or unwind semantics` | -| [C4799](compiler-warning-level-1-c4799.md) | `function 'name' has no EMMS instruction` | +| [C4799](compiler-warning-level-1-c4799.md) | `function 'function' has no EMMS instruction` | | [C4803](compiler-warning-level-1-c4803.md) | `'declaration': the raise method has a different storage class from that of the event, 'declaration'` | | [C4810](compiler-warning-level-1-c4810.md) | `value of pragma pack(show) == number` | | [C4811](compiler-warning-level-1-c4811.md) | `value of pragma conform(forScope, show) == value` | diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199.md index 6f687f9a8c..675357263c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4000-through-c4199.md @@ -1,8 +1,9 @@ --- -description: "Table of Microsoft C/C++ compiler (MSVC) warning messages C4000 through C4199" title: "Microsoft C/C++ compiler (MSVC) warnings C4000 through C4199" +description: "Table of Microsoft C/C++ compiler (MSVC) warning messages C4000 through C4199" ms.date: "04/21/2019" -f1_keywords: ["C4000", "C4035", "C4060", "C4063", "C4064", "C4065", "C4069", "C4123", "C4137", "C4181", "C4188", "C4193", "C4194", "C4195", "C4196", "C4199"] +f1_keywords: ["C4023", "C4035", "C4051", "C4060", "C4063", "C4064", "C4065", "C4069", "C4123", "C4137", "C4181", "C4188", "C4193", "C4194", "C4195", "C4196", "C4199"] +helpviewer_keywords: ["C4023", "C4035", "C4051", "C4060", "C4063", "C4064", "C4065", "C4069", "C4123", "C4137", "C4181", "C4188", "C4193", "C4194", "C4195", "C4196", "C4199"] --- # Microsoft C/C++ compiler warnings C4000 through C4199 @@ -15,8 +16,8 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |Warning|Message| |-------------|-------------| |[Compiler warning (level 4, no longer emitted) C4001](compiler-warning-level-4-c4001.md)|nonstandard extension 'single line comment' was used| -|[Compiler warning (level 1, Error) C4002](compiler-warning-level-1-c4002.md)|too many arguments for function-like macro invocation '*identifier*'| -|[Compiler warning (level 1, Error) C4003](compiler-warning-level-1-c4003.md)|not enough arguments for function-like macro invocation '*identifier*'| +|[Compiler warning (level 1, error) C4002](compiler-warning-level-1-c4002.md)|too many arguments for function-like macro invocation '*identifier*'| +|[Compiler warning (level 1, error) C4003](compiler-warning-level-1-c4003.md)|not enough arguments for function-like macro invocation '*identifier*'| |[Compiler warning (level 1) C4005](compiler-warning-level-1-c4005.md)|'*identifier*': macro redefinition| |[Compiler warning (level 1) C4006](compiler-warning-level-1-c4006.md)|`#undef` expected an identifier| |[Compiler warning (level 3) C4007](compiler-warning-level-2-c4007.md)|'*function*': must be '*attribute*'| @@ -27,10 +28,10 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 3) C4018](compiler-warning-level-3-c4018.md)|'*expression*': signed/unsigned mismatch| |[Compiler warning (level 4) C4019](compiler-warning-level-4-c4019.md)|empty statement at global scope| |[Compiler warning (level 1) C4020](compiler-warning-level-1-c4020.md)|'function': too many actual parameters| -|[Compiler warning (level 1) C4022](compiler-warning-level-1-c4022.md)|'*function*': pointer mismatch for actual parameter '*parameter_number*'| -|Compiler warning (level 1) C4023|'*function*': based pointer passed to unprototyped function: parameter '*parameter_number*'| -|[Compiler warning (level 1) C4024](compiler-warning-level-1-c4024.md)|'*function*': different types for formal and actual parameter '*parameter_number*'| -|[Compiler warning (level 1) C4025](compiler-warning-level-1-c4025.md)|'*function*': based pointer passed to function with variable arguments: parameter '*parameter_number*'| +|[Compiler warning (level 1) C4022](compiler-warning-level-1-c4022.md)|'*function*': pointer mismatch for actual parameter *parameter_number*| +|Compiler warning (level 1) C4023|'*function*': based pointer passed to unprototyped function: parameter *parameter_number*| +|[Compiler warning (level 1) C4024](compiler-warning-level-1-c4024.md)|'*function*': different types for formal and actual parameter *parameter_number*| +|[Compiler warning (level 1) C4025](compiler-warning-level-1-c4025.md)|'*function*': based pointer passed to function with variable arguments: parameter *parameter_number*| |[Compiler warning (level 1) C4026](compiler-warning-level-1-c4026.md)|function declared with formal parameter list| |[Compiler warning (level 1) C4027](compiler-warning-level-1-c4027.md)|function declared without formal parameter list| |[Compiler warning (level 1) C4028](compiler-warning-level-1-c4028.md)|formal parameter *parameter_number* different from declaration| @@ -68,7 +69,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 3) C4073](compiler-warning-level-3-c4073.md)|initializers put in library initialization area| |[Compiler warning (level 1) C4074](compiler-warning-level-1-c4074.md)|initializers put in compiler reserved initialization area| |[Compiler warning (level 1) C4075](compiler-warning-level-1-c4075.md)|initializers put in unrecognized initialization area| -|[Compiler warning (level 1) C4076](compiler-warning-level-1-c4076.md)|'*type_modifier*': can't be used with type '*typename*'| +|[Compiler warning (level 1) C4076](compiler-warning-level-1-c4076.md)|'*type_modifier*': cannot be used with type '*typename*'| |[Compiler warning (level 1) C4077](compiler-warning-level-1-c4077.md)|unknown check_stack option| |[Compiler warning (level 1) C4079](compiler-warning-level-1-c4079.md)|unexpected token '*token*'| |[Compiler warning (level 1) C4080](compiler-warning-level-1-c4080.md)|expected identifier for segment name; found '*symbol*'| @@ -77,8 +78,8 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 1) C4085](compiler-warning-level-1-c4085.md)|expected pragma parameter to be '`on`' or '`off`'| |[Compiler warning (level 1) C4086](compiler-warning-level-1-c4086.md)|expected pragma parameter to be '1', '2', '4', '8', or '16'| |[Compiler warning (level 1) C4087](compiler-warning-level-1-c4087.md)|'function': declared with '`void`' parameter list| -|[Compiler warning (level 1) C4088](compiler-warning-level-1-c4088.md)|'*function*': pointer mismatch in actual parameter '*parameter_number*', formal parameter '*parameter_number*'| -|[Compiler warning (level 1) C4089](compiler-warning-level-1-c4089.md)|'*function*': different types in actual parameter '*parameter_number*', formal parameter '*parameter_number*'| +|[Compiler warning (level 1) C4088](compiler-warning-level-1-c4088.md)|'*function*': pointer mismatch in actual parameter *parameter_number*, formal parameter *parameter_number*| +|[Compiler warning (level 1) C4089](compiler-warning-level-1-c4089.md)|'*function*': different types in actual parameter *parameter_number*, formal parameter *parameter_number*| |[Compiler warning (level 1) C4090](compiler-warning-level-1-c4090.md)|'*operation*': different '*modifier*' qualifiers| |[Compiler warning (level 1 and level 2) C4091](compiler-warning-level-1-c4091.md)|'*keyword*': ignored on left of '*type*' when no variable is declared| |[Compiler warning (level 4) C4092](compiler-warning-level-4-c4092.md)|sizeof returns 'unsigned long'| @@ -87,12 +88,12 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 1) C4097](compiler-warning-level-1-c4097.md)|expected pragma parameter to be '`restore`' or '`off`'| |[Compiler warning (level 1) C4098](compiler-warning-level-1-c4098.md)|'*function*': '`void`' function returning a value| |[Compiler warning (level 2) C4099](compiler-warning-level-2-c4099.md)|'*identifier*': type name first seen using '*object_type1*' now seen using '*object_type2*'| -|[Compiler warning (level 4) C4100](compiler-warning-level-4-c4100.md)|'*identifier*': unreferenced formal parameter| +|[Compiler warning (level 4) C4100](compiler-warning-level-4-c4100.md)|'*identifier*': unreferenced parameter| |[Compiler warning (level 3 and level 4) C4101](compiler-warning-level-3-c4101.md)|'*identifier*': unreferenced local variable| |[Compiler warning (level 3) C4102](compiler-warning-level-3-c4102.md)|'*label*': unreferenced label| |[Compiler warning (level 1) C4103](compiler-warning-level-1-c4103.md)|alignment changed after including header, may be due to missing `#pragma pack(pop)`| |[Compiler warning (level 1) C4109](compiler-warning-level-1-c4109.md)|unexpected identifier '*identifier*'| -|[Compiler warning (level 1 and level 4) C4112](compiler-warning-levels-1-and-4-c4112.md)|`#line` requires an integer between 1 and '*line_count*'| +|[Compiler warning (level 1 and level 4) C4112](compiler-warning-levels-1-and-4-c4112.md)|`#line` requires an integer between 1 and *line_count*| |[Compiler warning (level 1) C4113](compiler-warning-level-1-c4113.md)|'*identifier1*' differs in parameter lists from '*identifier2*'| |[Compiler warning (level 1) C4114](compiler-warning-level-1-c4114.md)|same type qualifier used more than once| |[Compiler warning (level 1 and level 4) C4115](compiler-warning-levels-1-and-4-c4115.md)|'*type*': named type definition in parentheses| @@ -113,7 +114,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 1 and level 3) C4133](compiler-warning-level-3-c4133.md)|'*expression*': incompatible types - from '*type1*' to '*type2*'| |Compiler warning C4137|'function': no return value from floating-point function| |[Compiler warning (level 1) C4138](compiler-warning-level-1-c4138.md)|'`*/`' found outside of comment| -|[Compiler warning (level 1, Error) C4141](compiler-warning-level-1-c4141.md)|'*modifier*': used more than once| +|[Compiler warning (level 1, error) C4141](compiler-warning-level-1-c4141.md)|'*modifier*': used more than once| |[Compiler warning (level 1) C4142](compiler-warning-level-1-c4142.md)|'*identifier*': benign redefinition of type| |[Compiler warning (level 1) C4143](compiler-warning-level-1-c4143.md)|`pragma` 'same_seg' not supported; use `__based` allocation| |[Compiler warning (level 1) C4144](compiler-warning-level-1-c4144.md)|'*expression*': relational expression as switch expression| @@ -126,10 +127,10 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 1) C4155](compiler-warning-level-1-c4155.md)|deletion of an array expression without using the array form of 'delete'| |[Compiler warning (level 2) C4156](compiler-warning-level-2-c4156.md)|deletion of an array expression without using the array form of 'delete'; array form substituted| |[Compiler warning (level 1) C4157](compiler-warning-level-1-c4157.md)|pragma was ignored by C compiler| -|[Compiler warning (level 1) C4158](compiler-warning-level-1-c4158.md)|assuming `#pragma pointers_to_members(full_generality, `'*inheritance_type*'`)`| -|[Compiler warning (level 3) C4159](compiler-warning-level-3-c4159.md)|`#pragma `'*pragma*'`(pop,...)`: has popped previously pushed identifier '*identifier*'| -|[Compiler warning (level 1) C4160](compiler-warning-level-1-c4160.md)|`#pragma `'*pragma*'`(pop,...)`: did not find previously pushed identifier '*identifier*'| -|[Compiler warning (level 3) C4161](compiler-warning-level-3-c4161.md)|`#pragma `'*pragma*'`(pop...)`: more pops than pushes| +|[Compiler warning (level 1) C4158](compiler-warning-level-1-c4158.md)|assuming `#pragma pointers_to_members(full_generality, `*inheritance_type*`)`| +|[Compiler warning (level 3) C4159](compiler-warning-level-3-c4159.md)|`#pragma `*pragma*`(pop,...)`: has popped previously pushed identifier '*identifier*'| +|[Compiler warning (level 1) C4160](compiler-warning-level-1-c4160.md)|`#pragma `*pragma*`(pop,...)`: did not find previously pushed identifier '*identifier*'| +|[Compiler warning (level 3) C4161](compiler-warning-level-3-c4161.md)|`#pragma `*pragma*`(pop...)`: more pops than pushes| |[Compiler warning (level 1) C4162](compiler-warning-level-1-c4162.md)|'*identifier*': no function with C linkage found| |[Compiler warning (level 1) C4163](compiler-warning-level-1-c4163.md)|'*identifier*': not available as an intrinsic function| |[Compiler warning (level 1) C4164](compiler-warning-level-1-c4164.md)|'*function*': intrinsic function not declared| @@ -148,12 +149,12 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |Compiler warning C4181|qualifier applied to reference type; ignored| |[Compiler warning (level 1) C4182](compiler-warning-level-1-c4182.md)|`#include` nesting level is *nest_count* deep; possible infinite recursion| |[Compiler warning (level 1) C4183](compiler-warning-level-1-c4183.md)|'*identifier*': missing return type; assumed to be a member function returning '`int`'| -|[Compiler warning (level 1) C4185](compiler-warning-level-1-c4185.md)|ignoring unknown `#import` attribute '*attribute*'| -|[Compiler warning (level 1) C4186](compiler-warning-level-1-c4186.md)|`#`*import* attribute '*attribute*' requires '*argument_count*' arguments; ignored| +|[Compiler warning (level 1) C4185](compiler-warning-level-1-c4185.md)|ignoring unknown `#`*import* attribute '*attribute*'| +|[Compiler warning (level 1) C4186](compiler-warning-level-1-c4186.md)|`#`*import* attribute '*attribute*' requires *argument_count* arguments; ignored| |[Compiler warning (level 1) C4187](compiler-warning-level-1-c4187.md)|`#import` attributes '*attribute1*' and '*attribute2*' are incompatible; both ignored| |Compiler warning (level 1) C4188|constant expression is not integral| |[Compiler warning (level 3 and level 4) C4189](compiler-warning-level-4-c4189.md)|'*identifier*': local variable is initialized but not referenced| -|[Compiler warning (level 1) C4190](compiler-warning-level-1-c4190.md)|'*identifier1*' has C-linkage specified, but returns UDT '*identifier2*' which is incompatible with C| +|[Compiler warning (level 1) C4190](compiler-warning-level-1-c4190.md)|'*identifier1*' has C-linkage specified, but returns '*identifier2*' which is incompatible with C| |[Compiler warning (level 3, off) C4191](compiler-warning-level-3-c4191.md)|'*operation*': unsafe conversion from '*type_of_expression*' to '*type_required*'
Making a function call using the resulting pointer may cause your program to fail| |[Compiler warning (level 3) C4192](compiler-warning-level-3-c4192.md)|automatically excluding '*identifier*' while importing type library '*library*'| |Compiler warning (level 3) C4193|`#pragma warning(pop)`: no matching '`#pragma warning(push)`'| diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md index 276cb8c9c9..08698aef3a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4200-through-c4399.md @@ -3,6 +3,7 @@ title: "Microsoft C/C++ compiler (MSVC) warnings C4200 through C4399" description: "Table of Microsoft C/C++ compiler (MSVC) warnings C4200 through C4399." ms.date: 10/18/2020 f1_keywords: ["C4203", "C4277", "C4279", "C4298", "C4299", "C4301", "C4303", "C4314", "C4315", "C4317", "C4318", "C4321", "C4322", "C4323", "C4327", "C4328", "C4330", "C4338", "C4352", "C4362", "C4367", "C4370", "C4380", "C4387"] +helpviewer_keywords: ["C4203", "C4277", "C4279", "C4298", "C4299", "C4301", "C4303", "C4314", "C4315", "C4317", "C4318", "C4321", "C4322", "C4323", "C4327", "C4328", "C4330", "C4338", "C4352", "C4362", "C4367", "C4370", "C4380", "C4387"] --- # Microsoft C/C++ compiler warnings C4200 through C4399 @@ -54,7 +55,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 2 and level 3 and level 4) C4244](compiler-warning-levels-3-and-4-c4244.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', possible loss of data| |[Compiler warning (level 4) C4245](compiler-warning-level-4-c4245.md)|'*conversion_type*': conversion from '*type1*' to '*type2*', signed/unsigned mismatch| |[Compiler warning (level 2) C4250](compiler-warning-level-2-c4250.md)|'*classname*': inherits '*base_classname*::*member*' via dominance| -|[Compiler warning (level 2) C4251](compiler-warning-level-1-c4251.md)|'*object_type1*': '*identifier1*' needs to have dll-interface to be used by clients of '*identfier2*'| +|[Compiler warning (level 2) C4251](compiler-warning-level-1-c4251.md)|'*type*': '*type1*' needs to have dll-interface to be used by clients of '*type2*'| |[Compiler warning (level 4, off) C4254](compiler-warning-level-4-c4254.md)|'*operator*': conversion from '*type1*':'*field_bits*' to '*type2*':'*field_bits*', possible loss of data| |[Compiler warning (level 4, off) C4255](compiler-warning-level-4-c4255.md)|'*function*': no function prototype given: converting '()' to '(void)'| |[Compiler warning (level 4) C4256](compiler-warning-level-4-c4256.md)|'*function*': constructor for class with virtual bases has '`...`'; calls may not be compatible with older versions of Visual C++| @@ -125,7 +126,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 4) C4336](compiler-warning-level-4-c4336.md)|import cross-referenced type library '*library1*' before importing '*library2*'| |[Compiler warning (level 4) C4337](compiler-warning-level-4-c4337.md)|cross-referenced type library '*library1*' in '*library2*' is being automatically imported| |Compiler warning (level 4) C4338|#pragma *directive*: standard section '*section*' is used| -|[Compiler warning (level 4, off) C4339](compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in 'WinRT\|CLR' meta-data - use of this type may lead to a runtime exception| +|[Compiler warning (level 4, off) C4339](compiler-warning-level-4-c4339.md)|'*type*': use of undefined type detected in *WinRT/CLR* meta-data - use of this type may lead to a runtime exception| |[Compiler warning (level 1) C4340](compiler-warning-level-1-c4340.md)|'*value*': value wrapped from positive to negative value| |[Compiler warning (level 1, off, no longer emitted) C4342](compiler-warning-level-1-c4342.md)|behavior change: '*function*' called, but a member operator was called in previous versions| |[Compiler warning (level 4) C4343](compiler-warning-level-4-c4343.md)|`#pragma optimize("g",off)` overrides `/Og` option| @@ -135,7 +136,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |[Compiler warning (level 1, off, no longer emitted) C4350](compiler-warning-level-1-c4350.md)|behavior change: '*member1*' called instead of '*member2*'| |Compiler warning (level 1) C4352|'*identifier*': intrinsic function already defined| |[Compiler warning (level 1) C4353](compiler-warning-level-1-c4353.md)|nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead| -|[Compiler warning (level 1 and level 4, off) C4355](compiler-warning-c4355.md)Compiler warning (level 1 and level 4) C4355|'this': used in base member initializer list| +|[Compiler warning (level 1 and level 4, off) C4355](compiler-warning-c4355.md)|'this': used in base member initializer list| |[Compiler warning (level 2) C4356](compiler-warning-level-2-c4356.md)|'*member*': static data member cannot be initialized via derived class| |[Compiler warning (level 3) C4357](compiler-warning-level-3-c4357.md)|param array argument found in formal argument list for delegate '*delegate*' ignored when generating '*function*'| |[Compiler warning (level 1) C4358](compiler-warning-level-1-c4358.md)|'*operator*': return type of combined delegates is not 'void'; returned value is undefined| diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md index 01f55ec356..03b421b60e 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4400-through-c4599.md @@ -1,7 +1,7 @@ --- title: "Microsoft C/C++ compiler (MSVC) warnings C4400 through C4599" description: "Table of Microsoft C/C++ compiler (MSVC) warnings C4400 through C4599" -ms.date: "04/21/2019" +ms.date: "1/22/2025" f1_keywords: ["C4413", "C4415", "C4416", "C4417", "C4418", "C4419", "C4421", "C4423", "C4424", "C4425", "C4426", "C4427", "C4438", "C4442", "C4443", "C4444", "C4446", "C4447", "C4448", "C4449", "C4450", "C4451", "C4452", "C4453", "C4454", "C4455", "C4466", "C4467", "C4468", "C4472", "C4474", "C4475", "C4476", "C4478", "C4480", "C4482", "C4483", "C4491", "C4492", "C4493", "C4494", "C4495", "C4496", "C4497", "C4498", "C4499", "C4509", "C4519", "C4531", "C4542", "C4562", "C4568", "C4569", "C4573", "C4574", "C4575", "C4576", "C4578", "C4582", "C4583", "C4585", "C4586", "C4587", "C4588", "C4589", "C4591", "C4592", "C4593", "C4594", "C4595", "C4598", "C4599"] helpviewer_keywords: ["C4413", "C4415", "C4416", "C4417", "C4418", "C4419", "C4421", "C4423", "C4424", "C4425", "C4426", "C4427", "C4438", "C4442", "C4443", "C4444", "C4446", "C4447", "C4448", "C4449", "C4450", "C4451", "C4452", "C4453", "C4454", "C4455", "C4466", "C4467", "C4468", "C4472", "C4474", "C4475", "C4476", "C4478", "C4480", "C4482", "C4483", "C4491", "C4492", "C4493", "C4494", "C4495", "C4496", "C4497", "C4498", "C4499", "C4509", "C4519", "C4531", "C4542", "C4562", "C4568", "C4569", "C4573", "C4574", "C4575", "C4576", "C4578", "C4582", "C4583", "C4585", "C4586", "C4587", "C4588", "C4589", "C4591", "C4592", "C4593", "C4594", "C4595", "C4598", "C4599"] --- @@ -15,186 +15,186 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |Warning|Message| |-------------|-------------| -|[Compiler warning (level 1) C4600](compiler-warning-level-1-c4600.md)|#pragma '*macro name*': expected a valid non-empty string| -|[Compiler warning (level 4) C4400](../../error-messages/compiler-warnings/compiler-warning-level-4-c4400.md)|'*type*': const/volatile qualifiers on this type are not supported| -|[Compiler warning (level 1) C4401](../../error-messages/compiler-warnings/compiler-warning-level-1-c4401.md)|'*bitfield*': member is bit field| -|[Compiler warning (level 1) C4402](../../error-messages/compiler-warnings/compiler-warning-level-1-c4402.md)|must use PTR operator| -|[Compiler warning (level 1) C4403](../../error-messages/compiler-warnings/compiler-warning-level-1-c4403.md)|illegal PTR operator| -|[Compiler warning (level 3) C4404](../../error-messages/compiler-warnings/compiler-warning-level-3-c4404.md)|period on directive ignored| -|[Compiler warning (level 1) C4405](../../error-messages/compiler-warnings/compiler-warning-level-1-c4405.md)|'*identifier*': identifier is reserved word| -|[Compiler warning (level 1) C4406](../../error-messages/compiler-warnings/compiler-warning-level-1-c4406.md)|operand on directive ignored| -|[Compiler warning (level 1) C4407](../../error-messages/compiler-warnings/compiler-warning-level-1-c4407.md)|cast between different pointer to member representations, compiler may generate incorrect code| -|[Compiler warning (level 4) C4408](../../error-messages/compiler-warnings/compiler-warning-level-4-c4408.md)|anonymous 'struct\|union' did not declare any data members| -|[Compiler warning (level 1) C4409](../../error-messages/compiler-warnings/compiler-warning-level-1-c4409.md)|illegal instruction size| -|[Compiler warning (level 1) C4410](../../error-messages/compiler-warnings/compiler-warning-level-1-c4410.md)|illegal size for operand| -|[Compiler warning (level 1) C4411](../../error-messages/compiler-warnings/compiler-warning-level-1-c4411.md)|'*identifier*': symbol resolves to displacement register| -|[Compiler warning (level 2) C4412](../../error-messages/compiler-warnings/compiler-warning-level-2-c4412.md)|'*function*': function signature contains type '*type*'; C++ objects are unsafe to pass between pure code and mixed or native.| -|Compiler warning C4413|'classname::member': reference member is initialized to a temporary that doesn't persist after the constructor exits| -|[Compiler warning (level 3) C4414](../../error-messages/compiler-warnings/compiler-warning-level-3-c4414.md)|'*function*': short jump to function converted to near| -|Compiler warning (level 1) C4415|duplicate __declspec(code_seg('*name*'))| -|Compiler warning (level 1) C4416|__declspec(code_seg(...)) contains empty string: ignored| -|Compiler warning (level 1) C4417|an explicit template instantiation cannot have __declspec(code_seg(...)): ignored| -|Compiler warning (level 1) C4418|__declspec(code_seg(...)) ignored on an enum| -|Compiler warning (level 3) C4419|'*symbol*' has no effect when applied to private ref class '*class*'.| -|[Compiler warning (level 1) C4420](../../error-messages/compiler-warnings/compiler-warning-level-1-c4420.md)|'*checked_operator*': operator not available, using '*operator*' instead; run-time checking may be compromised| +|[Compiler warning (level 4, Error) C4400](compiler-warning-level-4-c4400.md)|'*type*': `const`/`volatile` qualifiers on this type are not supported| +|[Compiler warning (level 1) C4401](compiler-warning-level-1-c4401.md)|'*bitfield*': member is bit field| +|[Compiler warning (level 1) C4402](compiler-warning-level-1-c4402.md)|must use `PTR` operator| +|[Compiler warning (level 1) C4403](compiler-warning-level-1-c4403.md)|illegal `PTR` operator| +|[Compiler warning (level 3) C4404](compiler-warning-level-3-c4404.md)|period on directive ignored| +|[Compiler warning (level 1) C4405](compiler-warning-level-1-c4405.md)|'*identifier*': identifier is reserved word| +|[Compiler warning (level 1) C4406](compiler-warning-level-1-c4406.md)|operand on directive ignored| +|[Compiler warning (level 1) C4407](compiler-warning-level-1-c4407.md)|cast between different pointer to member representations, compiler may generate incorrect code| +|[Compiler warning (level 4) C4408](compiler-warning-level-4-c4408.md)|anonymous *struct/union* did not declare any data members| +|[Compiler warning (level 1) C4409](compiler-warning-level-1-c4409.md)|illegal instruction size| +|[Compiler warning (level 1) C4410](compiler-warning-level-1-c4410.md)|illegal size for operand| +|[Compiler warning (level 1) C4411](compiler-warning-level-1-c4411.md)|'*identifier*': symbol resolves to displacement register| +|[Compiler warning (level 2, off) C4412](compiler-warning-level-2-c4412.md)|'*function*': function signature contains type '*type*'; C++ objects are unsafe to pass between pure code and mixed or native.| +|Compiler warning (no longer emitted) C4413|'`classname::member`': reference member is initialized to a temporary that doesn't persist after the constructor exits| +|[Compiler warning (level 3) C4414](compiler-warning-level-3-c4414.md)|'*function*': short jump to function converted to near| +|Compiler warning (level 1) C4415|duplicate `__declspec(code_seg(`'*name*'`))`| +|Compiler warning (level 1) C4416|`__declspec(code_seg(...))` contains empty string: ignored| +|Compiler warning (level 1) C4417|an explicit template instantiation cannot have `__declspec(code_seg(...))`: ignored| +|Compiler warning (level 1) C4418|`__declspec(code_seg(...))` ignored on an `enum`| +|Compiler warning (level 3) C4419|'*symbol*' has no effect when applied to `private ref class` '*class*'.| +|[Compiler warning (level 1) C4420](compiler-warning-level-1-c4420.md)|'*checked_operator*': operator not available, using '*operator*' instead; run-time checking may be compromised| |Compiler warning (level 3) C4421|'*parameter*': a reference parameter on a resumable function is potentially unsafe| -|Compiler warning (level 3) C4423|'std::bad_alloc': will be caught by class ('*type*') on line *number*| -|Compiler warning (level 3) C4424|catch for '*type1*' preceded by '*type2*' on line *number*; unpredictable behavior may result if 'std::bad_alloc' is thrown| -|Compiler warning (level 1) C4425|A SAL annotation cannot be applied to '...'| -|Compiler warning (level 1) C4426|optimization flags changed after including header, may be due to #pragma optimize()| +|Compiler warning (level 3) C4423|'`std::bad_alloc`': will be caught by class ('*type*') on line *number*| +|Compiler warning (level 3) C4424|catch for '*type1*' preceded by '*type2*' on line *number*; unpredictable behavior may result if '`std::bad_alloc`' is thrown| +|Compiler warning (level 1) C4425|A SAL annotation cannot be applied to '`...`'| +|Compiler warning (level 1, off) C4426|optimization flags changed after including header, may be due to `#pragma optimize()`| |Compiler warning (level 1) C4427|'*operator*': overflow in constant division, undefined behavior| -|[Compiler warning (level 4) C4429](../../error-messages/compiler-warnings/compiler-warning-level-4-c4429.md)|possible incomplete or improperly formed universal-character-name| -|[Compiler warning (Error) C4430](../../error-messages/compiler-warnings/compiler-warning-c4430.md)|missing type specifier - int assumed. Note: C++ does not support default-int| -|[Compiler warning (level 4) C4431](../../error-messages/compiler-warnings/compiler-warning-level-4-c4431.md)|missing type specifier - int assumed. Note: C no longer supports default-int| -|[Compiler warning (level 4) C4434](../../error-messages/compiler-warnings/compiler-warning-level-4-c4434.md)|a static constructor must have private accessibility; changing to private access| -|[Compiler warning (level 4) C4435](../../error-messages/compiler-warnings/compiler-warning-level-4-c4435.md)|'*derived_class*': Object layout under /vd2 will change due to virtual base '*base_class*'| -|[Compiler warning (level 1) C4436](../../error-messages/compiler-warnings/compiler-warning-level-1-c4436.md)|dynamic\_cast from virtual base '*base_class*' to '*derived_class*' in constructor or destructor could fail with partially-constructed object| -|[Compiler warning (level 4) C4437](../../error-messages/compiler-warnings/compiler-warning-level-4-c4437.md)|dynamic\_cast from virtual base '*base_class*' to '*derived_class*' could fail in some contexts| -|Compiler warning C4438|'*function*': cannot be called safely in /await:clrcompat mode. If '*function*' calls into the CLR it may result in CLR head corruption| -|[Compiler warning (Error) C4439](../../error-messages/compiler-warnings/compiler-warning-c4439.md)|'*function*': function definition with a managed type in the signature must have a __clrcall calling convention| -|[Compiler warning (level 1) C4440](../../error-messages/compiler-warnings/compiler-warning-level-1-c4440.md)|calling convention redefinition from '*calling_convention1*' to '*calling_convenction2*' ignored| -|[Compiler warning (level 1) C4441](../../error-messages/compiler-warnings/compiler-warning-level-1-c4441.md)|calling convention of '*calling_convention1*' ignored; '*calling_convention2*' used instead| -|Compiler warning (level 1) C4442|embedded null terminator in __annotation argument. Value will be truncated.| -|Compiler warning (level 1) C4443|expected pragma parameter to be '0', '1', or '2'| -|Compiler warning (level 3) C4444|'*identifier*': top level '__unaligned' is not implemented in this context| -|[Compiler warning (level 1) C4445](../../error-messages/compiler-warnings/compiler-warning-level-1-c4445.md)|'*function*': in a 'WinRT\|managed' type a virtual method cannot be private| +|[Compiler warning (level 4) C4429](compiler-warning-level-4-c4429.md)|possible incomplete or improperly formed universal-character-name| +|[Compiler warning (level 1, Error) C4430](compiler-warning-c4430.md)|missing type specifier - int assumed. Note: C++ does not support default-int| +|[Compiler warning (level 4) C4431](compiler-warning-level-4-c4431.md)|missing type specifier - int assumed. Note: C no longer supports default-int| +|[Compiler warning (level 4) C4434](compiler-warning-level-4-c4434.md)|a static constructor must have private accessibility; changing to private access| +|[Compiler warning (level 4, off) C4435](compiler-warning-level-4-c4435.md)|'*derived_class*': Object layout under `/vd2` will change due to virtual base '*base_class*'| +|[Compiler warning (level 1 and level 4) C4436](compiler-warning-level-1-c4436.md)|`dynamic_cast` from virtual base '*base_class*' to '*derived_class*' in constructor or destructor could fail with partially-constructed object| +|[Compiler warning (level 1 and level 4, off) C4437](compiler-warning-level-4-c4437.md)|`dynamic_cast` from virtual base '*base_class*' to '*derived_class*' could fail in some contexts| +|Compiler warning C4438|'*function*': cannot be called safely in `/await:clrcompat` mode. If '*function*' calls into the CLR it may result in CLR head corruption| +|[Compiler warning (level 1, Error) C4439](compiler-warning-c4439.md)|'*function*': function definition with a managed type in the signature must have a `__clrcall` calling convention| +|[Compiler warning (level 1) C4440](compiler-warning-level-1-c4440.md)|calling convention redefinition from '*calling_convention1*' to '*calling_convenction2*' ignored| +|[Compiler warning (level 1) C4441](compiler-warning-level-1-c4441.md)|calling convention of '*calling_convention1*' ignored; '*calling_convention2*' used instead| +|Compiler warning (level 1) C4442|embedded null terminator in `__annotation` argument. Value will be truncated.| +|Compiler warning (level 1) C4443|expected pragma parameter to be '`0`', '`1`', or '`2`'| +|Compiler warning (level 3, off) C4444|'*identifier*': top level '`__unaligned`' is not implemented in this context| +|[Compiler warning (level 1) C4445](compiler-warning-level-1-c4445.md)|'*function*': in a *WinRT/managed* type a virtual method cannot be private| |Compiler warning (level 1) C4446|'*type*': cannot map member '*name1*' into this type, due to conflict with the type name. The method was renamed to '*name2*'| -|Compiler warning (level 1) C4447|'main' signature found without threading model. Consider using 'int main(Platform::Array\^ args)'.| -|Compiler warning C4448|'*type*1' does not have a default interface specified in metadata. Picking: '*type2*', which may fail at runtime.| -|Compiler warning C4449|'*type*' an unsealed type should be marked as '[WebHostHidden]'| -|Compiler warning C4450|'*type1*' should be marked as '[WebHostHidden]' because it derives from '*type2*'| -|Compiler warning (level 4) C4451|'classname1::member': Usage of ref class 'classname2::member' inside this context can lead to invalid marshaling of object across contexts| -|Compiler warning (level 1) C4452|'*identifier*': public type cannot be at global scope. It must be in a namespace that is a child of the name of the output .winmd file.| -|Compiler warning (level 1) C4453|'*type*': A '[WebHostHidden]' type should not be used on the published surface of a public type that is not '[WebHostHidden]'| -|Compiler warning (level 1) C4454|'*function*' is overloaded by more than the number of input parameters without having [DefaultOverload] specified. Picking '*declaration*' as the default overload| +|Compiler warning (level 1) C4447|'`main`' signature found without threading model. Consider using '`int main(Platform::Array^ args)`'.| +|Compiler warning (level 1) C4448|'*type1*' does not have a default interface specified in metadata. Picking: '*type2*', which may fail at runtime.| +|Compiler warning C4449|'*type*' an unsealed type should be marked as '`[WebHostHidden]`'| +|Compiler warning C4450|'*type1*' should be marked as '`[WebHostHidden]`' because it derives from '*type2*'| +|Compiler warning (level 3 and level 4) C4451|'*classname1::member*': Usage of ref class '*classname2::member*' inside this context can lead to invalid marshaling of object across contexts| +|Compiler warning (level 1, Error) C4452|'*identifier*': public type cannot be at global scope. It must be in a namespace that is a child of the name of the output `.winmd` file.| +|Compiler warning (level 1) C4453|'*type*': A '`[WebHostHidden]`' type should not be used on the published surface of a public type that is not '`[WebHostHidden]`'| +|Compiler warning (level 1) C4454|'*function*' is overloaded by more than the number of input parameters without having `[DefaultOverload]` specified. Picking '*declaration*' as the default overload| |Compiler warning (level 1) C4455|'operator *operator*': literal suffix identifiers that do not start with an underscore are reserved| -|[Compiler warning (level 4) C4456](compiler-warning-level-4-c4456.md)|declaration of '*identifier*' hides previous local declaration| -|[Compiler warning (level 4) C4457](compiler-warning-level-4-c4457.md)|declaration of '*identifier*' hides function parameter| -|[Compiler warning (level 4) C4458](compiler-warning-level-4-c4458.md)|declaration of '*identifier*' hides class member| -|[Compiler warning (level 4) C4459](compiler-warning-level-4-c4459.md)|declaration of '*identifier*' hides global declaration| -|[Compiler warning (level 4) C4460](../../error-messages/compiler-warnings/compiler-warning-level-4-c4460.md)|'WinRT\|managed' operator '*operator*', has parameter passed by reference. 'WinRT\|managed' operator '*operator*' has different semantics from C++ operator '*cpp_operator*', did you intend to pass by value?| -|[Compiler warning (level 1) C4461](../../error-messages/compiler-warnings/compiler-warning-level-1-c4461.md)|'*classname*': this class has a finalizer '!*finalizer*' but no destructor '~*dtor*'| -|[Compiler warning (level 1, Error) C4462](../../error-messages/compiler-warnings/compiler-warning-level-1-c4462.md)|'*type*' : cannot determine the GUID of the type. Program may fail at runtime.| -|[Compiler warning (level 4) C4463](compiler-warning-level-4-c4463.md)|overflow; assigning '*value*' to bit-field that can only hold values from '*min_value*' to '*max_value*'| -|[Compiler warning (level 4) C4464](../../error-messages/compiler-warnings/compiler-warning-level-4-c4464.md)|relative include path contains '..'| +|[Compiler warning (level 1 and level 4) C4456](compiler-warning-level-4-c4456.md)|declaration of '*identifier*' hides previous local declaration| +|[Compiler warning (level 1 and level 4) C4457](compiler-warning-level-4-c4457.md)|declaration of '*identifier*' hides function parameter| +|[Compiler warning (level 1 and level 4) C4458](compiler-warning-level-4-c4458.md)|declaration of '*identifier*' hides class member| +|[Compiler warning (level 1 and level 4) C4459](compiler-warning-level-4-c4459.md)|declaration of '*identifier*' hides global declaration| +|[Compiler warning (level 4) C4460](compiler-warning-level-4-c4460.md)|*WinRT/managed* operator '*operator*', has parameter passed by reference. *WinRT/managed* operator '*operator*' has different semantics from C++ operator '*cpp_operator*', did you intend to pass by value?| +|[Compiler warning (level 1) C4461](compiler-warning-level-1-c4461.md)|'*classname*': this class has a finalizer '`!`*finalizer*' but no destructor '`~`*dtor*'| +|[Compiler warning (level 1, Error) C4462](compiler-warning-level-1-c4462.md)|'*type*' : cannot determine the GUID of the type. Program may fail at runtime.| +|[Compiler warning (level 4) C4463](compiler-warning-level-4-c4463.md)|overflow; assigning *value* to bit-field that can only hold values from *min_value* to *max_value*| +|[Compiler warning (level 4, off) C4464](compiler-warning-level-4-c4464.md)|relative include path contains '`..`'| |Compiler warning C4466|Could not perform coroutine heap elision| +|Compiler warning (level 1) C4465|'*identifier*': use of dependent template requires `::template`| |Compiler warning (level 1) C4467|Usage of ATL attributes is deprecated| -|Compiler warning (level 1) C4468|The [[fallthrough]] attribute must be followed by a `case` label or a `default` label| -|[Compiler warning (level 1) C4470](../../error-messages/compiler-warnings/compiler-warning-level-1-c4470.md)|floating-point control pragmas ignored under /clr| -|[Compiler warning (level 4) C4471](compiler-warning-level-4-c4471.md)|'*enumeration*': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)| -|Compiler warning (level 1) C4472|'*identifier*' is a native enum: add an access specifier (private/public) to declare a 'WinRT\|managed' enum| +|Compiler warning (level 1) C4468|The `[[fallthrough]]` attribute must be followed by a `case` label or a `default` label| +|[Compiler warning (level 1) C4470](compiler-warning-level-1-c4470.md)|floating-point control pragmas ignored under `/clr`| +|[Compiler warning (level 4, off) C4471](compiler-warning-level-4-c4471.md)|'*enumeration*': a forward declaration of an unscoped enumeration must have an underlying type| +|Compiler warning (level 1) C4472|'*identifier*' is a native enum: add an access specifier (private/public) to declare a 'WinRT/managed' enum| |[Compiler warning (level 1) C4473](c4473.md)|'*function*' : not enough arguments passed for format string| |Compiler warning (level 3) C4474|'*function*' : too many arguments passed for format string| |Compiler warning (level 3) C4475|'*function*' : length modifier '*modifier*' cannot be used with type field character '*character*' in format specifier| |Compiler warning (level 3) C4476|'*function*' : unknown type field character '*character*' in format specifier| |[Compiler warning (level 1) C4477](c4477.md)|'*function*' : format string '*string*' requires an argument of type '*type*', but variadic argument *number* has type '*type*'| |Compiler warning (level 1) C4478|'*function*' : positional and non-positional placeholders cannot be mixed in the same format string| -|Compiler warning (Error) C4480|nonstandard extension used: specifying underlying type for enum '*enumeration*'| -|[Compiler warning (level 4) C4481](../../error-messages/compiler-warnings/compiler-warning-level-4-c4481.md)|nonstandard extension used: override specifier '*keyword*'| -|Compiler warning C4482|nonstandard extension used: enum '*enumeration*' used in qualified name| +|Compiler warning (Error) C4480|nonstandard extension used: specifying underlying type for `enum` '*enumeration*'| +|[Compiler warning (level 4, Error) C4481](compiler-warning-level-4-c4481.md)|nonstandard extension used: override specifier '*keyword*'| +|Compiler warning C4482|nonstandard extension used: `enum` '*enumeration*' used in qualified name| |Compiler warning (level 1, Error) C4483|syntax error: expected C++ keyword| -|[Compiler warning (Error) C4484](../../error-messages/compiler-warnings/compiler-warning-c4484.md)|'*override_function*': matches base ref class method '*base_class_function*', but is not marked 'virtual', 'new' or 'override'; 'new' (and not 'virtual') is assumed| -|[Compiler warning (Error) C4485](../../error-messages/compiler-warnings/compiler-warning-c4485.md)|'*override_function*': matches base ref class method '*base_class_function*', but is not marked 'new' or 'override'; 'new' (and 'virtual') is assumed| -|[Compiler warning (level 1) C4486](../../error-messages/compiler-warnings/compiler-warning-level-1-c4486.md)|'*function*': a private virtual method of a ref class or value class should be marked 'sealed'| -|[Compiler warning (level 4) C4487](../../error-messages/compiler-warnings/compiler-warning-level-4-c4487.md)|'*derived_class_function*': matches inherited non-virtual method '*base_class_function*' but is not explicitly marked 'new'| -|[Compiler warning (level 1) C4488](../../error-messages/compiler-warnings/compiler-warning-level-1-c4488.md)|'*function*': requires '*keyword*' keyword to implement the interface method '*interface_method*'| -|[Compiler warning (level 1) C4489](../../error-messages/compiler-warnings/compiler-warning-level-1-c4489.md)|'*specifier*': not allowed on interface method '*method*'; override specifiers are only allowed on ref class and value class methods| -|[Compiler warning (level 1) C4490](../../error-messages/compiler-warnings/compiler-warning-level-1-c4490.md)|'override': incorrect use of override specifier; '*function*' does not match a base ref class method| +|[Compiler warning (level 1, Error) C4484](compiler-warning-c4484.md)|'*override_function*': matches base `ref class` method '*base_class_function*', but is not marked '`virtual`', '`new`' or '`override`'; '`new`' (and not '`virtual`') is assumed| +|[Compiler warning (level 1, Error) C4485](compiler-warning-c4485.md)|'*override_function*': matches base `ref class` method '*base_class_function*', but is not marked '`new`' or '`override`'; '`new`' (and '`virtual`') is assumed| +|[Compiler warning (level 1) C4486](compiler-warning-level-1-c4486.md)|'*function*': a private virtual method of a `ref class` or value class should be marked '`sealed`'| +|[Compiler warning (level 4) C4487](compiler-warning-level-4-c4487.md)|'*derived_class_function*': matches inherited non-virtual method '*base_class_function*' but is not explicitly marked '`new`'| +|[Compiler warning (level 1) C4488](compiler-warning-level-1-c4488.md)|'*function*': requires '*keyword*' keyword to implement the interface method '*interface_method*'| +|[Compiler warning (level 1) C4489](compiler-warning-level-1-c4489.md)|'*specifier*': not allowed on interface method '*method*'; override specifiers are only allowed on ref class and value class methods| +|[Compiler warning (level 1) C4490](compiler-warning-level-1-c4490.md)|'*override*': incorrect use of override specifier; '*function*' does not match a base ref class method| |Compiler warning (level 1) C4491|'*name*': has an illegal IDL version format| -|Compiler warning (level 1, Error) C4492|'*function1*': matches base ref class method '*function2*', but is not marked 'override'| -|Compiler warning (level 3, Error) C4493|delete expression has no effect as the destructor of '*type*' does not have 'public' accessibility| -|Compiler warning (level 1) C4494|'*function*' : Ignoring __declspec(allocator) because the function return type is not a pointer or reference| -|Compiler warning C4495|nonstandard extension '__super' used: replace with explicit base class name| -|Compiler warning C4496|nonstandard extension 'for each' used: replace with ranged-for statement| -|Compiler warning C4497|nonstandard extension 'sealed' used: replace with 'final'| -|Compiler warning C4498|nonstandard extension used: '*extension*'| -|Compiler warning (level 4) C4499|'*function*' : an explicit specialization cannot have a storage class (ignored)"| -|[Compiler warning (level 1) C4502](../../error-messages/compiler-warnings/compiler-warning-level-1-c4502.md)|'*linkage specification*' requires use of keyword 'extern' and must precede all other specifiers| -|[Compiler warning (level 1) C4503](../../error-messages/compiler-warnings/compiler-warning-level-1-c4503.md)|'*identifier*': decorated name length exceeded, name was truncated| -|[Compiler warning (level 4) C4505](../../error-messages/compiler-warnings/compiler-warning-level-4-c4505.md)|'*function*': unreferenced local function has been removed| -|[Compiler warning (level 1) C4506](../../error-messages/compiler-warnings/compiler-warning-level-1-c4506.md)|no definition for inline function '*function*'| -|[Compiler warning (level 1) C4508](../../error-messages/compiler-warnings/compiler-warning-level-1-c4508.md)|'*function*': function should return a value; 'void' return type assumed| +|Compiler warning (level 1, Error) C4492|'*function1*': matches base `ref class` method '*function2*', but is not marked '`override`'| +|Compiler warning (level 3, Error) C4493|delete expression has no effect as the destructor of '*type*' does not have '`public`' accessibility| +|Compiler warning (level 1) C4494|'*function*' : Ignoring `__declspec(allocator)` because the function return type is not a pointer or reference| +|Compiler warning (level 4, off) C4495|nonstandard extension '`__super`' used: replace with explicit base class name| +|Compiler warning (level 4, Error, off) C4496|nonstandard extension '`for each`' used: replace with ranged-for statement| +|Compiler warning (level 4, off) C4497|nonstandard extension '`sealed`' used: replace with '`final`'| +|Compiler warning (level 4, off) C4498|nonstandard extension used: '*extension*'| +|Compiler warning (level 4) C4499|'*function*': an explicit specialization cannot have a storage class (ignored)| +|[Compiler warning (level 1) C4502](compiler-warning-level-1-c4502.md)|'linkage specification' requires use of keyword '`extern`' and must precede all other specifiers| +|[Compiler warning (level 1) C4503](compiler-warning-level-1-c4503.md)|'*identifier*': decorated name length exceeded, name was truncated| +|[Compiler warning (level 4) C4505](compiler-warning-level-4-c4505.md)|'*function*': unreferenced function with internal linkage has been removed| +|[Compiler warning (level 1) C4506](compiler-warning-level-1-c4506.md)|no definition for inline function '*function*'| +|[Compiler warning (level 1) C4508](compiler-warning-level-1-c4508.md)|'*function*': function should return a value; '`void`' return type assumed| |Compiler warning C4509|nonstandard extension used: '*function*' uses SEH and '*object*' has destructor| -|[Compiler warning (level 4) C4510](../../error-messages/compiler-warnings/compiler-warning-level-4-c4510.md)|'*class*': default constructor was implicitly defined as deleted| -|[Compiler warning (level 3) C4511](../../error-messages/compiler-warnings/compiler-warning-level-3-c4511.md)|'*class*': copy constructor was implicitly defined as deleted| -|[Compiler warning (level 4) C4512](../../error-messages/compiler-warnings/compiler-warning-level-4-c4512.md)|'*class*': assignment operator was implicitly defined as deleted| -|[Compiler warning (level 4) C4513](../../error-messages/compiler-warnings/compiler-warning-level-4-c4513.md)|'*class*': destructor was implicitly defined as deleted| -|[Compiler warning (level 4) C4514](../../error-messages/compiler-warnings/compiler-warning-level-4-c4514.md)|'*function*': unreferenced inline function has been removed| -|[Compiler warning (level 4) C4515](../../error-messages/compiler-warnings/compiler-warning-level-4-c4515.md)|'*namespace*': namespace uses itself| -|[Compiler warning (level 4) C4516](../../error-messages/compiler-warnings/compiler-warning-level-4-c4516.md)|'class::symbol': access-declarations are deprecated; member using-declarations provide a better alternative| -|[Compiler warning (level 4) C4517](../../error-messages/compiler-warnings/compiler-warning-level-4-c4517.md)|access-declarations are deprecated; member using-declarations provide a better alternative| -|[Compiler warning (level 1) C4518](../../error-messages/compiler-warnings/compiler-warning-level-1-c4518.md)|'*specifier*': storage-class or type specifier(s) unexpected here; ignored| -|Compiler warning (Error) C4519|default template arguments are only allowed on a class template| -|[Compiler warning (level 3) C4521](../../error-messages/compiler-warnings/compiler-warning-level-3-c4521.md)|'*class*': multiple copy constructors specified| -|[Compiler warning (level 3) C4522](../../error-messages/compiler-warnings/compiler-warning-level-3-c4522.md)|'*class*': multiple assignment operators specified| -|[Compiler warning (level 3) C4523](../../error-messages/compiler-warnings/compiler-warning-level-3-c4523.md)|'*class*': multiple destructors specified| -|[Compiler warning (level 1) C4526](../../error-messages/compiler-warnings/compiler-warning-level-1-c4526.md)|'*function*': static member function cannot override virtual function '*virtual function*' override ignored, virtual function will be hidden| -|[Compiler warning (level 1) C4530](../../error-messages/compiler-warnings/compiler-warning-level-1-c4530.md)|C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc| +|[Compiler warning (level 4) C4510](compiler-warning-level-4-c4510.md)|'*class*': default constructor was implicitly defined as deleted| +|[Compiler warning (level 4) C4511](compiler-warning-level-3-c4511.md)|'*class*': copy constructor was implicitly defined as deleted| +|[Compiler warning (level 4) C4512](compiler-warning-level-4-c4512.md)|'*class*': assignment operator was implicitly defined as deleted| +|[Compiler warning (level 4) C4513](compiler-warning-level-4-c4513.md)|'*class*': destructor was implicitly defined as deleted| +|[Compiler warning (level 4, off) C4514](compiler-warning-level-4-c4514.md)|'*function*': unreferenced inline function has been removed| +|[Compiler warning (level 4) C4515](compiler-warning-level-4-c4515.md)|'*namespace*': namespace uses itself| +|[Compiler warning (level 4) C4516](compiler-warning-level-4-c4516.md)|'*class*::*symbol*': access-declarations are deprecated; member using-declarations provide a better alternative| +|[Compiler warning (level 4) C4517](compiler-warning-level-4-c4517.md)|access-declarations are deprecated; member using-declarations provide a better alternative| +|[Compiler warning (level 1) C4518](compiler-warning-level-1-c4518.md)|'*specifier*': storage-class or type specifier(s) unexpected here; ignored| +|Compiler warning (level1, Error, no longer emitted) C4519|default template arguments are only allowed on a class template| +|[Compiler warning (level 3) C4521](compiler-warning-level-3-c4521.md)|'*class*': multiple copy constructors specified| +|[Compiler warning (level 3) C4522](compiler-warning-level-3-c4522.md)|'*class*': multiple assignment operators specified| +|[Compiler warning (level 3) C4523](compiler-warning-level-3-c4523.md)|'*class*': multiple destructors specified| +|[Compiler warning (level 1) C4526](compiler-warning-level-1-c4526.md)|'*function*': static member function cannot override virtual function '*virtual function*'
override ignored, virtual function will be hidden| +|[Compiler warning (level 1) C4530](compiler-warning-level-1-c4530.md)|C++ exception handler used, but unwind semantics are not enabled. Specify `/EHsc`| |Compiler warning (level 1) C4531|C++ exception handling not available on Windows CE. Use Structured Exception Handling| -|[Compiler warning (level 1) C4532](../../error-messages/compiler-warnings/compiler-warning-level-1-c4532.md)|'continue': jump out of '__finally/finally' block has undefined behavior during termination handling| -|[Compiler warning (level 1) C4533](../../error-messages/compiler-warnings/compiler-warning-level-1-c4533.md)|initialization of '*variable*' is skipped by '*goto label*'| -|[Compiler warning (level 3) C4534](../../error-messages/compiler-warnings/compiler-warning-level-3-c4534.md)|'*constructor*' will not be a default constructor for 'class/struct' '*identifier*' due to the default argument| -|[Compiler warning (level 3) C4535](../../error-messages/compiler-warnings/compiler-warning-level-3-c4535.md)|calling _set_se_translator() requires /EHa| -|[Compiler warning (level 4) C4536](../../error-messages/compiler-warnings/compiler-warning-level-4-c4536.md)|'*typename*': type-name exceeds meta-data limit of '*character_limit*' characters| -|[Compiler warning (level 1) C4537](../../error-messages/compiler-warnings/compiler-warning-level-1-c4537.md)|'*object*': '.' applied to non-UDT type| -|[Compiler warning (level 3) C4538](../../error-messages/compiler-warnings/compiler-warning-level-3-c4538.md)|'*type*': const/volatile qualifiers on this type are not supported| -|[Compiler warning (level 1) C4540](../../error-messages/compiler-warnings/compiler-warning-level-1-c4540.md)|dynamic_cast used to convert to inaccessible or ambiguous base; run-time test will fail ('*type1*' to '*type2*')| -|[Compiler warning (level 1) C4541](../../error-messages/compiler-warnings/compiler-warning-level-1-c4541.md)|'*identifier*' used on polymorphic type '*type*' with /GR-; unpredictable behavior may result| +|[Compiler warning (level 1) C4532](compiler-warning-level-1-c4532.md)|'*continue*': jump out of *__finally/finally* block has undefined behavior during termination handling| +|[Compiler warning (level 1) C4533](compiler-warning-level-1-c4533.md)|initialization of '*variable*' is skipped by '`goto` *label*'| +|[Compiler warning (level 3) C4534](compiler-warning-level-3-c4534.md)|'*constructor*' will not be a default constructor for *class/struct* '*identifier*' due to the default argument| +|[Compiler warning (level 3) C4535](compiler-warning-level-3-c4535.md)|calling `_set_se_translator()` requires `/EHa`| +|[Compiler warning (level 4, off) C4536](compiler-warning-level-4-c4536.md)|'*typename*': type-name exceeds meta-data limit of '*character_limit*' characters| +|[Compiler warning (level 1) C4537](compiler-warning-level-1-c4537.md)|'*object*': '`.`' applied to non-UDT type| +|[Compiler warning (level 3) C4538](compiler-warning-level-3-c4538.md)|'*type*': `const`/`volatile` qualifiers on this type are not supported| +|[Compiler warning (level 1) C4540](compiler-warning-level-1-c4540.md)|`dynamic_cast` used to convert to inaccessible or ambiguous base; run-time test will fail ('*type1*' to '*type2*')| +|[Compiler warning (level 1) C4541](compiler-warning-level-1-c4541.md)|'*identifier*' used on polymorphic type '*type*' with `/GR-`; unpredictable behavior may result| |Compiler warning (level 1) C4542|Skipping generation of merged injected text file, cannot write *filetype* file: '*issue*': *message*| -|[Compiler warning (level 3) C4543](../../error-messages/compiler-warnings/compiler-warning-level-3-c4543.md)|Injected text suppressed by attribute 'no\_injected_text'| -|[Compiler warning (level 1) C4544](../../error-messages/compiler-warnings/compiler-warning-level-1-c4544.md)|'*declaration*': default template argument ignored on this template declaration| -|[Compiler warning (level 1) C4545](../../error-messages/compiler-warnings/compiler-warning-level-1-c4545.md)|expression before comma evaluates to a function which is missing an argument list| -|[Compiler warning (level 1) C4546](../../error-messages/compiler-warnings/compiler-warning-level-1-c4546.md)|function call before comma missing argument list| -|[Compiler warning (level 1) C4547](../../error-messages/compiler-warnings/compiler-warning-level-1-c4547.md)|'*operator*': operator before comma has no effect; expected operator with side-effect| -|[Compiler warning (level 1) C4548](../../error-messages/compiler-warnings/compiler-warning-level-1-c4548.md)|expression before comma has no effect; expected expression with side-effect| -|[Compiler warning (level 1) C4549](../../error-messages/compiler-warnings/compiler-warning-level-1-c4549.md)|'*operator*': operator before comma has no effect; did you intend '*operator*'?| -|[Compiler warning (level 1) C4550](../../error-messages/compiler-warnings/compiler-warning-level-1-c4550.md)|expression evaluates to a function which is missing an argument list| -|[Compiler warning (level 1) C4551](../../error-messages/compiler-warnings/compiler-warning-level-1-c4551.md)|function call missing argument list| -|[Compiler warning (level 1) C4552](../../error-messages/compiler-warnings/compiler-warning-level-1-c4552.md)|'*operator*': operator has no effect; expected operator with side-effect| -|[Compiler warning (level 1) C4553](../../error-messages/compiler-warnings/compiler-warning-level-1-c4553.md)|'*operator*': operator has no effect; did you intend 'operator'?| -|[Compiler warning (level 3) C4554](../../error-messages/compiler-warnings/compiler-warning-level-3-c4554.md) C4554|'*operator*': check operator precedence for possible error; use parentheses to clarify precedence| -|[Compiler warning (level 1) C4555](../../error-messages/compiler-warnings/compiler-warning-level-1-c4555.md)|expression has no effect; expected expression with side-effect| -|[Compiler warning (level 1) C4556](../../error-messages/compiler-warnings/compiler-warning-level-1-c4556.md)|value of intrinsic immediate argument '*value*' is out of range '*lower_bound* - *upper_bound*'| -|[Compiler warning (level 3) C4557](../../error-messages/compiler-warnings/compiler-warning-level-3-c4557.md)|'__assume' contains effect '*effect*'| -|[Compiler warning (level 1) C4558](../../error-messages/compiler-warnings/compiler-warning-level-1-c4558.md)|value of operand '*value*' is out of range '*lower_bound* - *upper_bound*'| -|[Compiler warning (level 4) C4559](../../error-messages/compiler-warnings/compiler-warning-level-4-c4559.md)|'*function*': redefinition; the function gains __declspec(modifier)| -|[Compiler warning (level 1) C4561](../../error-messages/compiler-warnings/compiler-warning-level-1-c4561.md)|'__fastcall' incompatible with the '/clr' option: converting to '__stdcall'| -|Compiler warning (level 4) C4562|fully prototyped functions are required with the '/clr' option: converting '()' to '(void)'| -|[Compiler warning (level 4) C4564](../../error-messages/compiler-warnings/compiler-warning-level-4-c4564.md)|method '*method*' of 'class' '*classname*' defines unsupported default parameter '*parameter*'| -|[Compiler warning (level 4) C4565](../../error-messages/compiler-warnings/compiler-warning-level-4-c4565.md)|'*function*': redefinition; the symbol was previously declared with __declspec(modifier)| -|[Compiler warning (level 1) C4566](../../error-messages/compiler-warnings/compiler-warning-level-1-c4566.md)|character represented by universal-character-name '*char*' cannot be represented in the current code page (*number*)| +|[Compiler warning (level 3) C4543](compiler-warning-level-3-c4543.md)|Injected text suppressed by attribute '`no_injected_text`'| +|[Compiler warning (level 1) C4544](compiler-warning-level-1-c4544.md)|the default template argument for '*declaration*' is ignored on this template declaration| +|[Compiler warning (level 1, off) C4545](compiler-warning-level-1-c4545.md)|expression before comma evaluates to a function which is missing an argument list| +|[Compiler warning (level 1, off) C4546](compiler-warning-level-1-c4546.md)|function call before comma missing argument list| +|[Compiler warning (level 1, off) C4547](compiler-warning-level-1-c4547.md)|'*operator*': operator before comma has no effect; expected operator with side-effect| +|[Compiler warning (level 1, off) C4548](compiler-warning-level-1-c4548.md)|expression before comma has no effect; expected expression with side-effect| +|[Compiler warning (level 1, off) C4549](compiler-warning-level-1-c4549.md)|'*operator*': operator before comma has no effect; did you intend '*operator*'?| +|[Compiler warning (level 1) C4550](compiler-warning-level-1-c4550.md)|expression evaluates to a function which is missing an argument list| +|[Compiler warning (level 1) C4551](compiler-warning-level-1-c4551.md)|function call missing argument list| +|[Compiler warning (level 1) C4552](compiler-warning-level-1-c4552.md)|'*operator*': result of expression not used| +|[Compiler warning (level 1) C4553](compiler-warning-level-1-c4553.md)|'*operator*': result of expression not used; did you intend '*operator*'?| +|[Compiler warning (level 3) C4554](compiler-warning-level-3-c4554.md) C4554|'*operator*': check operator precedence for possible error; use parentheses to clarify precedence| +|[Compiler warning (level 1, off) C4555](compiler-warning-level-1-c4555.md)|result of expression not used| +|[Compiler warning (level 1) C4556](compiler-warning-level-1-c4556.md)|value of intrinsic immediate argument '*value*' is out of range '*lower_bound* - *upper_bound*'| +|[Compiler warning (level 3, off) C4557](compiler-warning-level-3-c4557.md)|'`__assume`' contains effect '*effect*'| +|[Compiler warning (level 1) C4558](compiler-warning-level-1-c4558.md)|value of operand '*value*' is out of range '*lower_bound* - *upper_bound*'| +|[Compiler warning (level 4) C4559](compiler-warning-level-4-c4559.md)|'*function*': redefinition; the function gains `__declspec(`*modifier*`)`| +|[Compiler warning (level 1) C4561](compiler-warning-level-1-c4561.md)|'`__fastcall`' incompatible with the '`/clr`' option: converting to '`__stdcall`'| +|Compiler warning (level 4) C4562|fully prototyped functions are required with the '`/clr`' option: converting '`()`' to '`(void)`'| +|[Compiler warning (level 4) C4564](compiler-warning-level-4-c4564.md)|method '*method*' of *class* '*classname*' defines unsupported default parameter '*parameter*'| +|[Compiler warning (level 4) C4565](compiler-warning-level-4-c4565.md)|'*function*': redefinition; the symbol was previously declared with `__declspec(`*modifier*`)`| +|[Compiler warning (level 1) C4566](compiler-warning-level-1-c4566.md)|character represented by universal-character-name '*char*' cannot be represented in the current code page (*number*)| |Compiler warning (level 1) C4568|'*function*': no members match the signature of the explicit override| |Compiler warning (level 3) C4569|'*function*': no members match the signature of the explicit override| -|[Compiler warning (level 3) C4570](../../error-messages/compiler-warnings/compiler-warning-level-3-c4570.md)|'*type*': is not explicitly declared as abstract but has abstract functions| -|[Compiler warning (level 4) C4571](../../error-messages/compiler-warnings/compiler-warning-level-4-c4571.md)|Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught| -|[Compiler warning (level 1) C4572](../../error-messages/compiler-warnings/compiler-warning-level-1-c4572.md)|[ParamArray] attribute is deprecated under /clr, use '...' instead| -|Compiler warning (level 1) C4573|the usage of '*lambda function*' requires the compiler to capture 'this' but the current default capture mode does not allow it| -|Compiler warning (level 4) C4574|'*Identifier*' is defined to be '0': did you mean to use '#if identifier'?| -|Compiler warning (level 1) C4575|'__vectorcall' incompatible with the '/clr' option: converting to '__stdcall'| +|[Compiler warning (level 3) C4570](compiler-warning-level-3-c4570.md)|'*type*': is not explicitly declared as abstract but has abstract functions| +|[Compiler warning (level 4) C4571](compiler-warning-level-4-c4571.md)|Informational: `catch(...)` semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught| +|[Compiler warning (level 1) C4572](compiler-warning-level-1-c4572.md)|`[ParamArray]` attribute is deprecated under `/clr`, use '`...`' instead| +|Compiler warning (level 1, Error) C4573|the usage of '*lambda function*' requires the compiler to capture '`this`' but the current default capture mode does not allow it| +|Compiler warning (level 4, off) C4574|'*Identifier*' is defined to be '`0`': did you mean to use '`#if` *identifier*'?| +|Compiler warning (level 1) C4575|'`__vectorcall`' incompatible with the '`/clr`' option: converting to '`__stdcall`'| |Compiler warning (level 1, Error) C4576|a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax| -|[Compiler warning (level 1, Off) C4577](../../error-messages/compiler-warnings/compiler-warning-level-1-c4577.md)|'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc| -|Compiler warning (level 1, Error) C4578|'abs': conversion from '*type1*' to '*type2*', possible loss of data (Did you mean to call '*function*' or to #include \?)| -|[Compiler warning (level 3) C4580](../../error-messages/compiler-warnings/compiler-warning-level-3-c4580.md)|[attribute] is deprecated; instead specify System::Attribute or Platform::Metadata as a base class| -|[Compiler warning (level 1) C4581](../../error-messages/compiler-warnings/compiler-warning-level-1-c4581.md)|deprecated behavior: '"*string*"' replaced with '*string*' to process attribute| -|Compiler warning (level 4) C4582|'*type*': constructor is not implicitly called| -|Compiler warning (level 4) C4583|'*type*': destructor is not implicitly called| -|[Compiler warning (level 1) C4584](../../error-messages/compiler-warnings/compiler-warning-level-1-c4584.md)|'*class1*': base-class '*class2*' is already a base-class of '*class3*'| -|Compiler warning (level 1, Error) C4585|'*class*': A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class| -|Compiler warning (level 1, Error) C4586|'*type*': A public type cannot be declared in a top-level namespace called 'Windows'| -|Compiler warning (level 1) C4587|'*anonymous_structure*': behavior change: constructor is no longer implicitly called| -|Compiler warning (level 1) C4588|'*anonymous_structure*': behavior change: destructor is no longer implicitly called| +|[Compiler warning (level 1, Off) C4577](compiler-warning-level-1-c4577.md)|'`noexcept`' used with no exception handling mode specified; termination on exception is not guaranteed. Specify `/EHsc`| +|Compiler warning (level 1, Error) C4578|'`abs`': conversion from '*type1*' to '*type2*', possible loss of data (Did you mean to call '*function*' or to `#include `?)| +|[Compiler warning (level 3) C4580](compiler-warning-level-3-c4580.md)|`[attribute]` is deprecated; instead specify *namespace::*Attribute as a base class| +|[Compiler warning (level 1) C4581](compiler-warning-level-1-c4581.md)|deprecated behavior: '"*string*"' replaced with '*string*' to process attribute| +|Compiler warning (level 4, off) C4582|'*type*': constructor is not implicitly called| +|Compiler warning (level 4, off) C4583|'*type*': destructor is not implicitly called| +|[Compiler warning (level 1) C4584](compiler-warning-level-1-c4584.md)|'*class1*': base-class '*class2*' is already a base-class of '*class3*'| +|Compiler warning (level 1, Error) C4585|'*class*': A WinRT '`public ref class`' must either be sealed or derive from an existing unsealed class| +|Compiler warning (level 1, Error) C4586|'*type*': A public type cannot be declared in a top-level namespace called '`Windows`'| +|Compiler warning (level 1, off) C4587|'*anonymous_structure*': behavior change: constructor is no longer implicitly called| +|Compiler warning (level 1, off) C4588|'*anonymous_structure*': behavior change: destructor is no longer implicitly called| |Compiler warning (level 4) C4589|Constructor of abstract class '*class1*' ignores initializer for virtual base class '*class2*'| -|Compiler warning (level 1) C4591|'constexpr' call-depth limit of *number* exceeded (/constexpr:depth\)| -|Compiler warning (level 3) C4592|'*function*': 'constexpr' call evaluation failed; function will be called at run-time| -|Compiler warning (level 1) C4593|'*function*': 'constexpr' call evaluation step limit of '*limit*' exceeded; use /constexpr:steps\ to increase the limit| -|Compiler warning (level 3) C4594|'*type*': destructor will not be implicitly called if an exception is thrown| -|Compiler warning (level 1) C4595|'*type*': behavior change: destructor will no longer be implicitly called if an exception is thrown| -|[Compiler warning (level 4) C4596](../../error-messages/compiler-warnings/c4596.md)|'*identifier*': illegal qualified name in member declaration| -|[Compiler warning (error) C4597](c4597.md)|undefined behavior: offsetof applied to a member of a virtual base| -|Compiler warning (level 1 and level 3) C4598|'#include "*header*"': header number *number* in the precompiled header does not match current compilation at that position| -|Compiler warning (level 3) C4599|'*flag* *path*': command line argument number *number* does not match precompiled header| +|Compiler warning (level 1, no longer emitted) C4591|'`constexpr`' call-depth limit of *number* exceeded (`/constexpr:depth`)| +|Compiler warning (level 1, Error) C4592|'*name*': symbol will be dynamically initialized (implementation limitation)| +|Compiler warning (level 1, no longer emitted) C4593|'*function*': '`constexpr`' call evaluation step limit of '*limit*' exceeded; use `/constexpr:steps` to increase the limit| +|Compiler warning (level 1) C4594|class '*name*' can never be instantiated - indirect virtual base class '*name*' is inaccessible| +|Compiler warning (level 3) C4595|'*name*': non-member operator new or delete functions may not be declared inline| +|[Compiler warning (level 4, Error, off) C4596](c4596.md)|'*identifier*': illegal qualified name in member declaration| +|[Compiler warning (error) C4597](c4597.md)|undefined behavior: *message*| +|Compiler warning (level 1 and level 3) C4598|'`#include "`*header*`"`': header number *number* in the precompiled header does not match current compilation at that position| +|Compiler warning (level 3, off) C4599|'*flag* *path*': command line argument number *number* does not match precompiled header| ## See also -[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md) \ +[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md)\ [Compiler warnings C4000 - C5999](compiler-warnings-c4000-c5999.md) diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md index 3bdb97c94b..073da82641 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799.md @@ -15,162 +15,162 @@ The articles in this section describe Microsoft C/C++ compiler warning messages |Warning|Message| |-------------|-------------| -|[Compiler warning (level 1) C4600](../../error-messages/compiler-warnings/compiler-warning-level-1-c4600.md)|#pragma 'macro name': expected a valid non-empty string| -|[Compiler warning (level 1) C4602](compiler-warning-level-1-c4602.md)|#pragma pop_macro: 'macro name' no previous #pragma push_macro for this identifier| +|[Compiler warning (level 1) C4600](compiler-warning-level-1-c4600.md)|`#pragma `'*macro name*': expected a valid non-empty string| +|[Compiler warning (level 1) C4602](compiler-warning-level-1-c4602.md)|`#pragma pop_macro: `'*macro name*' no previous `#pragma push_macro` for this identifier| |[Compiler warning (level 1) C4603](compiler-warning-level-1-c4603.md)|'*identifier*': macro is not defined or definition is different after precompiled header use| -|Compiler warning (level 1) C4604|'*type*': passing argument by value across native and managed boundary requires valid copy constructor. Otherwise the runtime behavior is undefined| -|Compiler warning (level 1) C4605|'/D*macro*' specified on current command line, but was not specified when precompiled header was built| -|[Compiler warning (level 1) C4606](../../error-messages/compiler-warnings/compiler-warning-level-1-c4606.md)|#pragma warning: 'warning number' ignored; Code Analysis warnings are not associated with warning levels| -|[Compiler warning (level 3) C4608](../../error-messages/compiler-warnings/compiler-warning-level-3-c4608.md)|'union_member' has already been initialized by another union member in the initializer list, 'union_member'| -|Compiler warning (level 3, Error) C4609|'*type1*' derives from default interface '*interface*' on type '*type2*'. Use a different default interface for '*type1*', or break the base/derived relationship.| -|[Compiler warning (level 4) C4610](../../error-messages/compiler-warnings/compiler-warning-level-4-c4610.md)|object 'class' can never be instantiated - user defined constructor required| -|[Compiler warning (level 4) C4611](../../error-messages/compiler-warnings/compiler-warning-level-4-c4611.md)|interaction between 'function' and C++ object destruction is non-portable| +|Compiler warning (level 1) C4604|'*type*': passing an argument of this type by value across the native/managed boundary requires the type to be move- or copy-constructible. Otherwise, the runtime behavior is undefined| +|Compiler warning (level 1, off) C4605|'`/D`*macro*' specified on current command line, but was not specified when precompiled header was built| +|[Compiler warning (level 1) C4606](compiler-warning-level-1-c4606.md)|`#pragma warning:` '*warning number*' ignored; Code Analysis warnings are not associated with warning levels| +|[Compiler warning (level 3, off) C4608](compiler-warning-level-3-c4608.md)|Initializing multiple members of union: '*member1*' and '*member2*'| +|Compiler warning (level 3, error) C4609|'*type1*' derives from default interface '*interface*' on type '*type2*'. Use a different default interface for '*type1*', or break the base/derived relationship.| +|[Compiler warning (level 4) C4610](compiler-warning-level-4-c4610.md)|*class* '*name*' can never be instantiated - user defined constructor required| +|[Compiler warning (level 4) C4611](compiler-warning-level-4-c4611.md)|interaction between '*function*' and C++ object destruction is non-portable| |[Compiler warning (level 1) C4612](compiler-warning-level-1-c4612.md)|error in include filename| |[Compiler warning (level 1) C4613](compiler-warning-level-1-c4613.md)|'*symbol*': class of segment cannot be changed| -|[Compiler warning (level 1) C4615](../../error-messages/compiler-warnings/compiler-warning-level-1-c4615.md)|#pragma warning: unknown user warning type| -|[Compiler warning (level 1) C4616](../../error-messages/compiler-warnings/compiler-warning-level-1-c4616.md)|#pragma warning: warning number 'number' not a valid compiler warning| -|[Compiler warning (level 1) C4618](../../error-messages/compiler-warnings/compiler-warning-level-1-c4618.md)|pragma parameters included an empty string; pragma ignored| -|[Compiler warning (level 3) C4619](../../error-messages/compiler-warnings/compiler-warning-level-3-c4619.md)|#pragma warning: there is no warning number 'number'| -|[Compiler warning (level 1) C4620](compiler-warning-level-1-c4620.md)|no postfix form of 'operator ++' found for type 'type', using prefix form| -|[Compiler warning (level 1) C4621](../../error-messages/compiler-warnings/compiler-warning-level-1-c4621.md)|no postfix form of 'operator --' found for type 'type', using prefix form| -|[Compiler warning (level 3) C4622](compiler-warning-level-3-c4622.md)|overwriting debug information formed during creation of the precompiled header in object file: 'file'| -|[Compiler warning (level 4) C4623](../../error-messages/compiler-warnings/compiler-warning-level-4-c4623.md)|'derived class': default constructor was implicitly defined as deleted because a base class default constructor is inaccessible or deleted| -|[Compiler warning (level 1) C4624](../../error-messages/compiler-warnings/compiler-warning-level-1-c4624.md)|'derived class': destructor was implicitly defined as deleted because a base class destructor is inaccessible or deleted| -|[Compiler warning (level 4) C4625](../../error-messages/compiler-warnings/compiler-warning-level-4-c4625.md)|'derived class': copy constructor was implicitly defined as deleted because a base class copy constructor is inaccessible or deleted| -|[Compiler warning (level 4) C4626](../../error-messages/compiler-warnings/compiler-warning-level-4-c4626.md)|'derived class': assignment operator was implicitly defined as deleted because a base class assignment operator is inaccessible or deleted| -|[Compiler warning (level 1) C4627](../../error-messages/compiler-warnings/compiler-warning-level-1-c4627.md)|'\': skipped when looking for precompiled header use| -|[Compiler warning (level 1) C4628](../../error-messages/compiler-warnings/compiler-warning-level-1-c4628.md)|digraphs not supported with -Ze. Character sequence 'digraph' not interpreted as alternate token for '%s'| -|[Compiler warning (level 4) C4629](compiler-warning-level-4-c4629.md)|digraph used, character sequence 'digraph' interpreted as token 'char' (insert a space between the two characters if this is not what you intended)| -|[Compiler warning (level 1) C4630](../../error-messages/compiler-warnings/compiler-warning-level-1-c4630.md)|'symbol': 'extern' storage-class specifier illegal on member definition| -|Compiler warning (level 2) C4631|MSXML or XPath unavailable, XML document comments will not be processed. reason| -|[Compiler warning (level 1) C4632](../../error-messages/compiler-warnings/compiler-warning-level-1-c4632.md)|XML document comment: file - access denied: reason| -|[Compiler warning (level 3) C4633](../../error-messages/compiler-warnings/compiler-warning-level-3-c4633.md)|XML document comment target: error: reason| -|[Compiler warning (level 4) C4634](compiler-warning-level-4-c4634.md)|XML document comment target: cannot be applied: reason| -|[Compiler warning (level 3) C4635](compiler-warning-level-3-c4635.md)|XML document comment target: badly-formed XML: reason| -|[Compiler warning (level 3) C4636](compiler-warning-level-3-c4636.md)|XML document comment applied to construct: tag requires non-empty 'attribute' attribute.| -|[Compiler warning (level 3 and level 4) C4637](compiler-warning-level-3-c4637.md)|XML document comment target: \ tag discarded. Reason| -|[Compiler warning (level 3) C4638](compiler-warning-level-3-c4638.md)|XML document comment target: reference to unknown symbol 'symbol'.| -|[Compiler warning (level 4) C4639](../../error-messages/compiler-warnings/compiler-warning-level-4-c4639.md)|MSXML error, XML document comments will not be processed. Reason| -|[Compiler warning (level 3) C4640](../../error-messages/compiler-warnings/compiler-warning-level-3-c4640.md)|'instance': construction of local static object is not thread-safe| -|[Compiler warning (level 3) C4641](../../error-messages/compiler-warnings/compiler-warning-level-3-c4641.md)|XML document comment has an ambiguous cross reference:| +|[Compiler warning (level 1) C4615](compiler-warning-level-1-c4615.md)|`#pragma warning`: unknown user warning type| +|[Compiler warning (level 1) C4616](compiler-warning-level-1-c4616.md)|`#pragma warning`: warning number '*number*' not a valid compiler warning| +|[Compiler warning (level 1) C4618](compiler-warning-level-1-c4618.md)|pragma parameters included an empty string; pragma ignored| +|[Compiler warning (level 3, off) C4619](compiler-warning-level-3-c4619.md)|`#pragma warning`: there is no warning number '*number*'| +|[Compiler warning (level 1) C4620](compiler-warning-level-1-c4620.md)|no postfix form of '`operator ++`' found for type '*type*', using prefix form| +|[Compiler warning (level 1) C4621](compiler-warning-level-1-c4621.md)|no postfix form of '`operator --`' found for type '*type*', using prefix form| +|[Compiler warning (level 3) C4622](compiler-warning-level-3-c4622.md)|overwriting debug information formed during creation of the precompiled header in object file: '*file*'| +|[Compiler warning (level 1 and level 4, off) C4623](compiler-warning-level-4-c4623.md)|'*derived class*': default constructor was implicitly defined as deleted| +|[Compiler warning (level 1 and level 4) C4624](compiler-warning-level-1-c4624.md)|'*derived class*': destructor was implicitly defined as deleted| +|[Compiler warning (level 1 and level 4, off) C4625](compiler-warning-level-4-c4625.md)|'*derived class*': copy constructor was implicitly defined as deleted| +|[Compiler warning (level 1 and level 4, off) C4626](compiler-warning-level-4-c4626.md)|'*derived class*': assignment operator was implicitly defined as deleted| +|[Compiler warning (level 1, no longer emitted) C4627](compiler-warning-level-1-c4627.md)|'`identifier`': skipped when looking for precompiled header use| +|[Compiler warning (level 1, off) C4628](compiler-warning-level-1-c4628.md)|digraphs not supported with `-Ze`. Character sequence '*digraph*' not interpreted as alternate token for '*token*'| +|[Compiler warning (level 4, no longer emitted) C4629](compiler-warning-level-4-c4629.md)|digraph used, character sequence '*digraph*' interpreted as token '*char*' (insert a space between the two characters if this is not what you intended)| +|[Compiler warning (level 1) C4630](compiler-warning-level-1-c4630.md)|'*symbol*': '*extern*' storage-class specifier illegal on member definition| +|Compiler warning (level 2) C4631|`MSXML` or `XPath` unavailable, XML document comments will not be processed. *reason*| +|[Compiler warning (level 1) C4632](compiler-warning-level-1-c4632.md)|XML document comment: *file* - access denied: *reason*| +|[Compiler warning (level 3 and level 4) C4633](compiler-warning-level-3-c4633.md)|XML document comment *target*: error: *reason*| +|[Compiler warning (level 4) C4634](compiler-warning-level-4-c4634.md)|XML document comment *target*: cannot be applied: *reason*| +|[Compiler warning (level 3 and level 4) C4635](compiler-warning-level-3-c4635.md)|XML document comment *target*: badly-formed XML: *reason*| +|[Compiler warning (level 3) C4636](compiler-warning-level-3-c4636.md)|XML document comment *target*: tag requires non-empty '*attribute*' attribute.| +|[Compiler warning (level 3 and level 4) C4637](compiler-warning-level-3-c4637.md)|XML document comment *target*: `` tag discarded. *Reason*| +|[Compiler warning (level 3) C4638](compiler-warning-level-3-c4638.md)|XML document comment *target*: reference to unknown symbol '*symbol*'.| +|[Compiler warning (level 2) C4639](compiler-warning-level-4-c4639.md)|`MSXML` error, XML document comments will not be processed. *Reason*| +|[Compiler warning (level 3, off) C4640](compiler-warning-level-3-c4640.md)|'*instance*': construction of local static object is not thread-safe| +|[Compiler warning (level 3) C4641](compiler-warning-level-3-c4641.md)|XML document comment has an ambiguous cross reference:| |Compiler warning (level 1) C4642|'*class*': could not import the constraints for generic parameter '*name*'| |Compiler warning (level 4, off) C4643|Forward declaring '*identifier*' in namespace std is not permitted by the C++ Standard.| |Compiler warning (level 1) C4644|usage of the macro-based `offsetof` pattern in constant expressions is non-standard; use `offsetof` defined in the C++ standard library instead| -|[Compiler warning (level 3) C4645](compiler-warning-level-3-c4645.md)|function declared with __declspec(noreturn) has a return statement| -|[Compiler warning (level 3) C4646](compiler-warning-level-3-c4646.md)|function declared with __declspec(noreturn) has non-void return type| -|Compiler warning (level 3) C4647|behavior change: __is_pod(*type*) has different value in previous versions| -|Compiler warning (level 3) C4648|standard attribute 'carries_dependency' is ignored| +|[Compiler warning (level 3) C4645](compiler-warning-level-3-c4645.md)|function declared with '`noreturn`' has a return statement| +|[Compiler warning (level 3) C4646](compiler-warning-level-3-c4646.md)|function declared with '`noreturn`' has non-void return type| +|Compiler warning (level 3, off) C4647|behavior change: `__is_pod(`*type*`)` has different value in previous versions| +|Compiler warning (level 3) C4648|standard attribute `[[`*attribute*`]]` is ignored| |Compiler warning (level 3) C4649|attributes are ignored in this context| -|[Compiler warning (level 1) C4650](../../error-messages/compiler-warnings/compiler-warning-level-1-c4650.md)|debugging information not in precompiled header; only global symbols from the header will be available| -|[Compiler warning (level 1) C4651](../../error-messages/compiler-warnings/compiler-warning-level-1-c4651.md)|'definition' specified for precompiled header but not for current compile| -|[Compiler warning (level 1) C4652](../../error-messages/compiler-warnings/compiler-warning-level-1-c4652.md)|compiler option 'option' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header| -|[Compiler warning (level 2) C4653](../../error-messages/compiler-warnings/compiler-warning-level-2-c4653.md)|compiler option 'option' inconsistent with precompiled header; current command-line option ignored| -|Compiler warning (level 4) C4654|Code placed before include of precompiled header line will be ignored. Add code to precompiled header.| -|[Compiler warning (level 1) C4655](compiler-warning-level-1-c4655.md)|'symbol': variable type is new since the latest build, or is defined differently elsewhere| -|[Compiler warning (level 1) C4656](../../error-messages/compiler-warnings/compiler-warning-level-1-c4656.md)|'symbol': data type is new or has changed since the latest build, or is defined differently elsewhere| +|[Compiler warning (level 1) C4650](compiler-warning-level-1-c4650.md)|debugging information not in precompiled header; only global symbols from the header will be available| +|[Compiler warning (level 1) C4651](compiler-warning-level-1-c4651.md)|'`/D`*definition*' specified for precompiled header but not for current compile| +|[Compiler warning (level 1) C4652](compiler-warning-level-1-c4652.md)|compiler option '*option*' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header| +|[Compiler warning (level 1) C4653](compiler-warning-level-2-c4653.md)|compiler option '*option*' inconsistent with precompiled header; current command-line option ignored| +|Compiler warning (level 4, off) C4654|Code placed before include of precompiled header line will be ignored. Add code to precompiled header.| +|[Compiler warning (level 1) C4655](compiler-warning-level-1-c4655.md)|'*symbol*': variable type is new since the latest build, or is defined differently elsewhere| +|[Compiler warning (level 1) C4656](compiler-warning-level-1-c4656.md)|'*symbol*': data type is new or has changed since the latest build, or is defined differently elsewhere| |[Compiler warning (level 1) C4657](compiler-warning-level-1-c4657.md)|expression involves a data type that is new since the latest build| -|Compiler warning (level 1) C4658|'function': function prototype is new since the latest build, or is declared differently elsewhere| -|[Compiler warning (level 1) C4659](../../error-messages/compiler-warnings/compiler-warning-level-1-c4659.md)|#pragma 'pragma': use of reserved segment 'segment' has undefined behavior, use #pragma comment(linker, ...)| -|[Compiler warning (level 1) C4661](../../error-messages/compiler-warnings/compiler-warning-level-1-c4661.md)|'identifier': no suitable definition provided for explicit template instantiation request| -|[Compiler warning (level 1) C4662](compiler-warning-level-1-c4662.md)|explicit instantiation; template-class 'identifier1' has no definition from which to specialize 'identifier2'| -|[Compiler warning (level 1) C4667](../../error-messages/compiler-warnings/compiler-warning-level-1-c4667.md)|'function': no function template defined that matches forced instantiation| -|[Compiler warning (level 4) C4668](../../error-messages/compiler-warnings/compiler-warning-level-4-c4668.md)|'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directive'| -|[Compiler warning (level 1) C4669](../../error-messages/compiler-warnings/compiler-warning-level-1-c4669.md)|'cast': unsafe conversion: 'class' is a managed type object| -|[Compiler warning (level 4) C4670](compiler-warning-level-4-c4670.md)|'identifier': this base class is inaccessible| -|Compiler warning (level 4) C4671|'identifier': the copy constructor is inaccessible| -|[Compiler warning (level 4) C4672](compiler-warning-level-4-c4672.md)|'identifier1': ambiguous. First seen as 'identifier2'| -|[Compiler warning (level 4) C4673](../../error-messages/compiler-warnings/compiler-warning-level-4-c4673.md)|throwing 'identifier' the following types will not be considered at the catch site| -|[Compiler warning (level 1) C4674](compiler-warning-level-1-c4674.md)|'method' should be declared 'static' and have exactly one parameter| -|Compiler warning (level 4) C4676|'%s': the destructor is inaccessible| -|[Compiler warning (level 1) C4677](../../error-messages/compiler-warnings/compiler-warning-level-1-c4677.md)|'function': signature of non-private member contains assembly private type 'private_type'| -|[Compiler warning (level 1) C4678](compiler-warning-level-1-c4678.md)|base class 'base_type' is less accessible than 'derived_type'| -|[Compiler warning (level 1) C4679](../../error-messages/compiler-warnings/compiler-warning-level-1-c4679.md)|'member': could not import member| -|[Compiler warning (level 4) C4680](../../error-messages/compiler-warnings/compiler-warning-level-4-c4680.md)|'class': coclass does not specify a default interface| -|[Compiler warning (level 4) C4681](compiler-warning-level-4-c4681.md)|'class': coclass does not specify a default interface that is an event source| -|[Compiler warning (level 4) C4682](compiler-warning-level-4-c4682.md)|'parameter': no directional parameter attribute specified, defaulting to [in]| -|[Compiler warning (level 1) C4683](../../error-messages/compiler-warnings/compiler-warning-level-1-c4683.md)|'function': event source has an 'out'-parameter; exercise caution when hooking multiple event handlers| -|[Compiler warning (level 1) C4684](../../error-messages/compiler-warnings/compiler-warning-level-1-c4684.md)|'attribute': WARNING!! attribute may cause invalid code generation: use with caution| -|[Compiler warning (level 1) C4685](compiler-warning-level-1-c4685.md)|expecting '> >' found '>>' when parsing template parameters| -|[Compiler warning (level 3) C4686](../../error-messages/compiler-warnings/compiler-warning-level-3-c4686.md)|'user-defined type': possible change in behavior, change in UDT return calling convention| -|[Compiler warning (Error) C4687](../../error-messages/compiler-warnings/compiler-warning-c4687.md)|'class': a sealed abstract class cannot implement an interface 'interface'| -|[Compiler warning (level 1) C4688](../../error-messages/compiler-warnings/compiler-warning-level-1-c4688.md)|'constraint': constraint list contains assembly private type 'type'| -|Compiler warning (level 1) C4689|'%c': unsupported character in #pragma detect_mismatch; #pragma ignored| -|[Compiler warning (level 4) C4690](../../error-messages/compiler-warnings/compiler-warning-level-4-c4690.md)|[ emitidl( pop ) ]: more pops than pushes| -|[Compiler warning (level 1) C4691](../../error-messages/compiler-warnings/compiler-warning-level-1-c4691.md)|'type': type referenced was expected in unreferenced assembly 'file', type defined in current translation unit used instead| -|[Compiler warning (level 1) C4692](../../error-messages/compiler-warnings/compiler-warning-level-1-c4692.md)|'function': signature of non-private member contains assembly private native type 'native_type'| -|[Compiler warning (level 1, Error) C4693](../../error-messages/compiler-warnings/compiler-warning-c4693.md)|'class': a sealed abstract class cannot have any instance members 'instance member'| -|[Compiler warning (level 1, Error) C4694](../../error-messages/compiler-warnings/compiler-warning-c4694.md)|'class': a sealed abstract class cannot have a base-class 'base_class'| -|Compiler warning (level 1) C4695|#pragma execution_character_set: 'character set' is not a supported argument: currently only 'UTF-8' is supported| -|Compiler warning (level 1) C4696|/ZBvalue1 option out of range; assuming 'value2'| -| [Compiler warning (level 3) C4698](../../error-messages/compiler-warnings/c4698.md) | '*feature*' is for evaluation purposes only and is subject to change or removal in future updates. | -|[Compiler warning (level 1 and level 4) C4700](../../error-messages/compiler-warnings/compiler-warning-level-1-and-level-4-c4700.md)|uninitialized local variable 'name' used| -|[Compiler warning (level 4) C4701](../../error-messages/compiler-warnings/compiler-warning-level-4-c4701.md)|potentially uninitialized local variable 'name' used| -|[Compiler warning (level 4) C4702](../../error-messages/compiler-warnings/compiler-warning-level-4-c4702.md)|unreachable code| -|[Compiler warning (level 4) C4703](../../error-messages/compiler-warnings/compiler-warning-level-4-c4703.md)|potentially uninitialized local pointer variable '%s' used| -|[Compiler warning (level 4) C4706](../../error-messages/compiler-warnings/compiler-warning-level-4-c4706.md)|assignment within conditional expression| -|[Compiler warning (level 4) C4709](../../error-messages/compiler-warnings/compiler-warning-level-4-c4709.md)|comma operator within array index expression| -|[Compiler warning (level 4) C4710](../../error-messages/compiler-warnings/compiler-warning-level-4-c4710.md)|'function': function not inlined| -|[Compiler warning (level 1) C4711](../../error-messages/compiler-warnings/compiler-warning-level-1-c4711.md)|function 'function' selected for automatic inline expansion| -|[Compiler warning (level 4) C4714](../../error-messages/compiler-warnings/compiler-warning-level-4-c4714.md)|function 'function' marked as __forceinline not inlined| -|[Compiler warning (level 1) C4715](../../error-messages/compiler-warnings/compiler-warning-level-1-c4715.md)|'function': not all control paths return a value| -|[Compiler warning (level 1, Error) C4716](../../error-messages/compiler-warnings/compiler-warning-level-1-c4716.md)|'function': must return a value| -|[Compiler warning (level 1) C4717](../../error-messages/compiler-warnings/compiler-warning-level-1-c4717.md)|'function': recursive on all control paths, function will cause runtime stack overflow| +|Compiler warning (level 1) C4658|'*function*': function prototype is new since the latest build, or is declared differently elsewhere| +|[Compiler warning (level 1) C4659](compiler-warning-level-1-c4659.md)|`#pragma `'*pragma*': use of reserved segment '*segment*' has undefined behavior, use `#pragma comment(linker, ...)`| +|[Compiler warning (level 1) C4661](compiler-warning-level-1-c4661.md)|'*identifier*': no suitable definition provided for explicit template instantiation request| +|[Compiler warning (level 1) C4662](compiler-warning-level-1-c4662.md)|explicit instantiation; template-class '*identifier1*' has no definition from which to specialize '*identifier2*'| +|[Compiler warning (level 1) C4667](compiler-warning-level-1-c4667.md)|'*function*': cannot find a function template that matches the explicit instantiation| +|[Compiler warning (level 4, off) C4668](compiler-warning-level-4-c4668.md)|'*symbol*' is not defined as a preprocessor macro, replacing with '`0`' for '*directive*'| +|[Compiler warning (level 1) C4669](compiler-warning-level-1-c4669.md)|'*cast*': unsafe conversion: '*class*' is a *managed/WinRT* type object| +|[Compiler warning (level 4) C4670](compiler-warning-level-4-c4670.md)|'*identifier*': this base class is inaccessible| +|Compiler warning (level 4) C4671|'*identifier*': the copy constructor is inaccessible| +|[Compiler warning (level 4) C4672](compiler-warning-level-4-c4672.md)|'*identifier1*': ambiguous. First seen as '*identifier2*'| +|[Compiler warning (level 4) C4673](compiler-warning-level-4-c4673.md)|throwing '*identifier*' the following types will not be considered at the catch site| +|[Compiler warning (level 1) C4674](compiler-warning-level-1-c4674.md)|'*method*' should be declared '`static`' and have exactly one parameter| +|Compiler warning (level 4) C4676|'*class*': the destructor is inaccessible| +|[Compiler warning (level 1) C4677](compiler-warning-level-1-c4677.md)|'*function*': signature of non-private member contains assembly private type '*private_type*'| +|[Compiler warning (level 1) C4678](compiler-warning-level-1-c4678.md)|base class '*base_type*' is less accessible than '*derived_type*'| +|[Compiler warning (level 1 and level 4) C4679](compiler-warning-level-1-c4679.md)|'*member*': could not import item or its associated custom attribute| +|[Compiler warning (level 4) C4680](compiler-warning-level-4-c4680.md)|'*class*': `coclass` does not specify a default interface| +|[Compiler warning (level 4) C4681](compiler-warning-level-4-c4681.md)|'*class*': `coclass` does not specify a default interface that is an event source| +|[Compiler warning (level 4, off) C4682](compiler-warning-level-4-c4682.md)|'*parameter*': no directional parameter attribute specified, defaulting to `[in]`| +|[Compiler warning (level 1) C4683](compiler-warning-level-1-c4683.md)|'*function*': event source has an 'out'-parameter; exercise caution when hooking multiple event handlers| +|[Compiler warning (level 1) C4684](compiler-warning-level-1-c4684.md)|'*attribute*': WARNING!! attribute may cause invalid code generation: use with caution| +|[Compiler warning (level 1, no longer emitted) C4685](compiler-warning-level-1-c4685.md)|expecting '`> >`' found '`>>`' when parsing template parameters| +|[Compiler warning (level 3, off) C4686](compiler-warning-level-3-c4686.md)|'*user-defined type*': possible change in behavior, change in UDT return calling convention| +|[Compiler warning (level 1, error) C4687](compiler-warning-c4687.md)|'*class*': a sealed abstract class cannot implement an interface '*interface*'| +|[Compiler warning (level 1) C4688](compiler-warning-level-1-c4688.md)|'*constraint*': constraint list contains assembly private type '*type*'| +|Compiler warning (level 1) C4689|'*character*': unsupported character in `#pragma detect_mismatch`; `#pragma` ignored| +|[Compiler warning (level 4) C4690](compiler-warning-level-4-c4690.md)|`[ emitidl( pop ) ]`: more pops than pushes| +|[Compiler warning (level 1) C4691](compiler-warning-level-1-c4691.md)|'*type*': type referenced was expected in unreferenced *assembly* '*file*', type defined in current translation unit used instead| +|[Compiler warning (level 1, off) C4692](compiler-warning-level-1-c4692.md)|'*function*': signature of non-private member contains assembly private native type '*native_type*'| +|[Compiler warning (level 1, error) C4693](compiler-warning-c4693.md)|'*class*': a sealed abstract class cannot have any instance members '*instance member*'| +|[Compiler warning (level 1, error) C4694](compiler-warning-c4694.md)|'*class*': a sealed abstract class cannot have a base-class '*base_class*'| +|Compiler warning (level 1) C4695|`#pragma execution_character_set`: '*character set*' is not a supported argument: currently only '`UTF-8`' is supported| +|Compiler warning (level 1) C4696|`/ZBvalue1` option out of range; assuming 'value2'| +| [Compiler warning (level 3) C4698](c4698.md) | '*feature*' is for evaluation purposes only and is subject to change or removal in future updates. | +|[Compiler warning (level 1 and level 4) C4700](compiler-warning-level-1-and-level-4-c4700.md)|uninitialized local variable 'name' used| +|[Compiler warning (level 4) C4701](compiler-warning-level-4-c4701.md)|potentially uninitialized local variable 'name' used| +|[Compiler warning (level 4) C4702](compiler-warning-level-4-c4702.md)|unreachable code| +|[Compiler warning (level 4) C4703](compiler-warning-level-4-c4703.md)|potentially uninitialized local pointer variable '*identifier*' used| +|[Compiler warning (level 4) C4706](compiler-warning-level-4-c4706.md)|assignment used as a condition| +|[Compiler warning (level 4) C4709](compiler-warning-level-4-c4709.md)|comma operator within array index expression| +|[Compiler warning (level 4, off) C4710](compiler-warning-level-4-c4710.md)|'*function*': function not inlined| +|[Compiler warning (level 1) C4711](compiler-warning-level-1-c4711.md)|function 'function' selected for automatic inline expansion| +|[Compiler warning (level 4) C4714](compiler-warning-level-4-c4714.md)|function '*function*' marked as `__forceinline` not inlined| +|[Compiler warning (level 1) C4715](compiler-warning-level-1-c4715.md)|'function': not all control paths return a value| +|[Compiler warning (level 1, error) C4716](compiler-warning-level-1-c4716.md)|'function': must return a value| +|[Compiler warning (level 1) C4717](compiler-warning-level-1-c4717.md)|'function': recursive on all control paths, function will cause runtime stack overflow| |[Compiler warning (level 4) C4718](compiler-warning-level-4-c4718.md)|'function call': recursive call has no side effects, deleting| |Compiler warning (level 1) C4719|Double constant found when Qfast specified - use 'f' as a suffix to indicate single precision| |Compiler warning (level 2) C4720|in-line assembler reports: 'message'| |Compiler warning (level 1) C4721|'function': not available as an intrinsic| |[Compiler warning (level 1) C4722](compiler-warning-level-1-c4722.md)|'function': destructor never returns, potential memory leak| -|[Compiler warning (level 3) C4723](../../error-messages/compiler-warnings/compiler-warning-level-3-c4723.md)|potential divide by 0| +|[Compiler warning (level 3) C4723](compiler-warning-level-3-c4723.md)|potential divide by 0| |[Compiler warning (level 3) C4724](compiler-warning-level-3-c4724.md)|potential mod by 0| |Compiler warning (level 3) C4725|instruction may be inaccurate on some Pentiums| -|Compiler warning C4726|ARM arch4/4T supports only ' or ' with immediate value| -|[Compiler warning (level 1) C4727](../../error-messages/compiler-warnings/compiler-warning-level-1-c4727.md)|PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.| -|Compiler warning (level 1) C4728|/Yl- option ignored because PCH reference is required| +|Compiler warning C4726|ARM arch4/4T supports only '`` or ``' with immediate value| +|[Compiler warning (level 1) C4727](compiler-warning-level-1-c4727.md)|PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.| +|Compiler warning (level 1) C4728|`/Yl-` option ignored because PCH reference is required| |Compiler warning (level 4) C4729|function too big for flow graph based warnings| -|[Compiler warning (Level 1) C4730](../../error-messages/compiler-warnings/compiler-warning-level-1-c4730.md)|'main': mixing _m64 and floating point expressions may result in incorrect code| -|[Compiler warning (Level 1) C4731](../../error-messages/compiler-warnings/compiler-warning-level-1-c4731.md)|'pointer': frame pointer register 'register' modified by inline assembly code| -|Compiler warning (level 1) C4732|intrinsic '%s' is not supported in this architecture| -|[Compiler warning (Level 1) C4733](../../error-messages/compiler-warnings/compiler-warning-level-1-c4733.md)|Inline asm assigning to 'FS:0': handler not registered as safe handler| +|[Compiler warning (Level 1) C4730](compiler-warning-level-1-c4730.md)|'main': mixing `_m64` and floating point expressions may result in incorrect code| +|[Compiler warning (Level 1) C4731](compiler-warning-level-1-c4731.md)|'pointer': frame pointer register 'register' modified by inline assembly code| +|Compiler warning (level 1) C4732|intrinsic '*identifier*' is not supported in this architecture| +|[Compiler warning (Level 1) C4733](compiler-warning-level-1-c4733.md)|Inline asm assigning to '`FS:0`': handler not registered as safe handler| |Compiler warning C4734|More than 64k line numbers in a COFF debug info section; stop emitting COFF debug line numbers for module 'module'| |Compiler warning C4735|`align_function` attribute argument '*argument*' is not a power of two and is not positive. Ignoring attribute| |Compiler warning C4736|`align_function` attribute ignored because `/Gy` was not specified| -|[Compiler warning (Level 3) C4738](../../error-messages/compiler-warnings/compiler-warning-level-3-c4738.md)|storing 32-bit float result in memory, possible loss of performance| +|[Compiler warning (Level 3) C4738](compiler-warning-level-3-c4738.md)|storing 32-bit float result in memory, possible loss of performance| |[Compiler warning (level 1) C4739](compiler-warning-level-1-c4739.md)|reference to variable 'var' exceeds its storage space| -|[Compiler warning (Level 4) C4740](../../error-messages/compiler-warnings/compiler-warning-level-4-c4740.md)|flow in or out of inline asm code suppresses global optimization| -|[Compiler warning (Level 1) C4742](../../error-messages/compiler-warnings/compiler-warning-level-1-c4742.md)|'var' has different alignment in 'file1' and 'file2': number and number| -|[Compiler warning (Level 1) C4743](../../error-messages/compiler-warnings/compiler-warning-level-1-c4743.md)|'type' has different size in 'file1' and 'file2': number and number bytes| -|[Compiler warning (Level 1) C4744](../../error-messages/compiler-warnings/compiler-warning-level-1-c4744.md)|'var' has different type in 'file1' and 'file2': 'type1' and 'type2'| +|[Compiler warning (Level 4) C4740](compiler-warning-level-4-c4740.md)|flow in or out of inline asm code suppresses global optimization| +|[Compiler warning (Level 1) C4742](compiler-warning-level-1-c4742.md)|'var' has different alignment in 'file1' and 'file2': number and number| +|[Compiler warning (Level 1) C4743](compiler-warning-level-1-c4743.md)|'type' has different size in 'file1' and 'file2': number and number bytes| +|[Compiler warning (Level 1) C4744](compiler-warning-level-1-c4744.md)|'var' has different type in 'file1' and 'file2': 'type1' and 'type2'| |Compiler warning C4745|volatile access of 'name' cannot be honored due to its size| -|[Compiler warning C4746](../../error-messages/compiler-warnings/compiler-warning-c4746.md)|volatile access of '*expression*' is subject to /volatile:\ setting; consider using __iso_volatile_load/store intrinsic functions| -|[Compiler warning (level 1) C4747](../../error-messages/compiler-warnings/compiler-warning-level-1-c4747.md)|Calling managed 'entrypoint': Managed code may not be run under loader lock, including the DLL entrypoint and calls reached from the DLL entrypoint| -|Compiler warning (level 4) C4749|conditionally supported: offsetof applied to non-standard-layout type '*type*'| -|[Compiler warning (level 1) C4750](compiler-warning-level-1-c4750.md)|'identifier': function with _alloca() inlined into a loop| -|Compiler warning (level 4) C4751|/arch:AVX does not apply to Intel(R) Streaming SIMD Extensions that are within inline ASM| -|Compiler warning (level 4) C4752|found Intel(R) Advanced Vector Extensions; consider using /arch:AVX| +|[Compiler warning C4746](compiler-warning-c4746.md)|volatile access of '*expression*' is subject to `/volatile:` setting; consider using `__iso_volatile_load/store intrinsic functions`| +|[Compiler warning (level 1) C4747](compiler-warning-level-1-c4747.md)|Calling managed 'entrypoint': Managed code may not be run under loader lock, including the DLL entrypoint and calls reached from the DLL entrypoint| +|Compiler warning (level 4, off) C4749|conditionally supported: *message*| +|[Compiler warning (level 1) C4750](compiler-warning-level-1-c4750.md)|'identifier': function with `_alloca()` inlined into a loop| +|Compiler warning (level 4) C4751|`/arch:AVX` does not apply to Intel(R) Streaming SIMD Extensions that are within inline ASM| +|Compiler warning (level 4) C4752|found Intel(R) Advanced Vector Extensions; consider using `/arch:AVX`| |Compiler warning C4753|Cannot find bounds for pointer; MPX intrinsic function ignored| |[Compiler warning (level 4) C4754](compiler-warning-level-4-c4754.md)|Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed. Cast '%s' to '%s' (or similar type of %d bytes).| |Compiler warning C4755|Conversion rules for arithmetic operations in the comparison at %s(%d) mean that one branch cannot be executed in an inlined function. Cast '%s' to '%s' (or similar type of %d bytes).| -|[Compiler warning (level 2) C4756](../../error-messages/compiler-warnings/compiler-warning-level-2-c4756.md)|overflow in constant arithmetic| +|[Compiler warning (level 2) C4756](compiler-warning-level-2-c4756.md)|overflow in constant arithmetic| |Compiler warning (level 4) C4757|subscript is a large unsigned value, did you intend a negative constant?| |Compiler warning C4761|integral size mismatch in argument; conversion supplied| |[Compiler warning (level 4) C4764](compiler-warning-level-4-c4764.md)|Can not align catch objects to greater than 16 bytes| -|Compiler warning (level 4) C4767|section name '%s' is longer than 8 characters and will be truncated by the linker| -|[Compiler warning (level 3) C4768](c4768.md)|__declspec attributes before linkage specification are ignored| +|Compiler warning (level 4, off) C4767|section name '%s' is longer than 8 characters and will be truncated by the linker| +|[Compiler warning (level 3, off) C4768](c4768.md)|`__declspec` attributes before linkage specification are ignored| | [Compiler warning (level 4) C4770](./c4770.md) | partially validated enum '*name*' used as index | |Compiler warning C4771|Bounds must be created using a simple pointer; MPX intrinsic function ignored| -|[Compiler warning (level 1, Error) C4772](../../error-messages/compiler-warnings/compiler-warning-level-1-c4772.md)|#import referenced a type from a missing type library; 'missing_type' used as a placeholder| -|Compiler warning (level 4) C4774|'*string*' : format string expected in argument *number* is not a string literal| +|[Compiler warning (level 1, error) C4772](compiler-warning-level-1-c4772.md)|`#import` referenced a type from a missing type library; '*missing_type*' used as a placeholder| +|Compiler warning (level 4, off) C4774|'*string*' : format string expected in argument *number* is not a string literal| |Compiler warning (level 3) C4775|nonstandard extension used in format string '*string*' of function '*function*'| -|Compiler warning (level 1) C4776|'%*character*' is not allowed in the format string of function '*function*'| -|Compiler warning (level 4) C4777|'*function*' : format string '*string*' requires an argument of type '*type1*', but variadic argument *number* has type '*type2*'| +|Compiler warning (level 1) C4776|'`%`*character*' is not allowed in the format string of function '*function*'| +|Compiler warning (level 4, off) C4777|'*function*' : format string '*string*' requires an argument of type '*type1*', but variadic argument *number* has type '*type2*'| |Compiler warning (level 3) C4778|'*function*' : unterminated format string '*string*'| -|[Compiler warning (Level 1) C4788](../../error-messages/compiler-warnings/compiler-warning-level-1-c4788.md)|'identifier': identifier was truncated to 'number' characters| -|[Compiler warning (Level 1) C4789](../../error-messages/compiler-warnings/compiler-warning-level-1-c4789.md)|buffer 'identifier' of size N bytes will be overrun; M bytes will be written starting at offset L| -|Compiler warning (level 2) C4792|function '%s' declared using sysimport and referenced from native code; import library required to link| -|[Compiler warning (level 1 and 3) C4793](../../error-messages/compiler-warnings/compiler-warning-level-1-and-3-c4793.md)|'function': function compiled as native: 'reason'| +|[Compiler warning (Level 1) C4788](compiler-warning-level-1-c4788.md)|'identifier': identifier was truncated to 'number' characters| +|[Compiler warning (Level 1) C4789](compiler-warning-level-1-c4789.md)|buffer 'identifier' of size N bytes will be overrun; M bytes will be written starting at offset L| +|Compiler warning (level 2) C4792|function '%s' declared using `sysimport` and referenced from native code; import library required to link| +|[Compiler warning (level 1 and level 3) C4793](compiler-warning-level-1-and-3-c4793.md)|'*function*': function compiled as native:
*reason*| |[Compiler warning (level 1) C4794](compiler-warning-level-1-c4794.md)|segment of thread local storage variable '%s' changed from '%s' to '%s'| |Compiler warning C4798|native code generated for p-code function 'name' with exception handler or unwind semantics| -|[Compiler warning (level 1) C4799](../../error-messages/compiler-warnings/compiler-warning-level-1-c4799.md)|function 'function' has no EMMS instruction| +|[Compiler warning (level 1) C4799](compiler-warning-level-1-c4799.md)|function '*function*' has no EMMS instruction| ## See also diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c4800-through-c4999.md b/docs/error-messages/compiler-warnings/compiler-warnings-c4800-through-c4999.md index b33c69c14f..604fdbc580 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c4800-through-c4999.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c4800-through-c4999.md @@ -2,8 +2,8 @@ title: "Microsoft C/C++ compiler (MSVC) warnings C4800 through C4999" description: "Table of Microsoft C/C++ compiler (MSVC) warnings C4800 through C4999." ms.date: 04/17/2024 -f1_keywords: ["C4801", "C4808", "C4809", "C4815", "C4827", "C4828", "C4837", "C4842", "C4844", "C4845", "C4846", "C4847", "C4848", "C4849", "C4854", "C4855", "C4856", "C4857", "C4858", "C4859", "C4860", "C4861", "C4869", "C4872", "C4880", "C4881", "C4882", "C4883", "C4907", "C4916", "C4921", "C4934", "C4954", "C4955", "C4963", "C4966", "C4970", "C4971", "C4973", "C4974", "C4975", "C4976", "C4981", "C4983", "C4987", "C4988", "C4989", "C4990", "C4991", "C4992", "C4998"] -helpviewer_keywords: ["C4801", "C4808", "C4809", "C4815", "C4827", "C4828", "C4837", "C4842", "C4844", "C4845", "C4846", "C4847", "C4848", "C4849", "C4854", "C4855", "C4856", "C4857", "C4858", "C4859", "C4860", "C4861", "C4869", "C4872", "C4880", "C4881", "C4882", "C4883", "C4907", "C4916", "C4921", "C4934", "C4954", "C4955", "C4963", "C4966", "C4970", "C4971", "C4973", "C4974", "C4975", "C4976", "C4981", "C4983", "C4987", "C4988", "C4989", "C4990", "C4991", "C4992", "C4998"] +f1_keywords: ["C4801", "C4808", "C4809", "C4815", "C4826", "C4827", "C4828", "C4837", "C4842", "C4844", "C4845", "C4846", "C4847", "C4848", "C4849", "C4854", "C4855", "C4856", "C4857", "C4858", "C4859", "C4860", "C4861", "C4869", "C4872", "C4880", "C4881", "C4882", "C4883", "C4907", "C4916", "C4921", "C4934", "C4954", "C4955", "C4963", "C4966", "C4970", "C4971", "C4973", "C4974", "C4975", "C4976", "C4981", "C4983", "C4987", "C4988", "C4989", "C4990", "C4991", "C4992", "C4998"] +helpviewer_keywords: ["C4801", "C4808", "C4809", "C4815", "C4826", "C4827", "C4828", "C4837", "C4842", "C4844", "C4845", "C4846", "C4847", "C4848", "C4849", "C4854", "C4855", "C4856", "C4857", "C4858", "C4859", "C4860", "C4861", "C4869", "C4872", "C4880", "C4881", "C4882", "C4883", "C4907", "C4916", "C4921", "C4934", "C4954", "C4955", "C4963", "C4966", "C4970", "C4971", "C4973", "C4974", "C4975", "C4976", "C4981", "C4983", "C4987", "C4988", "C4989", "C4990", "C4991", "C4992", "C4998"] --- # Microsoft C/C++ compiler warnings C4800 through C4999 @@ -24,124 +24,124 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | [Compiler warning (level 1) C4807](compiler-warning-level-1-c4807.md) | '*operation*': unsafe mix of type '*type1*' and signed bit field of type '*type2*' | | Compiler warning (level 1) C4808 | `case` '*value*' is not a valid value for `switch` condition of type '`bool`' | | Compiler warning (level 1) C4809 | `switch` statement has redundant '`default`' label; all possible '`case`' labels are given | -| [Compiler warning (level 1) C4810](compiler-warning-level-1-c4810.md) | value of `pragma pack(show)` == n | +| [Compiler warning (level 1) C4810](compiler-warning-level-1-c4810.md) | value of `pragma pack(show)` == *number* | | [Compiler warning (level 1) C4811](compiler-warning-level-1-c4811.md) | value of `pragma conform(forScope, show)` == *value* | | [Compiler warning (level 1) C4812](compiler-warning-level-1-c4812.md) | obsolete declaration style: please use '*new_syntax*' instead | | [Compiler warning (level 1) C4813](compiler-warning-level-1-c4813.md) | '*function*': a friend function of a local class must have been previously declared | | Compiler warning (level 4) C4815 | '*object name*': zero-sized array in stack object will have no elements (unless the object is an aggregate that has been aggregate initialized) | | [Compiler warning (level 4) C4816](compiler-warning-level-4-c4816.md) | '*param*': parameter has a zero-sized array which will be truncated (unless the object is passed by reference) | -| [Compiler warning (level 1) C4817](compiler-warning-level-1-c4817.md) | '*member*': illegal use of '.' to access this member; compiler replaced with '->' | -| [Compiler warning (level 1) C4819](compiler-warning-level-1-c4819.md) | The file contains a character that cannot be represented in the current code page (number). Save the file in Unicode format to prevent data loss | -| [Compiler warning (level 4, off) C4820](compiler-warning-level-4-c4820.md) | '*bytes*' bytes padding added after construct '*member_name*' | +| [Compiler warning (level 1) C4817](compiler-warning-level-1-c4817.md) | '*member*': illegal use of '`.`' to access this member; compiler replaced with '`->`' | +| [Compiler warning (level 1) C4819](compiler-warning-level-1-c4819.md) | The file contains a character that cannot be represented in the current code page (*number*). Save the file in Unicode format to prevent data loss | +| [Compiler warning (level 4, off) C4820](compiler-warning-level-4-c4820.md) |'*type*': '*bytes*' bytes padding added after *class* '*member_name*'| | [Compiler warning (level 1) C4821](compiler-warning-level-1-c4821.md) | Unable to determine Unicode encoding type, please save the file with signature (BOM) | -| [Compiler warning (level 1, off) C4822](compiler-warning-level-1-c4822.md) | 'member function': local class member function does not have a body | +| [Compiler warning (level 4, off) C4822](compiler-warning-level-1-c4822.md) | '*member function*': local class member function does not have a body | | [Compiler warning (level 3) C4823](compiler-warning-level-3-c4823.md) | '*function*': uses pinning pointers but unwind semantics are not enabled. Consider using `/EHa` | | Compiler warning (level 2, off) C4826 | Conversion from '*type1*' to '*type2*' is sign-extended. This may cause unexpected runtime behavior. | | Compiler warning (level 3) C4827 | A public '`ToString`' method with 0 parameters should be marked as `virtual` and `override` | -| Compiler warning (level 1) C4828 | The file contains a character starting at offset 0x*HexOffset* that is illegal in the current source character set (codepage *codepage*). | +| Compiler warning (level 1) C4828 | The file contains a character starting at offset `0x`*HexOffset* that is illegal in the current source character set (codepage *codepage*). | | [Compiler warning (level 1) C4829](compiler-warning-level-1-c4829.md) | Possibly incorrect parameters to function `main`. Consider '`int main(Platform::Array^ argv)`' | -| [Compiler warning (level 1) C4834](c4834.md) | discarding return value of function with 'nodiscard' attribute | +| [Compiler warning (level 1) C4834](c4834.md) |discarding return value of function with `[[nodiscard]]` attribute| | [Compiler warning (level 1) C4835](compiler-warning-level-1-c4835.md) | '*variable*': the initializer for exported data will not be run until managed code is first executed in the host assembly | | Compiler warning (level 4, off) C4837 | trigraph detected: '`??`*character*' replaced by '*character*' | | [Compiler warning (level 1) C4838](compiler-warning-level-1-c4838.md) | conversion from '*type_1*' to '*type_2*' requires a narrowing conversion | -| [Compiler warning (level 3) C4839](compiler-warning-level-3-c4839.md) | non-standard use of class '*type*' as an argument to a variadic function | +| [Compiler warning (level 3, error) C4839](compiler-warning-level-3-c4839.md) | non-standard use of class '*type*' as an argument to a variadic function | | [Compiler warning (level 4) C4840](compiler-warning-level-4-c4840.md) | non-portable use of class '*type*' as an argument to a variadic function | -| [Compiler warning (level 4, off) C4841](c4841.md) | non-standard extension used: compound member designator used in `offsetof` | +| [Compiler warning (level 4, off) C4841](c4841.md) | non-standard extension used: *message* | | Compiler warning (level 4, off) C4842 | the result of '`offsetof`' applied to a type using multiple inheritance is not guaranteed to be consistent between compiler releases | | [Compiler warning (level 4) C4843](c4843.md) | '*type1*': An exception handler of reference to array or function type is unreachable, use '*type2*' instead | | Compiler warning (level 1) C4844 | '`export module` *`module_name`*`;`' is now the preferred syntax for declaring a module interface | -| Compiler warning (level 4) C4845 | '`__declspec(no_init_all)`' is ignored if '`/d1initall[0|1|2|3]`' was not specified on the command line | +| Compiler warning (level 4) C4845 |'`__declspec(no_init_all)`' is ignored unless '`/d1initall[0|1|2|3]`' or '`/presetPadding`' is specified on the command line| | Compiler warning (level 4) C4846 | '*value*' is not a valid argument for '`/d1initall`': command-line flag ignored | -| Compiler warning (level 4) C4847 | '`__declspec(no_init_all)`' can only be applied to a function, a class type, or a local variable: ignored | -| Compiler warning (level 1) C4848 | support for standard attribute '`no_unique_address`' in C++17 and earlier is a vendor extension | +| Compiler warning (level 4) C4847 |'*identifier*': '`__declspec(no_init_all)`' can only be applied to a function, a class type, or a local variable: ignored | +| Compiler warning (level 1) C4848 | support for attribute `[[`*attribute*`]]` in C++17 and earlier is a vendor extension | | Compiler warning (level 1) C4849 | OpenMP '*clause*' clause ignored in '*directive*' directive | | Compiler warning (Level 1, error) C4854 | binding dereferenced null pointer to reference has undefined behavior | -| Compiler warning (level 1, off) C4855 | implicit capture of '`this`' via '`[=]`' is deprecated in 'version' | -| Compiler warning (level 4) C4856 | '*value*' is not a valid argument for '`/d1initAll:FillPattern`' (value must be between 0 and 255). Command-line flag ignored | -| Compiler warning (level 1) C4857 | C++/CLI mode does not support C++ versions newer than C++17; setting language to `/std:c++17` | +| Compiler warning (level 1, off) C4855 | implicit capture of '`this`' via '`[=]`' is deprecated in '*version*' | +| Compiler warning (level 4) C4856 | '*value*' is not a valid argument for '`/d1initAll:FillPattern`' (value must be between `0` and `255`). Command-line flag ignored | +| Compiler warning (level 1) C4857 | C++/CLI mode does not support C++ versions newer than C++*ver*; setting language to `/std:c++`*ver* | | Compiler warning (level 1) C4858 | discarding return value: *function name* | | Compiler warning (level 4) C4859 | '*value*' is not a valid argument for '`/presetWarn`': it must be a decimal value > 0. Command-line flag ignored | | Compiler warning (level 4) C4860 | '*object name*': compiler zero initialized '*number*' bytes of storage | | Compiler warning (level 4) C4861 | compiler zero initialized '*number*' bytes of storage | | [Compiler warning (level 4) C4866](c4866.md) | compiler may not enforce left-to-right evaluation order for call to *operator_name* | -| [Compiler warning (level 1, error) C4867](compiler-warning-c4867.md) | '*function*': function call missing argument list; use '*call*' to create a pointer to member | +| [Compiler warning (level 1, error) C4867](compiler-warning-c4867.md) |'*function name*': non-standard syntax; use '`&`' to create a pointer to member| | [Compiler warning (level 4) C4868](compiler-warning-c4868.md) | '*file*(*line_number*)' compiler may not enforce left-to-right evaluation order in braced initialization list | | Compiler warning (level 3) C4869 | '`nodiscard`' may only be applied to classes, enumerations, and functions | | Compiler warning (level 2) C4872 | floating point division by zero detected when compiling the call graph for the `concurrency::parallel_for_each` at: '*location*' | -| Compiler warning (level 1) C4880 | casting from 'const *type_1*' to '*type_2*': casting away constness from a pointer or reference may result in undefined behavior in an amp restricted function | +| Compiler warning (level 1) C4880 | casting from '*const type_1*' to '*type_2*': casting away constness from a pointer or reference may result in undefined behavior in an `amp` restricted function | | Compiler warning (level 4) C4881 | the constructor and/or the destructor will not be invoked for `tile_static` variable '*variable-name*' | | Compiler warning (level 1) C4882 | passing functors with non-const call operators to `concurrency::parallel_for_each` is deprecated | | Compiler warning C4883 | '*function name*': function size suppresses optimizations | | [Compiler warning C4900](compiler-warning-level-1-c4900.md) | Il mismatch between '*tool1*' version '*version1*' and '*tool2*' version '*version2*' | -| [Compiler warning (level 1, off) C4905](compiler-warning-level-1-c4905.md) | wide string literal cast to '`LPSTR`' | -| [Compiler warning (level 1, off) C4906](compiler-warning-level-1-c4906.md) | string literal cast to '`LPWSTR`' | -| Compiler warning (Error) C4907 | multiple calling conventions cannot be specified; last given will be used | -| [Compiler warning (level 1) C4910](compiler-warning-level-1-c4910.md) | '\: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation | +| [Compiler warning (level 1, off) C4905](compiler-warning-level-1-c4905.md) | wide string literal cast to '*type*' | +| [Compiler warning (level 1, off) C4906](compiler-warning-level-1-c4906.md) | string literal cast to '*type*' | +| Compiler warning (error) C4907 | multiple calling conventions cannot be specified; last given will be used | +| [Compiler warning (level 1) C4910](compiler-warning-level-1-c4910.md) |'*identifier*': '`__declspec(dllexport)`' and '`extern`' are incompatible on an explicit instantiation| | [Compiler warning (level 1) C4912](compiler-warning-level-1-c4912.md) | '*attribute*': attribute has undefined behavior on a nested UDT | | [Compiler warning (level 4) C4913](compiler-warning-level-4-c4913.md) | user defined binary operator '`,`' exists but no overload could convert all operands, default built-in binary operator '`,`' used | | Compiler warning (level 1) C4916 | in order to have a `dispid`, '*description*': must be introduced by an interface | | [Compiler warning (level 1, off) C4917](compiler-warning-level-1-c4917.md) | '*declarator*': a GUID can only be associated with a class, interface or namespace | | [Compiler warning (level 4) C4918](compiler-warning-level-4-c4918.md) | '*character*': invalid character in pragma optimization list | -| [Compiler warning (level 1) C4920](compiler-warning-level-1-c4920.md) | enum *enum-name* member *member_1*=*value_1* already seen in enum *enum-name* as *member_2*=*value_2* | +| [Compiler warning (level 1) C4920](compiler-warning-level-1-c4920.md) | `enum` *enum-name* member *member_1*`=`*value_1* already seen in `enum` *enum-name* as *member_2*`=`*value_2* | | Compiler warning (level 3) C4921 | '*description*': attribute value '*attribute*' should not be multiply specified | -| [Compiler warning (level 1) C4925](compiler-warning-level-1-c4925.md) | '*method*': dispinterface method cannot be called from script | +| [Compiler warning (level 1) C4925](compiler-warning-level-1-c4925.md) | '*method*': `dispinterface` method cannot be called from script | | [Compiler warning (level 1) C4926](compiler-warning-level-1-c4926.md) | '*identifier*': symbol is already defined: attributes ignored | | [Compiler warning (level 1) C4927](compiler-warning-level-1-c4927.md) | illegal conversion; more than one user-defined conversion has been implicitly applied | | [Compiler warning (level 1, off) C4928](compiler-warning-level-1-c4928.md) | illegal copy-initialization; more than one user-defined conversion has been implicitly applied | -| [Compiler warning (level 1) C4929](compiler-warning-level-1-c4929.md) | '*file*': typelibrary contains a union; ignoring the 'embedded_idl' qualifier | +| [Compiler warning (level 1) C4929](compiler-warning-level-1-c4929.md) | '*file*': `typelibrary` contains a union; ignoring the '`embedded_idl`' qualifier | | [Compiler warning (level 1) C4930](compiler-warning-level-1-c4930.md) | '*prototype*': prototyped function not called (was a variable definition intended?) | | [Compiler warning (level 4, off) C4931](compiler-warning-level-4-c4931.md) | we are assuming the type library was built for *number*-bit pointers | | [Compiler warning (level 4) C4932](compiler-warning-level-4-c4932.md) | `__identifier(`*identifier*`)` and `__identifier(`*identifier*`)` are indistinguishable | | Compiler warning (level 1) C4934 | '`__delegate(multicast)`' is deprecated, use '`__delegate`' instead | | [Compiler warning (level 1) C4935](compiler-warning-level-1-c4935.md) | assembly access specifier modified from '*access*' | -| [Compiler warning (level 1, Error) C4936](compiler-warning-c4936.md) | this __declspec is supported only when compiled with `/clr` or `/clr:pure` | +| [Compiler warning (level 1, error) C4936](compiler-warning-c4936.md) | this `__declspec` is supported only when compiled with `/clr` or `/clr:pure` | | [Compiler warning (level 4) C4937](compiler-warning-level-4-c4937.md) | '*text1*' and '*text2*' are indistinguishable as arguments to '*directive*' | | [Compiler warning (level 4) C4938](compiler-warning-level-4-c4938.md) | '*var*': Floating point reduction variable may cause inconsistent results under `/fp:strict` or `#pragma fenv_access` | -| [Compiler warning C4939](compiler-warning-level-1-c4939.md) | #pragma vtordisp is deprecated and will be removed in a future release of Visual C++ | +| [Compiler warning (level 1) C4939](compiler-warning-level-1-c4939.md) | `#pragma vtordisp` is deprecated and will be removed in a future release of Visual C++ | | [Compiler warning (level 1) C4944](compiler-warning-level-1-c4944.md) | '*symbol*': cannot import symbol from '*assembly1*': as '*symbol*' already exists in the current scope | | [Compiler warning (level 1) C4945](compiler-warning-level-1-c4945.md) | '*symbol*': cannot import symbol from '*assembly1*': as '*symbol*' has already been imported from another assembly '*assembly2*' | | [Compiler warning (level 1, off) C4946](compiler-warning-level-1-c4946.md) | `reinterpret_cast` used between related classes: '*class1*' and '*class2*' | | [Compiler warning (level 1) C4947](compiler-warning-level-1-c4947.md) | '*type_or_member*': marked as obsolete | | [Compiler warning (level 2) C4948](compiler-warning-level-2-c4948.md) | return type of '*accessor*' does not match the last parameter type of the corresponding setter | -| [Compiler warning (level 1 and level 4) C4949](compiler-warning-level-1-and-level-4-c4949.md) | pragmas '`managed`' and '`unmanaged`' are meaningful only when compiled with '`/clr[:option]`' | -| [Compiler warning (level 1, Error) C4950](compiler-warning-c4950.md) | '*type_or_member*': marked as obsolete | +| [Compiler warning (level 1 and level 4) C4949](compiler-warning-level-1-and-level-4-c4949.md) | `pragma` '*pragma*' is meaningful only when compiled with '`/clr[:option]`'| +| [Compiler warning (level 1, error) C4950](compiler-warning-c4950.md) | '*type_or_member*': marked as obsolete | | [Compiler warning (level 1) C4951](compiler-warning-level-1-c4951.md) | '*function*' has been edited since profile data was collected, function profile data not used | | [Compiler warning (level 1) C4952](compiler-warning-level-1-c4952.md) | '*function*': no profile data found in program database '*pgd-file*' | | [Compiler warning (level 1) C4953](compiler-warning-level-1-c4953.md) | Inlinee '*function*' has been edited since profile data was collected, profile data not used | | Compiler warning C4954 | '*function*': not profiled (contains `__int64` switch expression) | | Compiler warning C4955 | '*import2*': import ignored; already imported from '*import1*' | -| [Compiler warning (level 1, Error) C4956](compiler-warning-c4956.md) | '*type*': this type is not verifiable | -| [Compiler warning (level 1, Error) C4957](compiler-warning-c4957.md) | '*cast*': explicit cast from '*cast_from*' to '*cast_to*' is not verifiable | -| [Compiler warning (level 1, Error) C4958](compiler-warning-c4958.md) | '*operation*': pointer arithmetic is not verifiable | -| [Compiler warning (level 1, Error) C4959](compiler-warning-c4959.md) | cannot define unmanaged type '*type*' in `/clr:safe` because accessing its members yields unverifiable code | +| [Compiler warning (level 1, error) C4956](compiler-warning-c4956.md) | '*type*': this type is not verifiable | +| [Compiler warning (level 1, error) C4957](compiler-warning-c4957.md) | '*cast*': explicit cast from '*cast_from*' to '*cast_to*' is not verifiable | +| [Compiler warning (level 1, error) C4958](compiler-warning-c4958.md) | '*operation*': pointer arithmetic is not verifiable | +| [Compiler warning (level 1, error) C4959](compiler-warning-c4959.md) | cannot define unmanaged *type* '*identifier*' in `/clr:safe` because accessing its members yields unverifiable code | | [Compiler warning (level 4) C4960](compiler-warning-level-4-c4960.md) | '*function*' is too big to be profiled | | [Compiler warning (level 1) C4961](compiler-warning-c4961.md) | No profile data was merged into '*pgd-file*', profile-guided optimizations disabled | | [Compiler warning (level 4, off) C4962](compiler-warning-c4962.md) | '*function*': Profile-guided optimizations disabled because optimizations caused profile data to become inconsistent | | Compiler warning (level 1) C4963 | '*description*': no profile data found; different compiler options were used in instrumented build | | [Compiler warning (level 1) C4964](compiler-warning-level-1-c4964.md) | No optimization options were specified; profile info will not be collected | -| [Compiler warning (level 1) C4965](compiler-warning-level-1-c4965.md) | implicit box of integer 0; use nullptr or explicit cast | +| [Compiler warning (level 1) C4965](compiler-warning-level-1-c4965.md) | implicit box of integer `0`; use `nullptr` or explicit cast | | Compiler warning (level 1) C4966 | '*function*' has `__code_seg` annotation with unsupported segment name, annotation ignored | | Compiler warning C4970 | delegate constructor: target object ignored since '*type*' is static | -| Compiler warning (level 1) C4971 | Argument order: \, \ for delegate constructor is deprecated, use \, \ | -| [Compiler warning (level 1, Error) C4972](compiler-warning-c4972.md) | Directly modifying or treating the result of an unbox operation as an lvalue is unverifiable | +| Compiler warning (level 1, no longer emitted) C4971 |Argument order: ``, `` for delegate constructor is deprecated, use ``, ``| +| [Compiler warning (level 1, error) C4972](compiler-warning-c4972.md) | Directly modifying or treating the result of an unbox operation as an lvalue is unverifiable | | Compiler warning (level 1) C4973 | '*symbol*': marked as deprecated | | Compiler warning (level 1) C4974 | '*symbol*': marked as deprecated | | Compiler warning (level 1) C4975 | modopt '[*modifier*]' was ignored for formal parameter '*parameter*' | -| Compiler warning (level 1) C4976 | invalid value '*value*' for '`/W`'; assuming '1' | -| Compiler warning (level 3) C4981 | Warbird: function '*function*' marked as __forceinline not inlined because it contains exception semantics | -| Compiler warning (level 3) C4983 | '/analyze:sarif:hashname' ignored because the argument to '/analyze:log' is a single file rather than a directory | -| [Compiler warning C4984](compiler-warning-c4984.md) | '`if constexpr`' is a C++17 language extension | -| [Compiler warning (level 4) C4985](compiler-warning-level-4-c4985.md) | '*symbol_name*': attributes not present on previous declaration. | -| [Compiler warning (level 4, off) C4986](compiler-warning-c4986.md) | '*declaration*': exception specification does not match previous declaration | +| Compiler warning (level 1) C4976 | invalid value '*value*' for '`/W`'; assuming '`1`' | +| Compiler warning (level 3) C4981 | Warbird: function '*function*' marked as `__forceinline` not inlined because it contains exception semantics | +| Compiler warning (level 3) C4983 | '`/analyze:sarif:hashname`' ignored because the argument to '`/analyze:log`' is a single file rather than a directory | +| [Compiler warning (level 1) C4984](compiler-warning-c4984.md) | '`if constexpr`' is a C++17 language extension | +| [Compiler warning (level 3) C4985](compiler-warning-level-4-c4985.md) | '*symbol_name*': attributes not present on previous declaration. | +| [Compiler warning (level 2 and level 4, off) C4986](compiler-warning-c4986.md) | '*declaration*': exception specification does not match previous declaration | | Compiler warning (level 4, off) C4987 | nonstandard extension used: '`throw (...)`' | | Compiler warning (level 4, off) C4988 | '*variable*': variable declared outside class/function scope | | Compiler warning (level 4) C4989 | '*type*': type has conflicting definitions. | | Compiler warning (level 3) C4990 | Warbird: *message* | | Compiler warning (level 3) C4991 | Warbird: function '*function*' marked as `__forceinline` not inlined because protection level of inlinee is greater than the parent | | Compiler warning (level 3) C4992 | Warbird: function '*function-name*' marked as `__forceinline` not inlined because it contains inline assembly which cannot be protected | -| [Compiler warning (level 3) C4995](compiler-warning-level-3-c4995.md) | '*function*': name was marked as #pragma deprecated | -| [Compiler warning (level 3) C4996](compiler-warning-level-3-c4996.md) | '*deprecated-declaration*': *deprecation-message* (or "was declared deprecated") | -| [Compiler warning (level 1) C4997](compiler-warning-level-1-c4997.md) | '*class*': coclass does not implement a COM interface or pseudo-interface | +| [Compiler warning (level 3) C4995](compiler-warning-level-3-c4995.md) | '*function*': name was marked as `#pragma deprecated` | +| [Compiler warning (level 3) C4996](compiler-warning-level-3-c4996.md) | '*deprecated-declaration*': *deprecation-message* | +| [Compiler warning (level 1) C4997](compiler-warning-level-1-c4997.md) | '*class*': `coclass` does not implement a COM interface or pseudo-interface | | Compiler warning (level 1) C4998 | EXPECTATION FAILED: *expectation*(*value*) | ## See also diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c5000-through-c5199.md b/docs/error-messages/compiler-warnings/compiler-warnings-c5000-through-c5199.md index 5fd8d8a5fd..38f4e44895 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c5000-through-c5199.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c5000-through-c5199.md @@ -23,39 +23,39 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | Compiler warning (level 1 and level 4, off) C5027 | '*type*': move assignment operator was implicitly defined as deleted | | Compiler warning (level 1) C5028 | '*name*': Alignment specified in prior declaration (*number*) not specified in definition | | Compiler warning (level 4, off) C5029 | nonstandard extension used: alignment attributes in C++ apply to variables, data members and tag types only | -| Compiler warning (level 3) C5030 | attribute '*attribute-name*' is not recognized | +| Compiler warning (level 3) C5030 | attribute `[[`*attribute_name*`]]` is not recognized | | Compiler warning (level 4, off) C5031 | `#pragma warning(pop)`: likely mismatch, popping warning state pushed in different file | | Compiler warning (level 4, off) C5032 | detected `#pragma warning(push)` with no corresponding `#pragma warning(pop)` | | [Compiler warning (level 1) C5033](c5033.md) | '*storage-class*' is no longer a supported storage class | -| Compiler warning (level 5, off) C5034 | use of intrinsic '*intrinsic*' causes function *function-name* to be compiled as guest code | -| Compiler warning (level 5, off) C5035 | use of feature '*feature*' causes function *function-name* to be compiled as guest code | -| Compiler warning (level 1) C5036 | varargs function pointer conversion when compiling with `/hybrid:x86arm64` '*type1*' to '*type2*' | -| [Compiler warning (error) C5037](c5037.md) | '*member-function*': an out-of-line definition of a member of a class template cannot have default arguments | -| [Compiler warning (level 4, off) C5038](c5038.md) | data member '*member1*' will be initialized after data member '*member2*' | -| Compiler warning (level 4, off) C5039 | '*function*': pointer or reference to potentially throwing function passed to `extern C` function under `-EHc`. Undefined behavior may occur if this function throws an exception. | +| Compiler warning (level 4, off) C5034 | use of intrinsic '*intrinsic*' causes function *function-name* to be compiled as guest code | +| Compiler warning (level 4, off) C5035 | use of feature '*feature*' causes function *function-name* to be compiled as guest code | +| Compiler warning (level 1) C5036 | `varargs` function pointer conversion when compiling with /hybrid:x86arm64 from type '*type1*' to type '*type2*' | +| [Compiler warning (level 3, error) C5037](c5037.md) | '*member-function*': an out-of-line definition of a member of a class template cannot have default arguments | +| [Compiler warning (level 4, off) C5038](c5038.md) | *data member* '*member1*' will be initialized after *data member* '*member2*' | +| Compiler warning (level 4, off) C5039 | '*function*': pointer or reference to potentially throwing function passed to '`extern "C"`' function under `-EHc`. Undefined behavior may occur if this function throws an exception. | | Compiler warning (level 3) C5040 | dynamic exception specifications are valid only in C++14 and earlier; treating as noexcept(false) | -| Compiler warning (level 1, off) C5041 | '*definition*': out-of-line definition for constexpr static data member is not needed and is deprecated in C++17 | -| Compiler warning (level 3, off) C5042 | '*declaration*': function declarations at block scope cannot be specified 'inline' in standard C++; remove 'inline' specifier | +| Compiler warning (level 4, off) C5041 | '*definition*': out-of-line definition for `constexpr` static data member is not needed and is deprecated in C++17 | +| Compiler warning (level 3, off) C5042 | '*declaration*': function declarations at block scope cannot be specified '`inline`' in standard C++; remove '`inline`' specifier | | Compiler warning (level 2) C5043 | '*specification*': exception specification does not match previous declaration | | Compiler warning (level 4) C5044 | An argument to command-line option *option-name* points to a path '*path-name*' that does not exist | -| [Compiler warning (level 4) C5045](c5045.md) | Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified | +| [Compiler warning (level 4) C5045](c5045.md) | Compiler will insert Spectre mitigation for memory load if `/Qspectre` switch specified | | [Compiler warning (level 2) C5046](c5046.md) | '*function*': Symbol involving type with internal linkage not defined | -| Compiler warning (level 1) C5047 | use of nonstandard `__if_exists` with modules is not supported | +| Compiler warning (level 1, error) C5047 | use of nonstandard '*keyword*' with modules is not supported | | Compiler warning (level 1) C5048 | Use of macro '*macroname*' may result in non-deterministic output | | Compiler warning (level 1) C5049 | '*string*': Embedding a full path may result in machine-dependent output | | [Compiler warning (level 1) C5050](c5050.md) | Possible incompatible environment while importing module '*module_name*': *issue* | -| Compiler warning (level 1) C5051 | attribute 'attribute-name' requires at least 'standard-level'; ignored | -| Compiler warning (level 3, off) C5052 | Keyword 'keyword-name' was introduced in C++\ and requires use of the 'option-name' command-line option | +| Compiler warning (level 1) C5051 | attribute `[[`*attribute-name*`]]` requires at least '*standard_version*'; ignored | +| Compiler warning (level 3, off) C5052 | Keyword '*keyword-name*' was introduced in `C++`*version* and requires use of the '*switch*' command-line option | | Compiler warning (level 1) C5053 | support for '`explicit()`' in C++17 and earlier is a vendor extension | -| [Compiler warning (level 4) C5054](c5054.md) | operator 'operator-name': deprecated between enumerations of different types | -| [Compiler warning (level 1) C5055](c5055.md) | operator 'operator-name': deprecated between enumerations and floating-point types | -| [Compiler warning (level 1) C5056](c5056.md) | operator 'operator-name': deprecated for array types | -| Compiler warning (level 1) C5057 | header unit reference to 'name' already exists. Ignoring header unit 'header-name' | -| Compiler warning (level 1) C5058 | file system error: cannot find header file 'file-name' for header unit 'unit-name' | +| [Compiler warning (level 4) C5054](c5054.md) | operator '*operator-name*': deprecated between enumerations of different types | +| [Compiler warning (level 1) C5055](c5055.md) | operator '*operator-name*': deprecated between enumerations and floating-point types | +| [Compiler warning (level 1) C5056](c5056.md) | operator '*operator-name*': deprecated for array types | +| Compiler warning (level 1) C5057 | header unit reference to '*name*' already exists. Ignoring header unit '*header-name*' | +| Compiler warning (level 1) C5058 | file system error: cannot find header file '*file-name*' for header unit '*unit-name*' | | Compiler warning C5059 | runtime checks and address sanitizer is not currently supported - disabling runtime checks | | Compiler warning (level 4) C5060 | `/Qpar` and address sanitizer not currently supported - disabling auto-parallelization | | Compiler warning (level 4) C5061 | the use of a comma operator as a subscript expression has been deprecated | -| Compiler warning (level 4) C5062 | enum direct list initialization between 'type-1' and 'type-2' is no longer supported | +| Compiler warning (level 4) C5062 | `enum` direct list initialization between '*type-1*' and '*type-2*' is no longer supported | | Compiler warning (level 1) C5063 | '`std::is_constant_evaluated`' always evaluates to true in manifestly constant-evaluated expressions | | [Compiler warning (level 1) C5072](compiler-warning-c5072.md) | ASAN enabled without debug information emission. Enable debug info for better ASAN error reporting | | Compiler warning (level 1) C5081 | Secure hotpatch is not supported with `/GENPROFILE`, `/FASTGENPROFILE` or `/LTCG:PGI`, disabling secure hotpatch. | diff --git a/docs/error-messages/compiler-warnings/compiler-warnings-c5200-through-c5399.md b/docs/error-messages/compiler-warnings/compiler-warnings-c5200-through-c5399.md index 43dea219e0..1b66790fb1 100644 --- a/docs/error-messages/compiler-warnings/compiler-warnings-c5200-through-c5399.md +++ b/docs/error-messages/compiler-warnings/compiler-warnings-c5200-through-c5399.md @@ -2,8 +2,8 @@ title: "Microsoft C/C++ compiler (MSVC) compiler warnings C5200 through C5399" description: "Table of Microsoft C/C++ compiler (MSVC) warnings C5200 through C5399." ms.date: 04/19/2024 -f1_keywords: ["C5200", "C5201", "C5202", "C5203", "C5204", "C5205", "C5206", "C5207", "C5209", "C5210", "C5211", "C5212", "C5213", "C5214", "C5215", "C5216", "C5217", "C5218", "C5219", "C5220", "C5221", "C5222", "C5223", "C5224", "C5225", "C5226", "C5227", "C5228", "C5229", "C5230", "C5231", "C5232", "C5233", "C5234", "C5235", "C5236", "C5237", "C5238", "C5239", "C5241", "C5242", "C5244", "C5245", "C5246", "C5249", "C5250", "C5251", "C5252", "C5253", "C5254", "C5255", "C5256", "C5257", "C5258", "C5259", "C5260", "C5261", "C5263", "C5264", "C5265", "C5268", "C5269", "C5270", "C5271", "C5272", "C5273", "C5274", "C5275", "C5300", "C5303", "C5304", "C5305"] -helpviewer_keywords: ["C5200", "C5201", "C5202", "C5203", "C5204", "C5205", "C5206", "C5207", "C5209", "C5210", "C5211", "C5212", "C5213", "C5214", "C5215", "C5216", "C5217", "C5218", "C5219", "C5220", "C5221", "C5222", "C5223", "C5224", "C5225", "C5226", "C5227", "C5228", "C5229", "C5230", "C5231", "C5232", "C5233", "C5234", "C5235", "C5236", "C5237", "C5238", "C5239", "C5241", "C5242", "C5244", "C5245", "C5246", "C5249", "C5250", "C5251", "C5252", "C5253", "C5254", "C5255", "C5256", "C5257", "C5258", "C5259", "C5260", "C5261", "C5263", "C5264", "C5265", "C5268", "C5269", "C5270", "C5271", "C5272", "C5273", "C5274", "C5275", "C5300", "C5303", "C5304", "C5305"] +f1_keywords: ["C5200", "C5201", "C5202", "C5203", "C5204", "C5205", "C5206", "C5207", "C5209", "C5210", "C5212", "C5213", "C5214", "C5215", "C5216", "C5217", "C5218", "C5219", "C5220", "C5221", "C5222", "C5223", "C5224", "C5225", "C5226", "C5227", "C5228", "C5229", "C5230", "C5231", "C5232", "C5233", "C5234", "C5235", "C5236", "C5237", "C5238", "C5239", "C5241", "C5242", "C5244", "C5245", "C5246", "C5249", "C5250", "C5251", "C5252", "C5253", "C5254", "C5255", "C5256", "C5257", "C5258", "C5259", "C5260", "C5261", "C5263", "C5264", "C5265", "C5268", "C5269", "C5270", "C5271", "C5272", "C5273", "C5274", "C5275", "C5300", "C5303", "C5304", "C5305"] +helpviewer_keywords: ["C5200", "C5201", "C5202", "C5203", "C5204", "C5205", "C5206", "C5207", "C5209", "C5210", "C5212", "C5213", "C5214", "C5215", "C5216", "C5217", "C5218", "C5219", "C5220", "C5221", "C5222", "C5223", "C5224", "C5225", "C5226", "C5227", "C5228", "C5229", "C5230", "C5231", "C5232", "C5233", "C5234", "C5235", "C5236", "C5237", "C5238", "C5239", "C5241", "C5242", "C5244", "C5245", "C5246", "C5249", "C5250", "C5251", "C5252", "C5253", "C5254", "C5255", "C5256", "C5257", "C5258", "C5259", "C5260", "C5261", "C5263", "C5264", "C5265", "C5268", "C5269", "C5270", "C5271", "C5272", "C5273", "C5274", "C5275", "C5300", "C5303", "C5304", "C5305"] --- # Microsoft C/C++ compiler warnings C5200 through C5399 @@ -15,29 +15,29 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | Warning | Message | |--|--| -| Compiler warning (level 1) C5200 | feature 'feature-name' requires compiler flag 'option-name' | +| Compiler warning (level 1) C5200 | *feature* '*feature-name*' requires compiler flag '*option-name*' | | Compiler warning (level 1) C5201 | a module declaration can appear only at the start of a translation unit unless a global module fragment is used | | Compiler warning (level 1) C5202 | a global module fragment can only contain preprocessor directives | -| Compiler warning (level 1) C5203 | a parenthesized declarator name after 'explicit' will be considered an explicit-specifier in C++20 | -| Compiler warning (level 3, off) C5204 | 'type-name': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly | -| Compiler warning (level 4) C5205 | delete of an abstract class 'type-name' that has a non-virtual destructor results in undefined behavior | +| Compiler warning (level 1) C5203 | a parenthesized declarator name after '`explicit`' will be considered an explicit-specifier in C++20 | +| Compiler warning (level 3, off) C5204 | '*type-name*': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly | +| Compiler warning (level 4) C5205 | delete of an abstract class '*type-name*' that has a non-virtual destructor results in undefined behavior | | Compiler warning (level 3) C5206 | deduced return types for coroutines is a non-standard extension | | Compiler warning (level 1) C5207 | the simple requirement asserts the validity of expression '`e->id`'. Did you mean '`{ e } -> id`'? You can suppress the warning using '`{ e->id }`' | -| [Compiler warning (level 1) C5208](c5208.md) | unnamed class used in `typedef` name cannot declare members other than non-static data members, member enumerations, or member classes | -| Compiler warning (level 1) C5209 | the C++20 syntax for an init-capture has changed to '& ...opt identifier initializer' | +| [Compiler warning (level 1, error) C5208](c5208.md) | unnamed class used in `typedef` name cannot declare members other than non-static data members, member enumerations, or member classes | +| Compiler warning (level 1) C5209 | the C++20 syntax for an init-capture has changed to '`& ...opt identifier initializer`' | | Compiler warning (level 1) C5210 | '*name*' is not a valid header unit reference; ignoring | | Compiler warning (level 1) C5212 | '*name*' is not a valid named reference; treating as reference to file | -| Compiler warning (level 1) C5213 | '*name*' named reference is treated as a named partition but the name is not specified; treating as reference to file | +| Compiler warning (level 1) C5213 | '*name*' named reference is treated as a named partition but the *module* name is not specified; treating as reference to file | | Compiler warning (level 4, off) C5214 | applying '*modifier*' to an operand with a volatile qualified type is deprecated in C++20 | | Compiler warning (level 4, off) C5215 | '*name*' a function parameter with a volatile qualified type is deprecated in C++20 | | Compiler warning (level 4, off) C5216 | '*name*' a volatile qualified return type is deprecated in C++20 | | Compiler warning (level 4, off) C5217 | a structured binding declaration that includes volatile is deprecated in C++20 | | Compiler warning (level 1) C5218 | destroying delete may not behave as intended when non-conforming switches '`/Zc:sizedDealloc-`' or '`/Zc:alignedNew-`' are used | | Compiler warning (level 2, off) C5219 | implicit conversion from '*type-1*' to '*type-2*', possible loss of data | -| Compiler warning (level 4, off) C5220 | '*name*': a non-static data member with a volatile qualified type no longer implies that compiler generated copy/move constructors and copy/move assignment operators are not trivial | -| Compiler warning (level 1) C5221 | xfg::rename is deprecated. | +| Compiler warning (level 4, off) C5220 | '*name*': a non-static data member with a volatile qualified type no longer implies
that compiler generated copy/move constructors and copy/move assignment operators are not trivial | +| Compiler warning (level 1) C5221 | `xfg::rename` is deprecated. | | Compiler warning (level 3) C5222 | '*attribute-name*': all unscoped attribute names are reserved for future standardization | -| Compiler warning (level 3) C5223 | all attribute names in the attribute namespace 'msvc' are reserved for the implementation | +| Compiler warning (level 3) C5223 | all attribute names in the attribute namespace '`msvc`' are reserved for the implementation | | Compiler warning (level 3) C5224 | all attribute names in the attribute namespace '*namespace-name*' are reserved for future standardization | | Compiler warning (level 1) C5225 | '*symbol*': exported inline function defined in a private module fragment is a non-standard extension | | Compiler warning (level 1) C5226 | '*symbol*': exported template defined in private module fragment has no reachable instantiation | @@ -45,7 +45,7 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | Compiler warning (level 4) C5228 | nonstandard extension, '*identifier*' resolved to a member of a dependent base. This lookup is not allowed under `/permissive-`. | | Compiler warning (level 4) C5229 | nonstandard extension, the hidden friend function '*function-name*' was found by name lookup which isn't allowed under `/permissive-`. | | Compiler warning C5230 | nonstandard extension, '*identifier*' was resolved to '*symbol-1*' under `/permissive`. Under `/permissive-` it would resolve to '*symbol-2*'. | -| Compiler warning (level 3) C5231 | the expression '`co_await promise.final_suspend()`' must be non-throwing | +| Compiler warning (level 3, error) C5231 | the expression '`co_await promise.final_suspend()`' must be non-throwing | | Compiler warning (level 1) C5232 | in C++20 this comparison calls '*name*' recursively | | Compiler warning (level 4, off) C5233 | explicit lambda capture '*identifier*' is not used | | Compiler warning (level 1) C5234 | file system error: '*filename*' is not a valid header-name; ignoring | @@ -53,35 +53,35 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | Compiler warning (level 1) C5236 | JSON ill-formed: *message*; ignoring '*filename*' | | Compiler warning (level 1) C5237 | cannot resolve header unit entry '*name*' to a header file in '*filename*'; ignoring entry | | Compiler warning (level 1) C5238 | file system error: cannot open '*filename*' for reading; ignoring | -| Compiler warning (level 4) C5239 | '*symbol*': potentially throwing function called from a function declared `__declspec(nothrow)`. Undefined behavior may occur if an exception is thrown. | -| [Compiler warning (level 4) C5240](c5240.md) | '*attribute-name*': attribute is ignored in this syntactic position | -| Compiler warning (level 1) C5241 | '`/exportHeader`' usage to lookup header-name is deprecated; prefer '/headerName:name value=filename' | +| Compiler warning (level 4) C5239 | '*symbol*': potentially-throwing function called from a function declared `__declspec(nothrow)`. Undefined behavior may occur if an exception is thrown. | +| [Compiler warning (level 4, off) C5240](c5240.md) | '*attribute-name*': attribute is ignored in this syntactic position | +| Compiler warning (level 1) C5241 | '`/exportHeader`' usage to lookup header-name is deprecated; prefer '`/headerName:`*name* *value*`=`*filename*' | | Compiler warning (level 1) C5242 | syntax error in pragma '*identifier*' | -| [Compiler warning (level 1, off) C5243](c5243.md) | '*type-name*': using incomplete class 'class-name' can cause potential one definition rule violation due to ABI limitation | -| Compiler warning (level 1) C5244 | '#include \<*filename*>' in the purview of module '*module-name-1*' appears erroneous. Consider moving that directive before the module declaration, or replace the textual inclusion with 'import \<*module-name-2*>;'. | +| [Compiler warning (level 1, off) C5243](c5243.md) | '*type-name*': using incomplete class '*class-name*' can cause potential one definition rule violation due to ABI limitation | +| Compiler warning (level 1) C5244 | '`#include <`*filename*`>`' in the purview of module '*module-name-1*' appears erroneous. Consider moving that directive before the module declaration, or replace the textual inclusion with '`import <`*module-name-2*`>;`'. | | Compiler warning (level 4, off) C5245 | '*function*': unreferenced function with internal linkage has been removed | | Compiler warning (level 1, off) C5246 | '*member*': the initialization of a subobject should be wrapped in braces | | [Compiler warning (level 1, off) C5247](c5247.md) | section '*section-name*' is reserved for C++ dynamic initialization. Manually creating the section will interfere with C++ dynamic initialization and may lead to undefined behavior | -| [Compiler warning (level 1, off) C5248](c5248.md) | section '*section-name*' is reserved for C++ dynamic initialization. Variables manually put into the section may be optimized out and their order relative to compiler generated dynamic initializers is unspecified. | +| [Compiler warning (level 1, off) C5248](c5248.md) | section '*section-name*' is reserved for C++ dynamic initialization. Variables manually put into the section may be optimized out and their order relative to compiler generated dynamic initializers is unspecified | | Compiler warning (level 1, off) C5249 | '*bitfield*' of type '*enumeration_name*' has named enumerators with values that cannot be represented in the given bit field width of '*bitfield_width*'. | -| Compiler warning (level 3, off) C5250 | '*function_name*': intrinsic function not declared. | -| Compiler warning (level 4, off) C5251 | *segment-name* changed after including header | +| Compiler warning (level 3, off) C5250 | '*function_name*': intrinsic function not declared | +| Compiler warning (level 4, off) C5251 | the value of `#pragma` *pragma name* changed after `#include`; `#pragma `*pragma name*`(pop)` missing in this header? | | Compiler warning (level 4) C5252 | Multiple different types resulted in the same XFG type-hash *hash-value*; the PDB will only record information for one of them | | Compiler warning (level 4) C5253 | a non-local lambda cannot have a capture default | -| Compiler warning (level 4, off) C5254 | language feature 'terse static assert' requires compiler flag '/std:c++17' | -| Compiler warning (level 3) C5255 | unterminated bidirectional character encountered: 'U+XXXX' | +| Compiler warning (level 4, off) C5254 | language feature 'terse static assert' requires compiler flag '*/std:c++17*' | +| Compiler warning (level 3) C5255 | unterminated bidirectional character encountered: '`U+`*XXXX*' | | Compiler warning (level 1, off) C5256 | '*enumeration*': a non-defining declaration of an enumeration with a fixed underlying type is only permitted as a standalone declaration | -| Compiler warning (level 1 or 4) C5257 | '*enumeration*': enumeration was previously declared without a fixed underlying type | +| Compiler warning (level 1 and level 4) C5257 | '*enumeration*': enumeration was previously declared without a fixed underlying type | | Compiler warning (level 4, off) C5258 | explicit capture of '*symbol*' is not required for this use | | Compiler warning (level 4, off) C5259 | '*specialized-type*': explicit specialization requires 'template <>' | | Compiler warning (level 1) C5260 | the constant variable '*variable-name*' has internal linkage in an included header file context, but external linkage in imported header unit context; consider declaring it 'inline' as well if it will be shared across translation units, or 'static' to express intent to use it local to this translation unit | | Compiler warning (level 2) C5261 | no integer type can represent all enumerator values in enumeration '*enum-name*' | -| [Compiler warning (level 1, error, off) C5262](c5262.md) | implicit fall-through occurs here; are you missing a break statement? Use `[[fallthrough]]` when a `break` statement is intentionally omitted between cases | +| [Compiler warning (level 1, off) C5262](c5262.md) | implicit fall-through occurs here; are you missing a break statement? Use `[[fallthrough]]` when a `break` statement is intentionally omitted between cases | | Compiler warning (level 4, off) C5263 | calling '`std::move`' on a temporary object prevents copy elision | | Compiler warning (level 4, off) C5264 | '*variable-name*': 'const' variable is not used | | Compiler warning (level 1) C5265 | cannot open search path '*path*' | -| [Compiler warning (level 4, off) C5266](compiler-warning-level-4-c5266.md) | 'const' qualifier on return type has no effect | -| [Compiler warning C5267](c5267.md) | definition of implicit copy constructor/assignment operator for '*type*' is deprecated because it has a user-provided assignment operator/copy constructor | +| [Compiler warning (level 4, off) C5266](compiler-warning-level-4-c5266.md) | '*const*' qualifier on return type has no effect | +| [Compiler warning (level 4, off) C5267](c5267.md) | definition of implicit *copy constructor/assignment operator* for '*type*' is deprecated because it has a user-provided *assignment operator/copy constructor* | | Compiler warning (level 1) C5268 | Failed to allocate memory at fixed address 0x*address*. Use `/Yb` to specify a specific address base if bit-identical .pch files are required. | | Compiler warning (level 1) C5269 | Failed to allocate PCH memory at fixed address 0x*address*. Use `/Ym` to specify a specific address base if bit-identical .pch files are required. | | Compiler warning (level 3) C5270 | '*value*' is not allowed for option '*switch name*'; allowed values are: *value list* | @@ -89,13 +89,29 @@ The articles in this section describe Microsoft C/C++ compiler warning messages | Compiler warning (level 1) C5272 | throwing an object of non-copyable type '*type*' is non-standard. If a copy is needed at runtime it will be made as if by `memcpy`. | | Compiler warning (level 1) C5273 | behavior change: `_Alignas` on anonymous type no longer ignored (promoted members will align) | | Compiler warning (level 1) C5274 | behavior change: `_Alignas` no longer applies to the type '*type*' (only applies to declared data objects) | -| Compiler warning (Error) C5275 | facade assembly '*name*' being imported under '`/clr`'; missing option '`/clr:netcore`'? | -| Compiler warning (level 1, error) C5300 | '#pragma omp atomic': left operand of '*operator*' must match left hand side of assignment-expression | -| [Compiler warning (level 1) C5301](c5301-c5302.md) | '#pragma omp for': '*loop-index*' increases while loop condition uses '*comparison*'; non-terminating loop? | -| [Compiler warning (level 1) C5302](c5301-c5302.md) | '#pragma omp for': '*loop-index*' decreases while loop condition uses '*comparison*'; non-terminating loop? | +| Compiler warning (error) C5275 | assembly '*name*' being imported under '*/clr*' does not contain the required fundamental types | +| Compiler warning (level 1) C5276 | `/experimental:ifcDebugRecords` currently requires `/Z7` to be enabled. Please recompile with `/Z7` enabled.| +| Compiler warning (level 1) C5277 | type trait optimization for '*class name*' is disabled | +| Compiler warning (level 1) C5278 | adding a specialization for '*type*' has undefined behavior | +| Compiler warning (level 1) C5279 | a lambda declarator without a parameter list requires at least '*language version*' | +| Compiler warning (level 1) C5280 | a static operator '*operator name*' requires at least '*language version*'| +| Compiler warning (level 1) C5281 | a static lambda requires at least '*language version*' | +| Compiler warning (level 1) C5282 | '`if consteval`' requires at least '*language version*' | +| Compiler warning (level 1) C5283 | an attribute in this position requires at least '*language version*' | +| Compiler warning (level 4) C5284 | conversion from value '*value*' of type '*type 1*' to '*type 2*' requires a narrowing conversion | +| Compiler warning (level 1) C5285 | cannot declare a specialization for '*template name*': *template argument* | +| Compiler warning (level 1) C5286 | implicit conversion from `enum` type '*type 1*' to `enum` type '*type 2*'; use an explicit cast to silence this warning | +| Compiler warning (level 1) C5287 | operands are different `enum` types '*type 1*' and '*type 2*'; use an explicit cast to silence this warning | +| Compiler warning (error) C5300 | '`#pragma omp atomic` *clause*': expression mismatch for lvalue being updated | +| [Compiler warning (level 1) C5301](c5301-c5302.md) | '`#pragma omp for`': '*loop-index*' increases while loop condition uses '*comparison*'; non-terminating loop? | +| [Compiler warning (level 1) C5302](c5301-c5302.md) | '`#pragma omp for`': '*loop-index*' decreases while loop condition uses '*comparison*'; non-terminating loop? | | Compiler warning (level 1) C5303 | function marked with `[[msvc::intrinsic]]` did not result in a no-op cast | | Compiler warning (level 1) C5304 | a declaration designated by the using-declaration '*name1*' exported from this module has internal linkage and using such a name outside the module is ill-formed; consider declaring '*name2*' '`inline`' to use it outside of this module | | Compiler warning (level 1) C5305 | '*name*': an explicit instantiation declaration that follows an explicit instantiation definition is ignored | +| Compiler warning (level 1) C5306 | parameter array behavior change: overload '*identifier 1*' resolved to '*identifier 2*'; previously, it would have resolved to '*identifier 3*'. Use `/clr:ECMAParamArray` to revert to old behavior | +| Compiler warning (level 3) C5307 | '*function*': argument (*argument number*) converted from '*type 1*' to '*type 2*'. Missing '`L`' encoding-prefix for character literal? | +| Compiler warning (level 1, error) C5308 | Modifying reserved macro name '*macro name*' may cause undefined behavior | +| Compiler warning (level 1, error) C5309 | literal suffix '*name*' requires at least '*language version*'| ## See also diff --git a/docs/error-messages/includes/error-boilerplate.md b/docs/error-messages/includes/error-boilerplate.md index a344d4e6b5..d7eba2d5c8 100644 --- a/docs/error-messages/includes/error-boilerplate.md +++ b/docs/error-messages/includes/error-boilerplate.md @@ -1,11 +1,11 @@ > [!IMPORTANT] -> The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may make many subsequent errors go away. +> The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may resolve multiple subsequent errors. To get help on a particular diagnostic message in Visual Studio, select it in the **Output** window and press the **F1** key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool at the top of the page to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the table of contents on this page. > [!NOTE] -> Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page when you used **F1** and you think the error or warning message needs additional explanation, let us know. You can use the feedback buttons on this page to raise a documentation issue on [GitHub](https://github.com/MicrosoftDocs/cpp-docs/issues). If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the [Developer Community](https://aka.ms/feedback/report?space=62) site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose **Help > Send Feedback > Report a Problem**, or submit a suggestion by using **Help > Send Feedback > Send a Suggestion**. Some compiler error topics were created that are not emitted by the compiler and now redirect to this page instead. +> Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page and think the error or warning message needs additional explanation, let us know by using the feedback buttons on this page. If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the [Developer Community](https://aka.ms/feedback/report?space=62) site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose **Help > Send Feedback > Report a Problem**, or submit a suggestion by using **Help > Send Feedback > Suggest a Feature**. Some compiler error topics were created that are not emitted by the compiler and now redirect to this page instead. -You may find additional assistance for errors and warnings in [Microsoft Learn Q&A](/answers/topics/c%2B%2B.html) forums. Or, search for the error or warning number on the Visual Studio C++ [Developer Community](https://aka.ms/vsfeedback/browsecpp) site. You can also search [Stack Overflow](https://stackoverflow.com/) to find solutions. +You may find additional assistance for errors and warnings in [Microsoft Q&A C++](/answers/tags/314/cpp) forums. Or, search for the error or warning number on the Visual Studio C++ [Developer Community](https://aka.ms/vsfeedback/browsecpp) site. You can also search [Stack Overflow](https://stackoverflow.com/) to find solutions. For links to additional help and community resources, see [Visual C++ Help and Community](../../overview/visual-cpp-help-and-community.md). diff --git a/docs/error-messages/toc.yml b/docs/error-messages/toc.yml index ad851c5bbb..8109e4d313 100644 --- a/docs/error-messages/toc.yml +++ b/docs/error-messages/toc.yml @@ -86,7 +86,7 @@ items: - name: Compiler fatal errors expanded: false items: - - name: Compiler fatal errors C999 through C1999 + - name: Compiler fatal errors C1001 through C1907 href: compiler-errors-1/compiler-fatal-errors-c999-through-c1999.md - name: Fatal error C1001 href: compiler-errors-1/fatal-error-c1001.md @@ -3167,6 +3167,8 @@ items: href: compiler-errors-2/compiler-error-c7553.md - name: Compiler error C7626 href: compiler-warnings/c5208.md + - name: Compiler error C7688 + href: compiler-errors-2/compiler-error-c7688.md - name: Compiler warnings C4000 through C5999 expanded: false items: @@ -3725,7 +3727,7 @@ items: items: - name: Compiler warnings C4400 through C4599 href: compiler-warnings/compiler-warnings-c4400-through-c4599.md - - name: Compiler warning (level 4) C4400 + - name: Compiler warning (level 4, Error) C4400 href: compiler-warnings/compiler-warning-level-4-c4400.md - name: Compiler warning (level 1) C4401 href: compiler-warnings/compiler-warning-level-1-c4401.md @@ -3749,7 +3751,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4410.md - name: Compiler warning (level 1) C4411 href: compiler-warnings/compiler-warning-level-1-c4411.md - - name: Compiler warning (level 2) C4412 + - name: Compiler warning (level 2, off) C4412 href: compiler-warnings/compiler-warning-level-2-c4412.md - name: Compiler warning (level 3) C4414 href: compiler-warnings/compiler-warning-level-3-c4414.md @@ -3757,19 +3759,19 @@ items: href: compiler-warnings/compiler-warning-level-1-c4420.md - name: Compiler warning (level 4) C4429 href: compiler-warnings/compiler-warning-level-4-c4429.md - - name: Compiler warning C4430 + - name: Compiler warning (level 1, Error) C4430 href: compiler-warnings/compiler-warning-c4430.md - name: Compiler warning (level 4) C4431 href: compiler-warnings/compiler-warning-level-4-c4431.md - name: Compiler warning (level 4) C4434 href: compiler-warnings/compiler-warning-level-4-c4434.md - - name: Compiler warning (level 4) C4435 + - name: Compiler warning (level 4, off) C4435 href: compiler-warnings/compiler-warning-level-4-c4435.md - - name: Compiler warning (level 1) C4436 + - name: Compiler warning (level 1 and level 4) C4436 href: compiler-warnings/compiler-warning-level-1-c4436.md - - name: Compiler warning (level 4) C4437 + - name: Compiler warning (level 1 and level 4, off) C4437 href: compiler-warnings/compiler-warning-level-4-c4437.md - - name: Compiler warning C4439 + - name: Compiler warning (level 1, Error) C4439 href: compiler-warnings/compiler-warning-c4439.md - name: Compiler warning (level 1) C4440 href: compiler-warnings/compiler-warning-level-1-c4440.md @@ -3777,13 +3779,13 @@ items: href: compiler-warnings/compiler-warning-level-1-c4441.md - name: Compiler warning (level 1) C4445 href: compiler-warnings/compiler-warning-level-1-c4445.md - - name: Compiler warning (level 4) C4456 + - name: Compiler warning (level 1 and level 4) C4456 href: compiler-warnings/compiler-warning-level-4-c4456.md - - name: Compiler warning (level 4) C4457 + - name: Compiler warning (level 1 and level 4) C4457 href: compiler-warnings/compiler-warning-level-4-c4457.md - - name: Compiler warning (level 4) C4458 + - name: Compiler warning (level 1 and level 4) C4458 href: compiler-warnings/compiler-warning-level-4-c4458.md - - name: Compiler warning (level 4) C4459 + - name: Compiler warning (level 1 and level 4) C4459 href: compiler-warnings/compiler-warning-level-4-c4459.md - name: Compiler warning (level 4) C4460 href: compiler-warnings/compiler-warning-level-4-c4460.md @@ -3793,21 +3795,21 @@ items: href: compiler-warnings/compiler-warning-level-1-c4462.md - name: Compiler warning (level 4) C4463 href: compiler-warnings/compiler-warning-level-4-c4463.md - - name: Compiler warning (level 4) C4464 + - name: Compiler warning (level 4, off) C4464 href: compiler-warnings/compiler-warning-level-4-c4464.md - name: Compiler warning (level 1) C4470 href: compiler-warnings/compiler-warning-level-1-c4470.md - - name: Compiler warning (level 4) C4471 + - name: Compiler warning (level 4, off) C4471 href: compiler-warnings/compiler-warning-level-4-c4471.md - name: Compiler warning (level 1) C4473 href: compiler-warnings/c4473.md - name: Compiler warning (level 1) C4477 href: compiler-warnings/c4477.md - - name: Compiler warning (level 4) C4481 + - name: Compiler warning (level 4, Error) C4481 href: compiler-warnings/compiler-warning-level-4-c4481.md - - name: Compiler warning C4484 + - name: Compiler warning (level 1, Error) C4484 href: compiler-warnings/compiler-warning-c4484.md - - name: Compiler warning C4485 + - name: Compiler warning (level 1, Error) C4485 href: compiler-warnings/compiler-warning-c4485.md - name: Compiler warning (level 1) C4486 href: compiler-warnings/compiler-warning-level-1-c4486.md @@ -3831,13 +3833,13 @@ items: href: compiler-warnings/compiler-warning-level-1-c4508.md - name: Compiler warning (level 4) C4510 href: compiler-warnings/compiler-warning-level-4-c4510.md - - name: Compiler warning (level 3) C4511 + - name: Compiler warning (level 4) C4511 href: compiler-warnings/compiler-warning-level-3-c4511.md - name: Compiler warning (level 4) C4512 href: compiler-warnings/compiler-warning-level-4-c4512.md - name: Compiler warning (level 4) C4513 href: compiler-warnings/compiler-warning-level-4-c4513.md - - name: Compiler warning (level 4) C4514 + - name: Compiler warning (level 4, off) C4514 href: compiler-warnings/compiler-warning-level-4-c4514.md - name: Compiler warning (level 4) C4515 href: compiler-warnings/compiler-warning-level-4-c4515.md @@ -3865,7 +3867,7 @@ items: href: compiler-warnings/compiler-warning-level-3-c4534.md - name: Compiler warning (level 3) C4535 href: compiler-warnings/compiler-warning-level-3-c4535.md - - name: Compiler warning (level 4) C4536 + - name: Compiler warning (level 4, off) C4536 href: compiler-warnings/compiler-warning-level-4-c4536.md - name: Compiler warning (level 1) C4537 href: compiler-warnings/compiler-warning-level-1-c4537.md @@ -3879,15 +3881,15 @@ items: href: compiler-warnings/compiler-warning-level-3-c4543.md - name: Compiler warning (level 1) C4544 href: compiler-warnings/compiler-warning-level-1-c4544.md - - name: Compiler warning (level 1) C4545 + - name: Compiler warning (level 1, off) C4545 href: compiler-warnings/compiler-warning-level-1-c4545.md - - name: Compiler warning (level 1) C4546 + - name: Compiler warning (level 1, off) C4546 href: compiler-warnings/compiler-warning-level-1-c4546.md - - name: Compiler warning (level 1) C4547 + - name: Compiler warning (level 1, off) C4547 href: compiler-warnings/compiler-warning-level-1-c4547.md - - name: Compiler warning (level 1) C4548 + - name: Compiler warning (level 1, off) C4548 href: compiler-warnings/compiler-warning-level-1-c4548.md - - name: Compiler warning (level 1) C4549 + - name: Compiler warning (level 1, off) C4549 href: compiler-warnings/compiler-warning-level-1-c4549.md - name: Compiler warning (level 1) C4550 href: compiler-warnings/compiler-warning-level-1-c4550.md @@ -3899,11 +3901,11 @@ items: href: compiler-warnings/compiler-warning-level-1-c4553.md - name: Compiler warning (level 3) C4554 href: compiler-warnings/compiler-warning-level-3-c4554.md - - name: Compiler warning (level 1) C4555 + - name: Compiler warning (level 1, off) C4555 href: compiler-warnings/compiler-warning-level-1-c4555.md - name: Compiler warning (level 1) C4556 href: compiler-warnings/compiler-warning-level-1-c4556.md - - name: Compiler warning (level 3) C4557 + - name: Compiler warning (level 3, off) C4557 href: compiler-warnings/compiler-warning-level-3-c4557.md - name: Compiler warning (level 1) C4558 href: compiler-warnings/compiler-warning-level-1-c4558.md @@ -3931,7 +3933,7 @@ items: href: compiler-warnings/compiler-warning-level-1-c4581.md - name: Compiler warning (level 1) C4584 href: compiler-warnings/compiler-warning-level-1-c4584.md - - name: Compiler warning (level 4) C4596 + - name: Compiler warning (level 4, Error, off) C4596 href: compiler-warnings/c4596.md - name: Compiler warning (level 4) C4597 href: compiler-warnings/c4597.md @@ -4844,7 +4846,7 @@ items: - name: Math errors expanded: false items: - - name: Math errors (Mxxxx) + - name: Math errors (M6101 through M6205) href: tool-errors/math-errors-m6101-through-m6205.md - name: Math error M6101 href: tool-errors/math-error-m6101.md diff --git a/docs/error-messages/tool-errors/linker-tools-error-lnk2019.md b/docs/error-messages/tool-errors/linker-tools-error-lnk2019.md index 932be366f5..a12ad9a170 100644 --- a/docs/error-messages/tool-errors/linker-tools-error-lnk2019.md +++ b/docs/error-messages/tool-errors/linker-tools-error-lnk2019.md @@ -88,9 +88,9 @@ For example, if you use an AVX2 intrinsic, but don't specify the [`/ARCH:AVX2`]( C++ language conformance work that was done in Visual Studio 2005 made **`wchar_t`** a native type by default. If not all files have been compiled by using the same **`/Zc:wchar_t`** settings, type references might not resolve to compatible types. Make sure **`wchar_t`** types in all library and object files are compatible. Either update from a **`wchar_t`** typedef, or use consistent **/Zc:wchar_t** settings when you compile. -### You get errors for `*printf*` and `*scanf*` functions when you link a legacy static library +### You get errors for *`printf`* and *`scanf`* functions when you link a legacy static library -A static library that was built using a version of Visual Studio before Visual Studio 2015 might cause LNK2019 errors when linked with the UCRT. The UCRT header files ``, ``, and ``now define many `*printf*` and `*scanf*` variations as **`inline`** functions. The inlined functions are implemented by a smaller set of common functions. Individual exports for the inlined functions aren't available in the standard UCRT libraries, which only export the common functions. There are a couple of ways to resolve this issue. The method we recommend is to rebuild the legacy library with your current version of Visual Studio. Make sure the library code uses the standard headers for the definitions of the `*printf*` and `*scanf*` functions that caused the errors. Another option for a legacy library that you can't rebuild is to add `legacy_stdio_definitions.lib` to the list of libraries you link. This library file provides symbols for the `*printf*` and `*scanf*` functions that are inlined in the UCRT headers. For more information, see the **Libraries** section in [Overview of potential upgrade issues](../../porting/overview-of-potential-upgrade-issues-visual-cpp.md#libraries). +A static library that was built using a version of Visual Studio before Visual Studio 2015 might cause LNK2019 errors when linked with the UCRT. The UCRT header files ``, ``, and ``now define many *`printf`* and *`scanf`* variations as **`inline`** functions. The inlined functions are implemented by a smaller set of common functions. Individual exports for the inlined functions aren't available in the standard UCRT libraries, which only export the common functions. There are a couple of ways to resolve this issue. The method we recommend is to rebuild the legacy library with your current version of Visual Studio. Make sure the library code uses the standard headers for the definitions of the *`printf`* and *`scanf`* functions that caused the errors. Another option for a legacy library that you can't rebuild is to add `legacy_stdio_definitions.lib` to the list of libraries you link. This library file provides symbols for the *`printf`* and *`scanf`* functions that are inlined in the UCRT headers. For more information, see the **Libraries** section in [Overview of potential upgrade issues](../../porting/overview-of-potential-upgrade-issues-visual-cpp.md#libraries). ## Third-party library issues and vcpkg diff --git a/docs/error-messages/tool-errors/linker-tools-error-lnk2020.md b/docs/error-messages/tool-errors/linker-tools-error-lnk2020.md index 36de7722e0..e9711b9f71 100644 --- a/docs/error-messages/tool-errors/linker-tools-error-lnk2020.md +++ b/docs/error-messages/tool-errors/linker-tools-error-lnk2020.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Linker Tools Error LNK2020" title: "Linker Tools Error LNK2020" -ms.date: "11/04/2016" +description: "Learn more about: Linker Tools Error LNK2020" +ms.date: 11/04/2016 f1_keywords: ["LNK2020"] helpviewer_keywords: ["LNK2020"] -ms.assetid: 4dd017d0-5e83-471b-ac8a-538ac1ed6870 --- # Linker Tools Error LNK2020 @@ -47,16 +46,16 @@ The following sample generates LNK2020. template ref struct Base { - virtual void f1() {}; + virtual void f1() {} }; template ref struct Base2 { - virtual void f1() {}; + virtual void f1() {} }; int main() { Base^ p; // LNK2020 Base2^ p2 = gcnew Base2(); // OK -}; +} ``` diff --git a/docs/error-messages/tool-errors/linker-tools-error-lnk2033.md b/docs/error-messages/tool-errors/linker-tools-error-lnk2033.md index 74ff15798f..ca0deb3ce2 100644 --- a/docs/error-messages/tool-errors/linker-tools-error-lnk2033.md +++ b/docs/error-messages/tool-errors/linker-tools-error-lnk2033.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Linker Tools Error LNK2033" title: "Linker Tools Error LNK2033" -ms.date: "11/04/2016" +description: "Learn more about: Linker Tools Error LNK2033" +ms.date: 11/04/2016 f1_keywords: ["LNK2033"] helpviewer_keywords: ["LNK2033"] -ms.assetid: d61db467-9328-4788-bf54-e2a20537f13f --- # Linker Tools Error LNK2033 @@ -32,5 +31,5 @@ ref class B {}; int main() { A ^ aa = nullptr; B ^ bb = nullptr; // OK -}; +} ``` diff --git a/docs/error-messages/tool-errors/linker-tools-errors-and-warnings.md b/docs/error-messages/tool-errors/linker-tools-errors-and-warnings.md index 85801f1d35..2e90c8b062 100644 --- a/docs/error-messages/tool-errors/linker-tools-errors-and-warnings.md +++ b/docs/error-messages/tool-errors/linker-tools-errors-and-warnings.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Linker tools errors and warnings (LNKxxxx)" title: "Linker tools errors and warnings" +description: "Learn more about: Linker tools errors and warnings (LNKxxxx)" ms.date: 01/30/2024 -f1_keywords: ["LNK1100", "LNK1101", "LNK1102", "LNK1105", "LNK1108", "LNK1109", "LNK1111", "LNK1114", "LNK1115", "LNK1117", "LNK1118", "LNK1119", "LNK1121", "LNK1129", "LNK1130", "LNK1131", "LNK1132", "LNK1137", "LNK1144", "LNK1145", "LNK1146", "LNK1147", "LNK1148", "LNK1149", "LNK1154", "LNK1155", "LNK1156", "LNK1159", "LNK1160", "LNK1161", "LNK1162", "LNK1163", "LNK1165", "LNK1167", "LNK1171", "LNK1172", "LNK1173", "LNK1174", "LNK1175", "LNK1178", "LNK1180", "LNK1182", "LNK1183", "LNK1184", "LNK1185", "LNK1186", "LNK1187", "LNK1190", "LNK1194", "LNK1195", "LNK1197", "LNK1198", "LNK1199", "LNK1207", "LNK1209", "LNK1210", "LNK1212", "LNK1213", "LNK1214", "LNK1216", "LNK1219", "LNK1220", "LNK1227", "LNK1229", "LNK1230", "LNK1232", "LNK1233", "LNK1234", "LNK1235", "LNK1236", "LNK1242", "LNK1243", "LNK1244", "LNK1246", "LNK1247", "LNK1249", "LNK1250", "LNK1252", "LNK1253", "LNK1255", "LNK1257", "LNK1258", "LNK1260", "LNK1261", "LNK1262", "LNK1263", "LNK1265", "LNK1266", "LNK1267", "LNK1268", "LNK1269", "LNK1270", "LNK1272", "LNK1274", "LNK1276", "LNK1279", "LNK1280", "LNK1281", "LNK1283", "LNK1285", "LNK1286", "LNK1289", "LNK1290", "LNK1291", "LNK1292", "LNK1293", "LNK1294", "LNK1295", "LNK1297", "LNK1298", "LNK1299", "LNK1300", "LNK1303", "LNK1304", "LNK1305", "LNK1307", "LNK1308", "LNK1310", "LNK1311", "LNK1315", "LNK1316", "LNK1317", "LNK1319", "LNK1320", "LNK1321", "LNK1322", "LNK1323", "LNK1324", "LNK1325", "LNK1327", "LNK1328", "LNK1329", "LNK1330", "LNK1331", "LNK1333", "LNK1334", "LNK1335", "LNK1336", "LNK1337", "LNK1338", "LNK1339", "LNK1340", "LNK1341", "LNK1342", "LNK1343", "LNK1344", "LNK1345", "LNK1346", "LNK1347", "LNK1348", "LNK1349", "LNK1350", "LNK1351", "LNK1353", "LNK1354", "LNK1355", "LNK1356", "LNK1360", "LNK1361", "LNK1362", "LNK1363", "LNK1364", "LNK1365", "LNK1366", "LNK1367", "LNK1368", "LNK1369", "LNK1370", "LNK1371", "LNK1372", "LNK1373", "LNK1375", "LNK1376", "LNK1377", "LNK1378", "LNK1379", "LNK1380", "LNK1381", "LNK1382", "LNK1383", "LNK1384", "LNK1385", "LNK2002", "LNK2003", "LNK2009", "LNK2014", "LNK2015", "LNK2016", "LNK2018", "LNK2021", "LNK2024", "LNK2029", "LNK2030", "LNK2032", "LNK2034", "LNK2035", "LNK2036", "LNK2037", "LNK2040", "LNK2041", "LNK2042", "LNK2043", "LNK2044", "LNK2045", "LNK4003", "LNK4012", "LNK4013", "LNK4017", "LNK4018", "LNK4019", "LNK4030", "LNK4031", "LNK4038", "LNK4040", "LNK4041", "LNK4042", "LNK4043", "LNK4046", "LNK4047", "LNK4048", "LNK4051", "LNK4052", "LNK4056", "LNK4060", "LNK4061", "LNK4062", "LNK4066", "LNK4067", "LNK4068", "LNK4069", "LNK4072", "LNK4077", "LNK4079", "LNK4081", "LNK4085", "LNK4087", "LNK4088", "LNK4093", "LNK4094", "LNK4097", "LNK4103", "LNK4108", "LNK4195", "LNK4196", "LNK4198", "LNK4202", "LNK4203", "LNK4207", "LNK4208", "LNK4209", "LNK4223", "LNK4225", "LNK4226", "LNK4228", "LNK4232", "LNK4233", "LNK4236", "LNK4238", "LNK4239", "LNK4240", "LNK4241", "LNK4242", "LNK4243", "LNK4244", "LNK4245", "LNK4246", "LNK4249", "LNK4250", "LNK4251", "LNK4252", "LNK4255", "LNK4256", "LNK4257", "LNK4258", "LNK4259", "LNK4260", "LNK4261", "LNK4262", "LNK4263", "LNK4264", "LNK4265", "LNK4266", "LNK4267", "LNK4268", "LNK4269", "LNK4270", "LNK4271", "LNK4272", "LNK4273", "LNK4274", "LNK4275", "LNK4276", "LNK4277", "LNK4278", "LNK4279", "LNK4280", "LNK4281", "LNK4282", "LNK4283", "LNK4284", "LNK4285", "LNK4287", "LNK4288", "LNK4289", "LNK4290", "LNK4306", -"LNK4307" ] +f1_keywords: ["LNK1100", "LNK1101", "LNK1102", "LNK1105", "LNK1108", "LNK1109", "LNK1111", "LNK1114", "LNK1115", "LNK1117", "LNK1118", "LNK1119", "LNK1121", "LNK1129", "LNK1130", "LNK1131", "LNK1132", "LNK1137", "LNK1144", "LNK1145", "LNK1146", "LNK1147", "LNK1148", "LNK1149", "LNK1154", "LNK1155", "LNK1156", "LNK1159", "LNK1160", "LNK1161", "LNK1162", "LNK1163", "LNK1165", "LNK1167", "LNK1171", "LNK1172", "LNK1173", "LNK1174", "LNK1175", "LNK1178", "LNK1180", "LNK1182", "LNK1183", "LNK1184", "LNK1185", "LNK1186", "LNK1187", "LNK1190", "LNK1194", "LNK1195", "LNK1197", "LNK1198", "LNK1199", "LNK1207", "LNK1209", "LNK1210", "LNK1212", "LNK1213", "LNK1214", "LNK1216", "LNK1219", "LNK1220", "LNK1227", "LNK1229", "LNK1230", "LNK1232", "LNK1233", "LNK1234", "LNK1235", "LNK1236", "LNK1242", "LNK1243", "LNK1244", "LNK1246", "LNK1247", "LNK1249", "LNK1250", "LNK1252", "LNK1253", "LNK1255", "LNK1257", "LNK1258", "LNK1260", "LNK1261", "LNK1262", "LNK1263", "LNK1265", "LNK1266", "LNK1267", "LNK1268", "LNK1269", "LNK1270", "LNK1272", "LNK1274", "LNK1276", "LNK1279", "LNK1280", "LNK1281", "LNK1283", "LNK1285", "LNK1286", "LNK1289", "LNK1290", "LNK1291", "LNK1292", "LNK1293", "LNK1294", "LNK1295", "LNK1297", "LNK1298", "LNK1299", "LNK1300", "LNK1303", "LNK1304", "LNK1305", "LNK1307", "LNK1308", "LNK1310", "LNK1311", "LNK1315", "LNK1316", "LNK1317", "LNK1319", "LNK1320", "LNK1321", "LNK1322", "LNK1323", "LNK1324", "LNK1325", "LNK1327", "LNK1328", "LNK1329", "LNK1330", "LNK1331", "LNK1333", "LNK1334", "LNK1335", "LNK1336", "LNK1337", "LNK1338", "LNK1339", "LNK1340", "LNK1341", "LNK1342", "LNK1343", "LNK1344", "LNK1345", "LNK1346", "LNK1347", "LNK1348", "LNK1349", "LNK1350", "LNK1351", "LNK1353", "LNK1354", "LNK1355", "LNK1356", "LNK1360", "LNK1361", "LNK1362", "LNK1363", "LNK1364", "LNK1365", "LNK1366", "LNK1367", "LNK1368", "LNK1369", "LNK1370", "LNK1371", "LNK1372", "LNK1373", "LNK1375", "LNK1376", "LNK1377", "LNK1378", "LNK1379", "LNK1380", "LNK1381", "LNK1382", "LNK1383", "LNK1384", "LNK1385", "LNK2002", "LNK2003", "LNK2009", "LNK2014", "LNK2015", "LNK2016", "LNK2018", "LNK2021", "LNK2024", "LNK2029", "LNK2030", "LNK2032", "LNK2034", "LNK2035", "LNK2036", "LNK2037", "LNK2040", "LNK2041", "LNK2042", "LNK2043", "LNK2044", "LNK2045", "LNK4003", "LNK4012", "LNK4013", "LNK4017", "LNK4018", "LNK4019", "LNK4030", "LNK4031", "LNK4038", "LNK4040", "LNK4041", "LNK4042", "LNK4043", "LNK4046", "LNK4047", "LNK4048", "LNK4051", "LNK4052", "LNK4056", "LNK4060", "LNK4061", "LNK4062", "LNK4066", "LNK4067", "LNK4068", "LNK4069", "LNK4072", "LNK4077", "LNK4079", "LNK4081", "LNK4085", "LNK4087", "LNK4088", "LNK4093", "LNK4094", "LNK4097", "LNK4103", "LNK4108", "LNK4195", "LNK4196", "LNK4198", "LNK4202", "LNK4203", "LNK4207", "LNK4208", "LNK4209", "LNK4223", "LNK4225", "LNK4226", "LNK4228", "LNK4232", "LNK4233", "LNK4236", "LNK4238", "LNK4239", "LNK4240", "LNK4241", "LNK4242", "LNK4243", "LNK4244", "LNK4245", "LNK4246", "LNK4249", "LNK4250", "LNK4251", "LNK4252", "LNK4255", "LNK4256", "LNK4257", "LNK4258", "LNK4259", "LNK4260", "LNK4261", "LNK4262", "LNK4263", "LNK4264", "LNK4265", "LNK4266", "LNK4267", "LNK4268", "LNK4269", "LNK4270", "LNK4271", "LNK4272", "LNK4273", "LNK4274", "LNK4275", "LNK4276", "LNK4277", "LNK4278", "LNK4279", "LNK4280", "LNK4281", "LNK4282", "LNK4283", "LNK4284", "LNK4285", "LNK4287", "LNK4288", "LNK4289", "LNK4290", "LNK4306", "LNK4307"] helpviewer_keywords: ["errors [C++]", "linker [C++], errors and warnings", "errors [C++], linker"] --- # Linker tools errors and warnings (LNKxxxx) diff --git a/docs/error-messages/tool-errors/math-errors-m6101-through-m6205.md b/docs/error-messages/tool-errors/math-errors-m6101-through-m6205.md index 5c934acfb5..497e291e5f 100644 --- a/docs/error-messages/tool-errors/math-errors-m6101-through-m6205.md +++ b/docs/error-messages/tool-errors/math-errors-m6101-through-m6205.md @@ -1,10 +1,9 @@ --- description: "Learn more about: Math errors (Mxxxx)" -title: "Math errors" +title: "Learn about math errors M6101 through M6205" ms.date: "04/16/2019" -ms.assetid: bdf3dc2a-d993-4f53-b0f2-9604e4914127 --- -# Math errors (Mxxxx) +# Math errors (M6101 through M6205) This section is a reference to the errors generated by the runtime floating-point math library. Math runtime errors and warnings have the form M*xxxx*, where *xxxx* is a four-digit number. diff --git a/docs/error-messages/tool-errors/resource-compiler-errors-rc1000-through-rc4413.md b/docs/error-messages/tool-errors/resource-compiler-errors-rc1000-through-rc4413.md index 86313c3916..bc1f2f17fe 100644 --- a/docs/error-messages/tool-errors/resource-compiler-errors-rc1000-through-rc4413.md +++ b/docs/error-messages/tool-errors/resource-compiler-errors-rc1000-through-rc4413.md @@ -1,8 +1,7 @@ --- -description: "Learn more about: Resource compiler errors and warnings (RCxxxx, RWxxxx)" title: "Resource compiler errors and warnings" +description: "Learn more about: Resource compiler errors and warnings (RCxxxx, RWxxxx)" ms.date: "04/17/2019" -ms.assetid: 0819f955-0561-491d-af3d-2453f4e2d035 --- # Resource compiler errors and warnings (RCxxxx, RWxxxx) @@ -94,5 +93,5 @@ This section is a reference to the errors generated by the resource compiler. Re ## See also -[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md) +[C/C++ Compiler and build tools errors and warnings](../compiler-errors-1/c-cpp-build-errors.md)\ [Resource compiler](/windows/win32/menurc/resource-compiler) diff --git a/docs/extensions/compiler-support-for-type-traits-cpp-component-extensions.md b/docs/extensions/compiler-support-for-type-traits-cpp-component-extensions.md index df9bc0d8cf..c88366385c 100644 --- a/docs/extensions/compiler-support-for-type-traits-cpp-component-extensions.md +++ b/docs/extensions/compiler-support-for-type-traits-cpp-component-extensions.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: Compiler Support for Type Traits (C++/CLI and C++/CX)" title: "Compiler Support for Type Traits (C++/CLI and C++/CX)" +description: "Learn more about: Compiler Support for Type Traits (C++/CLI and C++/CX)" ms.date: "10/12/2018" ms.topic: "reference" f1_keywords: ["__is_simple_value_class", "__has_trivial_destructor", "__has_assign", "__is_union", "__is_class", "__is_abstract", "__has_trivial_assign", "__has_virtual_destructor", "__is_ref_array", "__is_base_of", "__has_copy", "__is_polymorphic", "__has_nothrow_constructor", "__is_ref_class", "__is_delegate", "__is_convertible_to", "__is_value_class", "__is_interface_class", "__has_nothrow_copy", "__is_sealed", "__has_trivial_constructor", "__has_trivial_copy", "__is_enum", "__has_nothrow_assign", "__has_finalizer", "__is_empty", "__is_pod", "__has_user_destructor"] helpviewer_keywords: ["__is_class keyword [C++]", "__is_pod keyword [C++]", "__is_delegate keyword [C++]", "__is_value_class keyword [C++]", "__has_copy keyword [C++]", "__has_nothrow_copy keyword [C++]", "__is_interface_class keyword [C++]", "__is_sealed keyword [C++]", "__is_convertible_to keyword [C++]", "__is_ref_class keyword [C++]", "__has_trivial_copy keyword [C++]", "__has_user_destructor keyword [C++]", "__is_abstract keyword [C++]", "__is_empty keyword [C++]", "__has_trivial_assign keyword [C++]", "__has_nothrow_constructor keyword [C++]", "__is_ref_array keyword [C++]", "__is_base_of keyword [C++]", "__has_nothrow_assign keyword [C++]", "__has_virtual_destructor keyword [C++]", "__has_finalizer keyword [C++]", "__is_union keyword [C++]", "__has_assign keyword [C++]", "__has_trivial_destructor keyword [C++]", "__is_polymorphic keyword [C++]", "__is_enum keyword [C++]", "__is_simple_value_class keyword [C++]", "__has_trivial_constructor keyword [C++]"] -ms.assetid: cd440630-0394-48c0-a16b-1580b6ef5844 --- # Compiler Support for Type Traits (C++/CLI and C++/CX) @@ -160,7 +159,7 @@ The following list contains the type traits that are supported by the compiler. Returns **`true`** if the type has a trivial, compiler-generated destructor. - ``` cpp + ```cpp // has_trivial_destructor.cpp #include struct S {}; diff --git a/docs/extensions/generic-interfaces-visual-cpp.md b/docs/extensions/generic-interfaces-visual-cpp.md index 29f3456ca9..5fa795e2ef 100644 --- a/docs/extensions/generic-interfaces-visual-cpp.md +++ b/docs/extensions/generic-interfaces-visual-cpp.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Generic Interfaces (C++/CLI)" title: "Generic Interfaces (C++/CLI)" -ms.date: "10/12/2018" +description: "Learn more about: Generic Interfaces (C++/CLI)" +ms.date: 10/12/2018 ms.topic: "reference" -helpviewer_keywords: ["generic interfaces", "interfaces, generic [C++}"] -ms.assetid: f3da788a-ba83-4db7-9dcf-9b95a8fb9d1a +helpviewer_keywords: ["generic interfaces", "interfaces, generic [C++]"] --- # Generic Interfaces (C++/CLI) diff --git a/docs/extensions/how-to-declare-interior-pointers-with-the-const-keyword-cpp-cli.md b/docs/extensions/how-to-declare-interior-pointers-with-the-const-keyword-cpp-cli.md index 85f3d4fba8..7a4bb01bf4 100644 --- a/docs/extensions/how-to-declare-interior-pointers-with-the-const-keyword-cpp-cli.md +++ b/docs/extensions/how-to-declare-interior-pointers-with-the-const-keyword-cpp-cli.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: How to: Declare Interior Pointers with the const Keyword (C++/CLI)" title: "How to: Declare Interior Pointers with the const Keyword (C++/CLI)" -ms.date: "10/12/2018" +description: "Learn more about: How to: Declare Interior Pointers with the const Keyword (C++/CLI)" +ms.date: 10/12/2018 ms.topic: "reference" helpviewer_keywords: ["pointers, interior"] -ms.assetid: 64e08b0e-9396-4046-ab51-8f6588f32330 --- # How to: Declare Interior Pointers with the const Keyword (C++/CLI) @@ -69,7 +68,7 @@ int main() { G ^ const h_G2 = gcnew G; // interior pointers to this object cannot be dereferenced and changed h_G2->msg = "test"; interior_ptr int_ptr_G2 = &(h_G->msg); -}; +} ``` ## See also diff --git a/docs/extensions/how-to-overload-functions-with-interior-pointers-and-native-pointers-cpp-cli.md b/docs/extensions/how-to-overload-functions-with-interior-pointers-and-native-pointers-cpp-cli.md index 0065f44486..5caafaeebf 100644 --- a/docs/extensions/how-to-overload-functions-with-interior-pointers-and-native-pointers-cpp-cli.md +++ b/docs/extensions/how-to-overload-functions-with-interior-pointers-and-native-pointers-cpp-cli.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)" title: "How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)" -ms.date: "10/12/2018" +description: "Learn more about: How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI)" +ms.date: 10/12/2018 ms.topic: "reference" helpviewer_keywords: ["Functions with interior and native pointers, overloading"] -ms.assetid: d70df625-4aad-457c-84f5-70a0a290cc1f --- # How to: Overload Functions with Interior Pointers and Native Pointers (C++/CLI) @@ -49,7 +48,7 @@ int main() { G ^pG = gcnew G; // common language runtime heap f( &pS->i ); f( &pG->i ); -}; +} ``` ```Output diff --git a/docs/extensions/overview-of-generics-in-visual-cpp.md b/docs/extensions/overview-of-generics-in-visual-cpp.md index 108be1e564..5e0760fcad 100644 --- a/docs/extensions/overview-of-generics-in-visual-cpp.md +++ b/docs/extensions/overview-of-generics-in-visual-cpp.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Overview of Generics in C++/CLI" title: "Overview of Generics in C++/CLI" +description: "Learn more about: Overview of Generics in C++/CLI" ms.date: "10/12/2018" ms.topic: "reference" helpviewer_keywords: ["generics [C++], about generics", "default initializers [C++]", "type parameters [C++]", "constructed types", "type arguments [C++]", "constructed types, open [C++]", "open constructed types [C++]", "constructed types, closed [C++]"] -ms.assetid: 21f10637-0fce-4916-b925-6c86a126d3aa --- # Overview of Generics in C++/CLI @@ -38,7 +37,7 @@ The *type argument* is the actual type used in place of the type parameter when ### Constructed Type -A type constructed from a generic type is referred to as a *constructed type*. A type not fully specified, such as `List` is an *open constructed type*; a type fully specified, such as `List,` is a *closed constructed type* or *specialized type*. Open constructed types may be used in the definition of other generic types or methods and may not be fully specified until the enclosing generic is itself specified. For example, the following is a use of an open constructed type as a base class for a generic: +A type constructed from a generic type is referred to as a *constructed type*. A type not fully specified, such as `List` is an *open constructed type*; a type fully specified, such as `List`, is a *closed constructed type* or *specialized type*. Open constructed types may be used in the definition of other generic types or methods and may not be fully specified until the enclosing generic is itself specified. For example, the following is a use of an open constructed type as a base class for a generic: ```cpp // generics_overview.cpp diff --git a/docs/extensions/pin-ptr-cpp-cli.md b/docs/extensions/pin-ptr-cpp-cli.md index c5c3f29afd..ea3baddba4 100644 --- a/docs/extensions/pin-ptr-cpp-cli.md +++ b/docs/extensions/pin-ptr-cpp-cli.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: pin_ptr (C++/CLI)" title: "pin_ptr (C++/CLI)" -ms.date: "10/12/2018" +description: "Learn more about: pin_ptr (C++/CLI)" +ms.date: 10/12/2018 ms.topic: "reference" f1_keywords: ["pin_ptr_cpp", "stdcli::language::pin_ptr", "pin_ptr"] helpviewer_keywords: ["pinning pointers", "pin_ptr keyword [C++]"] -ms.assetid: 6c2e6c73-4ec2-4dce-8e1f-ccf3a9f9d0aa --- # pin_ptr (C++/CLI) @@ -164,7 +163,7 @@ int main() { k = l; // ok Console::WriteLine(*k); -}; +} ``` ```Output diff --git a/docs/extensions/string-cpp-component-extensions.md b/docs/extensions/string-cpp-component-extensions.md index 57a1c3d638..6af1f65170 100644 --- a/docs/extensions/string-cpp-component-extensions.md +++ b/docs/extensions/string-cpp-component-extensions.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: String (C++/CLI and C++/CX)" title: "String (C++/CLI and C++/CX)" -ms.date: "10/08/2018" +description: "Learn more about: String (C++/CLI and C++/CX)" +ms.date: 10/08/2018 ms.topic: "reference" helpviewer_keywords: ["string support with /clr", "/clr compiler option [C++], string support"] -ms.assetid: c695f965-9be0-4e20-9661-373bfee6557e --- # String (C++/CLI and C++/CX) @@ -104,7 +103,7 @@ int main() { if (a != b) Console::WriteLine("a and b are not equal"); - // System:String^ and tracking reference + // System::String^ and tracking reference String^% rstr1 = a; Console::WriteLine(rstr1); @@ -211,11 +210,11 @@ The following sample shows that the compiler distinguishes between native string using namespace System; int func() { throw "simple string"; // const char * -}; +} int func2() { throw "string" + "string"; // returns System::String -}; +} template void func3(T t) { @@ -254,6 +253,6 @@ System.String ## See also -[Component Extensions for .NET and UWP](component-extensions-for-runtime-platforms.md)
-[String and Character Literals](../cpp/string-and-character-literals-cpp.md)
+[Component Extensions for .NET and UWP](component-extensions-for-runtime-platforms.md)\ +[String and Character Literals](../cpp/string-and-character-literals-cpp.md)\ [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md) diff --git a/docs/get-started/index.yml b/docs/get-started/index.yml index 64aba23128..d338b6c128 100644 --- a/docs/get-started/index.yml +++ b/docs/get-started/index.yml @@ -11,7 +11,7 @@ metadata: ms.date: 12/06/2021 author: tylermsft ms.author: twhitney - manager: markl + manager: coxford ms.service: visual-cpp dev_langs: - C++ diff --git a/docs/get-started/media/calc-divide-by-zero-fail.png b/docs/get-started/media/calc-divide-by-zero-fail.png new file mode 100644 index 0000000000..aabbef891a Binary files /dev/null and b/docs/get-started/media/calc-divide-by-zero-fail.png differ diff --git a/docs/get-started/media/calc-final-verification.png b/docs/get-started/media/calc-final-verification.png new file mode 100644 index 0000000000..7ed460ef3c Binary files /dev/null and b/docs/get-started/media/calc-final-verification.png differ diff --git a/docs/get-started/media/calc-vs2017-conditional-breakpoint.png b/docs/get-started/media/calc-vs2017-conditional-breakpoint.png new file mode 100644 index 0000000000..a68503955a Binary files /dev/null and b/docs/get-started/media/calc-vs2017-conditional-breakpoint.png differ diff --git a/docs/get-started/media/calc-vs2017-create-calculator-class.png b/docs/get-started/media/calc-vs2017-create-calculator-class.png new file mode 100644 index 0000000000..ff3accfbe2 Binary files /dev/null and b/docs/get-started/media/calc-vs2017-create-calculator-class.png differ diff --git a/docs/get-started/media/calc-vs2017-create-definition.png b/docs/get-started/media/calc-vs2017-create-definition.png new file mode 100644 index 0000000000..8782a1404e Binary files /dev/null and b/docs/get-started/media/calc-vs2017-create-definition.png differ diff --git a/docs/get-started/media/calc-vs2017-debug-breakpoint.png b/docs/get-started/media/calc-vs2017-debug-breakpoint.png new file mode 100644 index 0000000000..5a8c1e203d Binary files /dev/null and b/docs/get-started/media/calc-vs2017-debug-breakpoint.png differ diff --git a/docs/get-started/media/calc-vs2017-debug-inf.png b/docs/get-started/media/calc-vs2017-debug-inf.png new file mode 100644 index 0000000000..eee553c418 Binary files /dev/null and b/docs/get-started/media/calc-vs2017-debug-inf.png differ diff --git a/docs/get-started/media/calc-vs2017-hover-tooltip.png b/docs/get-started/media/calc-vs2017-hover-tooltip.png new file mode 100644 index 0000000000..3fc57e6626 Binary files /dev/null and b/docs/get-started/media/calc-vs2017-hover-tooltip.png differ diff --git a/docs/get-started/media/calc-vs2017-new-project-dialog.png b/docs/get-started/media/calc-vs2017-new-project-dialog.png new file mode 100644 index 0000000000..bb80014a16 Binary files /dev/null and b/docs/get-started/media/calc-vs2017-new-project-dialog.png differ diff --git a/docs/get-started/media/calc-vs2017-set-breakpoint.png b/docs/get-started/media/calc-vs2017-set-breakpoint.png new file mode 100644 index 0000000000..df4c6b693b Binary files /dev/null and b/docs/get-started/media/calc-vs2017-set-breakpoint.png differ diff --git a/docs/get-started/media/calc-vs2019-build-your-project.png b/docs/get-started/media/calc-vs2019-build-your-project.png index 2fc5b19b4e..733930b8a2 100644 Binary files a/docs/get-started/media/calc-vs2019-build-your-project.png and b/docs/get-started/media/calc-vs2019-build-your-project.png differ diff --git a/docs/get-started/media/calc-vs2019-choose-console-app.png b/docs/get-started/media/calc-vs2019-choose-console-app.png deleted file mode 100644 index 57501b418c..0000000000 Binary files a/docs/get-started/media/calc-vs2019-choose-console-app.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-conditional-breakpoint.png b/docs/get-started/media/calc-vs2019-conditional-breakpoint.png deleted file mode 100644 index abb0432a6c..0000000000 Binary files a/docs/get-started/media/calc-vs2019-conditional-breakpoint.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-create-calculator-class.png b/docs/get-started/media/calc-vs2019-create-calculator-class.png deleted file mode 100644 index 99b438d465..0000000000 Binary files a/docs/get-started/media/calc-vs2019-create-calculator-class.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-create-definition.png b/docs/get-started/media/calc-vs2019-create-definition.png deleted file mode 100644 index 8003656743..0000000000 Binary files a/docs/get-started/media/calc-vs2019-create-definition.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-debug-breakpoint.png b/docs/get-started/media/calc-vs2019-debug-breakpoint.png deleted file mode 100644 index 02c49c5b2d..0000000000 Binary files a/docs/get-started/media/calc-vs2019-debug-breakpoint.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-divide-by-zero-fail.png b/docs/get-started/media/calc-vs2019-divide-by-zero-fail.png deleted file mode 100644 index 8316c0dac0..0000000000 Binary files a/docs/get-started/media/calc-vs2019-divide-by-zero-fail.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-final-verification.png b/docs/get-started/media/calc-vs2019-final-verification.png deleted file mode 100644 index 6d6b15b9f7..0000000000 Binary files a/docs/get-started/media/calc-vs2019-final-verification.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2019-five-plus-five.png b/docs/get-started/media/calc-vs2019-five-plus-five.png index 4964180e9e..b6aac8a07e 100644 Binary files a/docs/get-started/media/calc-vs2019-five-plus-five.png and b/docs/get-started/media/calc-vs2019-five-plus-five.png differ diff --git a/docs/get-started/media/calc-vs2019-hover-tooltip.png b/docs/get-started/media/calc-vs2019-hover-tooltip.png index 8545bcf637..9d56d7808b 100644 Binary files a/docs/get-started/media/calc-vs2019-hover-tooltip.png and b/docs/get-started/media/calc-vs2019-hover-tooltip.png differ diff --git a/docs/get-started/media/calc-vs2019-name-your-project.png b/docs/get-started/media/calc-vs2019-name-your-project.png index 2a1cd21703..16bfc349e1 100644 Binary files a/docs/get-started/media/calc-vs2019-name-your-project.png and b/docs/get-started/media/calc-vs2019-name-your-project.png differ diff --git a/docs/get-started/media/calc-vs2019-set-breakpoint.png b/docs/get-started/media/calc-vs2019-set-breakpoint.png deleted file mode 100644 index fc92ecc3f0..0000000000 Binary files a/docs/get-started/media/calc-vs2019-set-breakpoint.png and /dev/null differ diff --git a/docs/get-started/media/calc-vs2022-autos.png b/docs/get-started/media/calc-vs2022-autos.png new file mode 100644 index 0000000000..6dfdf8199e Binary files /dev/null and b/docs/get-started/media/calc-vs2022-autos.png differ diff --git a/docs/get-started/media/calc-vs2022-choose-console-app.png b/docs/get-started/media/calc-vs2022-choose-console-app.png new file mode 100644 index 0000000000..b4c5e574a5 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-choose-console-app.png differ diff --git a/docs/get-started/media/calc-vs2022-conditional-breakpoint.png b/docs/get-started/media/calc-vs2022-conditional-breakpoint.png new file mode 100644 index 0000000000..0d25a762f8 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-conditional-breakpoint.png differ diff --git a/docs/get-started/media/calc-vs2022-create-calculator-class.png b/docs/get-started/media/calc-vs2022-create-calculator-class.png new file mode 100644 index 0000000000..79eeff423a Binary files /dev/null and b/docs/get-started/media/calc-vs2022-create-calculator-class.png differ diff --git a/docs/get-started/media/calc-vs2022-create-definition.png b/docs/get-started/media/calc-vs2022-create-definition.png new file mode 100644 index 0000000000..6b034ba971 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-create-definition.png differ diff --git a/docs/get-started/media/calc-vs2022-debug-breakpoint.png b/docs/get-started/media/calc-vs2022-debug-breakpoint.png new file mode 100644 index 0000000000..3266b4b4e2 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-debug-breakpoint.png differ diff --git a/docs/get-started/media/calc-vs2022-debug-inf.png b/docs/get-started/media/calc-vs2022-debug-inf.png new file mode 100644 index 0000000000..2e16e63a35 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-debug-inf.png differ diff --git a/docs/get-started/media/calc-vs2022-initial-dialog.png b/docs/get-started/media/calc-vs2022-initial-dialog.png index f37534789a..b807d690ba 100644 Binary files a/docs/get-started/media/calc-vs2022-initial-dialog.png and b/docs/get-started/media/calc-vs2022-initial-dialog.png differ diff --git a/docs/get-started/media/calc-vs2022-set-breakpoint.png b/docs/get-started/media/calc-vs2022-set-breakpoint.png new file mode 100644 index 0000000000..b90dd13458 Binary files /dev/null and b/docs/get-started/media/calc-vs2022-set-breakpoint.png differ diff --git a/docs/get-started/media/calculator-app.gif b/docs/get-started/media/calculator-app.gif deleted file mode 100644 index 3f0d8778ea..0000000000 Binary files a/docs/get-started/media/calculator-app.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-conditional-breakpoint.gif b/docs/get-started/media/calculator-conditional-breakpoint.gif deleted file mode 100644 index ec477879fb..0000000000 Binary files a/docs/get-started/media/calculator-conditional-breakpoint.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-create-class.gif b/docs/get-started/media/calculator-create-class.gif deleted file mode 100644 index 028f3a22ac..0000000000 Binary files a/docs/get-started/media/calculator-create-class.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-create-definition.gif b/docs/get-started/media/calculator-create-definition.gif deleted file mode 100644 index 5a3f002d42..0000000000 Binary files a/docs/get-started/media/calculator-create-definition.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-debug-conditional.gif b/docs/get-started/media/calculator-debug-conditional.gif deleted file mode 100644 index 50f1c18dc9..0000000000 Binary files a/docs/get-started/media/calculator-debug-conditional.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-final-verification.gif b/docs/get-started/media/calculator-final-verification.gif deleted file mode 100644 index 49c8588feb..0000000000 Binary files a/docs/get-started/media/calculator-final-verification.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-first-launch.gif b/docs/get-started/media/calculator-first-launch.gif deleted file mode 100644 index 54ffdcd711..0000000000 Binary files a/docs/get-started/media/calculator-first-launch.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-first-launch.png b/docs/get-started/media/calculator-first-launch.png new file mode 100644 index 0000000000..43c8547c94 Binary files /dev/null and b/docs/get-started/media/calculator-first-launch.png differ diff --git a/docs/get-started/media/calculator-five-plus-five.png b/docs/get-started/media/calculator-five-plus-five.png index 4d8f0ffde7..885c023879 100644 Binary files a/docs/get-started/media/calculator-five-plus-five.png and b/docs/get-started/media/calculator-five-plus-five.png differ diff --git a/docs/get-started/media/calculator-hello-world-console.png b/docs/get-started/media/calculator-hello-world-console.png index 40b3e63569..5f804bb016 100644 Binary files a/docs/get-started/media/calculator-hello-world-console.png and b/docs/get-started/media/calculator-hello-world-console.png differ diff --git a/docs/get-started/media/calculator-hover-tooltip.gif b/docs/get-started/media/calculator-hover-tooltip.gif deleted file mode 100644 index 9e430ec801..0000000000 Binary files a/docs/get-started/media/calculator-hover-tooltip.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-initial-build-output.png b/docs/get-started/media/calculator-initial-build-output.png index b3c43caaa1..03890a1065 100644 Binary files a/docs/get-started/media/calculator-initial-build-output.png and b/docs/get-started/media/calculator-initial-build-output.png differ diff --git a/docs/get-started/media/calculator-new-project-dialog.gif b/docs/get-started/media/calculator-new-project-dialog.gif deleted file mode 100644 index 459dee0c1d..0000000000 Binary files a/docs/get-started/media/calculator-new-project-dialog.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-new-project-dialog.png b/docs/get-started/media/calculator-new-project-dialog.png deleted file mode 100644 index fb2686bdc9..0000000000 Binary files a/docs/get-started/media/calculator-new-project-dialog.png and /dev/null differ diff --git a/docs/get-started/media/calculator-set-breakpoint.gif b/docs/get-started/media/calculator-set-breakpoint.gif deleted file mode 100644 index d736a4217d..0000000000 Binary files a/docs/get-started/media/calculator-set-breakpoint.gif and /dev/null differ diff --git a/docs/get-started/media/calculator-undefined-zero.gif b/docs/get-started/media/calculator-undefined-zero.gif deleted file mode 100644 index bb7db5c40f..0000000000 Binary files a/docs/get-started/media/calculator-undefined-zero.gif and /dev/null differ diff --git a/docs/get-started/tutorial-console-cpp.md b/docs/get-started/tutorial-console-cpp.md index d0322a9d41..5a251dca67 100644 --- a/docs/get-started/tutorial-console-cpp.md +++ b/docs/get-started/tutorial-console-cpp.md @@ -2,7 +2,7 @@ title: "Create a console calculator in C++" description: "Create a Hello World console app and a calculator app in Visual C++" ms.custom: "acquisition, mvc" -ms.date: 03/21/2024 +ms.date: 10/08/2024 ms.topic: "tutorial" ms.devlang: "cpp" --- @@ -10,7 +10,7 @@ ms.devlang: "cpp" ::: moniker range=">=msvc-160" -The usual starting point for a C++ programmer is a "Hello, world!" application that runs on the command line. You'll start with that in this article, and then we move on to something more challenging: a calculator app. +The usual starting point for a C++ programmer is a "Hello, world!" application that runs on the command line. You start with that in this article, and then move on to something more challenging: a calculator app. ## Prerequisites @@ -27,9 +27,11 @@ Visual Studio uses *projects* to organize the code for an app, and *solutions* t The dialog has options to clone a repository, open a project or solution, open a local folder, and create a new project." :::image-end::: -1. In the list of project templates, select **Console App**, then select **Next**. +1. In the **Create a new project** dialog, set the language dropdown to **C++**, set the platform dropdown to **Windows**, select **Console App** from the list of project types, then select **Next**. - :::image type="content" source="./media/calc-vs2019-choose-console-app.png" alt-text="Screenshot of the Visual Studio Create a new project dialog. The Console App template option is highlighted."::: + :::image type="complex" source="./media/calc-vs2022-choose-console-app.png" alt-text="Screenshot of the Visual Studio Create a new project dialog."::: + The language dropdown is set to C++, the platform dropdown is set to Windows, and project types like Empty Project, Console App, CMake Project, Windows Desktop Wizard, and so on, appear in the list of project types." + :::image-end::: > [!Important] > Make sure you select the C++ version of the **Console App** template. It has the **C++**, **Windows**, and **Console** tags, and the icon has "++" in the corner. @@ -71,11 +73,11 @@ The template for a new Windows console application creates a simple C++ "Hello W :::image type="content" source="./media/calc-vs2019-build-your-project.png" alt-text="Screenshot of the Visual Studio Output window. It's displaying a message that the build succeeded."::: -1. To run the code, on the menu bar, select **Debug**, **Start without debugging** (Ctrl+F5). +1. To run the code, on the menu bar, select **Debug** > **Start without debugging** (Ctrl+F5). - :::image type="content" source="./media/calc-vs2019-hello-world-console.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the output of the application: Hello World!."::: + :::image type="content" source="./media/calc-vs2019-hello-world-console.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the output of the application: Hello World!"::: - A console window opens and then runs your app. + A console window opens and your app runs within it. When you start a console app in Visual Studio, it runs your code, then prints "Press any key to close this window . . ." to give you a chance to see the output. @@ -120,15 +122,15 @@ Now let's modify the code in this template to be a calculator app. > Understanding the code: > - > - The `#include` statements allow you to reference code located in other files. Sometimes, you may see a filename surrounded by angle brackets (**\<\>**); other times, it's surrounded by quotes (**" "**). In general, angle brackets are used when referencing the C++ Standard Library, while quotes are used for other files. - > - The `using namespace std;` line tells the compiler to expect stuff from the C++ Standard Library to be used in this file. Without this line, each keyword from the library would have to be preceded with `std::` to denote its scope. For instance, without that line, each reference to `cout` would have to be written as `std::cout`. The **`using`** statement is added to make the code look more clean. - > - The `cout` keyword is used to print to standard output in C++. The **\<\<** operator tells the compiler to send whatever is to the right of it to the standard output. - > - The `endl` keyword is like the Enter key; it ends the line and moves the cursor to the next line. It's a better practice to put a `\n` inside the string (contained by `""`) to do the same thing because `endl` always flushes the buffer which can hurt the performance of the program. But since this is a very small app, `endl` is used instead for better readability. + > - The `#include` statement brings in code in other files. Sometimes, you may see a filename surrounded by angle brackets like ``. The angle brackets instruct the compiler to look for the `iostream` header file first in the standard system directories, and if not found, to look in directories specific to the project. Other times, you may see a filename surrounded by quotes like `"someHeader.h"`. The quotes instruct the compiler to skip looking in the standard system directories and instead only look in directories specific to the project. + > - The `using namespace std;` tells the compiler to expect code from the C++ Standard Library to be used in this file. Without this line, each keyword from the library would have to be preceded with `std::` to denote its scope. For instance, without that line, each reference to `cout` would be written as `std::cout`. The **`using`** statement is added to make it more convenient to access code in another namespace. + > - The `cout` keyword is used to print to standard output in C++. The `<<` operator tells the compiler to send whatever is to the right of it to the standard output. + > - The `endl` keyword is like the Enter key; it ends the line and moves the cursor to the next line. It's a better practice to put a `\n` inside the string (contained by `""`) to do the same thing because `endl` always flushes the buffer which can hurt the performance of the program. But since this is a very small app, `endl` is used instead. > - All C++ statements must end with semicolons and all C++ applications must contain a `main()` function. This function is what the program runs at the start. All code must be accessible from `main()` in order to be used. -1. To save the file, press **Ctrl+S**, or select the **Save** icon near the top of the IDE, the floppy disk icon in the toolbar under the menu bar. +1. To save the file, press **Ctrl+S**, or select the floppy disk icon in the toolbar under the menu bar. -1. To run the application, press **Ctrl+F5** or go to the **Debug** menu and select **Start Without Debugging**. You should see a console window appear that displays the text specified in the code. +1. To run the application, press **Ctrl+F5** or go to the **Debug** menu and select **Start Without Debugging**. You should see a console window appear that looks like this. 1. Close the console window when you're done. @@ -140,13 +142,13 @@ A class is like a blueprint for an object that does something. In this case, we 1. Go to the **Project** menu and select **Add Class**. In the **Class Name** edit box, enter *Calculator*. Select **OK**. - :::image type="complex" source="./media/calc-vs2019-create-calculator-class.png" alt-text="Screenshot of the Visual Studio Add Class dialog box."::: - The class name field is set to calculator. The .h file field contains Calculator.h. The .cpp file field contains Calculator.cpp. The base class field is empty. Other options for virtual destructor, inline, and unmanaged are unchecked. + :::image type="complex" source="./media/calc-vs2022-create-calculator-class.png" alt-text="Screenshot of the Visual Studio Add Class dialog box."::: + The class name field contains the text calculator. The .h file field contains Calculator.h. The .cpp file field contains Calculator.cpp. The base class field is empty. The options for inline, and Managed are unchecked. :::image-end::: - Two new files get added to your project. To save all your changed files at once, press **Ctrl+Shift+S**. It's a keyboard shortcut for **File** > **Save All**. There's also a toolbar button for **Save All**, an icon of two floppy disks, found beside the **Save** button. In general, it's good practice to do **Save All** frequently, so you don't miss any files when you save. + Two new files get added to your project. To save all your changed files at once, press **Ctrl+Shift+S**. It's a keyboard shortcut for **File** > **Save All**. There's also a toolbar button for **Save All**, an icon of two floppy disks, found beside the **Save** button. In general, it's good practice to do **Save All** frequently, so you don't miss saving any changes. - The **Add Class** wizard creates `.h` and `.cpp` files that have the same name as the class. You can see a full list of your project files in the **Solution Explorer** window, visible on the side of the IDE. If the window isn't visible, you can open it from the menu bar: select **View** > **Solution Explorer**. + The **Add Class** wizard creates `.h` and `.cpp` files that have the same name as the class. You can see a full list of your project files in the **Solution Explorer** window, visible on the side of the IDE. If the window isn't visible, open it from the menu bar via **View** > **Solution Explorer**. :::image type="complex" source="./media/calc-vs2019-solution-explorer.png" alt-text="Screenshot of the Visual Studio Solution Explorer window."::: The calculator tutorial project has a header files node containing Calculator.h. A Source Files node contains Calculator.cpp and CalculatorTutorial.cpp. Nodes for references, external dependencies, and resource files are visible but closed. @@ -167,18 +169,18 @@ A class is like a blueprint for an object that does something. In this case, we > Understanding the code > - > - This code declares a new function called `Calculate`, which we use to run math operations for addition, subtraction, multiplication, and division. - > - C++ code is organized into *header* (`.h`) files and *source* (`.cpp`) files. Several other file extensions are supported by various compilers, but these are the main ones to know about. Functions and variables are normally *declared*, that is, given a name and a type, in header files, and *implemented*, or given a definition, in source files. To access code defined in another file, you can use `#include "filename.h"`, where `filename.h` is the name of the file that declares the variables or functions you want to use. + > - This code declares a new function called `Calculate`, which handles math operations for addition, subtraction, multiplication, and division. + > - C++ code is organized into *header* (`.h`) files and *source* (`.cpp`) files. Some other file extensions are supported by various compilers, but these are the main ones to know about. Functions and variables are normally *declared*, that is, given a name and a type, in header files, and *implemented*, or given a definition, in source files. To access code defined in another file, you can use `#include "filename.h"`, where `filename.h` is the name of the file that declares the variables or functions you want to use. > - It's good practice to organize your code into different files based on what it does, so it's easy to find the code you need later. In our case, we define the `Calculator` class separately from the file containing the `main()` function, but we plan to reference the `Calculator` class in `main()`. -1. A green squiggle appears under `Calculate` because although the `Calculate` function is *declared*, it isn't *defined*. Hover over `Calculate`, click the down arrow on the screwdriver that appears, and select **Create definition of 'Calculate' in `Calculator.cpp`**. +1. A green squiggle appears under `Calculate` because although the `Calculate` function is *declared*, it isn't *defined*. Hover over `Calculate`, click the down arrow on the screwdriver icon, and select **Create definition of 'Calculate' in `Calculator.cpp`**. - :::image type="content" source="./media/calc-vs2019-create-definition.png" alt-text="Screenshot of a screwdriver dropdown in the Visual Studio editor window. The option 'Create definition of Calculate in Calculator.cpp' is highlighted."::: + :::image type="content" source="./media/calc-vs2022-create-definition.png" alt-text="Screenshot of a screwdriver dropdown in the Visual Studio editor window. The option 'Create definition of Calculate in Calculator.cpp' is highlighted."::: This code is added to *`Calculator.cpp`*: - :::image type="complex" source="./media/calc-vs2022-ctor-definition.png" alt-text="Screenshot of the Visual Studio editor showing the definition of the 'Calculate' ctor function."::: - The definition of the constructor is: double Calculator::Calculate( double x, char oper, double y) { return 0.0; } + :::image type="complex" source="./media/calc-vs2022-ctor-definition.png" alt-text="Screenshot of the Visual Studio editor showing the definition of the 'Calculate' function."::: + The definition of the function is: double Calculator::Calculate( double x, char oper, double y) { return 0.0; } :::image-end::: Currently, it just returns 0.0. Let's change that. @@ -206,12 +208,12 @@ A class is like a blueprint for an object that does something. In this case, we > Understanding the code > - > - The function `Calculate` consumes a number, an operator, and a second number, then performs the requested operation on the numbers. - > - The switch statement checks which operator was provided, and only executes the case corresponding to that operation. The default: case is a fallback in case the user types an operator that isn't accepted, so the program doesn't break. In general, it's best to handle invalid user input in a more elegant way, but this is beyond the scope of this tutorial. - > - The **`double`** keyword denotes a type of number that supports decimals. This way, the calculator can handle both decimal math and integer math. The `Calculate` function is required to always return such a number due to the **`double`** at the very start of the code (this denotes the function's return type), which is why we return 0.0 even in the default case. + > - The function `Calculate` takes a number, an operator, and a second number. Then it performs the requested operation on the two numbers. + > - The `switch` statement checks which operator was provided, and executes the case corresponding to that operation. The `default:` case is a fallback in case the user types an operator that isn't handled by any of the preceding `case` statements. It's best to handle invalid user input in a more elegant way, but this is beyond the scope of this tutorial. + > - The **`double`** keyword denotes a type of number that supports decimals. This type of number is called a floating-point number, and `double` means a floating point number that has extra precision. This way, the calculator can handle both decimal math and integer math. The `Calculate` function is required to always return a double-precision floating point number due to the **`double`** at the start of the code (this denotes the function's return type), which is why we return 0.0 in the default case. > - The `.h` file declares the function *prototype*, which tells the compiler upfront what parameters it requires, and what return type to expect from it. The `.cpp` file has all the implementation details of the function. -If you build and run the code again at this point, it will immediately exit after asking which operation to perform. So, modify the `main` function to do multiple calculations. +If you build and run the code again at this point, it immediately exits after asking which operation to perform. So, modify the `main` function to do multiple calculations. ### Call the `Calculator` class member functions @@ -251,25 +253,25 @@ If you build and run the code again at this point, it will immediately exit afte > Understanding the code > - > - Since C++ programs always start at the `main()` function, we need to call our other code from there, so a `#include` statement is needed. - > - Some initial variables `x`, `y`, `oper`, and `result` are declared to store the first number, second number, operator, and final result, respectively. It's always good practice to give them some initial values to avoid undefined behavior, which is what is done here. - > - The `Calculator c;` line declares an object named 'c' as an instance of the `Calculator` class. The class itself is just a blueprint for how calculators work; the object is the specific calculator that does the math. - > - The `while (true)` statement is a loop. The code inside the loop continues to execute over and over again as long as the condition inside the `()` holds true. Since the condition is simply listed as **`true`**, it's always true, so the loop runs forever. To close the program, the user must manually close the console window. Otherwise, the program always waits for new input. - > - The `cin` keyword is used to accept input from the user. This input stream is smart enough to process a line of text entered in the console window and place it inside each of the variables listed, in order, assuming the user input matches the required specification. You can modify this line to accept different types of input such as more than two numbers--though the `Calculate()` function would also need to be updated to handle this. - > - The `c.Calculate(x, oper, y);` expression calls the `Calculate` function defined earlier, and supplies the entered input values. The function then returns a number that gets stored in `result`. - > - Finally, `result` is printed to the console, so the user sees the result of the calculation. + > - Since C++ programs always start at the `main()` function, we need to call our other code from there, so an `#include` statement is needed to make that code visible to our `main()` function. + > - The variables `x`, `y`, `oper`, and `result` are declared to store the first number, second number, operator, and final result, respectively. It's always good practice to give them some initial values to avoid undefined behavior, which is what is done here. + > - The `Calculator c;` line declares an object named `c` as an instance of the `Calculator` class. The class itself is just a blueprint for how calculators work; the object is the specific calculator that does the math. + > - The `while (true)` statement is a loop. The code inside the loop executes over and over again as long as the condition inside the `()` holds true. Since the condition is simply listed as **`true`**, it's always true, so the loop runs forever. To close the program, the user must manually close the console window. Otherwise, the program always waits for new input. + > - The `cin` keyword accepts input from the user. The input stream is smart enough to process a line of text entered in the console window and place it inside each of the variables listed, in order. + > - The `c.Calculate(x, oper, y);` expression calls the `Calculate` function defined earlier, and supplies the entered input values and the requested operation. The function then returns a number that is stored in `result`. + > - Finally, `result` is printed to the console and the user sees the result of the calculation. ### Build and test the code again Now test the program again to make sure everything works properly. 1. Press **Ctrl+F5** to rebuild and start the app. - 1. Enter `5+5`, and press **Enter**. Verify that the result is 10. :::image type="complex" source="./media/calc-vs2019-five-plus-five.png" alt-text="Screenshot of a command window showing the results of running the program."::: The app output the message: Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The user entered 5+5. The app output: Result of 5+5 is: 10 :::image-end::: +1. Stop the program by closing the console window. ## Debug the app @@ -277,33 +279,33 @@ Since the user is free to type anything into the console window, let's make sure ### Run the app in the debugger -1. In `CalcuatorTutorial.cpp`, set a breakpoint on the line: `result = c.Calculate(x, oper, y);`. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window. A red dot appears. +1. In `CalcuatorTutorial.cpp`, set a breakpoint on the line: `result = c.Calculate(x, oper, y);`. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window so that a red dot appears. - :::image type="content" source="./media/calc-vs2019-set-breakpoint.png" alt-text="Screenshot of the Visual Studio editor. A red dot representing a breakpoint appears on the line: result = c.Calculate(x, oper, y)."::: + :::image type="content" source="./media/calc-vs2022-set-breakpoint.png" alt-text="Screenshot of the Visual Studio editor. A red dot representing a breakpoint appears on the line: result = c.Calculate(x, oper, y)."::: Now when we debug the program, execution pauses at that line. We already have a rough idea that the program works for simple cases. Since we don't want to pause execution every time we call `Calculate()`, let's make the breakpoint conditional. 1. Right-click the red dot that represents the breakpoint, and select **Conditions**. In the edit box for the condition, enter `(y == 0) && (oper == '/')`. Select the **Close** button to save the breakpoint condition. - :::image type="complex" source="./media/calc-vs2019-conditional-breakpoint.png" alt-text="Screenshot of Visual Studio displaying the Breakpoint Settings pop-up." - The condition for the breakpoint is: y==0 && oper == '/' Is true. + :::image type="complex" source="./media/calc-vs2022-conditional-breakpoint.png" alt-text="Screenshot of a set breakpoint"::: + The breakpoint is on the line: result = c dot Calculate ( x, oper, y). 'Conditions...' The Condition option is checked. The Conditions dropdown is set to "Conditional Expression". The condition dropdown is set to "Is true". The condition is set to y == 0 && oper == '/'. :::image-end::: - Now, execution will pause at the breakpoint when the app tries to divide by 0. + Now, execution pauses at the breakpoint when the app tries to divide by 0. -1. To debug the program, press **F5**, or select the **Local Windows Debugger** toolbar button that has the green arrow icon. In your console app, if you enter something like "5 - 0", the program behaves normally and keeps running. However, if you type "10 / 0", it pauses at the breakpoint. You can put any number of spaces between the operator and numbers: `cin` is smart enough to parse the input appropriately. +1. To debug the program, press **F5**, or select the **Local Windows Debugger** debugger toolbar button that has the green arrow icon. In your console app, if you enter something like "5 - 0", the program behaves normally and keeps running. However, if you type "10 / 0", it pauses at the breakpoint. You can put any number of spaces between the operator and numbers: `cin` is smart enough to parse the input appropriately. - :::image type="content" source="./media/calc-vs2019-debug-breakpoint.png" alt-text="Screenshot of Visual Studio editor. Program execution halted at the conditional breakpoint on the line: result = c.Calculate(x, oper, y);."::: + :::image type="content" source="./media/calc-vs2022-debug-breakpoint.png" alt-text="Screenshot of Visual Studio editor. Program execution halted at the conditional breakpoint on the line: result = c.Calculate(x, oper, y);."::: ### Useful windows in the debugger -When you debug your code, you may notice that some new windows appear. These windows can assist your debugging experience. Take a look at the **Autos** window. The **Autos** window shows you the current values of variables used at least three lines before and up to the current line. +When you debug your code, you may notice that some new windows appear. These windows can assist your debugging experience. Take a look at the **Autos** window. The **Autos** window shows you the current values of variables used at least three lines before and up to the current line. If you don't see the **Autos** window, from the main menu select **Debug** > **Windows** > **Autos**. - :::image type="complex" source="./media/calculator-autos.png" alt-text="Screenshot of the Visual Studio debugger Autos window."::: + :::image type="complex" source="./media/calc-vs2022-autos.png" alt-text="Screenshot of the Visual Studio debugger Autos window."::: The value of oper is 47 '/', result is 5, x is 10, and y is 0. :::image-end::: -To see all of the variables from that function, switch to the **Locals** window. You can modify the values of these variables while debugging to see what effect they would have on the program. In this case, we leave them alone. +To see all of the variables from that function, switch to the **Locals** window. Because this is a small function, the Autos and Locals window show the same variables. But you can modify the values of these variables in the Locals window while debugging to see what effect they would have on the program. In this case, we leave them alone. Open the **Locals** window by selecting **Locals** at the bottom of the **Autos** window, or by selecting from the main menu **Debug** > **Windows** > **Locals**. :::image type="complex" source="./media/calc-vs2019-debug-locals.png" alt-text="Screenshot of the Locals window in Visual Studio, displaying the current values of local variables while debugging."::: The value of oper is 47 '/', result is 0, x is 10, and y is 0. @@ -321,10 +323,16 @@ You can also hover over variables in the code to see their current values at the 1. Continue using **F10** to **Step Over** each line until you get back to the `main()` function in the other file, and stop on the `cout` line. - The program is doing what's expected: it takes the first number, and divides it by the second. On the `cout` line, hover over the `result` variable or take a look at `result` in the **Autos** window. Its value `inf`, which doesn't look right, so let's fix it. The `cout` line just outputs whatever value is stored in `result`, so when you step one more line forward using **F10**, the console window displays: + The program is doing what's expected: it takes the first number, and divides it by the second. On the `cout` line, hover over the `result` variable or take a look at `result` in the **Autos** window. Its value is `inf`, which doesn't look right. + + :::image type="complex" source="./media/calc-vs2022-debug-inf.png" alt-text="Screenshot of debugging the calculator."::: + The current statement in the debugger is cout << "Result is: " << result << endl; In the autos window, result is inf. + :::image-end::: + + Let's fix it. The `cout` line outputs whatever value is stored in `result`, so when you step one more line forward using **F10**, the console window displays: - :::image type="complex" source="./media/calc-vs2019-divide-by-zero-fail.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the result of a division by zero operation."::: - The app output: Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The user entered 5-0. The app output: Result is: 5. THe user entered 10/0. The app output: Result is: inf + :::image type="complex" source="./media/calc-divide-by-zero-fail.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the result of a division by zero operation."::: + The app outputs: Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The user entered 5-0. The app output: Result is: 5. The user entered 10/0. The app output: Result is: inf :::image-end::: This result is because division by zero is undefined, so the program doesn't have a numerical answer for the requested operation. @@ -333,7 +341,7 @@ You can also hover over variables in the code to see their current values at the Let's handle division by zero more gracefully so that it's easier for the user to understand the problem. -1. Make the following changes in *`CalculatorTutorial.cpp`*. (You can leave the program running as you edit, thanks to a debugger feature called **Edit and Continue**). Add an `if` statement following `cin >> x >> oper >> y;` to check for division by zero and output a message to the user if it happens. Otherwise, the result is printed. +1. Make the following changes in *`CalculatorTutorial.cpp`*. You can leave the program running as you edit, thanks to a debugger feature called **Edit and Continue**. Add an `if` statement following `cin >> x >> oper >> y;` to check for division by zero and output a message to the user if it happens. Otherwise, the result is printed. ```cpp // CalculatorTutorial.cpp : This file contains the 'main' function. Program execution begins and ends there. @@ -360,7 +368,7 @@ Let's handle division by zero more gracefully so that it's easier for the user t cin >> x >> oper >> y; if (oper == '/' && y == 0) { - cout << "Attempted to divide by zero!" << endl; + cout << "Math error: Attempted to divide by zero!" << endl; continue; } else @@ -374,27 +382,27 @@ Let's handle division by zero more gracefully so that it's easier for the user t } ``` -1. Press **F5** once. Program execution continues all the way until it has to pause to ask for user input. Enter `10 / 0` again. Now, a more helpful message is printed. The user is asked for more input, and the program continues executing normally. +1. Press **F5** once. Program execution continues until it has to pause to ask for user input. Enter `10 / 0` again. Now, a more helpful message is printed. The user is asked for more input, and the program continues executing normally. - :::image type="complex" source="./media/calc-vs2019-final-verification.png" alt-text="Screenshot of a console window showing the final output after implementing changes to handle division by zero."::: + :::image type="complex" source="./media/calc-final-verification.png" alt-text="Screenshot of a console window showing the final output after implementing changes to handle division by zero."::: The console window displays two lines: 10 / 0 Result is: inf, followed by, 10 / 0 Math error: Attempted to divide by zero. :::image-end::: > [!Note] - > When you edit code while in debugging mode, there is a risk of code becoming stale. This happens when the debugger is still running your old code, and has not yet updated it with your changes. The debugger displays a dialog to inform you when this happens. Sometimes, you may need to press **F5** to refresh the code being executed. In particular, if you make a change inside a function while the point of execution is inside that function, you need to step out of the function, then back into it again to get the updated code. If that doesn't work and you see an error message, you can stop debugging by clicking on the red square in the toolbar under the menus at the top of the IDE, then start debugging again by entering **F5** or by choosing the green "play" arrow beside the stop button on the toolbar. + > When you edit code while in debugging mode, there's a risk of code becoming stale. This happens when the debugger is still running your old code, and has not yet updated it with your changes. The debugger displays a dialog to inform you when this happens. Sometimes, you may need to press **F5** to refresh the code being executed. In particular, if you make a change inside a function while the point of execution is inside that function, you need to step out of the function, then back into it again to get the updated code. If that doesn't work and you see an error message, you can stop debugging by clicking on the red square in the toolbar under the menus at the top of the IDE, then start debugging again by entering **F5** or by choosing the green "play" arrow beside the stop button on the toolbar. > > Another reason edit and continue may fail is if you see a message that says "The Require source files to exactly match the original version setting under Debug->Options->General needs to be enabled..." To fix this, from the main menu select **Tools** > **Options** > **Debugging** > **General** and ensure that **Require source files to exactly match the original version** is checked. > Understanding the Run and Debug shortcuts > - > - **F5** (or **Debug** > **Start Debugging**) starts a debugging session if one isn't already active, and runs the program until a breakpoint is hit or the program needs user input. If no user input is needed and no breakpoint is available to hit, the program terminates and the console window closes itself when the program finishes running. If you have something like a "Hello World" program to run, use **Ctrl+F5** or set a breakpoint before you press **F5** to keep the window open. - > - **Ctrl+F5** (or **Debug** > **Start Without Debugging**) runs the application without going into debug mode. This is slightly faster than debugging, and the console window stays open after the program finishes executing. - > - **F10** (known as **Step Over**) lets you iterate through code, line-by-line, and visualize how the code is run and what variable values are at each step of execution. - > - **F11** (known as **Step Into**) works similarly to **Step Over**, except it steps into any functions called on the line of execution. For example, if the line being executed calls a function, pressing **F11** moves the pointer into the body of the function, so you can follow the function's code being run before coming back to the line you started at. Pressing **F10** steps over the function call and just moves to the next line; the function call still happens, but the program doesn't pause to show you what it's doing. + > - **F5**, or **Debug** > **Start Debugging**, starts a debugging session, if one isn't already active, and runs the program until a breakpoint is hit or the program needs user input. If no user input is needed and no breakpoint is available to hit, the program terminates and the console window closes itself when the program finishes running. If your program outputs to the console, use **Ctrl+F5** or set a breakpoint before you press **F5** to keep the window open. + > - **Ctrl+F5**, or **Debug** > **Start Without Debugging**, runs the application without going into debug mode. This is slightly faster than debugging, and the console window stays open after the program finishes executing. + > - **F10**, known as **Step Over**, lets you iterate through code, line-by-line, and visualize how the code is run and what variable values are at each step of execution. + > - **F11**, known as **Step Into**, works similarly to **Step Over**, except it steps into any functions called on the line of execution. For example, if the line being executed calls a function, pressing **F11** moves the pointer into the body of the function, so you can follow the function's code being run before coming back to the line you started at. Pressing **F10** steps over the function call and just moves to the next line; the function call still happens, but the program doesn't pause to show you what it's doing. ### Close the app -- If it's still running, close the console window for the calculator app. +- If it's still running, close the console window to stop the calculator app. [!INCLUDE[includes/git-source-control.md](includes/git-source-control.md)] @@ -410,7 +418,7 @@ Congratulations! You completed the code for the calculator app, built and debugg ::: moniker range=" **New** > **Project**. The **New Project** window opens. -2. On the left sidebar, make sure **Visual C++** is selected. In the center, select **Windows Console Application**. +2. On the left sidebar, ensure that **Visual C++** is selected. In the center, select **Console App**. 3. In the **Name** textbox at the bottom, name the new project *CalculatorTutorial*, then select **OK**. - :::image type="content" source="./media/calculator-new-project-dialog.png" alt-text="Screenshot of the New Project dialog. The Windows Console Application project type is selected. The Name text box set to CalculatorTutorial."::: + :::image type="complex" source="./media/calc-vs2017-new-project-dialog.png" alt-text="Screenshot of the New Project dialog."::: + On the left, Other Languages > Visual C++ is selected. In the center, the Console App project type is selected. The Name text box contains CalculatorTutorial. + :::image-end::: An empty C++ Windows console application 'Hello World' app is created. Console applications use a Windows console window to display output and accept user input. In Visual Studio, an editor window opens and shows the generated code: @@ -461,11 +471,11 @@ The template for a new windows console application creates a simple C++ "Hello W 1. To run the code, on the menu bar, select **Debug**, **Start without debugging** (Ctrl+F5). - :::image type="content" source="./media/calculator-hello-world-console.png" alt-text="Screenshot of the Visual Studio Debug Console showing the output: Hello World!."::: + :::image type="content" source="./media/calculator-hello-world-console.png" alt-text="Screenshot of the Visual Studio Debug Console showing the output: Hello World!"::: - A console window opens and then runs your app. + A console window opens and your app runs within it. - When you start a console app in Visual Studio, it runs your code, then prints "Press any key to close this window . . ." to give you a chance to see the output. + When you start a console app in Visual Studio, it runs your code, then prints `Press any key to close this window . . .` to give you a chance to see the output. Congratulations! You created your first "Hello, world!" console app in Visual Studio! @@ -507,18 +517,18 @@ Now let's turn the code in this template to be a calculator app. > Understanding the code: > - > - The `#include` statements allow you to reference code located in other files. Sometimes, you may see a filename surrounded by angle brackets (**\<\>**); other times, it's surrounded by quotes (**" "**). In general, angle brackets are used when referencing the C++ Standard Library, while quotes are used for other files. - > - The `using namespace std;` line tells the compiler to expect stuff from the C++ Standard Library to be used in this file. Without this line, each keyword from the library would have to be preceded with `std::` to denote its scope. For instance, without that line, each reference to `cout` would have to be written as `std::cout`. The **`using`** statement is added to make the code look more clean. - > - The `cout` keyword is used to print to standard output in C++. The **`<<`* operator tells the compiler to send whatever is to the right of it to the standard output. - > - The `endl` keyword is like the Enter key; it ends the line and moves the cursor to the next line. It's a better practice to put a `\n` inside the string (contained by `""`) to do the same thing because `endl` always flushes the buffer and can hurt the performance of the program. But since this is a very small app, `endl` is used instead for better readability. + > - The `#include` statement brings in code in other files. Sometimes, you may see a filename surrounded by angle brackets like ``. The angle brackets instruct the compiler to look for the `iostream` header file first in the standard system directories, and if not found, to look in directories specific to the project. Other times, you may see a filename surrounded by quotes like `"someHeader.h"`. The quotes instruct the compiler to skip looking in the standard system directories and instead only look in directories specific to the project. + > - The `using namespace std;` tells the compiler to expect code from the C++ Standard Library to be used in this file. Without this line, each keyword from the library would have to be preceded with `std::` to denote its scope. For instance, without that line, each reference to `cout` would be written as `std::cout`. The **`using`** statement is added to make it more convenient to access code in another namespace. + > - The `cout` keyword prints to standard output in C++. The `<<` operator tells the compiler to send whatever is to the right of it to the standard output. + > - The `endl` keyword is like the Enter key; it ends the line and moves the cursor to the next line. It's a better practice to put a `\n` inside the string (contained by `""`) to do the same thing because `endl` always flushes the buffer and can hurt the performance of the program. But since this is a very small app, `endl` is used instead. > - All C++ statements must end with semicolons and all C++ applications must contain a `main()` function. This function is what the program runs at the start. All code must be accessible from `main()` in order to be used. -1. To save the file, press **Ctrl+S**, or select the **Save** icon near the top of the IDE, the floppy disk icon in the toolbar under the menu bar. +1. To save the file, press **Ctrl+S**, or select the floppy disk icon in the toolbar under the menu bar. -1. To run the application, press **Ctrl+F5** or go to the **Debug** menu and select **Start Without Debugging**. If you get a pop-up that says **This project is out of date**, you may select **Do not show this dialog again**, and then select **Yes** to build your application. You should see a console window appear that displays the text specified in the code. +1. To run the application, press **Ctrl+F5** or go to the **Debug** menu and select **Start Without Debugging**. If you get a pop-up that says **This project is out of date**, you may select **Do not show this dialog again**, and then select **Yes** to build your application. You should see a console window appear that looks like this: - :::image type="complex" source="./media/calculator-first-launch.gif" alt-text="Video showing the process of running the calculator app in the IDE."::: - First a dialog box appears that asks whether to build because the project is out of date. The checkbox for 'Do not show this dialog again' is selected. 'Yes' is selected to build the project, the calculator project builds, and then launches in a Windows console window. + :::image type="complex" source="./media/calculator-first-launch.png" alt-text="Screenshot of the calculator app running in a console window."::: + The console app shows the output which is: Calculator Console Application. Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The process exited with code 0 and there's a message that to automatically close the console when debugging stops, enable Tools > Options > Debugging > Automatically close the console when debugging stops. Lastly, there's a message to press any key to close this window. :::image-end::: 1. Close the console window when you're done. @@ -531,13 +541,15 @@ A class is like a blueprint for an object that does something. In this case, we 1. Go to the **Project** menu and select **Add Class**. In the **Class Name** edit box, enter *Calculator*. Select **OK**. - :::image type="content" source="./media/calculator-create-class.gif" alt-text="Video showing the user opening the Add Class dialog box, typing 'Calculator' in the Class Name field, and clicking OK."::: + :::image type="complex" source="./media/calc-vs2017-create-calculator-class.png" alt-text="Screenshot of the Visual Studio Add Class dialog box."::: + The class name field contains the text calculator. The .h file field contains Calculator.h. The .cpp file field contains Calculator.cpp. The base class field is empty. The options for inline, and Managed are unchecked. + :::image-end::: A class is like a blueprint for an object that does something. In this case, we define a calculator and how it should work. Two new files get added to your project. To save all your changed files at once, press **Ctrl+Shift+S**. It's a keyboard shortcut for **File** > **Save All**. There's also a toolbar button for **Save All**, an icon of two floppy disks, found beside the **Save** button. In general, it's good practice to do **Save All** frequently, so you don't miss any files when you save. - The **Add Class** wizard creates `.h` and `.cpp` files that have the same name as the class. You can see a full list of your project files in the **Solution Explorer** window, visible on the side of the IDE. If the window isn't visible, you can open it from the menu bar: select **View** > **Solution Explorer**. + The **Add Class** wizard creates `.h` and `.cpp` files that have the same name as the class. You can see a full list of your project files in the **Solution Explorer** window, visible on the side of the IDE. If the **Solution Explorer** isn't visible, open it from the menu bar: select **View** > **Solution Explorer**. :::image type="complex" source="./media/calculator-solution-explorer.png" alt-text="Screenshot of the Visual Studio Solution Explorer window."::: The calculator tutorial project has a header files node containing Calculator.h, stdafx.h, and targetver.h. A Source Files node contains Calculator.cpp, CalculatorTutorial.cpp, and stdafx.cpp. Nodes for references, external dependencies, and resource files are visible but closed. @@ -558,15 +570,15 @@ A class is like a blueprint for an object that does something. In this case, we > Understanding the code > - > - This code declares a new function called `Calculate`, which we use to run math operations for addition, subtraction, multiplication, and division. - > - C++ code is organized into *header* (`.h`) files and *source* (`.cpp`) files. Several other file extensions are supported by various compilers, but these are the main ones to know about. Functions and variables are normally *declared*, that is, given a name and a type, in header files, and *implemented*, or given a definition, in source files. To access code defined in another file, you can use `#include "filename.h"`, where `filename.h` is the name of the file that declares the variables or functions you want to use. + > - This code declares a new function called `Calculate`, which handles math operations for addition, subtraction, multiplication, and division. + > - C++ code is organized into *header* (`.h`) files and *source* (`.cpp`) files. Some other file extensions are supported by various compilers, but these are the main ones to know about. Functions and variables are normally *declared*, that is, given a name and a type, in header files, and *implemented*, or given a definition, in source files. To access code defined in another file, you can use `#include "filename.h"`, where `filename.h` is the name of the file that declares the variables or functions you want to use. > - It's good practice to organize your code into different files based on what it does, so it's easy to find the code you need later. In our case, we define the `Calculator` class separately from the file containing the `main()` function, but we plan to reference the `Calculator` class in `main()`. -1. A green squiggle appears under `Calculate` because although the `Calculate` function is *declared*, it isn't *defined*. Hover over `Calculate`, click the down arrow on the screwdriver that appears, and select **Create definition of 'Calculate' in `Calculator.cpp`**. A pop-up appears that gives you a peek of the code change that was made in the other file. The code was added to *`Calculator.cpp`*. +1. A green squiggle appears under `Calculate` because although the `Calculate` function is *declared*, it isn't *defined*. Hover over `Calculate`, click the down arrow on the light bulb, and select **Create definition of 'Calculate' in `Calculator.cpp`**. A pop-up appears that gives you a peek of the code change that was made in the other file. The code was added to *`Calculator.cpp`*. - :::image type="content" source="./media/calculator-create-definition.gif" alt-text="Video showing using the light bulb dropdown to select Create definition of Calculate in Calculator.cpp."::: + :::image type="content" source="./media/calc-vs2017-create-definition.png" alt-text="Video showing using the light bulb dropdown to select Create definition of Calculate in Calculator.cpp."::: - Currently, it just returns 0.0. Let's change that. Press **Esc** to close the pop-up. + Currently, it just returns 0.0. Let's change that. Press **Esc** to close the pop-up and choose **Yes** to save the changes. 1. Switch to the *`Calculator.cpp`* file in the editor window. Replace the contents of the file with the following code: @@ -593,16 +605,16 @@ A class is like a blueprint for an object that does something. In this case, we > Understanding the code > - > - The function `Calculate` consumes a number, an operator, and a second number, then performs the requested operation on the numbers. - > - The switch statement checks which operator was provided, and only executes the case corresponding to that operation. The default: case is a fallback in case the user types an operator that isn't accepted, so the program doesn't break. In general, it's best to handle invalid user input in a more elegant way, but this is beyond the scope of this tutorial. - > - The **`double`** keyword denotes a type of number that supports decimals. This way, the calculator can handle both decimal math and integer math. The `Calculate` function is required to always return such a number due to the **`double`** at the very start of the code (this denotes the function's return type), which is why we return 0.0 even in the default case. + > - The function `Calculate` takes a number, an operator, and a second number. Then it performs the requested operation on the two numbers. + > - The `switch` statement checks which operator was provided, and executes the case corresponding to that operation. The `default:` case is a fallback in case the user types an operator that isn't handled by any of the preceding `case` statements. It's best to handle invalid user input in a more elegant way, but this is beyond the scope of this tutorial. + > - The **`double`** keyword denotes a type of number that supports decimals. This type of number is called a floating-point number, and `double` means a floating point number that has extra precision. This way, the calculator can handle both decimal math and integer math. The `Calculate` function is required to always return a double-precision floating point number due to the **`double`** at the start of the code (this denotes the function's return type), which is why we return 0.0 in the default case. > - The `.h` file declares the function *prototype*, which tells the compiler upfront what parameters it requires, and what return type to expect from it. The `.cpp` file has all the implementation details of the function. -If you build and run the code again at this point, it will still exit after asking which operation to perform. Next, modify the `main` function to do some calculations. +If you build and run the code again at this point, it still exits after asking which operation to perform. Next, modify the `main` function to do some calculations. ### Call the Calculator class member functions -1. Now let's update the `main` function in *`CalculatorTutorial.cpp`*: +1. Update the `main` function in *`CalculatorTutorial.cpp`* as follows: ```cpp // CalculatorTutorial.cpp : This file contains the 'main' function. Program execution begins and ends there. @@ -637,23 +649,23 @@ If you build and run the code again at this point, it will still exit after aski > Understanding the code > - > - Since C++ programs always start at the `main()` function, we need to call our other code from there, so a `#include` statement is needed. - > - Some initial variables `x`, `y`, `oper`, and `result` are declared to store the first number, second number, operator, and final result, respectively. It's always good practice to give them some initial values to avoid undefined behavior, which is what is done here. - > - The `Calculator c;` line declares an object named 'c' as an instance of the `Calculator` class. The class itself is just a blueprint for how calculators work; the object is the specific calculator that does the math. - > - The `while (true)` statement is a loop. The code inside the loop continues to execute over and over again as long as the condition inside the `()` holds true. Since the condition is simply listed as **`true`**, it's always true, so the loop runs forever. To close the program, the user must manually close the console window. Otherwise, the program always waits for new input. - > - The `cin` keyword is used to accept input from the user. This input stream is smart enough to process a line of text entered in the console window and place it inside each of the variables listed, in order, assuming the user input matches the required specification. You can modify this line to accept different types of input such as more than two numbers--though the `Calculate()` function would also need to be updated to handle this. - > - The `c.Calculate(x, oper, y);` expression calls the `Calculate` function defined earlier, and supplies the entered input values. The function then returns a number that gets stored in `result`. - > - Finally, `result` is printed to the console, so the user sees the result of the calculation. + > - Since C++ programs always start at the `main()` function, we need to call our other code from there, so an `#include` statement is needed to make that code visible to our `main()` function. + > - The variables `x`, `y`, `oper`, and `result` are declared to store the first number, second number, operator, and final result, respectively. It's always good practice to give them some initial values to avoid undefined behavior, which is what is done here. + > - The `Calculator c;` line declares an object named `c` as an instance of the `Calculator` class. The class itself is just a blueprint for how calculators work; the object is the specific calculator that does the math. + > - The `while (true)` statement is a loop. The code inside the loop execute over and over again as long as the condition inside the `()` holds true. Since the condition is simply listed as **`true`**, it's always true, so the loop runs forever. To close the program, the user must manually close the console window. Otherwise, the program always waits for new input. + > - The `cin` keyword accepts input from the user. The input stream is smart enough to process a line of text entered in the console window and place it inside each of the variables listed, in order. + > - The `c.Calculate(x, oper, y);` expression calls the `Calculate` function defined earlier, and supplies the entered input values and the requested operation. The function then returns a number that is stored in `result`. + > - Finally, `result` is printed to the console and the user sees the result of the calculation. ### Build and test the code again Test the program again to make sure everything works properly. 1. Press **Ctrl+F5** to rebuild and start the app. - 1. Enter `5+5`, and press **Enter**. Verify that the result is 10. :::image type="content" source="./media/calculator-five-plus-five.png" alt-text="Screenshot of a command window running the Calculator app. It shows that the result of 5 + 5 is 10."::: +1. Stop the program by closing the console window. ## Debug the app @@ -661,35 +673,35 @@ Since the user is free to type anything into the console window, let's make sure ### Run the app in the debugger -1. In `CalcuatorTutorial.cpp`, set a breakpoint on the `result = c.Calculate(x, oper, y);` line. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window. A red dot appears. +1. In `CalcuatorTutorial.cpp`, set a breakpoint on the `result = c.Calculate(x, oper, y);` line. To set the breakpoint, click next to the line in the gray vertical bar along the left edge of the editor window so that a red dot appears. - :::image type="content" source="./media/calculator-set-breakpoint.gif" alt-text="Video showing the user setting a breakpoint on line 25: result = c.Calculate(x, oper, y);."::: + :::image type="content" source="./media/calc-vs2017-set-breakpoint.png" alt-text="Screenshot of the user setting a breakpoint on line 23: result = c.Calculate(x, oper, y);."::: - Now when we debug the program, it always pauses execution at that line. We already have a rough idea that the program works for simple cases. Since we don't want to pause execution every time, let's make the breakpoint conditional. + Now when you debug the program, it always pauses execution at that line. We already have a rough idea that the program works for simple cases. Since we don't want to pause execution every time, let's make the breakpoint conditional. 1. Right-click the red dot that represents the breakpoint, and select **Conditions**. In the edit box for the condition, enter `(y == 0) && (oper == '/')`. Select the **Close** button when you're done to save the breakpoint condition. - :::image type="complex" source="./media/calculator-conditional-breakpoint.gif" alt-text="Video demonstrating the process of setting a conditional breakpoint."::: - The breakpoint is on the line: result = c dot Calculate ( x, oper, y). 'Conditions...' is selected in the breakpoint dropdown, which opens the breakpoint settings window. The Condition option is checked, underneath which the dropdowns are set as: 'Conditional Expression' and 'Is true'. The user enters y == 0 && oper == '/' into the condition textbox and then selects close to set the conditional breakpoint. + :::image type="complex" source="./media/calc-vs2017-conditional-breakpoint.png" alt-text="Screenshot showing the conditional breakpoint window."::: + The breakpoint is on the line: result = c dot Calculate ( x, oper, y). 'Conditions...' The Condition option is checked. The Conditions dropdown is set to "Conditional Expression". The condition dropdown is set to "Is true". The condition is set to y == 0 && oper == '/'. :::image-end::: - Now we pause execution at the breakpoint specifically if a division by 0 is attempted. + Execution will pause at the breakpoint if a division by 0 is attempted. 1. To debug the program, press **F5**, or select the **Local Windows Debugger** toolbar button that has the green arrow icon. In your console app, if you enter something like "5 - 0", the program behaves normally and keeps running. However, if you type "10 / 0", it pauses at the breakpoint. You can even put any number of spaces between the operator and numbers; `cin` is smart enough to parse the input appropriately. - :::image type="complex" source="./media/calculator-debug-conditional.gif" alt-text="Video showing the program execution paused at the conditional breakpoint."::: + :::image type="complex" source="./media/calc-vs2017-debug-breakpoint.png" alt-text="Video showing the program execution paused at the conditional breakpoint."::: The user enters 5 - 0. The app outputs: Result is 5. The user then enters 10/0 and because the condition for the conditional breakpoint is met, execution stops on the line: result = c.Calculate(x, oper, y); :::image-end::: ### Useful windows in the debugger -When you debug your code, you may notice that some new windows appear. These windows can assist your debugging experience. Take a look at the **Autos** window. The **Autos** window shows you the current values of variables used at least three lines before and up to the current line. +When you debug your code, you may notice that some new windows appear. These windows can assist your debugging experience. Take a look at the **Autos** window. The **Autos** window shows you the current values of variables used at least three lines before and up to the current line. If you don't see the **Autos** window, from the main menu select **Debug** > **Windows** > **Autos**. :::image type="complex" source="./media/calculator-autos.png" alt-text="Screenshot of the Visual Studio debugger Autos window."::: The value of oper is 47 '/', result is 5, x is 10, and y is 0. :::image-end::: -To see all of the variables from that function, switch to the **Locals** window. You can modify the values of these variables while debugging, to see what effect they would have on the program. In this case, we leave them alone. +To see all of the variables from that function, switch to the **Locals** window. Because this is a small function, the Autos and Locals window show the same variables. But you can modify the values of these variables while debugging, to see what effect they would have on the program. In this case, we leave them alone. Open the **Locals** window by selecting **Locals** at the bottom of the **Autos** window, or by selecting from the main menu **Debug** > **Windows** > **Locals**. :::image type="complex" source="./media/calculator-locals.png" alt-text="Screenshot of the Locals window in Visual Studio, displaying the current values of local variables while debugging."::: The value of oper is 47 '/', result is 0, x is 10, and y is 0. @@ -697,7 +709,7 @@ To see all of the variables from that function, switch to the **Locals** window. You can also hover over variables in the code itself to see their current values where the execution is currently paused. Make sure the editor window is in focus by clicking on it first. - :::image type="content" source="./media/calculator-hover-tooltip.gif" alt-text="Video demonstrating a tooltip that appears while hovering over the variable y. It displays y's current value, which is 0."::: + :::image type="content" source="./media/calc-vs2017-hover-tooltip.png" alt-text="Video demonstrating a tooltip that appears while hovering over the variable y. It displays y's current value, which is 0."::: ### Continue debugging @@ -707,14 +719,16 @@ You can also hover over variables in the code itself to see their current values 1. Continue using **F10** to **Step Over** each line until you get back to the `main()` function in the other file, and stop on the `cout` line. - :::image type="complex" source="./media/calculator-undefined-zero.gif" alt-text="Video showing stepping over each line of code in the Calculate function."::: - Each line of code in the Calculate function is stepped over until control returns to the main function. The user then hovers over the variable named result to see its value, which is: inf." + The program is doing what's expected: it takes the first number, and divides it by the second. On the `cout` line, hover over the `result` variable or take a look at `result` in the **Autos** window. Its value is `inf`, which doesn't look right. + + :::image type="complex" source="./media/calc-vs2017-debug-inf.png" alt-text="Screenshot of debugging the calculator."::: + The current statement in the debugger is cout << "Result is: " << result << endl; In the autos window, result is inf. :::image-end::: - The program is doing what's expected: it takes the first number, and divides it by the second. On the `cout` line, hover over the `result` variable or take a look at `result` in the **Autos** window. Its value is `inf`, which doesn't look right, so let's fix it. The `cout` line just outputs whatever value is stored in `result`, so when you step one more line forward using **F10**, the console window displays: + Let's fix it. The `cout` line outputs whatever value is stored in `result`, so when you step one more line forward using **F10**, the console window displays: - :::image type="complex" source="./media/calculator-divide-by-zero-fail.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the result of a division by zero operation."::: - The app output: Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The user entered 5-0. The app output: Result is: 5. THe user entered 10/0. The app output: Result is: inf + :::image type="complex" source="./media/calc-divide-by-zero-fail.png" alt-text="Screenshot of the Visual Studio Debug Console displaying the result of a division by zero operation."::: + The app outputs: Please enter the operation to perform. Format: a+b | a-b | a*b | a/b. The user entered 5-0. The app output: Result is: 5. The user entered 10/0. The app output: Result is: inf :::image-end::: This result is because division by zero is undefined, so the program doesn't have a numerical answer for the requested operation. @@ -764,25 +778,27 @@ Let's handle division by zero more gracefully so that it's easier for the user t } ``` -1. Press **F5** once. Program execution continues all the way until it has to pause to ask for user input. Enter `10 / 0` again. Now, a more helpful message is printed. The user is asked for more input, and the program continues executing normally. +1. Press **F5** once. Program execution continues until it has to pause to ask for user input. Enter `10 / 0` again. Now, a more helpful message is printed. The user is asked for more input, and the program continues executing normally. - :::image type="content" source="./media/calculator-final-verification.gif" alt-text="Video of the Debug Console showing the final result after code changes. 10 / 0 is entered and the program displays 'Division by 0 exception'."::: + :::image type="content" source="./media/calc-final-verification.png" alt-text="Video of the Debug Console showing the final result after code changes. 10 / 0 is entered and the program displays 'Division by 0 exception'."::: > [!Note] - > When you edit code while in debugging mode, there is a risk of code becoming stale. This happens when the debugger is still running your old code, and has not yet updated it with your changes. The debugger pops up a dialog to inform you when this happens. Sometimes, you may need to press **F5** to refresh the code being executed. In particular, if you make a change inside a function while the point of execution is inside that function, step out of the function, then back into it again to get the updated code. If that doesn't work for some reason and you see an error message, you can stop debugging by clicking on the red square in the toolbar under the menus at the top of the IDE, then start debugging again by entering **F5** or by choosing the green "play" arrow beside the stop button on the toolbar. + > When you edit code while in debugging mode, there's a risk of code becoming stale. This happens when the debugger is still running your old code, and has not yet updated it with your changes. The debugger pops up a dialog to inform you when this happens. Sometimes, you may need to press **F5** to refresh the code being executed. In particular, if you make a change inside a function while the point of execution is inside that function, step out of the function, then back into it again to get the updated code. If that doesn't work for some reason and you see an error message, you can stop debugging by clicking on the red square in the toolbar under the menus at the top of the IDE, then start debugging again by entering **F5** or by choosing the green "play" arrow beside the stop button on the toolbar. > > Another reason edit and continue may fail is that you need to go to the main menu and select **Tools** > **Options** > **Debugging** > **General** and ensure that **Require source files to exactly match the original version** is checked. > Understanding the Run and Debug shortcuts > - > - **F5** (or **Debug** > **Start Debugging**) starts a debugging session if one isn't already active, and runs the program until a breakpoint is hit or the program needs user input. If no user input is needed and no breakpoint is available to hit, the program terminates and the console window closes itself when the program finishes running. If you have something like a "Hello World" program to run, use **Ctrl+F5** or set a breakpoint before you press **F5** to keep the window open. - > - **Ctrl+F5** (or **Debug** > **Start Without Debugging**) runs the application without going into debug mode. This is slightly faster than debugging, and the console window stays open after the program finishes executing. - > - **F10** (known as **Step Over**) lets you iterate through code, line-by-line, and visualize how the code is run and what variable values are at each step of execution. - > - **F11** (known as **Step Into**) works similarly to **Step Over**, except it steps into any functions called on the line of execution. For example, if the line being executed calls a function, pressing **F11** moves the pointer into the body of the function, so you can follow the function's code being run before coming back to the line you started at. Pressing **F10** steps over the function call and just moves to the next line; the function call still happens, but the program doesn't pause to show you what it's doing. + > - **F5**, or **Debug** > **Start Debugging**, starts a debugging session, if one isn't already active, and runs the program until a breakpoint is hit or the program needs user input. If no user input is needed and no breakpoint is available to hit, the program terminates and the console window closes itself when the program finishes running. If your program outputs to the console, use **Ctrl+F5** or set a breakpoint before you press **F5** to keep the window open. + > - **Ctrl+F5**, or **Debug** > **Start Without Debugging**, runs the application without going into debug mode. This is slightly faster than debugging, and the console window stays open after the program finishes executing. + > - **F10**, known as **Step Over**, lets you iterate through code, line-by-line, and visualize how the code is run and what variable values are at each step of execution. + > - **F11**, known as **Step Into**, works similarly to **Step Over**, except it steps into any functions called on the line of execution. For example, if the line being executed calls a function, pressing **F11** moves the pointer into the body of the function, so you can follow the function's code being run before coming back to the line you started at. Pressing **F10** steps over the function call and just moves to the next line; the function call still happens, but the program doesn't pause to show you what it's doing. ### Close the app -- If it's still running, close the console window for the calculator app. +- If it's still running, close the console window to stop the calculator app. + +## The finished app Congratulations! You completed the code for the calculator app, and built and debugged it in Visual Studio. diff --git a/docs/ide/add-interface-definition-library-method-wizard.md b/docs/ide/add-interface-definition-library-method-wizard.md index cfde869e82..6f4430b635 100644 --- a/docs/ide/add-interface-definition-library-method-wizard.md +++ b/docs/ide/add-interface-definition-library-method-wizard.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Use a Microsoft Visual Studio wizard to add a method to an interface definition language (IDL) interface in your project" title: "Add an IDL method" +description: "Learn more about: Use a Microsoft Visual Studio wizard to add a method to an interface definition language (IDL) interface in your project" ms.date: "04/13/2022" f1_keywords: ["vc.codewiz.method.overview", "vc.codewiz.method.idlattrib"] helpviewer_keywords: ["add IDL method wizard [C++]", "IDL methods [C++], adding", "methods [C++], adding using wizards", "IDL attributes, add an IDL method wizard"] @@ -20,7 +20,7 @@ This wizard differs from the [**Add method**](adding-a-method-visual-cpp.md) wiz 1. On the **View** menu, select **Class View**. -1. In the **Class View** pane, expand the project node to display the IDL interface (`.idl`file) to which you want to add the method. +1. In the **Class View** pane, expand the project node to display the IDL interface (`.idl` file) to which you want to add the method. 1. Right-click the name of the interface. diff --git a/docs/ide/include-cleanup-config.md b/docs/ide/include-cleanup-config.md index 6e68059746..5d4e281390 100644 --- a/docs/ide/include-cleanup-config.md +++ b/docs/ide/include-cleanup-config.md @@ -56,12 +56,12 @@ The `.editorconfig` settings that you can use with Include Cleanup are: |--|--|--|--| | `cpp_include_cleanup_add_missing_error_tag_type`

Sets the error level of add transitive include messages. | `none`
`suggestion`
`warning`
`error` | `cpp_include_cleanup_add_missing_error_tag_type = suggestion` | | `cpp_include_cleanup_remove_unused_error_tag_type`

Sets the error level of remove unused include messages. | `none`
`suggestion`
`warning`
`error`
`dimmed` | `cpp_include_cleanup_remove_unused_error_tag_type = dimmed` | -| `cpp_include_cleanup_excluded_files`

Excludes the specified files from Include Cleanup messages. You won’t get a suggestion related to the header at all, whether to add it or that it's unused. | *filename* | `cpp_include_cleanup_excluded_files = vcruntime.h, vcruntime_string.h` | +| `cpp_include_cleanup_excluded_files`

Excludes the specified files from Include Cleanup messages. You won't get a suggestion related to the header at all, whether to add it or that it's unused. | *filename* | `cpp_include_cleanup_excluded_files = vcruntime.h, vcruntime_string.h` | | `cpp_include_cleanup_required_files`

Specify that usage of *file1* requires *file2*. For example, specify that if you use `atlwin.h` that `altbase.h` must also be included. | *file1*:*file2* | `cpp_include_cleanup_required_files = atlwin.h:altbase.h, atlcom.h:altbase.h` | -| `cpp_include_cleanup_replacement_files`

Replaces *file1* with *file2* during Include Cleanup processing. For example, you may prefer using `cstdio` over `stdio.h`. If you have a file with both `#include ` and `#include ` and you consume content only from `stdio.h`, with this setting Include Cleanup will tell you to remove `stdio.h` because it replaced the usage of `cstdio` with `stdio.h` during processing. If you don't use the contents from either, Include Cleanup will tell you to remove both.| *file1*:*file2* | `cpp_include_cleanup_replacement_files = stdio.h:cstdio,stdint.h:cstdint` | +| `cpp_include_cleanup_replacement_files`

Replaces *file1* with *file2* during Include Cleanup processing. For example, you may prefer using `cstdio` over `stdio.h`. If you have a file with both `#include ` and `#include ` and you consume content only from `stdio.h`, with this setting Include Cleanup will tell you to remove `stdio.h` because it replaced the usage of `cstdio` with `stdio.h` during processing. If you don't use the contents from either, Include Cleanup will tell you to remove both.| *file1*:*file2* | `cpp_include_cleanup_replacement_files = stdio.h:cstdio,stdint.h:cstdint` | | `cpp_include_cleanup_alternate_files`

Don't generate a message for indirect include *file2* if *file1* is included. For example, if you `#include ` and are only using something from its indirectly included header `winerror.h`, Include Cleanup won't prompt to add `winerror.h`. Useful when you prefer to include a facade header file instead of the indirect includes it contains. | *file1*:*file2* | `cpp_include_cleanup_alternate_files = windows.h:winerror.h, windows.h:minwindef.h` | ## See also [C/C++ Include Cleanup overview](include-cleanup-overview.md)\ -[Include Cleanup messages](include-cleanup-messages.md) \ No newline at end of file +[Include Cleanup messages](include-cleanup-messages.md) diff --git a/docs/ide/include-cleanup-overview.md b/docs/ide/include-cleanup-overview.md index 8bfcaa921b..423b16a344 100644 --- a/docs/ide/include-cleanup-overview.md +++ b/docs/ide/include-cleanup-overview.md @@ -56,7 +56,7 @@ int main() The issue is that `myProgram.cpp` uses `std::string` and `std::cout`, but doesn't directly include the headers that define them. This code happens to compile because `myHeader.h` includes those headers. This code is brittle because if `myHeader.h` ever stopped including either one, `myProgram.cpp` wouldn't compile anymore. -Per the C++ guidelines, it's better to explicitly include headers for all of your dependencies so that your code isn't subject to brittleness caused by changes to header files. For more information, see [C++ Core Guidelines SF.10](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf10-avoid-dependencies-on-implicitly-included-names). +Per the C++ guidelines, it's better to explicitly include headers for all of your dependencies so that your code isn't subject to brittleness caused by changes to header files. For more information, see [SF.10: Avoid dependencies on implicitly `#include`d names](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf10-avoid-dependencies-on-implicitly-included-names) in the C++ Core Guidelines. Include Cleanup analyzes your code to identify unused and indirectly included headers. It provides feedback based on the settings described in [Config the C++ #include tool in Visual Studio](include-cleanup-config.md). Feedback can be in the form of error list warnings, suggestions, etc. For more details on the feedback provided by Include Cleanup, refer [Include Cleanup messages](include-cleanup-messages.md). diff --git a/docs/ide/lnt-make-member-function-const.md b/docs/ide/lnt-make-member-function-const.md index 9e419bf919..1e3439c952 100644 --- a/docs/ide/lnt-make-member-function-const.md +++ b/docs/ide/lnt-make-member-function-const.md @@ -8,7 +8,7 @@ monikerRange: ">=msvc-170" --- # `lnt-make-member-function-const` -When a member function doesn’t modify the object's state, annotate it with the `const` keyword. This guidance comes from the [C++ Core Guideline Con.2](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con2-by-default-make-member-functions-const). +When a member function doesn't modify the object's state, annotate it with the `const` keyword. This guidance comes from [Con.2: By default, make member functions `const`](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#con2-by-default-make-member-functions-const) in the C++ Core Guidelines. ## Example @@ -19,8 +19,8 @@ class MyClass { public: - int getValue() { return value; } // Flagged: ‘getValue’ doesn't modify the object's state. - void setValue(int newValue) { value = newValue; } // OK: ‘setValue’ modifies the object's state. + int getValue() { return value; } // Flagged: 'getValue' doesn't modify the object's state. + void setValue(int newValue) { value = newValue; } // OK: 'setValue' modifies the object's state. private: @@ -28,7 +28,7 @@ private: }; double getRadius() -{ // Flagged: ‘getRadius’ doesn't modify the object's state. +{ // Flagged: 'getRadius' doesn't modify the object's state. return radius; } ``` @@ -45,7 +45,7 @@ class MyClass public: int getValue() const { return value; } // Added const - void setValue(int newValue) { value = newValue; } // OK: ‘setValue’ modifies the object's state. + void setValue(int newValue) { value = newValue; } // OK: 'setValue' modifies the object's state. private: @@ -54,7 +54,7 @@ private: }; double getRadius() const // added const -{ // ‘getRadius’ doesn't modify the object's state. +{ // 'getRadius' doesn't modify the object's state. return radius; } ``` @@ -75,4 +75,4 @@ The current implementation of this check allows you to add `const` to member fun ## See also -[IntelliSense code linter for C++ overview](cpp-linter-overview.md) \ No newline at end of file +[IntelliSense code linter for C++ overview](cpp-linter-overview.md) diff --git a/docs/ide/lnt-uninitialized-local.md b/docs/ide/lnt-uninitialized-local.md index 4a4f223534..1be51a46df 100644 --- a/docs/ide/lnt-uninitialized-local.md +++ b/docs/ide/lnt-uninitialized-local.md @@ -10,7 +10,7 @@ monikerRange: ">=msvc-160" Local variables should be initialized when they're declared. -This guidance comes from the [C++ Core Guideline ES.20](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object). +This guidance comes from [ES.20: Always initialize an object](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object) in the C++ Core Guidelines. The `lnt-uninitialized-local` check is controlled by the **Uninitialized Local Variable** setting in the C/C++ Code Style options. For information on how to change this setting, see [Configure the linter](cpp-linter-overview.md#configure-the-linter). @@ -55,5 +55,5 @@ Using "Almost Always Auto" for declarations requires initialization at declarati ## See also [IntelliSense code linter for C++ overview](cpp-linter-overview.md)\ -[C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object)\ +[ES.20: Always initialize an object](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es20-always-initialize-an-object)\ [Almost Always Auto - Herb Sutter](https://herbsutter.com/2013/08/12/gotw-94-solution-aaa-style-almost-always-auto/) diff --git a/docs/ide/navigate-code-cpp.md b/docs/ide/navigate-code-cpp.md index 142af682bd..4838fd2057 100644 --- a/docs/ide/navigate-code-cpp.md +++ b/docs/ide/navigate-code-cpp.md @@ -11,7 +11,7 @@ Visual Studio provides a suite of tools that you can use to navigate around your Right-click an `#include` directive, and select **Go To Document**. Or, select **F12** with the cursor over that line to open the file. -![Screenshot of the C plus plus Go To Document menu option in the context of some include statements.](../ide/media/go-to-document.png) +![Screenshot of the C plus plus Go To Document menu option in the context of some include statements.](media/go-to-document.png) ## Toggle Header/Code File @@ -21,7 +21,7 @@ You can switch between a header file and its corresponding source file. Right-cl You can navigate to the definition of a code element with a right-click in the editor and selecting **Go To Definition**, or by selecting **F12**. You can navigate to a declaration similarly by right-clicking to open the context menu, or by selecting **Ctrl+F12**. -![Screenshot of options that appear when you right-click a code element. Includes Go To Definition, Peek Definition, and Go To Declaration.](../ide/media/go-to-def.png) +![Screenshot of options that appear when you right-click a code element. Includes Go To Definition, Peek Definition, and Go To Declaration.](media/go-to-def.png) ## Go To @@ -29,7 +29,7 @@ You can navigate to the definition of a code element with a right-click in the e You can open **Go To** with **Ctrl+,**. This action creates a search box over the document you're editing. -![Screenshot of the search box that appears when you open Go To. There's a text box for your search terms, and filters for types, recent files, etc.](../ide/media/go-to-cpp.png) +![Screenshot of the search box that appears when you open Go To. There's a text box for your search terms, and filters for types, recent files, etc.](media/go-to-cpp.png) **Go To** includes these search filters: @@ -62,11 +62,11 @@ To apply a text filter, start your search query with the filter's corresponding The following example shows results from a *Go To Files* operation by using the "f" filter: -![Screenshot of Go to Files results. The user typed 'f str' and string_utils.cpp and string_utils.h appear because they contain `str` in the name.](../ide/media/vs2017-go-to-results.png "Go To Menu") +![Screenshot of Go to Files results. The user typed 'f str' and string_utils.cpp and string_utils.h appear because they contain `str` in the name.](media/vs2017-go-to-results.png "Go To Menu") To see the list of text filters, type a ? followed by a space. You also can access the **Go To** commands with the **Edit** menu. This is another way to remind yourself of the main **Go To** keyboard shortcuts. -![Screenshot of the Go To menu which has options like Go To Line (Ctrl + G), Go to File (Ctrl + 1, Ctrl + F), and more.](../ide/media/go-to-menu-cpp.png "Go To Menu") +![Screenshot of the Go To menu which has options like Go To Line (Ctrl + G), Go to File (Ctrl + 1, Ctrl + F), and more.](media/go-to-menu-cpp.png "Go To Menu") ## Find or Find in Files @@ -74,15 +74,15 @@ You can run a text search for anything in your solution with **Find** (**Ctrl+F* **Find** can be scoped to a selection, the current document, all open documents, the current project, or the entire solution. You can use regular expressions and plain text. It also highlights all matches automatically in the IDE. -![Screenshot of the Find dialog. The user has searched `channel`. Yellow highlights in the file show all the places `Channel` is found.](../ide/media/find-cpp.png) +![Screenshot of the Find dialog. The user has searched `channel`. Yellow highlights in the file show all the places `Channel` is found.](media/find-cpp.png) **Find in Files** is a more powerful version of **Find** that displays results in the **Find Results** window. You can search external code dependencies, filter by file types, and more. -![Screenshot of the Find and Replace dialog. The Find in Files page is selected. Options are shown for matching case, the whole word, and so on.](../ide/media/find-in-files-cpp.png "Find in Files") +![Screenshot of the Find and Replace dialog. The Find in Files page is selected. Options are shown for matching case, the whole word, and so on.](media/find-in-files-cpp.png "Find in Files") You can organize **Find in Files** results in two windows. You can append results from multiple searches together. Select a result to go to that location in the file. -![Screenshot showing a Find in Files search result listing files containing text that matches the search string and an excerpt of each match.](../ide/media/vs2017-find-in-files-results.png "Find in Files") +![Screenshot showing a Find in Files search result listing files containing text that matches the search string and an excerpt of each match.](media/vs2017-find-in-files-results.png "Find in Files") For more information, see [Find in Files](/visualstudio/ide/find-in-files) in the Visual Studio documentation. @@ -90,7 +90,7 @@ For more information, see [Find in Files](/visualstudio/ide/find-in-files) in th To find all usages of a symbol in your codebase, place the caret in or just after the symbol, right-click, and then select **Find All References**. You can filter, sort, or group results in many different ways. Results populate incrementally. They're classified as Reads or Writes to help you see what's in your solution as opposed to system headers or other libraries. -![Screenshot of Find all references results which shows the line where the symbol was found, which file and project it is located in, and so on.](../ide/media/find-all-references-results-cpp.png) +![Screenshot of Find all references results which shows the line where the symbol was found, which file and project it is located in, and so on.](media/find-all-references-results-cpp.png) You can group results by the following categories: @@ -104,7 +104,7 @@ You can group results by the following categories: To filter results, hover over a column and select the filtering icon that pops up. You can filter results from the first column to hide things like string and comment references that you might not want to see. -![Screenshot of filtering options. Includes Confirmed, Disconfirmed, In comment, and unprocessed. Each shows how many results apply to that category.](../ide/media/find-all-references-filters-cpp.png) +![Screenshot of filtering options. Includes Confirmed, Disconfirmed, In comment, and unprocessed. Each shows how many results apply to that category.](media/find-all-references-filters-cpp.png) - **Confirmed results**: Actual code references to the symbol being searched for. For example, searching for a member function called `Size` returns all references to `Size` that match the scope of the class that defines `Size`. @@ -120,10 +120,10 @@ You can sort results by any column by selecting that column. You can swap betwee You can navigate to the definition of a type in a file, or to type members, by using the **Navigation Bar** that's above the editor window. -![Screenshot of the Navigation Bar above the editor window. It shows cryptlib > ChannelSwitch > ChannelMessageSeriesEnd().](../ide/media/navbar-cpp.png) +![Screenshot of the Navigation Bar above the editor window. It shows cryptlib > ChannelSwitch > ChannelMessageSeriesEnd().](media/navbar-cpp.png) ## See also -- [Read and understand C++ code](read-and-understand-code-cpp.md)\ -- [Edit and refactor C++ code](read-and-understand-code-cpp.md)\ +- [Read and understand C++ code](read-and-understand-code-cpp.md) +- [Edit and refactor C++ code](read-and-understand-code-cpp.md) - [Collaborate with Live Share for C++](live-share-cpp.md) diff --git a/docs/ide/read-and-understand-code-cpp.md b/docs/ide/read-and-understand-code-cpp.md index cdf11a2cd6..e98759ba67 100644 --- a/docs/ide/read-and-understand-code-cpp.md +++ b/docs/ide/read-and-understand-code-cpp.md @@ -1,7 +1,7 @@ --- title: "Read and understand C++ code in Visual Studio" description: "Use the C++ code editor in Visual Studio to format, and understand your code." -ms.date: "05/28/2019" +ms.date: 05/28/2019 --- # Read and understand C++ code in Visual Studio @@ -97,7 +97,7 @@ Place the cursor on or just after any type, keyword or function and press **F1** Right click on a code file in your project and choose **Generate graph of include files** to see a graph of which files are included by other files. -![Screenshot of a graph of include files. The graph shows that NAMSPACE DLL .CPP includes Namespace DLL .h, which includes V_10 .H, among other files.](../ide/media/vs2015_cpp_include_graph.png) +![Screenshot of a graph of include files. The graph shows that NAMESPACE DLL .CPP includes Namespace DLL .h, which includes V_10 .H, among other files.](../ide/media/vs2015_cpp_include_graph.png) ## View Call Hierarchy diff --git a/docs/ide/refactoring/change-signature.md b/docs/ide/refactoring/change-signature.md index df104d5976..e8b15f9005 100644 --- a/docs/ide/refactoring/change-signature.md +++ b/docs/ide/refactoring/change-signature.md @@ -2,6 +2,7 @@ description: "Learn more about: Change Signature" title: "Change Signature" ms.date: "09/18/2022" +f1_keywords: ["vc.pkg.refactoring.changesignaturedlg"] --- # Change Signature diff --git a/docs/ide/refactoring/extract-function.md b/docs/ide/refactoring/extract-function.md index 634dc9f291..91a9fc7d79 100644 --- a/docs/ide/refactoring/extract-function.md +++ b/docs/ide/refactoring/extract-function.md @@ -2,6 +2,7 @@ description: "Learn more about: Extract Function" title: "Extract Function" ms.date: "09/18/2022" +f1_keywords: ["vc.pkg.refactoring.extractfuncdlg"] --- # Extract Function diff --git a/docs/ide/refactoring/rename.md b/docs/ide/refactoring/rename.md index 512ae624ea..69bf660156 100644 --- a/docs/ide/refactoring/rename.md +++ b/docs/ide/refactoring/rename.md @@ -2,6 +2,7 @@ description: "Learn more about: Rename" title: "Rename" ms.date: "09/19/2022" +f1_keywords: ["vc.pkg.refactoring.renamedlg"] --- # Rename diff --git a/docs/index.yml b/docs/index.yml index ef1c16e4cf..94be641a2b 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -1,7 +1,7 @@ ### YamlMime:Hub title: Microsoft C++, C, and Assembler documentation summary: Learn how to use C++, C, and assembly language to develop applications, services, and tools for your platforms and devices. -# brand: aspnet | azure | dotnet | dynamics | m365 | ms-graph | office | power-platform | sql | sql-server | vs | visual-studio | windows | xamarin +# brand: aspnet | azure | dotnet | dynamics | m365 | ms-graph | office | power-platform | sql | sql-server | vs | visual-studio | windows brand: visual-studio metadata: title: Microsoft C/C++ Documentation @@ -172,7 +172,7 @@ additionalContent: - text: Mobile development url: cross-platform/index.yml - text: Game development - url: /windows/uwp/gaming/e2e/ + url: /visualstudio/gamedev/ # Card - title: Features links: diff --git a/docs/intrinsics/addressofreturnaddress.md b/docs/intrinsics/addressofreturnaddress.md index 62708c065e..62ed8bddb9 100644 --- a/docs/intrinsics/addressofreturnaddress.md +++ b/docs/intrinsics/addressofreturnaddress.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: _AddressOfReturnAddress" title: "_AddressOfReturnAddress" +description: "Learn more about: _AddressOfReturnAddress" ms.date: "09/02/2019" f1_keywords: ["_AddressOfReturnAddress_cpp", "_AddressOfReturnAddress"] helpviewer_keywords: ["_AddressOfReturnAddress intrinsic", "AddressOfReturnAddress intrinsic"] -ms.assetid: c7e10b8c-445e-4236-a602-e2d90200f70a --- # _AddressOfReturnAddress @@ -41,7 +40,7 @@ This routine is only available as an intrinsic. #include // This function will print three values: -// (1) The address retrieved from _AddressOfReturnAdress +// (1) The address retrieved from _AddressOfReturnAddress // (2) The return address stored at the location returned in (1) // (3) The return address retrieved the _ReturnAddress* intrinsic // Note that (2) and (3) should be the same address. diff --git a/docs/intrinsics/alphabetical-listing-of-intrinsic-functions.md b/docs/intrinsics/alphabetical-listing-of-intrinsic-functions.md index cf4ffa0393..f0fcca5fb3 100644 --- a/docs/intrinsics/alphabetical-listing-of-intrinsic-functions.md +++ b/docs/intrinsics/alphabetical-listing-of-intrinsic-functions.md @@ -7,7 +7,7 @@ ms.assetid: 178f88a2-7e8e-43ac-b55e-ef3298bef895 --- # Alphabetical listing of intrinsic functions -The following sections describe the Microsoft-specific intrinsic functions available on some or all architectures. Other supported intrinsics are documented by processor manufacturers, either in the header files or on their websites. For more information, and links to manufacturer documentation, see these articles: [ARM intrinsics](../intrinsics/arm-intrinsics.md), [ARM64 intrinsics](../intrinsics/arm64-intrinsics.md), [x86 intrinsics](../intrinsics/x86-intrinsics-list.md), and [x64 intrinsics](../intrinsics/x64-amd64-intrinsics-list.md). C Runtime Library (CRT) functions implemented as intrinsics aren't documented here. CRT intrinsic functions are documented in the [C Runtime Library Reference](../c-runtime-library/c-run-time-library-reference.md). +The following sections describe the Microsoft-specific intrinsic functions available on some or all architectures. Processor manufacturers document other supported intrinsics, either in the header files or on their websites. For more information, and links to manufacturer documentation, see these articles: [ARM intrinsics](../intrinsics/arm-intrinsics.md), [ARM64 intrinsics](../intrinsics/arm64-intrinsics.md), [x86 intrinsics](../intrinsics/x86-intrinsics-list.md), and [x64 intrinsics](../intrinsics/x64-amd64-intrinsics-list.md). C Runtime Library (CRT) functions implemented as intrinsics aren't documented here. CRT intrinsic functions are documented in the [C Runtime Library Reference](../c-runtime-library/c-run-time-library-reference.md). [`__addfsbyte`, `__addfsword`, `__addfsdword`](../intrinsics/addfsbyte-addfsword-addfsdword.md) @@ -29,6 +29,8 @@ The following sections describe the Microsoft-specific intrinsic functions avail [`_bittestandset`, `_bittestandset64`](../intrinsics/bittestandset-bittestandset64.md) +[`__check_isa_support`, `__check_arch_support`](../intrinsics/check-isa-arch-support.md) + [`__cpuid`, `__cpuidex`](../intrinsics/cpuid-cpuidex.md) [`_cvt_ftoi_fast`, `_cvt_ftoll_fast`, `_cvt_ftoui_fast`, `_cvt_ftoull_fast`, `_cvt_dtoi_fast`, `_cvt_dtoll_fast`, `_cvt_dtoui_fast`, `_cvt_dtoull_fast`](../intrinsics/fast-conversion-functions.md) diff --git a/docs/intrinsics/arm-intrinsics.md b/docs/intrinsics/arm-intrinsics.md index 58a6eb6738..f2a248f9a9 100644 --- a/docs/intrinsics/arm-intrinsics.md +++ b/docs/intrinsics/arm-intrinsics.md @@ -4,7 +4,6 @@ description: "Reference list of ARM intrinsics supported by the Microsoft C++ co ms.date: "09/02/2019" f1_keywords: ["arm_neon/vsetq_lane_p8", "armintr/_arm_uxtb", "arm_neon/vld4_lane_p8", "arm_neon/vrshrn_n_s64", "arm_neon/vsli_n_u32", "arm_neon/vsraq_n_u16", "arm_neon/vcgt_f32", "armintr/__iso_volatile_store32", "arm_neon/vceqq_f32", "armintr/_arm_smlal", "arm_neon/vmull_n_s32", "arm_neon/vmax_s8", "arm_neon/vmvn_u32", "arm_neon/vrshl_u32", "arm_neon/int32x2_t", "arm_neon/vdupq_n_p8", "arm_neon/vpmax_u16", "arm_neon/vtrnq_s32", "arm_neon/vset_lane_f32", "arm_neon/vrev64_s8", "arm_neon/vtrnq_p8", "arm_neon/vqshlq_u64", "arm_neon/vld1q_dup_s64", "arm_neon/vmovq_n_u64", "arm_neon/vqshrn_n_u16", "arm_neon/vhadd_s32", "arm_neon/vrhaddq_u32", "arm_neon/vst1q_p8", "arm_neon/vshrn_n_s16", "arm_neon/vget_high_f32", "arm_neon/vuzpq_s16", "arm_neon/vand_u16", "arm_neon/vmulq_s32", "arm_neon/vrsraq_n_s64", "arm_neon/vceqq_s8", "arm_neon/uint64x1x3_t", "arm_neon/veor_u32", "armintr/_arm_pkhtb", "arm_neon/vorrq_u16", "arm_neon/vpaddl_s8", "arm_neon/vmla_n_s16", "arm_neon/vqdmlal_lane_s32", "arm_neon/vshlq_n_u8", "arm_neon/vst2_lane_p8", "arm_neon/vld3q_u16", "arm_neon/vandq_u8", "arm_neon/vst1_u64", "arm_neon/vaddq_s64", "arm_neon/vuzpq_u32", "arm_neon/vld3_lane_p8", "arm_neon/vminq_s32", "arm_neon/vabd_u16", "arm_neon/vdup_n_u32", "arm_neon/vmul_p8", "arm_neon/vsra_n_u16", "arm_neon/vst3q_u16", "arm_neon/int32x2x3_t", "arm_neon/vld2_dup_u16", "arm_neon/vrhaddq_u8", "arm_neon/vhadd_u8", "arm_neon/vgetq_lane_s32", "arm_neon/vcleq_u16", "arm_neon/vabdq_s8", "arm_neon/vrev16q_u8", "arm_neon/vqshlu_n_s64", "arm_neon/vcvt_n_s32_f32", "arm_neon/vqrshrn_n_s64", "arm_neon/vst1q_p16", "arm_neon/vgetq_lane_s16", "arm_neon/vtstq_u32", "arm_neon/vmlsl_n_s16", "arm_neon/vcge_s8", "arm_neon/vshr_n_s16", "armintr/_arm_rbit", "arm_neon/vmls_u32", "arm_neon/vmls_lane_u32", "arm_neon/vcvtq_n_s32_f32", "arm_neon/vqshl_n_s8", "arm_neon/vst1q_s16", "armintr/__emit", "arm_neon/vshlq_s64", "arm_neon/vuzp_s8", "arm_neon/vld1q_lane_s64", "arm_neon/veorq_s32", "arm_neon/vaddq_u64", "arm_neon/vceq_s32", "arm_neon/vmovn_u16", "arm_neon/vabal_s8", "arm_neon/vabsq_f32", "armintr/_arm_smuad", "arm_neon/veor_u8", "arm_neon/int16x4_t", "arm_neon/vsraq_n_s16", "arm_neon/vshlq_s8", "arm_neon/vcreate_u32", "arm_neon/vzipq_s8", "arm_neon/vst3q_u8", "arm_neon/int64x1x4_t", "armintr/__iso_volatile_store16", "arm_neon/vst4_lane_p16", "arm_neon/vld1_dup_p16", "arm_neon/vhadd_s16", "arm_neon/vtbl2_s8", "arm_neon/veorq_u32", "arm_neon/vqdmlal_lane_s16", "arm_neon/vrsra_n_u8", "arm_neon/vbslq_u16", "arm_neon/vget_low_s64", "arm_neon/vceq_u16", "arm_neon/vdupq_lane_u32", "arm_neon/vabdl_u32", "arm_neon/vmlal_s32", "arm_neon/vst1_lane_u8", "arm_neon/vld4q_f16", "arm_neon/vqdmlsl_s32", "arm_neon/vqrdmulh_s32", "arm_neon/vqrshl_u8", "arm_neon/uint32x4x4_t", "arm_neon/vabaq_u16", "arm_neon/vcnt_p8", "arm_neon/vld3q_s16", "arm_neon/vshl_n_u32", "arm_neon/vrev64q_u16", "arm_neon/vextq_s64", "arm_neon/vhsubq_s8", "arm_neon/vld2_dup_u8", "arm_neon/vst3_s16", "arm_neon/vorn_u16", "arm_neon/vst4_f16", "arm_neon/vpadalq_u8", "armintr/__iso_volatile_load8", "arm_neon/vmovl_u16", "arm_neon/vld4q_u32", "arm_neon/vcgt_u32", "arm_neon/vmlaq_n_u32", "arm_neon/vrsra_n_u64", "arm_neon/vst4_s8", "arm_neon/vcvtq_n_f32_u32", "arm_neon/vst2q_u16", "arm_neon/vqshrn_n_s16", "arm_neon/vld4_s16", "arm_neon/uint16x8x4_t", "arm_neon/vrsqrte_u32", "arm_neon/vcltq_s8", "arm_neon/vst3_u16", "arm_neon/vst2_f32", "arm_neon/vld2_u64", "arm_neon/vst1_u16", "arm_neon/vmls_s16", "arm_neon/vqrshlq_s32", "arm_neon/vqdmull_s16", "arm_neon/vld2_lane_p16", "arm_neon/vpaddlq_u8", "arm_neon/vcvt_n_f32_u32", "arm_neon/vcgtq_u8", "arm_neon/vshl_s32", "arm_neon/vtbx3_p8", "arm_neon/vld3_dup_s32", "arm_neon/int16x4x3_t", "arm_neon/vcale_f32", "arm_neon/vqabsq_s32", "arm_neon/vmulq_u16", "arm_neon/vst1_s8", "arm_neon/vclt_u8", "armintr/_arm_sxtb16", "arm_neon/vshr_n_s8", "arm_neon/vst1_lane_f16", "arm_neon/vorn_s64", "armintr/_arm_usub8", "arm_neon/vst4_lane_f32", "arm_neon/vmls_lane_u16", "arm_neon/vpaddl_u32", "arm_neon/vdup_lane_u64", "arm_neon/vsri_n_p16", "arm_neon/vqrshlq_u64", "arm_neon/vclz_s16", "arm_neon/vsra_n_u32", "arm_neon/vabaq_s8", "arm_neon/vst2_lane_s8", "arm_neon/vcvt_n_u32_f32", "arm_neon/vst3_u32", "arm_neon/vcvtq_f32_u32", "arm_neon/vraddhn_s64", "armintr/_arm_uqsax", "arm_neon/vshl_u8", "armintr/_arm_uqadd16", "arm_neon/vrsra_n_u16", "arm_neon/vrshl_u64", "arm_neon/int32x4x3_t", "arm_neon/vmull_u8", "arm_neon/vcombine_u64", "arm_neon/vmull_u16", "arm_neon/vld1_dup_s8", "armintr/_CountLeadingSigns64", "arm_neon/vqshlq_n_s32", "arm_neon/vrecpe_f32", "arm_neon/vsri_n_u32", "arm_neon/vrsraq_n_s8", "arm_neon/vsetq_lane_s16", "arm_neon/vget_high_u32", "arm_neon/vmlal_u32", "arm_neon/vdupq_lane_s16", "arm_neon/vsubq_u64", "arm_neon/vext_p8", "arm_neon/vshl_u16", "arm_neon/vmls_n_u16", "arm_neon/vmull_s16", "arm_neon/vmovq_n_s64", "arm_neon/vaddq_f32", "arm_neon/vshl_n_s16", "arm_neon/vext_p16", "arm_neon/vextq_u32", "arm_neon/vld1_p8", "arm_neon/veor_s32", "arm_neon/int16x8x4_t", "arm_neon/vst1q_u16", "arm_neon/vzipq_p8", "arm_neon/int32x4x4_t", "arm_neon/vqdmulhq_lane_s32", "arm_neon/vst3_lane_u32", "arm_neon/vhsubq_s32", "armintr/__static_assert", "arm_neon/vst3q_lane_u16", "arm_neon/vpmin_u32", "arm_neon/vrev64q_p16", "arm_neon/vcleq_f32", "arm_neon/vhsub_u16", "arm_neon/vld2_lane_s32", "arm_neon/vmlsl_s32", "armintr/_arm_rev", "arm_neon/vcgeq_s16", "arm_neon/vmulq_s8", "arm_neon/vsri_n_s8", "arm_neon/vpadd_f32", "arm_neon/vld1q_lane_f16", "arm_neon/vmls_u16", "arm_neon/vld1_lane_f32", "arm_neon/vmlaq_lane_s16", "arm_neon/vqadd_u32", "arm_neon/vmul_n_s32", "arm_neon/vld1q_dup_p8", "arm_neon/vtrnq_s8", "arm_neon/vbslq_p8", "arm_neon/vget_lane_s8", "arm_neon/vext_u16", "arm_neon/vsubq_s16", "arm_neon/vld4_lane_s8", "arm_neon/uint32x2x2_t", "arm_neon/vdup_n_s8", "arm_neon/vld4_lane_u16", "arm_neon/vmovq_n_s16", "arm_neon/vst4q_s32", "arm_neon/vst2q_f16", "arm_neon/vbslq_s16", "arm_neon/vand_u64", "arm_neon/poly16_t", "arm_neon/vaba_u16", "arm_neon/vqshlq_s64", "armintr/_arm_uxth", "arm_neon/vst2_lane_s16", "arm_neon/vand_u8", "arm_neon/int8x16x3_t", "arm_neon/vrev64_u16", "arm_neon/vld2_lane_s16", "arm_neon/vabaq_s16", "arm_neon/vsli_n_u8", "arm_neon/vsraq_n_u64", "arm_neon/vmlsl_s16", "arm_neon/vmovn_u64", "arm_neon/vld4_f32", "arm_neon/vst2q_f32", "arm_neon/vtbx3_u8", "arm_neon/vcombine_s8", "arm_neon/vqdmulhq_s32", "arm_neon/vgetq_lane_p8", "armintr/_arm_smusd", "arm_neon/vpmax_u32", "arm_neon/vceq_f32", "arm_neon/vsri_n_p8", "arm_neon/vhsubq_u8", "arm_neon/vuzp_s16", "arm_neon/uint32x2x4_t", "arm_neon/vst4_lane_s32", "arm_neon/vsli_n_p8", "arm_neon/vld3_lane_f16", "arm_neon/vbic_u64", "arm_neon/vmlal_u16", "arm_neon/vmvn_s8", "arm_neon/vtstq_s8", "arm_neon/vmaxq_s32", "arm_neon/vqmovn_u64", "armintr/_arm_ssax", "arm_neon/vext_u32", "arm_neon/vld1_dup_u64", "arm_neon/vmlal_n_s16", "armintr/_arm_smulbb", "arm_neon/vqrdmulhq_lane_s16", "arm_neon/vdup_n_p8", "arm_neon/vaba_s8", "arm_neon/vrshrq_n_s32", "arm_neon/vmvnq_s32", "arm_neon/vpadal_s32", "arm_neon/vqshl_s16", "arm_neon/vtrn_p8", "arm_neon/vzip_s16", "arm_neon/vcge_f32", "armintr/_arm_sxtab16", "arm_neon/vst1q_lane_u64", "arm_neon/vqrshlq_u16", "arm_neon/int8x8_t", "arm_neon/vorr_u8", "arm_neon/vrev64_f32", "arm_neon/vpaddlq_s16", "arm_neon/vdupq_lane_u64", "arm_neon/vcltq_u16", "arm_neon/vst3_lane_f32", "arm_neon/vld2_dup_f32", "armintr/_arm_smmul", "arm_neon/vbsl_s16", "arm_neon/vld1_lane_u8", "arm_neon/vld2q_lane_u16", "arm_neon/vqshlu_n_s32", "armintr/_arm_smlalbt", "arm_neon/vmla_s8", "arm_neon/vsli_n_p16", "arm_neon/vmla_u8", "arm_neon/vqaddq_s16", "arm_neon/vld3_p16", "arm_neon/uint64x2x4_t", "arm_neon/vcnt_u8", "arm_neon/vcltq_u8", "arm_neon/vtbx1_p8", "arm_neon/vrev32q_u16", "arm_neon/vld1_lane_u16", "arm_neon/vqadd_s16", "arm_neon/vcnt_s8", "armintr/_MulUnsignedHigh", "arm_neon/vsliq_n_u8", "arm_neon/vpmin_s16", "armintr/__iso_volatile_load16", "arm_neon/vst2_lane_f32", "arm_neon/vqsubq_s32", "arm_neon/vqshl_s32", "arm_neon/vsraq_n_u32", "arm_neon/vcreate_s32", "arm_neon/vld3q_lane_u32", "arm_neon/vaddq_u16", "arm_neon/vand_s32", "arm_neon/vbicq_s32", "armintr/_arm_smulbt", "arm_neon/vrsra_n_s8", "arm_neon/vshrq_n_u32", "arm_neon/vld4_f16", "arm_neon/vcagtq_f32", "arm_neon/vaddw_u32", "armintr/_arm_uxtah", "arm_neon/vtstq_u8", "arm_neon/vld1_dup_u16", "arm_neon/int16x4x4_t", "arm_neon/vqshluq_n_s8", "arm_neon/vqdmulhq_n_s32", "arm_neon/vst1_s64", "arm_neon/vrsubhn_u16", "arm_neon/vld4_dup_p16", "arm_neon/vmlaq_s32", "arm_neon/vnegq_s32", "arm_neon/vst2q_u8", "arm_neon/vget_low_s32", "arm_neon/vorn_u32", "arm_neon/vld1q_s8", "arm_neon/vandq_s64", "arm_neon/vmvn_p8", "arm_neon/vabdl_s16", "arm_neon/vqshl_u32", "arm_neon/vld3_dup_u16", "arm_neon/vmov_n_f32", "arm_neon/vcvt_f32_u32", "arm_neon/vrhadd_s8", "arm_neon/vpadal_u32", "armintr/_arm_ubfx", "arm_neon/vcgt_s8", "arm_neon/vget_lane_f32", "arm_neon/vcge_s16", "arm_neon/vmov_n_s64", "arm_neon/vmulq_n_f32", "arm_neon/vpadalq_u32", "armintr/_arm_smlaldx", "arm_neon/vtst_u16", "arm_neon/vmls_n_s16", "arm_neon/vcombine_f32", "arm_neon/vld1q_p16", "armintr/_arm_ssat", "arm_neon/vextq_s8", "arm_neon/vmax_u32", "arm_neon/vqsubq_s64", "arm_neon/vcltq_s16", "arm_neon/vst2q_s8", "arm_neon/vpmax_u8", "arm_neon/vld4_dup_p8", "arm_neon/vrshr_n_u64", "arm_neon/vqrshrun_n_s16", "arm_neon/vget_low_u64", "arm_neon/vst2q_s32", "arm_neon/vst4_s32", "arm_neon/vrshrq_n_u8", "arm_neon/vdupq_n_u64", "arm_neon/vsriq_n_u8", "arm_neon/vdupq_lane_u8", "arm_neon/vsriq_n_s64", "arm_neon/vget_low_u8", "arm_neon/vst1_lane_p16", "arm_neon/vld1q_lane_u8", "arm_neon/vcgt_s32", "arm_neon/vst1_lane_u32", "arm_neon/vzipq_p16", "arm_neon/vmvn_u16", "arm_neon/vld1q_lane_u16", "armintr/_MoveToCoprocessor64", "arm_neon/vdup_n_u16", "arm_neon/vzipq_f32", "arm_neon/vshl_s16", "arm_neon/vmlaq_n_s16", "arm_neon/vget_lane_s64", "arm_neon/vld1q_lane_f32", "arm_neon/vnegq_s16", "armintr/_arm_usax", "arm_neon/vabd_s16", "arm_neon/vmovq_n_u32", "arm_neon/vshlq_n_u16", "armintr/_CountLeadingSigns", "arm_neon/vld3q_f16", "arm_neon/vceqq_u32", "arm_neon/int8x8x2_t", "arm_neon/vst2_s64", "arm_neon/vst4q_lane_s16", "arm_neon/vorn_s32", "arm_neon/vcle_f32", "arm_neon/vld1_p16", "arm_neon/vtrn_u32", "arm_neon/vbsl_s32", "arm_neon/float32x2_t", "arm_neon/vmvn_s32", "arm_neon/vqdmlsl_lane_s16", "arm_neon/vtbl3_s8", "arm_neon/vsra_n_u8", "arm_neon/vcvtq_u32_f32", "arm_neon/vst1_p8", "arm_neon/vrev64_p16", "armintr/__ldrexd", "arm_neon/vcgeq_u8", "arm_neon/vmlal_n_s32", "arm_neon/vst1q_lane_p8", "arm_neon/vpadalq_s32", "arm_neon/vtstq_p8", "arm_neon/vld4_lane_u8", "armintr/_arm_ssub16", "arm_neon/vpaddlq_u16", "armintr/_arm_udiv", "arm_neon/vld1_lane_p8", "arm_neon/vst1q_u32", "arm_neon/vld1_f32", "arm_neon/uint64x2x2_t", "arm_neon/vqsubq_u64", "arm_neon/vld4q_s32", "arm_neon/vceq_s16", "arm_neon/vst3_s64", "arm_neon/vext_s8", "armintr/_arm_smlsd", "arm_neon/vpadal_s16", "arm_neon/vbic_s32", "arm_neon/vld1_dup_u8", "arm_neon/vclt_f32", "arm_neon/vrev64_s16", "arm_neon/vrshlq_s64", "arm_neon/vdupq_n_s64", "arm_neon/vuzp_p16", "arm_neon/vld3_dup_p16", "arm_neon/vcreate_s8", "armintr/_arm_smlatt", "arm_neon/vtst_s32", "arm_neon/vshrq_n_s64", "arm_neon/vqshlq_n_s64", "arm_neon/vqshlu_n_s16", "arm_neon/vcleq_s16", "arm_neon/vmull_lane_s16", "arm_neon/int32x4_t", "arm_neon/vqadd_s8", "arm_neon/vld2q_f16", "arm_neon/vld2q_lane_p16", "arm_neon/vadd_u32", "arm_neon/vcntq_u8", "arm_neon/vst1_f32", "arm_neon/vmaxq_u32", "arm_neon/vsub_u64", "arm_neon/vsubl_s32", "arm_neon/poly16x4_t", "arm_neon/vgetq_lane_u16", "arm_neon/vdup_lane_s32", "arm_neon/vrhadd_s32", "arm_neon/veorq_u8", "arm_neon/vclzq_s8", "arm_neon/vsliq_n_s64", "arm_neon/vpadalq_s16", "arm_neon/vmla_n_f32", "arm_neon/vcgt_u16", "armintr/_arm_usada8", "arm_neon/vabd_u32", "arm_neon/vgetq_lane_s8", "arm_neon/vqshlq_n_u64", "arm_neon/vabaq_u32", "armintr/_arm_uhsax", "arm_neon/vmulq_f32", "arm_neon/vld3_dup_s16", "arm_neon/vst3_f16", "arm_neon/vrshrq_n_s64", "armintr/__rdpmccntr64", "arm_neon/vclsq_s32", "arm_neon/vmax_u16", "arm_neon/vmvnq_p8", "arm_neon/veor_u16", "arm_neon/vqshrn_n_u32", "arm_neon/vextq_u64", "arm_neon/vld1q_f32", "arm_neon/vget_low_u32", "arm_neon/vhaddq_s32", "arm_neon/vminq_u16", "arm_neon/vqrdmulhq_lane_s32", "arm_neon/vmla_s16", "arm_neon/vadd_s16", "arm_neon/vbsl_u16", "arm_neon/vhsub_s8", "arm_neon/vld4q_lane_p16", "arm_neon/vld1_s16", "arm_neon/vst2q_lane_p16", "arm_neon/vld2_dup_s8", "arm_neon/vst3q_s16", "arm_neon/vcgeq_u32", "arm_neon/vabdq_s16", "arm_neon/vrhadd_u16", "arm_neon/vqshlq_n_u32", "arm_neon/vst4q_lane_u32", "arm_neon/vrsraq_n_u64", "arm_neon/vmlsq_n_s32", "arm_neon/vld4_u8", "arm_neon/vld2_f16", "arm_neon/vqshlq_u8", "arm_neon/vorrq_u64", "arm_neon/vmin_u16", "arm_neon/vext_u8", "arm_neon/vpaddl_s32", "arm_neon/vshlq_u64", "arm_neon/vst2q_lane_f16", "armintr/_arm_sbfx", "arm_neon/vld3_dup_f16", "armintr/_arm_uhasx", "arm_neon/vst2_lane_u8", "armintr/_arm_smultb", "arm_neon/vdup_n_p16", "arm_neon/vtrnq_u32", "arm_neon/vrshlq_u8", "arm_neon/vld4_lane_p16", "arm_neon/vsraq_n_s32", "arm_neon/vclt_s16", "arm_neon/vzip_u8", "arm_neon/vld3_lane_s16", "arm_neon/vceqq_s32", "arm_neon/vld3_dup_f32", "arm_neon/vld4q_lane_s32", "arm_neon/poly8x16x4_t", "arm_neon/uint64x1x2_t", "arm_neon/vqdmlal_n_s16", "arm_neon/vld2_dup_f16", "arm_neon/vshrq_n_s32", "arm_neon/vcleq_s8", "arm_neon/vld3_s32", "arm_neon/vqrshlq_s64", "arm_neon/vbsl_f32", "arm_neon/vext_s64", "arm_neon/vabaq_s32", "arm_neon/vmulq_s16", "arm_neon/vld3_lane_u16", "arm_neon/vld3q_lane_u16", "armintr/_arm_smlaltt", "arm_neon/poly8x8x2_t", "arm_neon/vst3q_u32", "armintr/_arm_smlsdx", "arm_neon/vqrshl_s64", "arm_neon/vextq_p8", "armintr/_arm_uhsub16", "arm_neon/vld3q_p8", "armintr/_arm_smlawt", "armintr/_arm_smlawb", "arm_neon/vdupq_lane_s8", "arm_neon/vaddl_s16", "arm_neon/vcombine_p16", "arm_neon/vzipq_u32", "arm_neon/poly16x8_t", "arm_neon/vshlq_n_s32", "arm_neon/vrshl_s8", "arm_neon/vst2_u64", "arm_neon/vrev64q_s8", "arm_neon/vst2q_lane_s32", "arm_neon/vld2_dup_s16", "arm_neon/vclt_u16", "arm_neon/vuzp_p8", "arm_neon/vshrq_n_s16", "arm_neon/vst3_u64", "arm_neon/vpmin_u16", "arm_neon/vld3q_lane_s32", "arm_neon/vmlal_s16", "arm_neon/poly16x4x4_t", "arm_neon/vorr_u16", "arm_neon/vsliq_n_s16", "arm_neon/vaddl_u8", "arm_neon/vld4_dup_s32", "arm_neon/vld2_f32", "arm_neon/vclt_u32", "arm_neon/vmull_lane_u16", "arm_neon/vsubw_u32", "arm_neon/vld2_dup_s32", "arm_neon/vuzp_s32", "arm_neon/vcge_s32", "arm_neon/vdup_lane_p16", "arm_neon/vpmin_s8", "arm_neon/vpaddlq_u32", "arm_neon/vmlaq_n_s32", "arm_neon/vshrn_n_u64", "arm_neon/vrshr_n_u16", "arm_neon/vld1_s64", "arm_neon/vbsl_u64", "armintr/_arm_smlad", "arm_neon/vqsub_s16", "arm_neon/vld4_p8", "arm_neon/vqdmulh_lane_s32", "arm_neon/vld3_dup_s64", "arm_neon/vornq_s32", "arm_neon/vpadd_u8", "arm_neon/vld3_lane_p16", "arm_neon/uint64x1x4_t", "arm_neon/vld3_u16", "armintr/_arm_shsax", "arm_neon/vabdq_u16", "arm_neon/vcgtq_f32", "arm_neon/vsubq_s8", "arm_neon/vget_low_f16", "arm_neon/vld4_dup_u64", "arm_neon/vst3_lane_s8", "armintr/_arm_ssat16", "arm_neon/vmlaq_f32", "arm_neon/vsri_n_s32", "arm_neon/vmax_u8", "arm_neon/vqadd_u8", "armintr/_arm_uqsub8", "armintr/_arm_clz", "arm_neon/vcgtq_s32", "arm_neon/vraddhn_s32", "arm_neon/vzip_s8", "arm_neon/veorq_s16", "arm_neon/vsetq_lane_s32", "arm_neon/vmul_n_u16", "armintr/_ReadBankedReg", "arm_neon/vld1q_u8", "arm_neon/vld4_p16", "arm_neon/int64x2x2_t", "arm_neon/vmaxq_s8", "arm_neon/vpmax_s16", "arm_neon/vshlq_u16", "arm_neon/vtrnq_p16", "arm_neon/vabal_u16", "arm_neon/vld2_lane_u16", "arm_neon/vrev32_u8", "arm_neon/vrshl_s32", "arm_neon/vget_low_f32", "arm_neon/vld2_s8", "arm_neon/vclzq_s16", "arm_neon/vqdmulhq_n_s16", "arm_neon/vset_lane_u64", "arm_neon/vld2_dup_p16", "arm_neon/vpaddlq_s32", "arm_neon/vld2q_p8", "arm_neon/vst3_lane_u8", "arm_neon/vld4_dup_f32", "arm_neon/vld2_s64", "arm_neon/vmls_u8", "arm_neon/vtbx4_u8", "arm_neon/vsetq_lane_f32", "arm_neon/vcvt_s32_f32", "arm_neon/vst3q_s32", "arm_neon/vmlsq_s8", "arm_neon/vmlaq_n_u16", "armintr/__iso_volatile_load64", "arm_neon/vcgt_u8", "arm_neon/vld2_dup_p8", "arm_neon/vmov_n_u8", "armintr/_arm_sasx", "arm_neon/vmovq_n_p16", "arm_neon/vmlaq_u32", "arm_neon/vst3_f32", "arm_neon/int32x2x4_t", "arm_neon/vld1q_lane_u64", "arm_neon/vclz_u16", "arm_neon/uint8x8_t", "arm_neon/vsub_u32", "arm_neon/vorn_u8", "armintr/__wfe", "arm_neon/vget_high_s16", "arm_neon/vzip_p8", "arm_neon/vmlal_lane_s16", "arm_neon/vmulq_u8", "armintr/_isunordered", "arm_neon/vld1_dup_f32", "arm_neon/vld4_lane_s16", "arm_neon/vdupq_n_s16", "arm_neon/vst3q_p16", "arm_neon/vst1_lane_f32", "arm_neon/float32x4x3_t", "arm_neon/vand_s8", "arm_neon/float32x2x4_t", "arm_neon/vld3_p8", "arm_neon/vmlaq_lane_u16", "armintr/_arm_uqsub16", "arm_neon/vget_high_s32", "arm_neon/vshl_n_s32", "arm_neon/vornq_s8", "arm_neon/vmlsl_n_u32", "arm_neon/vqshlq_n_s8", "arm_neon/int32x2x2_t", "arm_neon/int16x4x2_t", "arm_neon/vceqq_u8", "arm_neon/vcreate_f16", "arm_neon/vorn_s16", "arm_neon/vqmovn_s32", "arm_neon/vextq_u8", "arm_neon/vld4_s32", "armintr/_WriteStatusReg", "arm_neon/uint8x16_t", "arm_neon/vshrn_n_s64", "arm_neon/vmul_n_u32", "arm_neon/vabdl_u8", "arm_neon/vtbx3_s8", "arm_neon/vaddhn_s16", "arm_neon/vld3q_s8", "arm_neon/vmlsl_n_u16", "arm_neon/vrev64q_s32", "arm_neon/int16x8_t", "arm_neon/vext_s32", "arm_neon/vdupq_n_f32", "arm_neon/vld1q_lane_s32", "arm_neon/vqrshlq_u32", "arm_neon/vtbl2_u8", "arm_neon/vgetq_lane_u8", "arm_neon/veorq_u64", "arm_neon/vcntq_s8", "arm_neon/vbslq_p16", "arm_neon/vqnegq_s32", "arm_neon/vaddw_s32", "arm_neon/vmov_n_p8", "arm_neon/vmull_p8", "arm_neon/vld1_lane_u32", "arm_neon/vcombine_s16", "arm_neon/vqshrn_n_s64", "arm_neon/vceqq_s16", "arm_neon/vld4q_p16", "armintr/_ReadStatusReg", "armintr/_arm_qdadd", "arm_neon/uint32x4x2_t", "arm_neon/vcleq_u8", "armintr/_arm_sxtah", "arm_neon/vrhaddq_s32", "arm_neon/vset_lane_s64", "arm_neon/vld4_s64", "armintr/_DAddSatInt", "arm_neon/vorr_s8", "arm_neon/vst2_u32", "arm_neon/vshll_n_u16", "arm_neon/vld2_dup_u32", "arm_neon/vst3q_lane_s32", "arm_neon/vst3q_p8", "armintr/_MoveFromCoprocessor", "arm_neon/uint32x4_t", "arm_neon/vuzpq_s8", "arm_neon/vrecps_f32", "arm_neon/vst1_lane_s8", "arm_neon/vtbx1_s8", "arm_neon/uint16x8x3_t", "arm_neon/vpaddl_s16", "arm_neon/vsubq_s64", "arm_neon/vrsraq_n_u8", "arm_neon/vqadd_s64", "arm_neon/vst4_lane_s16", "arm_neon/vqadd_u16", "arm_neon/vset_lane_u32", "arm_neon/vand_u32", "arm_neon/vrsqrtsq_f32", "arm_neon/vqaddq_u32", "arm_neon/vsra_n_s64", "armintr/_arm_umlal", "arm_neon/vcvt_f32_f16", "arm_neon/vget_lane_u32", "arm_neon/vbsl_s8", "arm_neon/vrshlq_u32", "arm_neon/vqdmull_lane_s16", "arm_neon/vabsq_s32", "arm_neon/vld3_s8", "arm_neon/vst3q_lane_s16", "arm_neon/vld2q_lane_s16", "arm_neon/vst1_lane_s64", "arm_neon/vmov_n_u16", "arm_neon/vst4_lane_u8", "arm_neon/vshll_n_u32", "arm_neon/vqabs_s8", "arm_neon/vmvnq_u8", "arm_neon/vpadalq_u16", "arm_neon/vbsl_p16", "arm_neon/vqrshrn_n_u16", "arm_neon/vld3q_u32", "arm_neon/vcgeq_f32", "armintr/__iso_volatile_load32", "arm_neon/vrecpe_u32", "arm_neon/vld2_dup_u64", "arm_neon/vld3q_f32", "armintr/_arm_shsub8", "arm_neon/vdup_lane_s64", "arm_neon/vqrshl_s8", "arm_neon/vsliq_n_u16", "arm_neon/vld1q_u16", "arm_neon/vorr_u32", "arm_neon/vqrshl_s32", "armintr/__dmb", "arm_neon/veorq_s8", "arm_neon/vld1_u16", "arm_neon/vmov_n_u32", "arm_neon/vhsub_s16", "arm_neon/vst4q_lane_u16", "arm_neon/vbsl_u8", "armintr/_arm_uxtab", "arm_neon/vld2q_lane_f32", "arm_neon/vst2_p8", "armintr/_arm_smmla", "arm_neon/vaddw_u16", "arm_neon/vmlal_s8", "arm_neon/vtst_u32", "arm_neon/vtbl4_u8", "arm_neon/vcvt_n_f32_s32", "arm_neon/vcageq_f32", "arm_neon/vget_low_s16", "arm_neon/vdupq_n_u8", "arm_neon/vorn_s8", "arm_neon/uint8x16x3_t", "arm_neon/vabdq_u32", "arm_neon/vrev64_p8", "arm_neon/vqsubq_s8", "armintr/_arm_smlabb", "arm_neon/vbicq_s64", "arm_neon/vmaxq_u16", "arm_neon/vdup_n_u8", "arm_neon/veor_s8", "arm_neon/int16x8x2_t", "arm_neon/vcvtq_s32_f32", "arm_neon/vtrn_u16", "arm_neon/vbslq_s32", "arm_neon/vld1q_dup_u32", "arm_neon/vmul_n_f32", "arm_neon/vqrshl_u32", "arm_neon/vqsubq_s16", "arm_neon/vst2_lane_f16", "armintr/_arm_smulwt", "arm_neon/vrshrn_n_u32", "arm_neon/vget_high_p16", "arm_neon/vqadd_u64", "arm_neon/vsli_n_s32", "arm_neon/vhadd_u32", "arm_neon/vmlsl_lane_u16", "arm_neon/vclzq_u32", "arm_neon/vqshrun_n_s64", "arm_neon/vrev64q_u32", "arm_neon/vqshrun_n_s16", "arm_neon/vrev32q_s8", "armintr/_arm_shasx", "arm_neon/vaddl_s8", "armintr/_arm_smull", "arm_neon/vabaq_u8", "armintr/_arm_revsh", "arm_neon/vsubq_f32", "arm_neon/poly16x4x2_t", "arm_neon/poly8x8x3_t", "arm_neon/vsubhn_s64", "arm_neon/vcle_u16", "arm_neon/poly8x16x3_t", "arm_neon/vqdmlsl_n_s16", "arm_neon/vqshl_u64", "arm_neon/vcge_u16", "armintr/_arm_uasx", "arm_neon/vmovl_s32", "arm_neon/vst1q_lane_u16", "arm_neon/vbic_u32", "arm_neon/vld2_s16", "armintr/_arm_qasx", "arm_neon/vorrq_u8", "arm_neon/vst2_s32", "armintr/_WriteBankedReg", "arm_neon/veorq_s64", "arm_neon/vld4_lane_f32", "arm_neon/vcreate_u8", "arm_neon/vset_lane_u8", "arm_neon/vandq_u16", "arm_neon/vrsubhn_s64", "arm_neon/vst1q_lane_p16", "arm_neon/uint8x8x2_t", "arm_neon/vmlsl_s8", "arm_neon/vmax_s32", "arm_neon/uint32x4x3_t", "arm_neon/vld4_dup_u16", "arm_neon/vabs_s32", "arm_neon/vld3_dup_u32", "arm_neon/vrshl_u16", "arm_neon/vcle_u8", "arm_neon/vqshl_n_u16", "arm_neon/vbic_s8", "arm_neon/float32x4x2_t", "arm_neon/vmls_f32", "arm_neon/vshll_n_u8", "arm_neon/vminq_s8", "arm_neon/vmlsq_lane_f32", "arm_neon/vst1q_f16", "arm_neon/vst1_lane_u64", "arm_neon/vrhadd_u8", "arm_neon/vclt_s32", "arm_neon/vst2_p16", "arm_neon/vrshrq_n_u16", "arm_neon/vneg_s32", "arm_neon/vmovl_s16", "arm_neon/vqshlq_s8", "arm_neon/vld1_s8", "arm_neon/vqdmulh_s32", "arm_neon/vcls_s8", "armintr/__trap", "arm_neon/vuzp_u32", "armintr/_CopyInt64FromDouble", "arm_neon/int8x16x2_t", "arm_neon/vmovn_s32", "arm_neon/vget_high_s8", "arm_neon/veor_s64", "armintr/_arm_uadd8", "arm_neon/vrev16_u8", "arm_neon/vbicq_u64", "arm_neon/vst4_lane_f16", "arm_neon/vst3_s32", "arm_neon/poly8x8_t", "arm_neon/vtstq_u16", "arm_neon/vld1_lane_s8", "arm_neon/float32x4x4_t", "arm_neon/vst2_s16", "arm_neon/vqrdmulhq_s32", "arm_neon/vqdmulhq_s16", "arm_neon/vrshrq_n_s8", "arm_neon/vcle_s32", "arm_neon/vtbl3_p8", "arm_neon/vbslq_u8", "arm_neon/vst4_u64", "armintr/_arm_umaal", "arm_neon/vshll_n_s8", "arm_neon/vcvt_u32_f32", "arm_neon/vld4q_p8", "arm_neon/vsetq_lane_u16", "arm_neon/vabd_u8", "arm_neon/vclz_u8", "arm_neon/vsubq_u32", "arm_neon/vld1q_lane_p16", "arm_neon/vcgtq_s16", "arm_neon/vmla_lane_s32", "arm_neon/vshlq_n_s64", "arm_neon/vbsl_u32", "arm_neon/vqshlq_s16", "armintr/_arm_qadd8", "arm_neon/vrshr_n_s32", "armintr/_CountOneBits64", "arm_neon/vceq_u32", "arm_neon/vbsl_p8", "arm_neon/uint16x8x2_t", "arm_neon/vsli_n_s16", "arm_neon/vmla_n_s32", "arm_neon/vld4_dup_u32", "arm_neon/vshrq_n_s8", "arm_neon/vqaddq_s8", "arm_neon/vshl_n_u64", "arm_neon/vtbl2_p8", "arm_neon/vcleq_u32", "arm_neon/vqsub_u32", "arm_neon/vmovl_u8", "arm_neon/vmlal_u8", "arm_neon/vmul_s8", "armintr/_MoveFromCoprocessor64", "arm_neon/vrsraq_n_s16", "arm_neon/vdupq_n_u32", "arm_neon/vmov_n_s16", "arm_neon/vst4_lane_p8", "arm_neon/vld1_s32", "arm_neon/vst4_p8", "arm_neon/vsriq_n_u32", "arm_neon/vqdmull_n_s16", "arm_neon/vshlq_u32", "arm_neon/vld3_u8", "armintr/_arm_usub16", "arm_neon/vmlsq_lane_s16", "arm_neon/vmovq_n_s8", "arm_neon/int32x4x2_t", "arm_neon/vld4q_u8", "arm_neon/poly16x8x2_t", "arm_neon/vld1q_u64", "arm_neon/vld3q_lane_s16", "arm_neon/int64x1x2_t", "arm_neon/vshlq_n_s8", "arm_neon/vrshl_s64", "arm_neon/vqshl_n_u8", "armintr/_arm_qadd", "armintr/_DSubSatInt", "armintr/_arm_usat16", "arm_neon/vmull_s8", "arm_neon/vsub_s8", "arm_neon/vmovq_n_u16", "arm_neon/vst4_u16", "arm_neon/vmlsl_lane_u32", "arm_neon/vsliq_n_p16", "arm_neon/vmovn_u32", "arm_neon/vbic_u16", "arm_neon/vtbx2_p8", "arm_neon/vrsubhn_s32", "armintr/_SubSatInt", "arm_neon/vst3_u8", "arm_neon/vdupq_n_s32", "arm_neon/vcntq_p8", "arm_neon/vst4_f32", "arm_neon/vbic_s64", "arm_neon/vld3_s64", "arm_neon/vrsra_n_s64", "arm_neon/vqabsq_s16", "arm_neon/vsriq_n_p8", "arm_neon/vst2_lane_p16", "arm_neon/vabsq_s16", "arm_neon/vcombine_u8", "arm_neon/vld2q_p16", "armintr/_CountOneBits", "armintr/__prefetch", "arm_neon/vld3_dup_u64", "arm_neon/vld2q_s16", "arm_neon/vget_low_p16", "arm_neon/vuzpq_u8", "arm_neon/vrev32q_s16", "armintr/_AddSatInt", "arm_neon/uint16x4x2_t", "arm_neon/vmov_n_s32", "arm_neon/vaddl_u16", "arm_neon/vqaddq_s64", "arm_neon/vmlaq_u16", "arm_neon/vsli_n_s8", "armintr/_arm_sxth", "arm_neon/vorr_s32", "arm_neon/vsra_n_u64", "arm_neon/vst2_f16", "arm_neon/vcombine_u16", "arm_neon/vabs_s16", "arm_neon/vsubhn_s32", "arm_neon/vst1q_lane_u32", "arm_neon/vst3_p8", "arm_neon/vqshrun_n_s32", "arm_neon/vcreate_s64", "arm_neon/vld4q_lane_s16", "arm_neon/vzipq_u16", "arm_neon/vmin_s32", "armintr/_CopyInt32FromFloat", "arm_neon/vcgtq_u32", "arm_neon/vabdl_s32", "arm_neon/vqshlq_n_u16", "arm_neon/int8x16x4_t", "arm_neon/vqrdmulh_n_s32", "arm_neon/vqaddq_u64", "arm_neon/vhaddq_s8", "arm_neon/vshll_n_s16", "arm_neon/vuzp_u8", "arm_neon/vaddl_u32", "arm_neon/vld4q_s16", "arm_neon/vqmovun_s16", "arm_neon/vld1q_lane_s8", "arm_neon/vld2_lane_u32", "arm_neon/vrshr_n_s8", "arm_neon/vmlaq_s16", "armintr/_CopyFloatFromInt32", "arm_neon/vmul_f32", "arm_neon/vmlaq_n_f32", "arm_neon/vst4_s16", "arm_neon/vld1_dup_s32", "arm_neon/vmul_u16", "arm_neon/vhaddq_s16", "arm_neon/vst1q_lane_f32", "arm_neon/vrhaddq_u16", "arm_neon/vbicq_u32", "arm_neon/vrev32_s8", "arm_neon/vmlaq_s8", "arm_neon/vmin_s16", "arm_neon/vst3_lane_p16", "arm_neon/vst2q_lane_f32", "arm_neon/vld4q_lane_f32", "arm_neon/vget_low_u16", "arm_neon/vqsub_s32", "arm_neon/vtbl1_s8", "arm_neon/vmovn_s64", "arm_neon/vpmax_s8", "arm_neon/int8x16_t", "arm_neon/vpmin_u8", "arm_neon/vdup_lane_p8", "arm_neon/vsetq_lane_u64", "arm_neon/vuzpq_u16", "arm_neon/vcgeq_u16", "arm_neon/uint8x16x2_t", "armintr/_arm_rev16", "armintr/_arm_sxtb", "arm_neon/vsliq_n_u64", "arm_neon/vmovq_n_u8", "arm_neon/vshlq_n_u32", "arm_neon/vcombine_s64", "armintr/_arm_qsax", "arm_neon/vmin_f32", "armintr/_arm_sadd16", "arm_neon/vmlsq_n_s16", "arm_neon/vorr_u64", "arm_neon/vqrshrun_n_s64", "arm_neon/vld2q_lane_s32", "arm_neon/vgetq_lane_p16", "arm_neon/vrev32_s16", "arm_neon/vqshl_u16", "arm_neon/vtrn_s8", "arm_neon/vst1q_lane_s64", "arm_neon/vtbl4_p8", "arm_neon/vst1_p16", "arm_neon/vmvn_u8", "arm_neon/vld2_lane_u8", "arm_neon/vld2q_u16", "arm_neon/vmovl_s8", "arm_neon/vbslq_u64", "arm_neon/vmls_s8", "arm_neon/vld3q_p16", "arm_neon/vtbl3_u8", "arm_neon/vabs_f32", "arm_neon/vsraq_n_s8", "arm_neon/vqadd_s32", "arm_neon/vmulq_n_s16", "arm_neon/vst3q_s8", "arm_neon/vaddhn_s64", "arm_neon/vmul_n_s16", "arm_neon/vtbl1_p8", "arm_neon/uint64x2x3_t", "arm_neon/vmlsq_s32", "arm_neon/vld2q_lane_u32", "arm_neon/vaddq_u8", "arm_neon/vcombine_f16", "arm_neon/vandq_s16", "arm_neon/vst4q_lane_p16", "arm_neon/vsri_n_u8", "arm_neon/vst3_lane_p8", "arm_neon/vst3_lane_s16", "arm_neon/vdup_n_s16", "arm_neon/vbicq_s8", "arm_neon/vdup_lane_u8", "arm_neon/vst4q_lane_s32", "arm_neon/vqrshl_u16", "arm_neon/vrsra_n_u32", "arm_neon/vdupq_lane_p8", "arm_neon/vld3_lane_u8", "arm_neon/vqrdmulh_n_s16", "arm_neon/vpmin_s32", "armintr/__cps", "arm_neon/vshl_u32", "armintr/_arm_uadd16", "arm_neon/vld3_s16", "arm_neon/vcvt_f32_s32", "arm_neon/vshlq_n_u64", "arm_neon/vrev64q_u8", "arm_neon/vextq_u16", "arm_neon/vsubl_s16", "arm_neon/vget_lane_p8", "arm_neon/vabal_s16", "arm_neon/vrecpeq_u32", "arm_neon/vminq_u8", "arm_neon/veor_s16", "arm_neon/vmull_n_u16", "arm_neon/vshl_n_u8", "arm_neon/vrev32q_u8", "arm_neon/vandq_s8", "arm_neon/vrshlq_s16", "arm_neon/vst4q_p16", "arm_neon/vandq_s32", "armintr/_MoveToCoprocessor2", "arm_neon/vqdmlsl_lane_s32", "arm_neon/vld1q_s64", "arm_neon/vmull_n_s16", "arm_neon/vneg_s16", "arm_neon/vqshluq_n_s64", "arm_neon/vst2_lane_s32", "arm_neon/vmvnq_u16", "arm_neon/vshll_n_s32", "arm_neon/vld3_dup_s8", "arm_neon/vtstq_s32", "arm_neon/vmlsl_u32", "arm_neon/vqdmulhq_lane_s16", "arm_neon/vaddl_s32", "armintr/_CountLeadingZeros", "arm_neon/vqrshrn_n_s16", "arm_neon/vmla_lane_u32", "arm_neon/vst1_u8", "arm_neon/vshl_u64", "arm_neon/vshr_n_u8", "arm_neon/vmull_lane_s32", "arm_neon/vmlal_lane_u32", "arm_neon/vsubl_s8", "arm_neon/float32x2x2_t", "armintr/_arm_bfc", "arm_neon/vaddq_s16", "arm_neon/vmlal_lane_s32", "arm_neon/vpadd_u16", "arm_neon/vst2q_lane_u16", "arm_neon/vld4_s8", "arm_neon/vst1q_s8", "arm_neon/vshrq_n_u64", "arm_neon/vsli_n_u16", "arm_neon/vqrdmulh_lane_s32", "arm_neon/vst4_lane_u16", "arm_neon/vabdq_f32", "arm_neon/vld2_lane_f16", "arm_neon/vqsub_u64", "arm_neon/vsub_f32", "arm_neon/vld1q_s16", "arm_neon/vmaxq_s16", "arm_neon/vcombine_u32", "arm_neon/vrsraq_n_u32", "armintr/_arm_smusdx", "arm_neon/vrev16_s8", "arm_neon/vqdmulh_n_s32", "arm_neon/vmul_s32", "arm_neon/vabdq_s32", "arm_neon/veor_u64", "arm_neon/vmlsl_n_s32", "arm_neon/vsub_s16", "arm_neon/vadd_u16", "arm_neon/vsriq_n_u16", "arm_neon/vmla_u32", "arm_neon/vuzpq_s32", "arm_neon/vst4q_s8", "arm_neon/vaddhn_u32", "arm_neon/vmlaq_lane_f32", "arm_neon/vld3_lane_s8", "arm_neon/vsliq_n_u32", "arm_neon/vqrshlq_s8", "arm_neon/vqdmlal_n_s32", "arm_neon/uint8x16x4_t", "arm_neon/vcgtq_u16", "arm_neon/vandq_u32", "arm_neon/vld4q_lane_u32", "arm_neon/vzip_p16", "arm_neon/vget_low_p8", "armintr/_arm_shadd8", "arm_neon/vmovn_s16", "arm_neon/vcge_u8", "arm_neon/vld2q_f32", "arm_neon/vaba_u32", "armintr/__iso_volatile_store8", "arm_neon/vst2q_p16", "arm_neon/vmul_s16", "arm_neon/vand_s16", "arm_neon/vtbx4_p8", "arm_neon/vceq_u8", "arm_neon/vrhaddq_s16", "arm_neon/vgetq_lane_f32", "arm_neon/vqshl_s8", "arm_neon/vbslq_f32", "arm_neon/vrsqrts_f32", "arm_neon/vld2q_s8", "arm_neon/vtbl1_u8", "arm_neon/vtst_u8", "arm_neon/vrev64q_f32", "arm_neon/vcle_s8", "arm_neon/vsetq_lane_p16", "arm_neon/vcreate_p16", "arm_neon/vabal_s32", "armintr/_arm_smlald", "arm_neon/vmla_f32", "arm_neon/vtbx2_s8", "arm_neon/int64x1x3_t", "arm_neon/vclz_s8", "arm_neon/vorr_s16", "arm_neon/vornq_s64", "arm_neon/vst1q_u64", "arm_neon/vdupq_n_s8", "armintr/_arm_sadd8", "arm_neon/vextq_s32", "armintr/_arm_smuadx", "armintr/_arm_qsub", "arm_neon/vadd_f32", "arm_neon/vrshrq_n_s16", "arm_neon/vqsub_s8", "arm_neon/vld3_f32", "arm_neon/vhadd_s8", "arm_neon/vmull_n_u32", "arm_neon/vdup_n_u64", "arm_neon/vsubw_s32", "armintr/_arm_sxtab", "armintr/_arm_uxtb16", "arm_neon/vmvn_s16", "arm_neon/vst1_lane_s16", "arm_neon/vqrdmulhq_n_s32", "arm_neon/vsriq_n_s32", "arm_neon/poly8x16x2_t", "arm_neon/vadd_u8", "arm_neon/vuzpq_p8", "arm_neon/vst2q_p8", "armintr/__wfi", "arm_neon/vget_high_u16", "arm_neon/vqrshl_u64", "arm_neon/vld1_dup_s64", "arm_neon/vqrshrn_n_s32", "arm_neon/vrshr_n_s64", "arm_neon/vst3_s8", "arm_neon/poly16x4x3_t", "arm_neon/vqrdmulh_lane_s16", "arm_neon/vmvnq_u32", "arm_neon/vqsubq_u32", "arm_neon/vmovq_n_p8", "arm_neon/vtrn_s16", "arm_neon/vld2q_u32", "arm_neon/vqsubq_u16", "arm_neon/vrsqrteq_u32", "arm_neon/vadd_u64", "armintr/_arm_usat", "arm_neon/vcvtq_n_u32_f32", "arm_neon/vaddq_s8", "arm_neon/vrsraq_n_u16", "arm_neon/vqabs_s16", "arm_neon/vsra_n_s8", "arm_neon/vsra_n_s16", "arm_neon/vqshlq_n_u8", "arm_neon/vpadal_s8", "arm_neon/vmlal_n_u16", "armintr/_CopyDoubleFromInt64", "arm_neon/vaddw_u8", "arm_neon/vmulq_n_s32", "arm_neon/vqaddq_s32", "arm_neon/vmla_lane_f32", "arm_neon/vmlaq_lane_s32", "arm_neon/vld1q_dup_u64", "arm_neon/uint16x8_t", "arm_neon/vld2_s32", "arm_neon/vcltq_f32", "arm_neon/vst4q_f32", "arm_neon/vsri_n_u16", "arm_neon/vshlq_s32", "arm_neon/vgetq_lane_u32", "arm_neon/vld1q_dup_f16", "arm_neon/vrev64q_s16", "arm_neon/vrshrq_n_u32", "arm_neon/vld2q_s32", "arm_neon/vcgtq_s8", "arm_neon/vsubhn_u64", "arm_neon/vmls_n_s32", "armintr/_arm_smmlar", "arm_neon/vld3_dup_u8", "arm_neon/vld3q_lane_p16", "arm_neon/vld2_dup_s64", "arm_neon/vqabs_s32", "arm_neon/vqaddq_u8", "arm_neon/vminq_u32", "arm_neon/vpaddl_u16", "arm_neon/vaba_s16", "arm_neon/vmul_u32", "arm_neon/vst1_lane_u16", "arm_neon/vcreate_f32", "arm_neon/vcvt_f16_f32", "arm_neon/vset_lane_s32", "arm_neon/vshl_s8", "arm_neon/vcgt_s16", "arm_neon/vtrn_f32", "arm_neon/vget_high_s64", "arm_neon/vld3_dup_p8", "arm_neon/vcreate_u64", "arm_neon/vext_u64", "arm_neon/vld1q_dup_s16", "arm_neon/vget_lane_s16", "arm_neon/vqdmlal_s16", "arm_neon/vld2_p16", "arm_neon/vld4_u16", "armintr/_arm_smlalbb", "arm_neon/vrev64_u8", "arm_neon/vbslq_s64", "arm_neon/vsubw_u16", "arm_neon/vrsubhn_u32", "arm_neon/vabdq_u8", "arm_neon/vmls_n_u32", "arm_neon/vshr_n_s32", "arm_neon/vmulq_n_u32", "arm_neon/vst3_p16", "arm_neon/vrev32_u16", "arm_neon/int8x8x3_t", "arm_neon/vst2q_lane_u32", "arm_neon/vextq_p16", "arm_neon/vtrnq_f32", "armintr/_arm_smultt", "arm_neon/vqneg_s8", "arm_neon/vmlsq_lane_s32", "arm_neon/vmov_n_p16", "arm_neon/vraddhn_u64", "arm_neon/vrhadd_u32", "arm_neon/vrev64_u32", "arm_neon/vrshrn_n_s32", "arm_neon/vld4q_f32", "arm_neon/vst2_s8", "arm_neon/vrsqrteq_f32", "arm_neon/uint16x4_t", "arm_neon/vget_low_s8", "arm_neon/vst2_lane_u32", "arm_neon/vhsub_s32", "arm_neon/vqdmull_lane_s32", "armintr/_arm_smulwb", "arm_neon/vmlsl_u8", "arm_neon/vdup_lane_s16", "arm_neon/vtbx4_s8", "arm_neon/vld4q_lane_u16", "arm_neon/vget_high_u8", "arm_neon/vclzq_s32", "arm_neon/vld1q_dup_f32", "arm_neon/vtrn_u8", "arm_neon/vqabsq_s8", "arm_neon/vdup_lane_f32", "arm_neon/vqrdmulh_s16", "arm_neon/vst4_u32", "arm_neon/vdup_lane_u32", "arm_neon/vst4_u8", "arm_neon/vmovq_n_s32", "arm_neon/vld2_lane_s8", "arm_neon/vld3_u32", "arm_neon/vsubl_u16", "arm_neon/vqshlu_n_s8", "arm_neon/float32x4_t", "arm_neon/vqshl_n_s32", "arm_neon/float32x2x3_t", "armintr/__hvc", "arm_neon/vst1q_lane_f16", "arm_neon/vmvnq_s16", "arm_neon/vst3q_lane_f32", "arm_neon/vld1q_dup_u8", "arm_neon/vmlsq_s16", "arm_neon/vget_lane_u8", "arm_neon/vld1_lane_s32", "arm_neon/vst4q_s16", "armintr/_arm_qsub8", "arm_neon/vorrq_s32", "arm_neon/vsriq_n_s8", "arm_neon/vqshrn_n_u64", "arm_neon/vdup_n_s32", "armintr/_arm_uhsub8", "arm_neon/vld3_lane_s32", "arm_neon/vbsl_s64", "arm_neon/vld1_dup_f16", "arm_neon/vsli_n_u64", "arm_neon/vraddhn_u32", "arm_neon/vsub_u16", "arm_neon/vcltq_u32", "arm_neon/vminq_f32", "arm_neon/vshl_n_s64", "arm_neon/vld4_u32", "arm_neon/vld1_u32", "arm_neon/vaddhn_u16", "arm_neon/vcvtq_n_f32_s32", "arm_neon/vorn_u64", "arm_neon/vsubhn_u16", "arm_neon/int64x1_t", "arm_neon/vst1q_lane_s8", "arm_neon/vld1q_dup_s32", "arm_neon/vrev32_p8", "arm_neon/vst3q_lane_p16", "arm_neon/vrecpeq_f32", "arm_neon/int8x8x4_t", "arm_neon/vshr_n_u32", "arm_neon/vdupq_lane_s64", "arm_neon/vpaddlq_s8", "arm_neon/vqshl_n_u32", "arm_neon/vmul_u8", "arm_neon/vtbx2_u8", "arm_neon/vshr_n_u64", "arm_neon/vqrshlq_s16", "arm_neon/vst3_lane_u16", "arm_neon/vqsub_u8", "arm_neon/vrsra_n_s16", "arm_neon/vaba_s32", "arm_neon/vsri_n_u64", "arm_neon/vst3q_lane_u32", "arm_neon/vmlsq_n_u32", "arm_neon/poly8x16_t", "arm_neon/vld2_u8", "armintr/_arm_smmulr", "arm_neon/vtst_s16", "armintr/_arm_smmls", "arm_neon/vqdmulh_s16", "arm_neon/vtrnq_u8", "arm_neon/vset_lane_p8", "arm_neon/vmlsl_u16", "arm_neon/vshrn_n_u16", "arm_neon/vld1_dup_p8", "arm_neon/vrev16q_s8", "arm_neon/vmov_n_s8", "arm_neon/vld1_u64", "arm_neon/vpmin_f32", "arm_neon/vmla_n_u16", "arm_neon/vst1_f16", "arm_neon/vqdmlsl_s16", "arm_neon/vmin_u32", "armintr/_arm_qsub16", "arm_neon/vcage_f32", "arm_neon/vornq_u32", "arm_neon/vpadd_s16", "arm_neon/vld1_u8", "arm_neon/vhsubq_s16", "arm_neon/vld1_dup_u32", "arm_neon/vld4_u64", "armintr/_MulHigh", "arm_neon/vmaxq_u8", "arm_neon/vget_lane_u16", "arm_neon/vld2q_u8", "arm_neon/vld1q_dup_p16", "arm_neon/vsraq_n_u8", "arm_neon/vqdmlsl_n_s32", "arm_neon/vst1_s16", "arm_neon/vst1q_s32", "arm_neon/vmaxq_f32", "arm_neon/vqdmulh_lane_s16", "armintr/__isb", "arm_neon/vuzpq_p16", "arm_neon/vmls_lane_s16", "arm_neon/vtbl4_s8", "arm_neon/vst1_lane_p8", "arm_neon/vsubw_s8", "arm_neon/vmin_u8", "arm_neon/vzip_u16", "arm_neon/vld4q_u16", "arm_neon/vshrn_n_s32", "arm_neon/vpadal_u16", "arm_neon/vorrq_s8", "arm_neon/vrshlq_u64", "arm_neon/vst3_lane_s32", "arm_neon/vqshluq_n_s32", "armintr/_arm_shsub16", "arm_neon/vst1_u32", "arm_neon/vrhadd_s16", "arm_neon/vzipq_s32", "arm_neon/vshrq_n_u16", "arm_neon/vcls_s32", "arm_neon/vceq_s8", "arm_neon/vld2q_lane_f16", "arm_neon/vst4q_u8", "arm_neon/vraddhn_u16", "arm_neon/vget_lane_u64", "armintr/_arm_smlsld", "arm_neon/vld3_u64", "arm_neon/vld1_lane_s16", "arm_neon/vabd_f32", "arm_neon/vdupq_n_u16", "armintr/__iso_volatile_store64", "arm_neon/vqsubq_u8", "arm_neon/poly16x8x3_t", "arm_neon/vcltq_s32", "arm_neon/vqnegq_s16", "arm_neon/vqsub_u16", "arm_neon/vaddq_s32", "arm_neon/vqshl_n_s64", "arm_neon/vabdl_s8", "arm_neon/vclsq_s16", "arm_neon/vpaddl_u8", "arm_neon/vmlsq_n_u16", "armintr/_arm_uqadd8", "arm_neon/vhsub_u32", "arm_neon/vset_lane_s16", "arm_neon/vsubl_u32", "arm_neon/vld3_lane_f32", "arm_neon/vcle_s16", "arm_neon/vmovl_u32", "arm_neon/vst3_lane_f16", "arm_neon/vcaltq_f32", "arm_neon/vsubq_s32", "arm_neon/vand_s64", "arm_neon/vst2_u8", "arm_neon/vcombine_p8", "arm_neon/vqdmlal_s32", "arm_neon/vsub_s32", "armintr/_arm_uxtab16", "arm_neon/vmlsq_n_f32", "armintr/_arm_qdsub", "arm_neon/vhaddq_u32", "arm_neon/vhsubq_u16", "arm_neon/vmlsq_lane_u16", "arm_neon/vst4_s64", "armintr/_CountLeadingOnes", "armintr/_arm_smlabt", "arm_neon/vcombine_s32", "arm_neon/vld4_lane_f16", "arm_neon/vadd_s64", "arm_neon/vorrq_u32", "armintr/__sev", "arm_neon/vdupq_lane_s32", "arm_neon/vrecpsq_f32", "arm_neon/vbicq_u16", "arm_neon/vld1_lane_p16", "arm_neon/vrshr_n_u32", "arm_neon/vcgeq_s32", "arm_neon/vld4_dup_s16", "arm_neon/vld1q_p8", "arm_neon/vrshlq_u16", "arm_neon/vmlaq_lane_u32", "arm_neon/vsub_s64", "arm_neon/vcreate_u16", "arm_neon/vget_lane_s32", "arm_neon/vuzp_f32", "arm_neon/vld2_lane_p8", "arm_neon/vuzp_u16", "arm_neon/vorrq_s16", "armintr/_arm_smlaltb", "arm_neon/vrshrn_n_s16", "arm_neon/vabd_s8", "arm_neon/vnegq_s8", "arm_neon/vst4q_u16", "arm_neon/vst1q_lane_s32", "arm_neon/vst1_lane_s32", "arm_neon/vmla_u16", "arm_neon/vmls_lane_s32", "arm_neon/vtst_s8", "arm_neon/vcgeq_s8", "arm_neon/poly8x8x4_t", "arm_neon/vqsub_s64", "armintr/_arm_uqasx", "arm_neon/vld1_lane_u64", "arm_neon/vminq_s16", "arm_neon/vmulq_u32", "arm_neon/vqrshlq_u8", "arm_neon/vdupq_n_p16", "arm_neon/vld4_dup_f16", "arm_neon/vcls_s16", "arm_neon/vmov_n_u64", "arm_neon/vmla_s32", "arm_neon/vrshl_s16", "arm_neon/vcalt_f32", "arm_neon/int64x2x3_t", "arm_neon/vsub_u8", "arm_neon/vzipq_u8", "arm_neon/vrshrn_n_u64", "arm_neon/vrshlq_s32", "arm_neon/vorr_s64", "arm_neon/vqrshl_s16", "arm_neon/vceqq_u16", "arm_neon/vmulq_n_u16", "arm_neon/vmlaq_u8", "arm_neon/vsri_n_s64", "arm_neon/vld3q_u8", "arm_neon/vld1_dup_s16", "arm_neon/vld1q_s32", "arm_neon/vsri_n_s16", "arm_neon/vshlq_u8", "arm_neon/vsli_n_s64", "arm_neon/vmull_lane_u32", "arm_neon/vshl_s64", "arm_neon/vcreate_s16", "arm_neon/uint8x8x4_t", "arm_neon/vqshrn_n_s32", "arm_neon/vqshlq_u32", "arm_neon/vmlal_n_u32", "arm_neon/vtrnq_s16", "arm_neon/vshr_n_s64", "arm_neon/vst2_u16", "arm_neon/vtrn_s32", "arm_neon/vsubhn_u32", "arm_neon/vbicq_s16", "arm_neon/vsetq_lane_s8", "arm_neon/vrsubhn_s16", "arm_neon/vhsub_u8", "arm_neon/vcleq_s32", "arm_neon/vld4_dup_s8", "arm_neon/vmull_u32", "arm_neon/vrshr_n_s16", "arm_neon/vst1q_lane_s16", "arm_neon/vmlsq_lane_u32", "arm_neon/vnegq_f32", "arm_neon/vmin_s8", "arm_neon/vrev16_p8", "arm_neon/vbic_u8", "arm_neon/vclzq_u16", "arm_neon/vcge_u32", "arm_neon/vget_high_u64", "arm_neon/vabsq_s8", "arm_neon/vhaddq_u16", "arm_neon/vsraq_n_s64", "arm_neon/vld2_u32", "arm_neon/vld2_lane_f32", "arm_neon/vqrshrn_n_u32", "arm_neon/vbslq_s8", "armintr/_CountLeadingZeros64", "arm_neon/vbicq_u8", "arm_neon/vdup_lane_s8", "arm_neon/vpadd_s32", "arm_neon/vld3q_lane_f16", "arm_neon/vaba_u8", "arm_neon/vqshlq_u16", "arm_neon/vst1q_u8", "arm_neon/vst4q_lane_f16", "arm_neon/vshl_n_u16", "armintr/_arm_smladx", "arm_neon/vmla_lane_s16", "arm_neon/vornq_u8", "arm_neon/vqneg_s32", "arm_neon/vadd_s8", "arm_neon/vcle_u32", "arm_neon/vclzq_u8", "arm_neon/vtbx1_u8", "armintr/_CountLeadingOnes64", "armintr/__dsb", "arm_neon/vaddq_u32", "arm_neon/vclsq_s8", "arm_neon/vdup_n_s64", "arm_neon/vmax_s16", "arm_neon/vst2q_u32", "arm_neon/vsetq_lane_s64", "arm_neon/vtst_p8", "arm_neon/vabs_s8", "arm_neon/vqshl_n_s16", "arm_neon/vqrshrn_n_u64", "arm_neon/vaddw_s8", "armintr/_arm_uhadd16", "arm_neon/vsriq_n_p16", "arm_neon/vld4_lane_u32", "arm_neon/vneg_f32", "armintr/_MoveToCoprocessor", "arm_neon/vmvnq_s8", "arm_neon/vld1q_lane_p8", "arm_neon/uint32x2x3_t", "arm_neon/vrshrn_n_u16", "arm_neon/vld3_f16", "arm_neon/vsriq_n_s16", "arm_neon/vshlq_n_s16", "arm_neon/vabal_u8", "arm_neon/vqshluq_n_s16", "arm_neon/vst2_lane_u16", "arm_neon/vbic_s16", "arm_neon/vqshl_n_u64", "arm_neon/vcagt_f32", "arm_neon/vpadalq_s8", "arm_neon/vclz_s32", "arm_neon/vld1_lane_s64", "arm_neon/vget_high_p8", "arm_neon/uint64x1_t", "arm_neon/vextq_s16", "arm_neon/vpadd_s8", "arm_neon/vrsubhn_u64", "arm_neon/vst3q_f16", "arm_neon/vdupq_lane_u16", "arm_neon/vrshrq_n_u64", "arm_neon/vmovq_n_f32", "arm_neon/vld1q_dup_u16", "arm_neon/vshr_n_u16", "arm_neon/uint32x2_t", "armintr/_arm_umull", "arm_neon/vtrnq_u16", "arm_neon/vsetq_lane_u32", "arm_neon/vneg_s8", "arm_neon/vsetq_lane_u8", "arm_neon/vst2q_lane_s16", "arm_neon/vqmovun_s32", "armintr/_arm_usad8", "armintr/_arm_pkhbt", "arm_neon/uint16x4x3_t", "arm_neon/vsra_n_s32", "arm_neon/vqmovun_s64", "arm_neon/vld1q_dup_s8", "arm_neon/vaddhn_s32", "arm_neon/vpmax_f32", "arm_neon/vpadd_u32", "arm_neon/vhsubq_u32", "arm_neon/vqrshrun_n_s32", "arm_neon/vadd_s32", "arm_neon/vclt_s8", "arm_neon/vorrq_s64", "arm_neon/vst4q_f16", "arm_neon/vst1_s32", "arm_neon/vceq_p8", "arm_neon/vsubw_s16", "arm_neon/vgetq_lane_u64", "arm_neon/vmla_n_u32", "arm_neon/vcvtq_f32_s32", "arm_neon/vld1q_u32", "arm_neon/vmax_f32", "armintr/_isunorderedf", "arm_neon/vrshl_u8", "arm_neon/vld4_dup_s64", "arm_neon/vqaddq_u16", "arm_neon/vld4q_lane_f16", "arm_neon/vceqq_p8", "arm_neon/vsubw_u8", "arm_neon/vqmovn_u16", "armintr/_arm_smlsldx", "arm_neon/vcreate_p8", "arm_neon/vqdmull_n_s32", "arm_neon/uint64x2_t", "arm_neon/vmls_s32", "arm_neon/vst3q_f32", "armintr/_arm_bfi", "armintr/_arm_qadd16", "arm_neon/vrshlq_s8", "arm_neon/vget_lane_p16", "arm_neon/vld2_p8", "arm_neon/vld3_lane_u32", "armintr/_MoveFromCoprocessor2", "arm_neon/vqshl_u8", "arm_neon/poly8_t", "arm_neon/vhadd_u16", "arm_neon/vmla_lane_u16", "arm_neon/vshrq_n_u8", "arm_neon/vuzpq_f32", "arm_neon/vmls_lane_f32", "arm_neon/vqneg_s16", "arm_neon/vtrn_p16", "arm_neon/vshrn_n_u32", "arm_neon/vaddhn_u64", "arm_neon/vabal_u32", "arm_neon/vld1q_lane_u32", "arm_neon/vrsraq_n_s32", "arm_neon/vandq_u64", "arm_neon/vqdmull_s32", "arm_neon/vext_s16", "arm_neon/vaddw_s16", "arm_neon/vrev64q_p8", "arm_neon/uint8x8x3_t", "arm_neon/vzip_f32", "armintr/_arm_ssub8", "arm_neon/uint16x4x4_t", "armintr/__swi", "armintr/_arm_smlatb", "arm_neon/vrhaddq_s8", "arm_neon/vpmax_s32", "arm_neon/vqshl_s64", "arm_neon/vrev16q_p8", "arm_neon/vqmovn_u32", "arm_neon/vld1q_f16", "arm_neon/vornq_u64", "arm_neon/vqshlq_n_s16", "arm_neon/vld1_f16", "armintr/_arm_smmlsr", "arm_neon/vshlq_s16", "arm_neon/vsubhn_s16", "arm_neon/vmulq_p8", "arm_neon/vdupq_lane_f32", "armintr/_arm_shadd16", "arm_neon/vornq_s16", "arm_neon/vst1q_lane_u8", "arm_neon/vcaleq_f32", "arm_neon/vst3q_lane_f16", "armintr/_arm_sdiv", "arm_neon/vld2_u16", "arm_neon/vdup_lane_u16", "arm_neon/vst4q_lane_f32", "arm_neon/vdup_n_f32", "arm_neon/vsubq_u8", "arm_neon/vset_lane_p16", "arm_neon/vrsqrte_f32", "arm_neon/vsubl_u8", "arm_neon/vld3q_lane_f32", "arm_neon/vqnegq_s8", "arm_neon/vqmovn_s16", "arm_neon/int16x8x3_t", "arm_neon/veorq_u16", "arm_neon/vqdmulh_n_s16", "arm_neon/vhaddq_u8", "arm_neon/vpadal_u8", "arm_neon/vst2q_s16", "arm_neon/poly16x8x4_t", "arm_neon/int64x2_t", "arm_neon/vmull_s32", "arm_neon/vld4_lane_s32", "arm_neon/vst4q_p8", "arm_neon/vmlal_lane_u16", "arm_neon/vclz_u32", "arm_neon/vsliq_n_s8", "arm_neon/vmls_n_f32", "arm_neon/vmlsl_lane_s16", "arm_neon/vst4q_u32", "arm_neon/vld1q_lane_s16", "arm_neon/vst1q_f32", "arm_neon/vrshr_n_u8", "arm_neon/vst1q_s64", "arm_neon/vbslq_u32", "arm_neon/vset_lane_s8", "arm_neon/vdupq_lane_p16", "arm_neon/vtstq_s16", "arm_neon/vshl_n_s8", "arm_neon/vqrdmulhq_n_s16", "arm_neon/vget_high_f16", "arm_neon/vst4_lane_u32", "arm_neon/vraddhn_s16", "arm_neon/vmlsl_lane_s32", "arm_neon/vld3q_s32", "arm_neon/vsriq_n_u64", "arm_neon/vld4_dup_u8", "arm_neon/vld4q_s8", "arm_neon/vqmovn_s64", "arm_neon/vrev32q_p8", "arm_neon/vsliq_n_p8", "arm_neon/vzipq_s16", "arm_neon/vgetq_lane_s64", "arm_neon/vst4_p16", "arm_neon/vsubq_u16", "arm_neon/vrev64_s32", "armintr/_arm_uhadd8", "arm_neon/vornq_u16", "arm_neon/vst4_lane_s8", "arm_neon/vabd_s32", "arm_neon/vqrdmulhq_s16", "arm_neon/vqshlq_s32", "arm_neon/int64x2x4_t", "arm_neon/vset_lane_u16", "arm_neon/vrsra_n_s32", "arm_neon/vabdl_u16", "arm_neon/vsliq_n_s32"] helpviewer_keywords: ["cl.exe compiler, ARM intrinsics", "intrinsics, ARM", "__cps ARM intrinsic", "__dmb ARM intrinsic", "__dsb ARM intrinsic", "__emit ARM intrinsic", "__hvc ARM intrinsic", "__isb ARM intrinsic", "__iso_volatile_load16 ARM intrinsic", "__iso_volatile_load32 ARM intrinsic", "__iso_volatile_load64 ARM intrinsic", "__iso_volatile_load8 ARM intrinsic", "__iso_volatile_store16 ARM intrinsic", "__iso_volatile_store32 ARM intrinsic", "__iso_volatile_store64 ARM intrinsic", "__iso_volatile_store8 ARM intrinsic", "__ldrexd ARM intrinsic", "__prefetch ARM intrinsic", "__rdpmccntr64 ARM intrinsic", "__sev ARM intrinsic", "__static_assert ARM intrinsic", "__swi ARM intrinsic", "__trap ARM intrinsic", "__wfe ARM intrinsic", "__wfi ARM intrinsic", "_AddSatInt ARM intrinsic", "_arm_bfc ARM intrinsic", "_arm_bfi ARM intrinsic", "_arm_clz ARM intrinsic", "_arm_pkhbt ARM intrinsic", "_arm_pkhtb ARM intrinsic", "_arm_qadd ARM intrinsic", "_arm_qadd16 ARM intrinsic", "_arm_qadd8 ARM intrinsic", "_arm_qasx ARM intrinsic", "_arm_qdadd ARM intrinsic", "_arm_qdsub ARM intrinsic", "_arm_qsax ARM intrinsic", "_arm_qsub ARM intrinsic", "_arm_qsub16 ARM intrinsic", "_arm_qsub8 ARM intrinsic", "_arm_rbit ARM intrinsic", "_arm_rev ARM intrinsic", "_arm_rev16 ARM intrinsic", "_arm_revsh ARM intrinsic", "_arm_sadd16 ARM intrinsic", "_arm_sadd8 ARM intrinsic", "_arm_sasx ARM intrinsic", "_arm_sbfx ARM intrinsic", "_arm_sdiv ARM intrinsic", "_arm_shadd16 ARM intrinsic", "_arm_shadd8 ARM intrinsic", "_arm_shasx ARM intrinsic", "_arm_shsax ARM intrinsic", "_arm_shsub16 ARM intrinsic", "_arm_shsub8 ARM intrinsic", "_arm_smlabb ARM intrinsic", "_arm_smlabt ARM intrinsic", "_arm_smlad ARM intrinsic", "_arm_smladx ARM intrinsic", "_arm_smlal ARM intrinsic", "_arm_smlalbb ARM intrinsic", "_arm_smlalbt ARM intrinsic", "_arm_smlald ARM intrinsic", "_arm_smlaldx ARM intrinsic", "_arm_smlaltb ARM intrinsic", "_arm_smlaltt ARM intrinsic", "_arm_smlatb ARM intrinsic", "_arm_smlatt ARM intrinsic", "_arm_smlawb ARM intrinsic", "_arm_smlawt ARM intrinsic", "_arm_smlsd ARM intrinsic", "_arm_smlsdx ARM intrinsic", "_arm_smlsld ARM intrinsic", "_arm_smlsldx ARM intrinsic", "_arm_smmla ARM intrinsic", "_arm_smmlar ARM intrinsic", "_arm_smmls ARM intrinsic", "_arm_smmlsr ARM intrinsic", "_arm_smmul ARM intrinsic", "_arm_smmulr ARM intrinsic", "_arm_smuad ARM intrinsic", "_arm_smuadx ARM intrinsic", "_arm_smulbb ARM intrinsic", "_arm_smulbt ARM intrinsic", "_arm_smull ARM intrinsic", "_arm_smultb ARM intrinsic", "_arm_smultt ARM intrinsic", "_arm_smulwb ARM intrinsic", "_arm_smulwt ARM intrinsic", "_arm_smusd ARM intrinsic", "_arm_smusdx ARM intrinsic", "_arm_ssat ARM intrinsic", "_arm_ssat16 ARM intrinsic", "_arm_ssax ARM intrinsic", "_arm_ssub16 ARM intrinsic", "_arm_ssub8 ARM intrinsic", "_arm_sxtab ARM intrinsic", "_arm_sxtab16 ARM intrinsic", "_arm_sxtah ARM intrinsic", "_arm_sxtb ARM intrinsic", "_arm_sxtb16 ARM intrinsic", "_arm_sxth ARM intrinsic", "_arm_uadd16 ARM intrinsic", "_arm_uadd8 ARM intrinsic", "_arm_uasx ARM intrinsic", "_arm_ubfx ARM intrinsic", "_arm_udiv ARM intrinsic", "_arm_uhadd16 ARM intrinsic", "_arm_uhadd8 ARM intrinsic", "_arm_uhasx ARM intrinsic", "_arm_uhsax ARM intrinsic", "_arm_uhsub16 ARM intrinsic", "_arm_uhsub8 ARM intrinsic", "_arm_umaal ARM intrinsic", "_arm_umlal ARM intrinsic", "_arm_umull ARM intrinsic", "_arm_uqadd16 ARM intrinsic", "_arm_uqadd8 ARM intrinsic", "_arm_uqasx ARM intrinsic", "_arm_uqsax ARM intrinsic", "_arm_uqsub16 ARM intrinsic", "_arm_uqsub8 ARM intrinsic", "_arm_usad8 ARM intrinsic", "_arm_usada8 ARM intrinsic", "_arm_usat ARM intrinsic", "_arm_usat16 ARM intrinsic", "_arm_usax ARM intrinsic", "_arm_usub16 ARM intrinsic", "_arm_usub8 ARM intrinsic", "_arm_uxtab ARM intrinsic", "_arm_uxtab16 ARM intrinsic", "_arm_uxtah ARM intrinsic", "_arm_uxtb ARM intrinsic", "_arm_uxtb16 ARM intrinsic", "_arm_uxth ARM intrinsic", "_CopyDoubleFromInt64 ARM intrinsic", "_CopyFloatFromInt32 ARM intrinsic", "_CopyInt32FromFloat ARM intrinsic", "_CopyInt64FromDouble ARM intrinsic", "_CountLeadingOnes ARM intrinsic", "_CountLeadingOnes64 ARM intrinsic", "_CountLeadingSigns ARM intrinsic", "_CountLeadingSigns64 ARM intrinsic", "_CountLeadingZeros ARM intrinsic", "_CountLeadingZeros64 ARM intrinsic", "_CountOneBits ARM intrinsic", "_CountOneBits64 ARM intrinsic", "_DAddSatInt ARM intrinsic", "_DSubSatInt ARM intrinsic", "_isunordered ARM intrinsic", "_isunorderedf ARM intrinsic", "_MoveFromCoprocessor ARM intrinsic", "_MoveFromCoprocessor2 ARM intrinsic", "_MoveFromCoprocessor64 ARM intrinsic", "_MoveToCoprocessor ARM intrinsic", "_MoveToCoprocessor2 ARM intrinsic", "_MoveToCoprocessor64 ARM intrinsic", "_MulHigh ARM intrinsic", "_MulUnsignedHigh ARM intrinsic", "_ReadBankedReg ARM intrinsic", "_ReadStatusReg ARM intrinsic", "_SubSatInt ARM intrinsic", "_WriteBankedReg ARM intrinsic", "_WriteStatusReg ARM intrinsic", "float32x2_t ARM intrinsic", "float32x2x2_t ARM intrinsic", "float32x2x3_t ARM intrinsic", "float32x2x4_t ARM intrinsic", "float32x4_t ARM intrinsic", "float32x4x2_t ARM intrinsic", "float32x4x3_t ARM intrinsic", "float32x4x4_t ARM intrinsic", "int16x4_t ARM intrinsic", "int16x4x2_t ARM intrinsic", "int16x4x3_t ARM intrinsic", "int16x4x4_t ARM intrinsic", "int16x8_t ARM intrinsic", "int16x8x2_t ARM intrinsic", "int16x8x3_t ARM intrinsic", "int16x8x4_t ARM intrinsic", "int32x2_t ARM intrinsic", "int32x2x2_t ARM intrinsic", "int32x2x3_t ARM intrinsic", "int32x2x4_t ARM intrinsic", "int32x4_t ARM intrinsic", "int32x4x2_t ARM intrinsic", "int32x4x3_t ARM intrinsic", "int32x4x4_t ARM intrinsic", "int64x1_t ARM intrinsic", "int64x1x2_t ARM intrinsic", "int64x1x3_t ARM intrinsic", "int64x1x4_t ARM intrinsic", "int64x2_t ARM intrinsic", "int64x2x2_t ARM intrinsic", "int64x2x3_t ARM intrinsic", "int64x2x4_t ARM intrinsic", "int8x16_t ARM intrinsic", "int8x16x2_t ARM intrinsic", "int8x16x3_t ARM intrinsic", "int8x16x4_t ARM intrinsic", "int8x8_t ARM intrinsic", "int8x8x2_t ARM intrinsic", "int8x8x3_t ARM intrinsic", "int8x8x4_t ARM intrinsic", "poly16_t ARM intrinsic", "poly16x4_t ARM intrinsic", "poly16x4x2_t ARM intrinsic", "poly16x4x3_t ARM intrinsic", "poly16x4x4_t ARM intrinsic", "poly16x8_t ARM intrinsic", "poly16x8x2_t ARM intrinsic", "poly16x8x3_t ARM intrinsic", "poly16x8x4_t ARM intrinsic", "poly8_t ARM intrinsic", "poly8x16_t ARM intrinsic", "poly8x16x2_t ARM intrinsic", "poly8x16x3_t ARM intrinsic", "poly8x16x4_t ARM intrinsic", "poly8x8_t ARM intrinsic", "poly8x8x2_t ARM intrinsic", "poly8x8x3_t ARM intrinsic", "poly8x8x4_t ARM intrinsic", "uint16x4_t ARM intrinsic", "uint16x4x2_t ARM intrinsic", "uint16x4x3_t ARM intrinsic", "uint16x4x4_t ARM intrinsic", "uint16x8_t ARM intrinsic", "uint16x8x2_t ARM intrinsic", "uint16x8x3_t ARM intrinsic", "uint16x8x4_t ARM intrinsic", "uint32x2_t ARM intrinsic", "uint32x2x2_t ARM intrinsic", "uint32x2x3_t ARM intrinsic", "uint32x2x4_t ARM intrinsic", "uint32x4_t ARM intrinsic", "uint32x4x2_t ARM intrinsic", "uint32x4x3_t ARM intrinsic", "uint32x4x4_t ARM intrinsic", "uint64x1_t ARM intrinsic", "uint64x1x2_t ARM intrinsic", "uint64x1x3_t ARM intrinsic", "uint64x1x4_t ARM intrinsic", "uint64x2_t ARM intrinsic", "uint64x2x2_t ARM intrinsic", "uint64x2x3_t ARM intrinsic", "uint64x2x4_t ARM intrinsic", "uint8x16_t ARM intrinsic", "uint8x16x2_t ARM intrinsic", "uint8x16x3_t ARM intrinsic", "uint8x16x4_t ARM intrinsic", "uint8x8_t ARM intrinsic", "uint8x8x2_t ARM intrinsic", "uint8x8x3_t ARM intrinsic", "uint8x8x4_t ARM intrinsic", "vaba_s16 ARM intrinsic", "vaba_s32 ARM intrinsic", "vaba_s8 ARM intrinsic", "vaba_u16 ARM intrinsic", "vaba_u32 ARM intrinsic", "vaba_u8 ARM intrinsic", "vabal_s16 ARM intrinsic", "vabal_s32 ARM intrinsic", "vabal_s8 ARM intrinsic", "vabal_u16 ARM intrinsic", "vabal_u32 ARM intrinsic", "vabal_u8 ARM intrinsic", "vabaq_s16 ARM intrinsic", "vabaq_s32 ARM intrinsic", "vabaq_s8 ARM intrinsic", "vabaq_u16 ARM intrinsic", "vabaq_u32 ARM intrinsic", "vabaq_u8 ARM intrinsic", "vabd_f32 ARM intrinsic", "vabd_s16 ARM intrinsic", "vabd_s32 ARM intrinsic", "vabd_s8 ARM intrinsic", "vabd_u16 ARM intrinsic", "vabd_u32 ARM intrinsic", "vabd_u8 ARM intrinsic", "vabdl_s16 ARM intrinsic", "vabdl_s32 ARM intrinsic", "vabdl_s8 ARM intrinsic", "vabdl_u16 ARM intrinsic", "vabdl_u32 ARM intrinsic", "vabdl_u8 ARM intrinsic", "vabdq_f32 ARM intrinsic", "vabdq_s16 ARM intrinsic", "vabdq_s32 ARM intrinsic", "vabdq_s8 ARM intrinsic", "vabdq_u16 ARM intrinsic", "vabdq_u32 ARM intrinsic", "vabdq_u8 ARM intrinsic", "vabs_f32 ARM intrinsic", "vabs_s16 ARM intrinsic", "vabs_s32 ARM intrinsic", "vabs_s8 ARM intrinsic", "vabsq_f32 ARM intrinsic", "vabsq_s16 ARM intrinsic", "vabsq_s32 ARM intrinsic", "vabsq_s8 ARM intrinsic", "vadd_f32 ARM intrinsic", "vadd_s16 ARM intrinsic", "vadd_s32 ARM intrinsic", "vadd_s64 ARM intrinsic", "vadd_s8 ARM intrinsic", "vadd_u16 ARM intrinsic", "vadd_u32 ARM intrinsic", "vadd_u64 ARM intrinsic", "vadd_u8 ARM intrinsic", "vaddhn_s16 ARM intrinsic", "vaddhn_s32 ARM intrinsic", "vaddhn_s64 ARM intrinsic", "vaddhn_u16 ARM intrinsic", "vaddhn_u32 ARM intrinsic", "vaddhn_u64 ARM intrinsic", "vaddl_s16 ARM intrinsic", "vaddl_s32 ARM intrinsic", "vaddl_s8 ARM intrinsic", "vaddl_u16 ARM intrinsic", "vaddl_u32 ARM intrinsic", "vaddl_u8 ARM intrinsic", "vaddq_f32 ARM intrinsic", "vaddq_s16 ARM intrinsic", "vaddq_s32 ARM intrinsic", "vaddq_s64 ARM intrinsic", "vaddq_s8 ARM intrinsic", "vaddq_u16 ARM intrinsic", "vaddq_u32 ARM intrinsic", "vaddq_u64 ARM intrinsic", "vaddq_u8 ARM intrinsic", "vaddw_s16 ARM intrinsic", "vaddw_s32 ARM intrinsic", "vaddw_s8 ARM intrinsic", "vaddw_u16 ARM intrinsic", "vaddw_u32 ARM intrinsic", "vaddw_u8 ARM intrinsic", "vand_s16 ARM intrinsic", "vand_s32 ARM intrinsic", "vand_s64 ARM intrinsic", "vand_s8 ARM intrinsic", "vand_u16 ARM intrinsic", "vand_u32 ARM intrinsic", "vand_u64 ARM intrinsic", "vand_u8 ARM intrinsic", "vandq_s16 ARM intrinsic", "vandq_s32 ARM intrinsic", "vandq_s64 ARM intrinsic", "vandq_s8 ARM intrinsic", "vandq_u16 ARM intrinsic", "vandq_u32 ARM intrinsic", "vandq_u64 ARM intrinsic", "vandq_u8 ARM intrinsic", "vbic_s16 ARM intrinsic", "vbic_s32 ARM intrinsic", "vbic_s64 ARM intrinsic", "vbic_s8 ARM intrinsic", "vbic_u16 ARM intrinsic", "vbic_u32 ARM intrinsic", "vbic_u64 ARM intrinsic", "vbic_u8 ARM intrinsic", "vbicq_s16 ARM intrinsic", "vbicq_s32 ARM intrinsic", "vbicq_s64 ARM intrinsic", "vbicq_s8 ARM intrinsic", "vbicq_u16 ARM intrinsic", "vbicq_u32 ARM intrinsic", "vbicq_u64 ARM intrinsic", "vbicq_u8 ARM intrinsic", "vbsl_f32 ARM intrinsic", "vbsl_p16 ARM intrinsic", "vbsl_p8 ARM intrinsic", "vbsl_s16 ARM intrinsic", "vbsl_s32 ARM intrinsic", "vbsl_s64 ARM intrinsic", "vbsl_s8 ARM intrinsic", "vbsl_u16 ARM intrinsic", "vbsl_u32 ARM intrinsic", "vbsl_u64 ARM intrinsic", "vbsl_u8 ARM intrinsic", "vbslq_f32 ARM intrinsic", "vbslq_p16 ARM intrinsic", "vbslq_p8 ARM intrinsic", "vbslq_s16 ARM intrinsic", "vbslq_s32 ARM intrinsic", "vbslq_s64 ARM intrinsic", "vbslq_s8 ARM intrinsic", "vbslq_u16 ARM intrinsic", "vbslq_u32 ARM intrinsic", "vbslq_u64 ARM intrinsic", "vbslq_u8 ARM intrinsic", "vcage_f32 ARM intrinsic", "vcageq_f32 ARM intrinsic", "vcagt_f32 ARM intrinsic", "vcagtq_f32 ARM intrinsic", "vcale_f32 ARM intrinsic", "vcaleq_f32 ARM intrinsic", "vcalt_f32 ARM intrinsic", "vcaltq_f32 ARM intrinsic", "vceq_f32 ARM intrinsic", "vceq_p8 ARM intrinsic", "vceq_s16 ARM intrinsic", "vceq_s32 ARM intrinsic", "vceq_s8 ARM intrinsic", "vceq_u16 ARM intrinsic", "vceq_u32 ARM intrinsic", "vceq_u8 ARM intrinsic", "vceqq_f32 ARM intrinsic", "vceqq_p8 ARM intrinsic", "vceqq_s16 ARM intrinsic", "vceqq_s32 ARM intrinsic", "vceqq_s8 ARM intrinsic", "vceqq_u16 ARM intrinsic", "vceqq_u32 ARM intrinsic", "vceqq_u8 ARM intrinsic", "vcge_f32 ARM intrinsic", "vcge_s16 ARM intrinsic", "vcge_s32 ARM intrinsic", "vcge_s8 ARM intrinsic", "vcge_u16 ARM intrinsic", "vcge_u32 ARM intrinsic", "vcge_u8 ARM intrinsic", "vcgeq_f32 ARM intrinsic", "vcgeq_s16 ARM intrinsic", "vcgeq_s32 ARM intrinsic", "vcgeq_s8 ARM intrinsic", "vcgeq_u16 ARM intrinsic", "vcgeq_u32 ARM intrinsic", "vcgeq_u8 ARM intrinsic", "vcgt_f32 ARM intrinsic", "vcgt_s16 ARM intrinsic", "vcgt_s32 ARM intrinsic", "vcgt_s8 ARM intrinsic", "vcgt_u16 ARM intrinsic", "vcgt_u32 ARM intrinsic", "vcgt_u8 ARM intrinsic", "vcgtq_f32 ARM intrinsic", "vcgtq_s16 ARM intrinsic", "vcgtq_s32 ARM intrinsic", "vcgtq_s8 ARM intrinsic", "vcgtq_u16 ARM intrinsic", "vcgtq_u32 ARM intrinsic", "vcgtq_u8 ARM intrinsic", "vcle_f32 ARM intrinsic", "vcle_s16 ARM intrinsic", "vcle_s32 ARM intrinsic", "vcle_s8 ARM intrinsic", "vcle_u16 ARM intrinsic", "vcle_u32 ARM intrinsic", "vcle_u8 ARM intrinsic", "vcleq_f32 ARM intrinsic", "vcleq_s16 ARM intrinsic", "vcleq_s32 ARM intrinsic", "vcleq_s8 ARM intrinsic", "vcleq_u16 ARM intrinsic", "vcleq_u32 ARM intrinsic", "vcleq_u8 ARM intrinsic", "vcls_s16 ARM intrinsic", "vcls_s32 ARM intrinsic", "vcls_s8 ARM intrinsic", "vclsq_s16 ARM intrinsic", "vclsq_s32 ARM intrinsic", "vclsq_s8 ARM intrinsic", "vclt_f32 ARM intrinsic", "vclt_s16 ARM intrinsic", "vclt_s32 ARM intrinsic", "vclt_s8 ARM intrinsic", "vclt_u16 ARM intrinsic", "vclt_u32 ARM intrinsic", "vclt_u8 ARM intrinsic", "vcltq_f32 ARM intrinsic", "vcltq_s16 ARM intrinsic", "vcltq_s32 ARM intrinsic", "vcltq_s8 ARM intrinsic", "vcltq_u16 ARM intrinsic", "vcltq_u32 ARM intrinsic", "vcltq_u8 ARM intrinsic", "vclz_s16 ARM intrinsic", "vclz_s32 ARM intrinsic", "vclz_s8 ARM intrinsic", "vclz_u16 ARM intrinsic", "vclz_u32 ARM intrinsic", "vclz_u8 ARM intrinsic", "vclzq_s16 ARM intrinsic", "vclzq_s32 ARM intrinsic", "vclzq_s8 ARM intrinsic", "vclzq_u16 ARM intrinsic", "vclzq_u32 ARM intrinsic", "vclzq_u8 ARM intrinsic", "vcnt_p8 ARM intrinsic", "vcnt_s8 ARM intrinsic", "vcnt_u8 ARM intrinsic", "vcntq_p8 ARM intrinsic", "vcntq_s8 ARM intrinsic", "vcntq_u8 ARM intrinsic", "vcombine_f16 ARM intrinsic", "vcombine_f32 ARM intrinsic", "vcombine_p16 ARM intrinsic", "vcombine_p8 ARM intrinsic", "vcombine_s16 ARM intrinsic", "vcombine_s32 ARM intrinsic", "vcombine_s64 ARM intrinsic", "vcombine_s8 ARM intrinsic", "vcombine_u16 ARM intrinsic", "vcombine_u32 ARM intrinsic", "vcombine_u64 ARM intrinsic", "vcombine_u8 ARM intrinsic", "vcreate_f16 ARM intrinsic", "vcreate_f32 ARM intrinsic", "vcreate_p16 ARM intrinsic", "vcreate_p8 ARM intrinsic", "vcreate_s16 ARM intrinsic", "vcreate_s32 ARM intrinsic", "vcreate_s64 ARM intrinsic", "vcreate_s8 ARM intrinsic", "vcreate_u16 ARM intrinsic", "vcreate_u32 ARM intrinsic", "vcreate_u64 ARM intrinsic", "vcreate_u8 ARM intrinsic", "vcvt_f16_f32 ARM intrinsic", "vcvt_f32_f16 ARM intrinsic", "vcvt_f32_s32 ARM intrinsic", "vcvt_f32_u32 ARM intrinsic", "vcvt_n_f32_s32 ARM intrinsic", "vcvt_n_f32_u32 ARM intrinsic", "vcvt_n_s32_f32 ARM intrinsic", "vcvt_n_u32_f32 ARM intrinsic", "vcvt_s32_f32 ARM intrinsic", "vcvt_u32_f32 ARM intrinsic", "vcvtq_f32_s32 ARM intrinsic", "vcvtq_f32_u32 ARM intrinsic", "vcvtq_n_f32_s32 ARM intrinsic", "vcvtq_n_f32_u32 ARM intrinsic", "vcvtq_n_s32_f32 ARM intrinsic", "vcvtq_n_u32_f32 ARM intrinsic", "vcvtq_s32_f32 ARM intrinsic", "vcvtq_u32_f32 ARM intrinsic", "vdup_lane_f32 ARM intrinsic", "vdup_lane_p16 ARM intrinsic", "vdup_lane_p8 ARM intrinsic", "vdup_lane_s16 ARM intrinsic", "vdup_lane_s32 ARM intrinsic", "vdup_lane_s64 ARM intrinsic", "vdup_lane_s8 ARM intrinsic", "vdup_lane_u16 ARM intrinsic", "vdup_lane_u32 ARM intrinsic", "vdup_lane_u64 ARM intrinsic", "vdup_lane_u8 ARM intrinsic", "vdup_n_f32 ARM intrinsic", "vdup_n_p16 ARM intrinsic", "vdup_n_p8 ARM intrinsic", "vdup_n_s16 ARM intrinsic", "vdup_n_s32 ARM intrinsic", "vdup_n_s64 ARM intrinsic", "vdup_n_s8 ARM intrinsic", "vdup_n_u16 ARM intrinsic", "vdup_n_u32 ARM intrinsic", "vdup_n_u64 ARM intrinsic", "vdup_n_u8 ARM intrinsic", "vdupq_lane_f32 ARM intrinsic", "vdupq_lane_p16 ARM intrinsic", "vdupq_lane_p8 ARM intrinsic", "vdupq_lane_s16 ARM intrinsic", "vdupq_lane_s32 ARM intrinsic", "vdupq_lane_s64 ARM intrinsic", "vdupq_lane_s8 ARM intrinsic", "vdupq_lane_u16 ARM intrinsic", "vdupq_lane_u32 ARM intrinsic", "vdupq_lane_u64 ARM intrinsic", "vdupq_lane_u8 ARM intrinsic", "vdupq_n_f32 ARM intrinsic", "vdupq_n_p16 ARM intrinsic", "vdupq_n_p8 ARM intrinsic", "vdupq_n_s16 ARM intrinsic", "vdupq_n_s32 ARM intrinsic", "vdupq_n_s64 ARM intrinsic", "vdupq_n_s8 ARM intrinsic", "vdupq_n_u16 ARM intrinsic", "vdupq_n_u32 ARM intrinsic", "vdupq_n_u64 ARM intrinsic", "vdupq_n_u8 ARM intrinsic", "veor_s16 ARM intrinsic", "veor_s32 ARM intrinsic", "veor_s64 ARM intrinsic", "veor_s8 ARM intrinsic", "veor_u16 ARM intrinsic", "veor_u32 ARM intrinsic", "veor_u64 ARM intrinsic", "veor_u8 ARM intrinsic", "veorq_s16 ARM intrinsic", "veorq_s32 ARM intrinsic", "veorq_s64 ARM intrinsic", "veorq_s8 ARM intrinsic", "veorq_u16 ARM intrinsic", "veorq_u32 ARM intrinsic", "veorq_u64 ARM intrinsic", "veorq_u8 ARM intrinsic", "vext_p16 ARM intrinsic", "vext_p8 ARM intrinsic", "vext_s16 ARM intrinsic", "vext_s32 ARM intrinsic", "vext_s64 ARM intrinsic", "vext_s8 ARM intrinsic", "vext_u16 ARM intrinsic", "vext_u32 ARM intrinsic", "vext_u64 ARM intrinsic", "vext_u8 ARM intrinsic", "vextq_p16 ARM intrinsic", "vextq_p8 ARM intrinsic", "vextq_s16 ARM intrinsic", "vextq_s32 ARM intrinsic", "vextq_s64 ARM intrinsic", "vextq_s8 ARM intrinsic", "vextq_u16 ARM intrinsic", "vextq_u32 ARM intrinsic", "vextq_u64 ARM intrinsic", "vextq_u8 ARM intrinsic", "vget_high_f16 ARM intrinsic", "vget_high_f32 ARM intrinsic", "vget_high_p16 ARM intrinsic", "vget_high_p8 ARM intrinsic", "vget_high_s16 ARM intrinsic", "vget_high_s32 ARM intrinsic", "vget_high_s64 ARM intrinsic", "vget_high_s8 ARM intrinsic", "vget_high_u16 ARM intrinsic", "vget_high_u32 ARM intrinsic", "vget_high_u64 ARM intrinsic", "vget_high_u8 ARM intrinsic", "vget_lane_f32 ARM intrinsic", "vget_lane_p16 ARM intrinsic", "vget_lane_p8 ARM intrinsic", "vget_lane_s16 ARM intrinsic", "vget_lane_s32 ARM intrinsic", "vget_lane_s64 ARM intrinsic", "vget_lane_s8 ARM intrinsic", "vget_lane_u16 ARM intrinsic", "vget_lane_u32 ARM intrinsic", "vget_lane_u64 ARM intrinsic", "vget_lane_u8 ARM intrinsic", "vget_low_f16 ARM intrinsic", "vget_low_f32 ARM intrinsic", "vget_low_p16 ARM intrinsic", "vget_low_p8 ARM intrinsic", "vget_low_s16 ARM intrinsic", "vget_low_s32 ARM intrinsic", "vget_low_s64 ARM intrinsic", "vget_low_s8 ARM intrinsic", "vget_low_u16 ARM intrinsic", "vget_low_u32 ARM intrinsic", "vget_low_u64 ARM intrinsic", "vget_low_u8 ARM intrinsic", "vgetq_lane_f32 ARM intrinsic", "vgetq_lane_p16 ARM intrinsic", "vgetq_lane_p8 ARM intrinsic", "vgetq_lane_s16 ARM intrinsic", "vgetq_lane_s32 ARM intrinsic", "vgetq_lane_s64 ARM intrinsic", "vgetq_lane_s8 ARM intrinsic", "vgetq_lane_u16 ARM intrinsic", "vgetq_lane_u32 ARM intrinsic", "vgetq_lane_u64 ARM intrinsic", "vgetq_lane_u8 ARM intrinsic", "vhadd_s16 ARM intrinsic", "vhadd_s32 ARM intrinsic", "vhadd_s8 ARM intrinsic", "vhadd_u16 ARM intrinsic", "vhadd_u32 ARM intrinsic", "vhadd_u8 ARM intrinsic", "vhaddq_s16 ARM intrinsic", "vhaddq_s32 ARM intrinsic", "vhaddq_s8 ARM intrinsic", "vhaddq_u16 ARM intrinsic", "vhaddq_u32 ARM intrinsic", "vhaddq_u8 ARM intrinsic", "vhsub_s16 ARM intrinsic", "vhsub_s32 ARM intrinsic", "vhsub_s8 ARM intrinsic", "vhsub_u16 ARM intrinsic", "vhsub_u32 ARM intrinsic", "vhsub_u8 ARM intrinsic", "vhsubq_s16 ARM intrinsic", "vhsubq_s32 ARM intrinsic", "vhsubq_s8 ARM intrinsic", "vhsubq_u16 ARM intrinsic", "vhsubq_u32 ARM intrinsic", "vhsubq_u8 ARM intrinsic", "vld1_dup_f16 ARM intrinsic", "vld1_dup_f32 ARM intrinsic", "vld1_dup_p16 ARM intrinsic", "vld1_dup_p8 ARM intrinsic", "vld1_dup_s16 ARM intrinsic", "vld1_dup_s32 ARM intrinsic", "vld1_dup_s64 ARM intrinsic", "vld1_dup_s8 ARM intrinsic", "vld1_dup_u16 ARM intrinsic", "vld1_dup_u32 ARM intrinsic", "vld1_dup_u64 ARM intrinsic", "vld1_dup_u8 ARM intrinsic", "vld1_f16 ARM intrinsic", "vld1_f32 ARM intrinsic", "vld1_lane_f32 ARM intrinsic", "vld1_lane_p16 ARM intrinsic", "vld1_lane_p8 ARM intrinsic", "vld1_lane_s16 ARM intrinsic", "vld1_lane_s32 ARM intrinsic", "vld1_lane_s64 ARM intrinsic", "vld1_lane_s8 ARM intrinsic", "vld1_lane_u16 ARM intrinsic", "vld1_lane_u32 ARM intrinsic", "vld1_lane_u64 ARM intrinsic", "vld1_lane_u8 ARM intrinsic", "vld1_p16 ARM intrinsic", "vld1_p8 ARM intrinsic", "vld1_s16 ARM intrinsic", "vld1_s32 ARM intrinsic", "vld1_s64 ARM intrinsic", "vld1_s8 ARM intrinsic", "vld1_u16 ARM intrinsic", "vld1_u32 ARM intrinsic", "vld1_u64 ARM intrinsic", "vld1_u8 ARM intrinsic", "vld1q_dup_f16 ARM intrinsic", "vld1q_dup_f32 ARM intrinsic", "vld1q_dup_p16 ARM intrinsic", "vld1q_dup_p8 ARM intrinsic", "vld1q_dup_s16 ARM intrinsic", "vld1q_dup_s32 ARM intrinsic", "vld1q_dup_s64 ARM intrinsic", "vld1q_dup_s8 ARM intrinsic", "vld1q_dup_u16 ARM intrinsic", "vld1q_dup_u32 ARM intrinsic", "vld1q_dup_u64 ARM intrinsic", "vld1q_dup_u8 ARM intrinsic", "vld1q_f16 ARM intrinsic", "vld1q_f32 ARM intrinsic", "vld1q_lane_f16 ARM intrinsic", "vld1q_lane_f32 ARM intrinsic", "vld1q_lane_p16 ARM intrinsic", "vld1q_lane_p8 ARM intrinsic", "vld1q_lane_s16 ARM intrinsic", "vld1q_lane_s32 ARM intrinsic", "vld1q_lane_s64 ARM intrinsic", "vld1q_lane_s8 ARM intrinsic", "vld1q_lane_u16 ARM intrinsic", "vld1q_lane_u32 ARM intrinsic", "vld1q_lane_u64 ARM intrinsic", "vld1q_lane_u8 ARM intrinsic", "vld1q_p16 ARM intrinsic", "vld1q_p8 ARM intrinsic", "vld1q_s16 ARM intrinsic", "vld1q_s32 ARM intrinsic", "vld1q_s64 ARM intrinsic", "vld1q_s8 ARM intrinsic", "vld1q_u16 ARM intrinsic", "vld1q_u32 ARM intrinsic", "vld1q_u64 ARM intrinsic", "vld1q_u8 ARM intrinsic", "vld2_dup_f16 ARM intrinsic", "vld2_dup_f32 ARM intrinsic", "vld2_dup_p16 ARM intrinsic", "vld2_dup_p8 ARM intrinsic", "vld2_dup_s16 ARM intrinsic", "vld2_dup_s32 ARM intrinsic", "vld2_dup_s64 ARM intrinsic", "vld2_dup_s8 ARM intrinsic", "vld2_dup_u16 ARM intrinsic", "vld2_dup_u32 ARM intrinsic", "vld2_dup_u64 ARM intrinsic", "vld2_dup_u8 ARM intrinsic", "vld2_f16 ARM intrinsic", "vld2_f32 ARM intrinsic", "vld2_lane_f16 ARM intrinsic", "vld2_lane_f32 ARM intrinsic", "vld2_lane_p16 ARM intrinsic", "vld2_lane_p8 ARM intrinsic", "vld2_lane_s16 ARM intrinsic", "vld2_lane_s32 ARM intrinsic", "vld2_lane_s8 ARM intrinsic", "vld2_lane_u16 ARM intrinsic", "vld2_lane_u32 ARM intrinsic", "vld2_lane_u8 ARM intrinsic", "vld2_p16 ARM intrinsic", "vld2_p8 ARM intrinsic", "vld2_s16 ARM intrinsic", "vld2_s32 ARM intrinsic", "vld2_s64 ARM intrinsic", "vld2_s8 ARM intrinsic", "vld2_u16 ARM intrinsic", "vld2_u32 ARM intrinsic", "vld2_u64 ARM intrinsic", "vld2_u8 ARM intrinsic", "vld2q_f16 ARM intrinsic", "vld2q_f32 ARM intrinsic", "vld2q_lane_f16 ARM intrinsic", "vld2q_lane_f32 ARM intrinsic", "vld2q_lane_p16 ARM intrinsic", "vld2q_lane_s16 ARM intrinsic", "vld2q_lane_s32 ARM intrinsic", "vld2q_lane_u16 ARM intrinsic", "vld2q_lane_u32 ARM intrinsic", "vld2q_p16 ARM intrinsic", "vld2q_p8 ARM intrinsic", "vld2q_s16 ARM intrinsic", "vld2q_s32 ARM intrinsic", "vld2q_s8 ARM intrinsic", "vld2q_u16 ARM intrinsic", "vld2q_u32 ARM intrinsic", "vld2q_u8 ARM intrinsic", "vld3_dup_f16 ARM intrinsic", "vld3_dup_f32 ARM intrinsic", "vld3_dup_p16 ARM intrinsic", "vld3_dup_p8 ARM intrinsic", "vld3_dup_s16 ARM intrinsic", "vld3_dup_s32 ARM intrinsic", "vld3_dup_s64 ARM intrinsic", "vld3_dup_s8 ARM intrinsic", "vld3_dup_u16 ARM intrinsic", "vld3_dup_u32 ARM intrinsic", "vld3_dup_u64 ARM intrinsic", "vld3_dup_u8 ARM intrinsic", "vld3_f16 ARM intrinsic", "vld3_f32 ARM intrinsic", "vld3_lane_f16 ARM intrinsic", "vld3_lane_f32 ARM intrinsic", "vld3_lane_p16 ARM intrinsic", "vld3_lane_p8 ARM intrinsic", "vld3_lane_s16 ARM intrinsic", "vld3_lane_s32 ARM intrinsic", "vld3_lane_s8 ARM intrinsic", "vld3_lane_u16 ARM intrinsic", "vld3_lane_u32 ARM intrinsic", "vld3_lane_u8 ARM intrinsic", "vld3_p16 ARM intrinsic", "vld3_p8 ARM intrinsic", "vld3_s16 ARM intrinsic", "vld3_s32 ARM intrinsic", "vld3_s64 ARM intrinsic", "vld3_s8 ARM intrinsic", "vld3_u16 ARM intrinsic", "vld3_u32 ARM intrinsic", "vld3_u64 ARM intrinsic", "vld3_u8 ARM intrinsic", "vld3q_f16 ARM intrinsic", "vld3q_f32 ARM intrinsic", "vld3q_lane_f16 ARM intrinsic", "vld3q_lane_f32 ARM intrinsic", "vld3q_lane_p16 ARM intrinsic", "vld3q_lane_s16 ARM intrinsic", "vld3q_lane_s32 ARM intrinsic", "vld3q_lane_u16 ARM intrinsic", "vld3q_lane_u32 ARM intrinsic", "vld3q_p16 ARM intrinsic", "vld3q_p8 ARM intrinsic", "vld3q_s16 ARM intrinsic", "vld3q_s32 ARM intrinsic", "vld3q_s8 ARM intrinsic", "vld3q_u16 ARM intrinsic", "vld3q_u32 ARM intrinsic", "vld3q_u8 ARM intrinsic", "vld4_dup_f16 ARM intrinsic", "vld4_dup_f32 ARM intrinsic", "vld4_dup_p16 ARM intrinsic", "vld4_dup_p8 ARM intrinsic", "vld4_dup_s16 ARM intrinsic", "vld4_dup_s32 ARM intrinsic", "vld4_dup_s64 ARM intrinsic", "vld4_dup_s8 ARM intrinsic", "vld4_dup_u16 ARM intrinsic", "vld4_dup_u32 ARM intrinsic", "vld4_dup_u64 ARM intrinsic", "vld4_dup_u8 ARM intrinsic", "vld4_f16 ARM intrinsic", "vld4_f32 ARM intrinsic", "vld4_lane_f16 ARM intrinsic", "vld4_lane_f32 ARM intrinsic", "vld4_lane_p16 ARM intrinsic", "vld4_lane_p8 ARM intrinsic", "vld4_lane_s16 ARM intrinsic", "vld4_lane_s32 ARM intrinsic", "vld4_lane_s8 ARM intrinsic", "vld4_lane_u16 ARM intrinsic", "vld4_lane_u32 ARM intrinsic", "vld4_lane_u8 ARM intrinsic", "vld4_p16 ARM intrinsic", "vld4_p8 ARM intrinsic", "vld4_s16 ARM intrinsic", "vld4_s32 ARM intrinsic", "vld4_s64 ARM intrinsic", "vld4_s8 ARM intrinsic", "vld4_u16 ARM intrinsic", "vld4_u32 ARM intrinsic", "vld4_u64 ARM intrinsic", "vld4_u8 ARM intrinsic", "vld4q_f16 ARM intrinsic", "vld4q_f32 ARM intrinsic", "vld4q_lane_f16 ARM intrinsic", "vld4q_lane_f32 ARM intrinsic", "vld4q_lane_p16 ARM intrinsic", "vld4q_lane_s16 ARM intrinsic", "vld4q_lane_s32 ARM intrinsic", "vld4q_lane_u16 ARM intrinsic", "vld4q_lane_u32 ARM intrinsic", "vld4q_p16 ARM intrinsic", "vld4q_p8 ARM intrinsic", "vld4q_s16 ARM intrinsic", "vld4q_s32 ARM intrinsic", "vld4q_s8 ARM intrinsic", "vld4q_u16 ARM intrinsic", "vld4q_u32 ARM intrinsic", "vld4q_u8 ARM intrinsic", "vmax_f32 ARM intrinsic", "vmax_s16 ARM intrinsic", "vmax_s32 ARM intrinsic", "vmax_s8 ARM intrinsic", "vmax_u16 ARM intrinsic", "vmax_u32 ARM intrinsic", "vmax_u8 ARM intrinsic", "vmaxq_f32 ARM intrinsic", "vmaxq_s16 ARM intrinsic", "vmaxq_s32 ARM intrinsic", "vmaxq_s8 ARM intrinsic", "vmaxq_u16 ARM intrinsic", "vmaxq_u32 ARM intrinsic", "vmaxq_u8 ARM intrinsic", "vmin_f32 ARM intrinsic", "vmin_s16 ARM intrinsic", "vmin_s32 ARM intrinsic", "vmin_s8 ARM intrinsic", "vmin_u16 ARM intrinsic", "vmin_u32 ARM intrinsic", "vmin_u8 ARM intrinsic", "vminq_f32 ARM intrinsic", "vminq_s16 ARM intrinsic", "vminq_s32 ARM intrinsic", "vminq_s8 ARM intrinsic", "vminq_u16 ARM intrinsic", "vminq_u32 ARM intrinsic", "vminq_u8 ARM intrinsic", "vmla_f32 ARM intrinsic", "vmla_lane_f32 ARM intrinsic", "vmla_lane_s16 ARM intrinsic", "vmla_lane_s32 ARM intrinsic", "vmla_lane_u16 ARM intrinsic", "vmla_lane_u32 ARM intrinsic", "vmla_n_f32 ARM intrinsic", "vmla_n_s16 ARM intrinsic", "vmla_n_s32 ARM intrinsic", "vmla_n_u16 ARM intrinsic", "vmla_n_u32 ARM intrinsic", "vmla_s16 ARM intrinsic", "vmla_s32 ARM intrinsic", "vmla_s8 ARM intrinsic", "vmla_u16 ARM intrinsic", "vmla_u32 ARM intrinsic", "vmla_u8 ARM intrinsic", "vmlal_lane_s16 ARM intrinsic", "vmlal_lane_s32 ARM intrinsic", "vmlal_lane_u16 ARM intrinsic", "vmlal_lane_u32 ARM intrinsic", "vmlal_n_s16 ARM intrinsic", "vmlal_n_s32 ARM intrinsic", "vmlal_n_u16 ARM intrinsic", "vmlal_n_u32 ARM intrinsic", "vmlal_s16 ARM intrinsic", "vmlal_s32 ARM intrinsic", "vmlal_s8 ARM intrinsic", "vmlal_u16 ARM intrinsic", "vmlal_u32 ARM intrinsic", "vmlal_u8 ARM intrinsic", "vmlaq_f32 ARM intrinsic", "vmlaq_lane_f32 ARM intrinsic", "vmlaq_lane_s16 ARM intrinsic", "vmlaq_lane_s32 ARM intrinsic", "vmlaq_lane_u16 ARM intrinsic", "vmlaq_lane_u32 ARM intrinsic", "vmlaq_n_f32 ARM intrinsic", "vmlaq_n_s16 ARM intrinsic", "vmlaq_n_s32 ARM intrinsic", "vmlaq_n_u16 ARM intrinsic", "vmlaq_n_u32 ARM intrinsic", "vmlaq_s16 ARM intrinsic", "vmlaq_s32 ARM intrinsic", "vmlaq_s8 ARM intrinsic", "vmlaq_u16 ARM intrinsic", "vmlaq_u32 ARM intrinsic", "vmlaq_u8 ARM intrinsic", "vmls_f32 ARM intrinsic", "vmls_lane_f32 ARM intrinsic", "vmls_lane_s16 ARM intrinsic", "vmls_lane_s32 ARM intrinsic", "vmls_lane_u16 ARM intrinsic", "vmls_lane_u32 ARM intrinsic", "vmls_n_f32 ARM intrinsic", "vmls_n_s16 ARM intrinsic", "vmls_n_s32 ARM intrinsic", "vmls_n_u16 ARM intrinsic", "vmls_n_u32 ARM intrinsic", "vmls_s16 ARM intrinsic", "vmls_s32 ARM intrinsic", "vmls_s8 ARM intrinsic", "vmls_u16 ARM intrinsic", "vmls_u32 ARM intrinsic", "vmls_u8 ARM intrinsic", "vmlsl_lane_s16 ARM intrinsic", "vmlsl_lane_s32 ARM intrinsic", "vmlsl_lane_u16 ARM intrinsic", "vmlsl_lane_u32 ARM intrinsic", "vmlsl_n_s16 ARM intrinsic", "vmlsl_n_s32 ARM intrinsic", "vmlsl_n_u16 ARM intrinsic", "vmlsl_n_u32 ARM intrinsic", "vmlsl_s16 ARM intrinsic", "vmlsl_s32 ARM intrinsic", "vmlsl_s8 ARM intrinsic", "vmlsl_u16 ARM intrinsic", "vmlsl_u32 ARM intrinsic", "vmlsl_u8 ARM intrinsic", "vmlsq_lane_f32 ARM intrinsic", "vmlsq_lane_s16 ARM intrinsic", "vmlsq_lane_s32 ARM intrinsic", "vmlsq_lane_u16 ARM intrinsic", "vmlsq_lane_u32 ARM intrinsic", "vmlsq_n_f32 ARM intrinsic", "vmlsq_n_s16 ARM intrinsic", "vmlsq_n_s32 ARM intrinsic", "vmlsq_n_u16 ARM intrinsic", "vmlsq_n_u32 ARM intrinsic", "vmlsq_s16 ARM intrinsic", "vmlsq_s32 ARM intrinsic", "vmlsq_s8 ARM intrinsic", "vmov_n_f32 ARM intrinsic", "vmov_n_p16 ARM intrinsic", "vmov_n_p8 ARM intrinsic", "vmov_n_s16 ARM intrinsic", "vmov_n_s32 ARM intrinsic", "vmov_n_s64 ARM intrinsic", "vmov_n_s8 ARM intrinsic", "vmov_n_u16 ARM intrinsic", "vmov_n_u32 ARM intrinsic", "vmov_n_u64 ARM intrinsic", "vmov_n_u8 ARM intrinsic", "vmovl_s16 ARM intrinsic", "vmovl_s32 ARM intrinsic", "vmovl_s8 ARM intrinsic", "vmovl_u16 ARM intrinsic", "vmovl_u32 ARM intrinsic", "vmovl_u8 ARM intrinsic", "vmovn_s16 ARM intrinsic", "vmovn_s32 ARM intrinsic", "vmovn_s64 ARM intrinsic", "vmovn_u16 ARM intrinsic", "vmovn_u32 ARM intrinsic", "vmovn_u64 ARM intrinsic", "vmovq_n_f32 ARM intrinsic", "vmovq_n_p16 ARM intrinsic", "vmovq_n_p8 ARM intrinsic", "vmovq_n_s16 ARM intrinsic", "vmovq_n_s32 ARM intrinsic", "vmovq_n_s64 ARM intrinsic", "vmovq_n_s8 ARM intrinsic", "vmovq_n_u16 ARM intrinsic", "vmovq_n_u32 ARM intrinsic", "vmovq_n_u64 ARM intrinsic", "vmovq_n_u8 ARM intrinsic", "vmul_f32 ARM intrinsic", "vmul_n_f32 ARM intrinsic", "vmul_n_s16 ARM intrinsic", "vmul_n_s32 ARM intrinsic", "vmul_n_u16 ARM intrinsic", "vmul_n_u32 ARM intrinsic", "vmul_p8 ARM intrinsic", "vmul_s16 ARM intrinsic", "vmul_s32 ARM intrinsic", "vmul_s8 ARM intrinsic", "vmul_u16 ARM intrinsic", "vmul_u32 ARM intrinsic", "vmul_u8 ARM intrinsic", "vmull_lane_s16 ARM intrinsic", "vmull_lane_s32 ARM intrinsic", "vmull_lane_u16 ARM intrinsic", "vmull_lane_u32 ARM intrinsic", "vmull_n_s16 ARM intrinsic", "vmull_n_s32 ARM intrinsic", "vmull_n_u16 ARM intrinsic", "vmull_n_u32 ARM intrinsic", "vmull_p8 ARM intrinsic", "vmull_s16 ARM intrinsic", "vmull_s32 ARM intrinsic", "vmull_s8 ARM intrinsic", "vmull_u16 ARM intrinsic", "vmull_u32 ARM intrinsic", "vmull_u8 ARM intrinsic", "vmulq_f32 ARM intrinsic", "vmulq_n_f32 ARM intrinsic", "vmulq_n_s16 ARM intrinsic", "vmulq_n_s32 ARM intrinsic", "vmulq_n_u16 ARM intrinsic", "vmulq_n_u32 ARM intrinsic", "vmulq_p8 ARM intrinsic", "vmulq_s16 ARM intrinsic", "vmulq_s32 ARM intrinsic", "vmulq_s8 ARM intrinsic", "vmulq_u16 ARM intrinsic", "vmulq_u32 ARM intrinsic", "vmulq_u8 ARM intrinsic", "vmvn_p8 ARM intrinsic", "vmvn_s16 ARM intrinsic", "vmvn_s32 ARM intrinsic", "vmvn_s8 ARM intrinsic", "vmvn_u16 ARM intrinsic", "vmvn_u32 ARM intrinsic", "vmvn_u8 ARM intrinsic", "vmvnq_p8 ARM intrinsic", "vmvnq_s16 ARM intrinsic", "vmvnq_s32 ARM intrinsic", "vmvnq_s8 ARM intrinsic", "vmvnq_u16 ARM intrinsic", "vmvnq_u32 ARM intrinsic", "vmvnq_u8 ARM intrinsic", "vneg_f32 ARM intrinsic", "vneg_s16 ARM intrinsic", "vneg_s32 ARM intrinsic", "vneg_s8 ARM intrinsic", "vnegq_f32 ARM intrinsic", "vnegq_s16 ARM intrinsic", "vnegq_s32 ARM intrinsic", "vnegq_s8 ARM intrinsic", "vorn_s16 ARM intrinsic", "vorn_s32 ARM intrinsic", "vorn_s64 ARM intrinsic", "vorn_s8 ARM intrinsic", "vorn_u16 ARM intrinsic", "vorn_u32 ARM intrinsic", "vorn_u64 ARM intrinsic", "vorn_u8 ARM intrinsic", "vornq_s16 ARM intrinsic", "vornq_s32 ARM intrinsic", "vornq_s64 ARM intrinsic", "vornq_s8 ARM intrinsic", "vornq_u16 ARM intrinsic", "vornq_u32 ARM intrinsic", "vornq_u64 ARM intrinsic", "vornq_u8 ARM intrinsic", "vorr_s16 ARM intrinsic", "vorr_s32 ARM intrinsic", "vorr_s64 ARM intrinsic", "vorr_s8 ARM intrinsic", "vorr_u16 ARM intrinsic", "vorr_u32 ARM intrinsic", "vorr_u64 ARM intrinsic", "vorr_u8 ARM intrinsic", "vorrq_s16 ARM intrinsic", "vorrq_s32 ARM intrinsic", "vorrq_s64 ARM intrinsic", "vorrq_s8 ARM intrinsic", "vorrq_u16 ARM intrinsic", "vorrq_u32 ARM intrinsic", "vorrq_u64 ARM intrinsic", "vorrq_u8 ARM intrinsic", "vpadal_s16 ARM intrinsic", "vpadal_s32 ARM intrinsic", "vpadal_s8 ARM intrinsic", "vpadal_u16 ARM intrinsic", "vpadal_u32 ARM intrinsic", "vpadal_u8 ARM intrinsic", "vpadalq_s16 ARM intrinsic", "vpadalq_s32 ARM intrinsic", "vpadalq_s8 ARM intrinsic", "vpadalq_u16 ARM intrinsic", "vpadalq_u32 ARM intrinsic", "vpadalq_u8 ARM intrinsic", "vpadd_f32 ARM intrinsic", "vpadd_s16 ARM intrinsic", "vpadd_s32 ARM intrinsic", "vpadd_s8 ARM intrinsic", "vpadd_u16 ARM intrinsic", "vpadd_u32 ARM intrinsic", "vpadd_u8 ARM intrinsic", "vpaddl_s16 ARM intrinsic", "vpaddl_s32 ARM intrinsic", "vpaddl_s8 ARM intrinsic", "vpaddl_u16 ARM intrinsic", "vpaddl_u32 ARM intrinsic", "vpaddl_u8 ARM intrinsic", "vpaddlq_s16 ARM intrinsic", "vpaddlq_s32 ARM intrinsic", "vpaddlq_s8 ARM intrinsic", "vpaddlq_u16 ARM intrinsic", "vpaddlq_u32 ARM intrinsic", "vpaddlq_u8 ARM intrinsic", "vpmax_f32 ARM intrinsic", "vpmax_s16 ARM intrinsic", "vpmax_s32 ARM intrinsic", "vpmax_s8 ARM intrinsic", "vpmax_u16 ARM intrinsic", "vpmax_u32 ARM intrinsic", "vpmax_u8 ARM intrinsic", "vpmin_f32 ARM intrinsic", "vpmin_s16 ARM intrinsic", "vpmin_s32 ARM intrinsic", "vpmin_s8 ARM intrinsic", "vpmin_u16 ARM intrinsic", "vpmin_u32 ARM intrinsic", "vpmin_u8 ARM intrinsic", "vqabs_s16 ARM intrinsic", "vqabs_s32 ARM intrinsic", "vqabs_s8 ARM intrinsic", "vqabsq_s16 ARM intrinsic", "vqabsq_s32 ARM intrinsic", "vqabsq_s8 ARM intrinsic", "vqadd_s16 ARM intrinsic", "vqadd_s32 ARM intrinsic", "vqadd_s64 ARM intrinsic", "vqadd_s8 ARM intrinsic", "vqadd_u16 ARM intrinsic", "vqadd_u32 ARM intrinsic", "vqadd_u64 ARM intrinsic", "vqadd_u8 ARM intrinsic", "vqaddq_s16 ARM intrinsic", "vqaddq_s32 ARM intrinsic", "vqaddq_s64 ARM intrinsic", "vqaddq_s8 ARM intrinsic", "vqaddq_u16 ARM intrinsic", "vqaddq_u32 ARM intrinsic", "vqaddq_u64 ARM intrinsic", "vqaddq_u8 ARM intrinsic", "vqdmlal_lane_s16 ARM intrinsic", "vqdmlal_lane_s32 ARM intrinsic", "vqdmlal_n_s16 ARM intrinsic", "vqdmlal_n_s32 ARM intrinsic", "vqdmlal_s16 ARM intrinsic", "vqdmlal_s32 ARM intrinsic", "vqdmlsl_lane_s16 ARM intrinsic", "vqdmlsl_lane_s32 ARM intrinsic", "vqdmlsl_n_s16 ARM intrinsic", "vqdmlsl_n_s32 ARM intrinsic", "vqdmlsl_s16 ARM intrinsic", "vqdmlsl_s32 ARM intrinsic", "vqdmulh_lane_s16 ARM intrinsic", "vqdmulh_lane_s32 ARM intrinsic", "vqdmulh_n_s16 ARM intrinsic", "vqdmulh_n_s32 ARM intrinsic", "vqdmulh_s16 ARM intrinsic", "vqdmulh_s32 ARM intrinsic", "vqdmulhq_lane_s16 ARM intrinsic", "vqdmulhq_lane_s32 ARM intrinsic", "vqdmulhq_n_s16 ARM intrinsic", "vqdmulhq_n_s32 ARM intrinsic", "vqdmulhq_s16 ARM intrinsic", "vqdmulhq_s32 ARM intrinsic", "vqdmull_lane_s16 ARM intrinsic", "vqdmull_lane_s32 ARM intrinsic", "vqdmull_n_s16 ARM intrinsic", "vqdmull_n_s32 ARM intrinsic", "vqdmull_s16 ARM intrinsic", "vqdmull_s32 ARM intrinsic", "vqmovn_s16 ARM intrinsic", "vqmovn_s32 ARM intrinsic", "vqmovn_s64 ARM intrinsic", "vqmovn_u16 ARM intrinsic", "vqmovn_u32 ARM intrinsic", "vqmovn_u64 ARM intrinsic", "vqmovun_s16 ARM intrinsic", "vqmovun_s32 ARM intrinsic", "vqmovun_s64 ARM intrinsic", "vqneg_s16 ARM intrinsic", "vqneg_s32 ARM intrinsic", "vqneg_s8 ARM intrinsic", "vqnegq_s16 ARM intrinsic", "vqnegq_s32 ARM intrinsic", "vqnegq_s8 ARM intrinsic", "vqrdmulh_lane_s16 ARM intrinsic", "vqrdmulh_lane_s32 ARM intrinsic", "vqrdmulh_n_s16 ARM intrinsic", "vqrdmulh_n_s32 ARM intrinsic", "vqrdmulh_s16 ARM intrinsic", "vqrdmulh_s32 ARM intrinsic", "vqrdmulhq_lane_s16 ARM intrinsic", "vqrdmulhq_lane_s32 ARM intrinsic", "vqrdmulhq_n_s16 ARM intrinsic", "vqrdmulhq_n_s32 ARM intrinsic", "vqrdmulhq_s16 ARM intrinsic", "vqrdmulhq_s32 ARM intrinsic", "vqrshl_s16 ARM intrinsic", "vqrshl_s32 ARM intrinsic", "vqrshl_s64 ARM intrinsic", "vqrshl_s8 ARM intrinsic", "vqrshl_u16 ARM intrinsic", "vqrshl_u32 ARM intrinsic", "vqrshl_u64 ARM intrinsic", "vqrshl_u8 ARM intrinsic", "vqrshlq_s16 ARM intrinsic", "vqrshlq_s32 ARM intrinsic", "vqrshlq_s64 ARM intrinsic", "vqrshlq_s8 ARM intrinsic", "vqrshlq_u16 ARM intrinsic", "vqrshlq_u32 ARM intrinsic", "vqrshlq_u64 ARM intrinsic", "vqrshlq_u8 ARM intrinsic", "vqrshrn_n_s16 ARM intrinsic", "vqrshrn_n_s32 ARM intrinsic", "vqrshrn_n_s64 ARM intrinsic", "vqrshrn_n_u16 ARM intrinsic", "vqrshrn_n_u32 ARM intrinsic", "vqrshrn_n_u64 ARM intrinsic", "vqrshrun_n_s16 ARM intrinsic", "vqrshrun_n_s32 ARM intrinsic", "vqrshrun_n_s64 ARM intrinsic", "vqshl_n_s16 ARM intrinsic", "vqshl_n_s32 ARM intrinsic", "vqshl_n_s64 ARM intrinsic", "vqshl_n_s8 ARM intrinsic", "vqshl_n_u16 ARM intrinsic", "vqshl_n_u32 ARM intrinsic", "vqshl_n_u64 ARM intrinsic", "vqshl_n_u8 ARM intrinsic", "vqshl_s16 ARM intrinsic", "vqshl_s32 ARM intrinsic", "vqshl_s64 ARM intrinsic", "vqshl_s8 ARM intrinsic", "vqshl_u16 ARM intrinsic", "vqshl_u32 ARM intrinsic", "vqshl_u64 ARM intrinsic", "vqshl_u8 ARM intrinsic", "vqshlq_n_s16 ARM intrinsic", "vqshlq_n_s32 ARM intrinsic", "vqshlq_n_s64 ARM intrinsic", "vqshlq_n_s8 ARM intrinsic", "vqshlq_n_u16 ARM intrinsic", "vqshlq_n_u32 ARM intrinsic", "vqshlq_n_u64 ARM intrinsic", "vqshlq_n_u8 ARM intrinsic", "vqshlq_s16 ARM intrinsic", "vqshlq_s32 ARM intrinsic", "vqshlq_s64 ARM intrinsic", "vqshlq_s8 ARM intrinsic", "vqshlq_u16 ARM intrinsic", "vqshlq_u32 ARM intrinsic", "vqshlq_u64 ARM intrinsic", "vqshlq_u8 ARM intrinsic", "vqshlu_n_s16 ARM intrinsic", "vqshlu_n_s32 ARM intrinsic", "vqshlu_n_s64 ARM intrinsic", "vqshlu_n_s8 ARM intrinsic", "vqshluq_n_s16 ARM intrinsic", "vqshluq_n_s32 ARM intrinsic", "vqshluq_n_s64 ARM intrinsic", "vqshluq_n_s8 ARM intrinsic", "vqshrn_n_s16 ARM intrinsic", "vqshrn_n_s32 ARM intrinsic", "vqshrn_n_s64 ARM intrinsic", "vqshrn_n_u16 ARM intrinsic", "vqshrn_n_u32 ARM intrinsic", "vqshrn_n_u64 ARM intrinsic", "vqshrun_n_s16 ARM intrinsic", "vqshrun_n_s32 ARM intrinsic", "vqshrun_n_s64 ARM intrinsic", "vqsub_s16 ARM intrinsic", "vqsub_s32 ARM intrinsic", "vqsub_s64 ARM intrinsic", "vqsub_s8 ARM intrinsic", "vqsub_u16 ARM intrinsic", "vqsub_u32 ARM intrinsic", "vqsub_u64 ARM intrinsic", "vqsub_u8 ARM intrinsic", "vqsubq_s16 ARM intrinsic", "vqsubq_s32 ARM intrinsic", "vqsubq_s64 ARM intrinsic", "vqsubq_s8 ARM intrinsic", "vqsubq_u16 ARM intrinsic", "vqsubq_u32 ARM intrinsic", "vqsubq_u64 ARM intrinsic", "vqsubq_u8 ARM intrinsic", "vraddhn_s16 ARM intrinsic", "vraddhn_s32 ARM intrinsic", "vraddhn_s64 ARM intrinsic", "vraddhn_u16 ARM intrinsic", "vraddhn_u32 ARM intrinsic", "vraddhn_u64 ARM intrinsic", "vrecpe_f32 ARM intrinsic", "vrecpe_u32 ARM intrinsic", "vrecpeq_f32 ARM intrinsic", "vrecpeq_u32 ARM intrinsic", "vrecps_f32 ARM intrinsic", "vrecpsq_f32 ARM intrinsic", "vrev16_p8 ARM intrinsic", "vrev16_s8 ARM intrinsic", "vrev16_u8 ARM intrinsic", "vrev16q_p8 ARM intrinsic", "vrev16q_s8 ARM intrinsic", "vrev16q_u8 ARM intrinsic", "vrev32_p8 ARM intrinsic", "vrev32_s16 ARM intrinsic", "vrev32_s8 ARM intrinsic", "vrev32_u16 ARM intrinsic", "vrev32_u8 ARM intrinsic", "vrev32q_p8 ARM intrinsic", "vrev32q_s16 ARM intrinsic", "vrev32q_s8 ARM intrinsic", "vrev32q_u16 ARM intrinsic", "vrev32q_u8 ARM intrinsic", "vrev64_f32 ARM intrinsic", "vrev64_p16 ARM intrinsic", "vrev64_p8 ARM intrinsic", "vrev64_s16 ARM intrinsic", "vrev64_s32 ARM intrinsic", "vrev64_s8 ARM intrinsic", "vrev64_u16 ARM intrinsic", "vrev64_u32 ARM intrinsic", "vrev64_u8 ARM intrinsic", "vrev64q_f32 ARM intrinsic", "vrev64q_p16 ARM intrinsic", "vrev64q_p8 ARM intrinsic", "vrev64q_s16 ARM intrinsic", "vrev64q_s32 ARM intrinsic", "vrev64q_s8 ARM intrinsic", "vrev64q_u16 ARM intrinsic", "vrev64q_u32 ARM intrinsic", "vrev64q_u8 ARM intrinsic", "vrhadd_s16 ARM intrinsic", "vrhadd_s32 ARM intrinsic", "vrhadd_s8 ARM intrinsic", "vrhadd_u16 ARM intrinsic", "vrhadd_u32 ARM intrinsic", "vrhadd_u8 ARM intrinsic", "vrhaddq_s16 ARM intrinsic", "vrhaddq_s32 ARM intrinsic", "vrhaddq_s8 ARM intrinsic", "vrhaddq_u16 ARM intrinsic", "vrhaddq_u32 ARM intrinsic", "vrhaddq_u8 ARM intrinsic", "vrshl_s16 ARM intrinsic", "vrshl_s32 ARM intrinsic", "vrshl_s64 ARM intrinsic", "vrshl_s8 ARM intrinsic", "vrshl_u16 ARM intrinsic", "vrshl_u32 ARM intrinsic", "vrshl_u64 ARM intrinsic", "vrshl_u8 ARM intrinsic", "vrshlq_s16 ARM intrinsic", "vrshlq_s32 ARM intrinsic", "vrshlq_s64 ARM intrinsic", "vrshlq_s8 ARM intrinsic", "vrshlq_u16 ARM intrinsic", "vrshlq_u32 ARM intrinsic", "vrshlq_u64 ARM intrinsic", "vrshlq_u8 ARM intrinsic", "vrshr_n_s16 ARM intrinsic", "vrshr_n_s32 ARM intrinsic", "vrshr_n_s64 ARM intrinsic", "vrshr_n_s8 ARM intrinsic", "vrshr_n_u16 ARM intrinsic", "vrshr_n_u32 ARM intrinsic", "vrshr_n_u64 ARM intrinsic", "vrshr_n_u8 ARM intrinsic", "vrshrn_n_s16 ARM intrinsic", "vrshrn_n_s32 ARM intrinsic", "vrshrn_n_s64 ARM intrinsic", "vrshrn_n_u16 ARM intrinsic", "vrshrn_n_u32 ARM intrinsic", "vrshrn_n_u64 ARM intrinsic", "vrshrq_n_s16 ARM intrinsic", "vrshrq_n_s32 ARM intrinsic", "vrshrq_n_s64 ARM intrinsic", "vrshrq_n_s8 ARM intrinsic", "vrshrq_n_u16 ARM intrinsic", "vrshrq_n_u32 ARM intrinsic", "vrshrq_n_u64 ARM intrinsic", "vrshrq_n_u8 ARM intrinsic", "vrsqrte_f32 ARM intrinsic", "vrsqrte_u32 ARM intrinsic", "vrsqrteq_f32 ARM intrinsic", "vrsqrteq_u32 ARM intrinsic", "vrsqrts_f32 ARM intrinsic", "vrsqrtsq_f32 ARM intrinsic", "vrsra_n_s16 ARM intrinsic", "vrsra_n_s32 ARM intrinsic", "vrsra_n_s64 ARM intrinsic", "vrsra_n_s8 ARM intrinsic", "vrsra_n_u16 ARM intrinsic", "vrsra_n_u32 ARM intrinsic", "vrsra_n_u64 ARM intrinsic", "vrsra_n_u8 ARM intrinsic", "vrsraq_n_s16 ARM intrinsic", "vrsraq_n_s32 ARM intrinsic", "vrsraq_n_s64 ARM intrinsic", "vrsraq_n_s8 ARM intrinsic", "vrsraq_n_u16 ARM intrinsic", "vrsraq_n_u32 ARM intrinsic", "vrsraq_n_u64 ARM intrinsic", "vrsraq_n_u8 ARM intrinsic", "vrsubhn_s16 ARM intrinsic", "vrsubhn_s32 ARM intrinsic", "vrsubhn_s64 ARM intrinsic", "vrsubhn_u16 ARM intrinsic", "vrsubhn_u32 ARM intrinsic", "vrsubhn_u64 ARM intrinsic", "vset_lane_f32 ARM intrinsic", "vset_lane_p16 ARM intrinsic", "vset_lane_p8 ARM intrinsic", "vset_lane_s16 ARM intrinsic", "vset_lane_s32 ARM intrinsic", "vset_lane_s64 ARM intrinsic", "vset_lane_s8 ARM intrinsic", "vset_lane_u16 ARM intrinsic", "vset_lane_u32 ARM intrinsic", "vset_lane_u64 ARM intrinsic", "vset_lane_u8 ARM intrinsic", "vsetq_lane_f32 ARM intrinsic", "vsetq_lane_p16 ARM intrinsic", "vsetq_lane_p8 ARM intrinsic", "vsetq_lane_s16 ARM intrinsic", "vsetq_lane_s32 ARM intrinsic", "vsetq_lane_s64 ARM intrinsic", "vsetq_lane_s8 ARM intrinsic", "vsetq_lane_u16 ARM intrinsic", "vsetq_lane_u32 ARM intrinsic", "vsetq_lane_u64 ARM intrinsic", "vsetq_lane_u8 ARM intrinsic", "vshl_n_s16 ARM intrinsic", "vshl_n_s32 ARM intrinsic", "vshl_n_s64 ARM intrinsic", "vshl_n_s8 ARM intrinsic", "vshl_n_u16 ARM intrinsic", "vshl_n_u32 ARM intrinsic", "vshl_n_u64 ARM intrinsic", "vshl_n_u8 ARM intrinsic", "vshl_s16 ARM intrinsic", "vshl_s32 ARM intrinsic", "vshl_s64 ARM intrinsic", "vshl_s8 ARM intrinsic", "vshl_u16 ARM intrinsic", "vshl_u32 ARM intrinsic", "vshl_u64 ARM intrinsic", "vshl_u8 ARM intrinsic", "vshll_n_s16 ARM intrinsic", "vshll_n_s32 ARM intrinsic", "vshll_n_s8 ARM intrinsic", "vshll_n_u16 ARM intrinsic", "vshll_n_u32 ARM intrinsic", "vshll_n_u8 ARM intrinsic", "vshlq_n_s16 ARM intrinsic", "vshlq_n_s32 ARM intrinsic", "vshlq_n_s64 ARM intrinsic", "vshlq_n_s8 ARM intrinsic", "vshlq_n_u16 ARM intrinsic", "vshlq_n_u32 ARM intrinsic", "vshlq_n_u64 ARM intrinsic", "vshlq_n_u8 ARM intrinsic", "vshlq_s16 ARM intrinsic", "vshlq_s32 ARM intrinsic", "vshlq_s64 ARM intrinsic", "vshlq_s8 ARM intrinsic", "vshlq_u16 ARM intrinsic", "vshlq_u32 ARM intrinsic", "vshlq_u64 ARM intrinsic", "vshlq_u8 ARM intrinsic", "vshr_n_s16 ARM intrinsic", "vshr_n_s32 ARM intrinsic", "vshr_n_s64 ARM intrinsic", "vshr_n_s8 ARM intrinsic", "vshr_n_u16 ARM intrinsic", "vshr_n_u32 ARM intrinsic", "vshr_n_u64 ARM intrinsic", "vshr_n_u8 ARM intrinsic", "vshrn_n_s16 ARM intrinsic", "vshrn_n_s32 ARM intrinsic", "vshrn_n_s64 ARM intrinsic", "vshrn_n_u16 ARM intrinsic", "vshrn_n_u32 ARM intrinsic", "vshrn_n_u64 ARM intrinsic", "vshrq_n_s16 ARM intrinsic", "vshrq_n_s32 ARM intrinsic", "vshrq_n_s64 ARM intrinsic", "vshrq_n_s8 ARM intrinsic", "vshrq_n_u16 ARM intrinsic", "vshrq_n_u32 ARM intrinsic", "vshrq_n_u64 ARM intrinsic", "vshrq_n_u8 ARM intrinsic", "vsli_n_p16 ARM intrinsic", "vsli_n_p8 ARM intrinsic", "vsli_n_s16 ARM intrinsic", "vsli_n_s32 ARM intrinsic", "vsli_n_s64 ARM intrinsic", "vsli_n_s8 ARM intrinsic", "vsli_n_u16 ARM intrinsic", "vsli_n_u32 ARM intrinsic", "vsli_n_u64 ARM intrinsic", "vsli_n_u8 ARM intrinsic", "vsliq_n_p16 ARM intrinsic", "vsliq_n_p8 ARM intrinsic", "vsliq_n_s16 ARM intrinsic", "vsliq_n_s32 ARM intrinsic", "vsliq_n_s64 ARM intrinsic", "vsliq_n_s8 ARM intrinsic", "vsliq_n_u16 ARM intrinsic", "vsliq_n_u32 ARM intrinsic", "vsliq_n_u64 ARM intrinsic", "vsliq_n_u8 ARM intrinsic", "vsra_n_s16 ARM intrinsic", "vsra_n_s32 ARM intrinsic", "vsra_n_s64 ARM intrinsic", "vsra_n_s8 ARM intrinsic", "vsra_n_u16 ARM intrinsic", "vsra_n_u32 ARM intrinsic", "vsra_n_u64 ARM intrinsic", "vsra_n_u8 ARM intrinsic", "vsraq_n_s16 ARM intrinsic", "vsraq_n_s32 ARM intrinsic", "vsraq_n_s64 ARM intrinsic", "vsraq_n_s8 ARM intrinsic", "vsraq_n_u16 ARM intrinsic", "vsraq_n_u32 ARM intrinsic", "vsraq_n_u64 ARM intrinsic", "vsraq_n_u8 ARM intrinsic", "vsri_n_p16 ARM intrinsic", "vsri_n_p8 ARM intrinsic", "vsri_n_s16 ARM intrinsic", "vsri_n_s32 ARM intrinsic", "vsri_n_s64 ARM intrinsic", "vsri_n_s8 ARM intrinsic", "vsri_n_u16 ARM intrinsic", "vsri_n_u32 ARM intrinsic", "vsri_n_u64 ARM intrinsic", "vsri_n_u8 ARM intrinsic", "vsriq_n_p16 ARM intrinsic", "vsriq_n_p8 ARM intrinsic", "vsriq_n_s16 ARM intrinsic", "vsriq_n_s32 ARM intrinsic", "vsriq_n_s64 ARM intrinsic", "vsriq_n_s8 ARM intrinsic", "vsriq_n_u16 ARM intrinsic", "vsriq_n_u32 ARM intrinsic", "vsriq_n_u64 ARM intrinsic", "vsriq_n_u8 ARM intrinsic", "vst1_f16 ARM intrinsic", "vst1_f32 ARM intrinsic", "vst1_lane_f16 ARM intrinsic", "vst1_lane_f32 ARM intrinsic", "vst1_lane_p16 ARM intrinsic", "vst1_lane_p8 ARM intrinsic", "vst1_lane_s16 ARM intrinsic", "vst1_lane_s32 ARM intrinsic", "vst1_lane_s64 ARM intrinsic", "vst1_lane_s8 ARM intrinsic", "vst1_lane_u16 ARM intrinsic", "vst1_lane_u32 ARM intrinsic", "vst1_lane_u64 ARM intrinsic", "vst1_lane_u8 ARM intrinsic", "vst1_p16 ARM intrinsic", "vst1_p8 ARM intrinsic", "vst1_s16 ARM intrinsic", "vst1_s32 ARM intrinsic", "vst1_s64 ARM intrinsic", "vst1_s8 ARM intrinsic", "vst1_u16 ARM intrinsic", "vst1_u32 ARM intrinsic", "vst1_u64 ARM intrinsic", "vst1_u8 ARM intrinsic", "vst1q_f16 ARM intrinsic", "vst1q_f32 ARM intrinsic", "vst1q_lane_f16 ARM intrinsic", "vst1q_lane_f32 ARM intrinsic", "vst1q_lane_p16 ARM intrinsic", "vst1q_lane_p8 ARM intrinsic", "vst1q_lane_s16 ARM intrinsic", "vst1q_lane_s32 ARM intrinsic", "vst1q_lane_s64 ARM intrinsic", "vst1q_lane_s8 ARM intrinsic", "vst1q_lane_u16 ARM intrinsic", "vst1q_lane_u32 ARM intrinsic", "vst1q_lane_u64 ARM intrinsic", "vst1q_lane_u8 ARM intrinsic", "vst1q_p16 ARM intrinsic", "vst1q_p8 ARM intrinsic", "vst1q_s16 ARM intrinsic", "vst1q_s32 ARM intrinsic", "vst1q_s64 ARM intrinsic", "vst1q_s8 ARM intrinsic", "vst1q_u16 ARM intrinsic", "vst1q_u32 ARM intrinsic", "vst1q_u64 ARM intrinsic", "vst1q_u8 ARM intrinsic", "vst2_f16 ARM intrinsic", "vst2_f32 ARM intrinsic", "vst2_lane_f16 ARM intrinsic", "vst2_lane_f32 ARM intrinsic", "vst2_lane_p16 ARM intrinsic", "vst2_lane_p8 ARM intrinsic", "vst2_lane_s16 ARM intrinsic", "vst2_lane_s32 ARM intrinsic", "vst2_lane_s8 ARM intrinsic", "vst2_lane_u16 ARM intrinsic", "vst2_lane_u32 ARM intrinsic", "vst2_lane_u8 ARM intrinsic", "vst2_p16 ARM intrinsic", "vst2_p8 ARM intrinsic", "vst2_s16 ARM intrinsic", "vst2_s32 ARM intrinsic", "vst2_s64 ARM intrinsic", "vst2_s8 ARM intrinsic", "vst2_u16 ARM intrinsic", "vst2_u32 ARM intrinsic", "vst2_u64 ARM intrinsic", "vst2_u8 ARM intrinsic", "vst2q_f16 ARM intrinsic", "vst2q_f32 ARM intrinsic", "vst2q_lane_f16 ARM intrinsic", "vst2q_lane_f32 ARM intrinsic", "vst2q_lane_p16 ARM intrinsic", "vst2q_lane_s16 ARM intrinsic", "vst2q_lane_s32 ARM intrinsic", "vst2q_lane_u16 ARM intrinsic", "vst2q_lane_u32 ARM intrinsic", "vst2q_p16 ARM intrinsic", "vst2q_p8 ARM intrinsic", "vst2q_s16 ARM intrinsic", "vst2q_s32 ARM intrinsic", "vst2q_s8 ARM intrinsic", "vst2q_u16 ARM intrinsic", "vst2q_u32 ARM intrinsic", "vst2q_u8 ARM intrinsic", "vst3_f16 ARM intrinsic", "vst3_f32 ARM intrinsic", "vst3_lane_f16 ARM intrinsic", "vst3_lane_f32 ARM intrinsic", "vst3_lane_p16 ARM intrinsic", "vst3_lane_p8 ARM intrinsic", "vst3_lane_s16 ARM intrinsic", "vst3_lane_s32 ARM intrinsic", "vst3_lane_s8 ARM intrinsic", "vst3_lane_u16 ARM intrinsic", "vst3_lane_u32 ARM intrinsic", "vst3_lane_u8 ARM intrinsic", "vst3_p16 ARM intrinsic", "vst3_p8 ARM intrinsic", "vst3_s16 ARM intrinsic", "vst3_s32 ARM intrinsic", "vst3_s64 ARM intrinsic", "vst3_s8 ARM intrinsic", "vst3_u16 ARM intrinsic", "vst3_u32 ARM intrinsic", "vst3_u64 ARM intrinsic", "vst3_u8 ARM intrinsic", "vst3q_f16 ARM intrinsic", "vst3q_f32 ARM intrinsic", "vst3q_lane_f16 ARM intrinsic", "vst3q_lane_f32 ARM intrinsic", "vst3q_lane_p16 ARM intrinsic", "vst3q_lane_s16 ARM intrinsic", "vst3q_lane_s32 ARM intrinsic", "vst3q_lane_u16 ARM intrinsic", "vst3q_lane_u32 ARM intrinsic", "vst3q_p16 ARM intrinsic", "vst3q_p8 ARM intrinsic", "vst3q_s16 ARM intrinsic", "vst3q_s32 ARM intrinsic", "vst3q_s8 ARM intrinsic", "vst3q_u16 ARM intrinsic", "vst3q_u32 ARM intrinsic", "vst3q_u8 ARM intrinsic", "vst4_f16 ARM intrinsic", "vst4_f32 ARM intrinsic", "vst4_lane_f16 ARM intrinsic", "vst4_lane_f32 ARM intrinsic", "vst4_lane_p16 ARM intrinsic", "vst4_lane_p8 ARM intrinsic", "vst4_lane_s16 ARM intrinsic", "vst4_lane_s32 ARM intrinsic", "vst4_lane_s8 ARM intrinsic", "vst4_lane_u16 ARM intrinsic", "vst4_lane_u32 ARM intrinsic", "vst4_lane_u8 ARM intrinsic", "vst4_p16 ARM intrinsic", "vst4_p8 ARM intrinsic", "vst4_s16 ARM intrinsic", "vst4_s32 ARM intrinsic", "vst4_s64 ARM intrinsic", "vst4_s8 ARM intrinsic", "vst4_u16 ARM intrinsic", "vst4_u32 ARM intrinsic", "vst4_u64 ARM intrinsic", "vst4_u8 ARM intrinsic", "vst4q_f16 ARM intrinsic", "vst4q_f32 ARM intrinsic", "vst4q_lane_f16 ARM intrinsic", "vst4q_lane_f32 ARM intrinsic", "vst4q_lane_p16 ARM intrinsic", "vst4q_lane_s16 ARM intrinsic", "vst4q_lane_s32 ARM intrinsic", "vst4q_lane_u16 ARM intrinsic", "vst4q_lane_u32 ARM intrinsic", "vst4q_p16 ARM intrinsic", "vst4q_p8 ARM intrinsic", "vst4q_s16 ARM intrinsic", "vst4q_s32 ARM intrinsic", "vst4q_s8 ARM intrinsic", "vst4q_u16 ARM intrinsic", "vst4q_u32 ARM intrinsic", "vst4q_u8 ARM intrinsic", "vsub_f32 ARM intrinsic", "vsub_s16 ARM intrinsic", "vsub_s32 ARM intrinsic", "vsub_s64 ARM intrinsic", "vsub_s8 ARM intrinsic", "vsub_u16 ARM intrinsic", "vsub_u32 ARM intrinsic", "vsub_u64 ARM intrinsic", "vsub_u8 ARM intrinsic", "vsubhn_s16 ARM intrinsic", "vsubhn_s32 ARM intrinsic", "vsubhn_s64 ARM intrinsic", "vsubhn_u16 ARM intrinsic", "vsubhn_u32 ARM intrinsic", "vsubhn_u64 ARM intrinsic", "vsubl_s16 ARM intrinsic", "vsubl_s32 ARM intrinsic", "vsubl_s8 ARM intrinsic", "vsubl_u16 ARM intrinsic", "vsubl_u32 ARM intrinsic", "vsubl_u8 ARM intrinsic", "vsubq_f32 ARM intrinsic", "vsubq_s16 ARM intrinsic", "vsubq_s32 ARM intrinsic", "vsubq_s64 ARM intrinsic", "vsubq_s8 ARM intrinsic", "vsubq_u16 ARM intrinsic", "vsubq_u32 ARM intrinsic", "vsubq_u64 ARM intrinsic", "vsubq_u8 ARM intrinsic", "vsubw_s16 ARM intrinsic", "vsubw_s32 ARM intrinsic", "vsubw_s8 ARM intrinsic", "vsubw_u16 ARM intrinsic", "vsubw_u32 ARM intrinsic", "vsubw_u8 ARM intrinsic", "vtbl1_p8 ARM intrinsic", "vtbl1_s8 ARM intrinsic", "vtbl1_u8 ARM intrinsic", "vtbl2_p8 ARM intrinsic", "vtbl2_s8 ARM intrinsic", "vtbl2_u8 ARM intrinsic", "vtbl3_p8 ARM intrinsic", "vtbl3_s8 ARM intrinsic", "vtbl3_u8 ARM intrinsic", "vtbl4_p8 ARM intrinsic", "vtbl4_s8 ARM intrinsic", "vtbl4_u8 ARM intrinsic", "vtbx1_p8 ARM intrinsic", "vtbx1_s8 ARM intrinsic", "vtbx1_u8 ARM intrinsic", "vtbx2_p8 ARM intrinsic", "vtbx2_s8 ARM intrinsic", "vtbx2_u8 ARM intrinsic", "vtbx3_p8 ARM intrinsic", "vtbx3_s8 ARM intrinsic", "vtbx3_u8 ARM intrinsic", "vtbx4_p8 ARM intrinsic", "vtbx4_s8 ARM intrinsic", "vtbx4_u8 ARM intrinsic", "vtrn_f32 ARM intrinsic", "vtrn_p16 ARM intrinsic", "vtrn_p8 ARM intrinsic", "vtrn_s16 ARM intrinsic", "vtrn_s32 ARM intrinsic", "vtrn_s8 ARM intrinsic", "vtrn_u16 ARM intrinsic", "vtrn_u32 ARM intrinsic", "vtrn_u8 ARM intrinsic", "vtrnq_f32 ARM intrinsic", "vtrnq_p16 ARM intrinsic", "vtrnq_p8 ARM intrinsic", "vtrnq_s16 ARM intrinsic", "vtrnq_s32 ARM intrinsic", "vtrnq_s8 ARM intrinsic", "vtrnq_u16 ARM intrinsic", "vtrnq_u32 ARM intrinsic", "vtrnq_u8 ARM intrinsic", "vtst_p8 ARM intrinsic", "vtst_s16 ARM intrinsic", "vtst_s32 ARM intrinsic", "vtst_s8 ARM intrinsic", "vtst_u16 ARM intrinsic", "vtst_u32 ARM intrinsic", "vtst_u8 ARM intrinsic", "vtstq_p8 ARM intrinsic", "vtstq_s16 ARM intrinsic", "vtstq_s32 ARM intrinsic", "vtstq_s8 ARM intrinsic", "vtstq_u16 ARM intrinsic", "vtstq_u32 ARM intrinsic", "vtstq_u8 ARM intrinsic", "vuzp_f32 ARM intrinsic", "vuzp_p16 ARM intrinsic", "vuzp_p8 ARM intrinsic", "vuzp_s16 ARM intrinsic", "vuzp_s32 ARM intrinsic", "vuzp_s8 ARM intrinsic", "vuzp_u16 ARM intrinsic", "vuzp_u32 ARM intrinsic", "vuzp_u8 ARM intrinsic", "vuzpq_f32 ARM intrinsic", "vuzpq_p16 ARM intrinsic", "vuzpq_p8 ARM intrinsic", "vuzpq_s16 ARM intrinsic", "vuzpq_s32 ARM intrinsic", "vuzpq_s8 ARM intrinsic", "vuzpq_u16 ARM intrinsic", "vuzpq_u32 ARM intrinsic", "vuzpq_u8 ARM intrinsic", "vzip_f32 ARM intrinsic", "vzip_p16 ARM intrinsic", "vzip_p8 ARM intrinsic", "vzip_s16 ARM intrinsic", "vzip_s8 ARM intrinsic", "vzip_u16 ARM intrinsic", "vzip_u8 ARM intrinsic", "vzipq_f32 ARM intrinsic", "vzipq_p16 ARM intrinsic", "vzipq_p8 ARM intrinsic", "vzipq_s16 ARM intrinsic", "vzipq_s32 ARM intrinsic", "vzipq_s8 ARM intrinsic", "vzipq_u16 ARM intrinsic", "vzipq_u32 ARM intrinsic", "vzipq_u8 ARM intrinsic"] -ms.assetid: d3d7dadd-7bd5-4508-8bff-371a66913e20 --- # ARM intrinsics @@ -305,7 +304,7 @@ Reads data from ARM coprocessors by using the coprocessor data transfer instruct unsigned __int64 _MoveFromCoprocessor64( unsigned int coproc, unsigned int opcode1, - unsigned int crm, + unsigned int crm ); ``` @@ -393,7 +392,7 @@ void _MoveFromCoprocessor64( unsigned __int64 value, unsigned int coproc, unsigned int opcode1, - unsigned int crm, + unsigned int crm ); ``` diff --git a/docs/intrinsics/check-isa-arch-support.md b/docs/intrinsics/check-isa-arch-support.md new file mode 100644 index 0000000000..00b066b54b --- /dev/null +++ b/docs/intrinsics/check-isa-arch-support.md @@ -0,0 +1,143 @@ +--- +description: "Learn more about: __check_isa_support, __check_arch_support" +title: "__check_isa_support, __check_arch_support" +ms.date: "11/07/2024" +f1_keywords: ["__check_isa_support", "__check_arch_support"] +helpviewer_keywords: ["__check_isa_support intrinsic", "__check_arch_support intrinsic"] +--- +# __check_isa_support, __check_arch_support + +**Microsoft Specific** + +`__check_isa_support` - detects if the processor supports the specified ISA feature and AVX10 version at run time. +`__check_arch_support` - detects if the arch flag (see [`/arch` (x86)](..\build\reference\arch-x86.md), [`/arch` (x64)](..\build\reference\arch-x64.md)) supports the specified ISA feature and AVX10 version at compile time. + +## Syntax + +```C +_Bool __check_isa_support( + unsigned feature, + unsigned avx10_version +); + +_Bool __check_arch_support( + unsigned feature, + unsigned avx10_version +); +``` + +```cpp +bool __check_isa_support( + unsigned feature, + unsigned avx10_version +); + +bool __check_arch_support( + unsigned feature, + unsigned avx10_version +); +``` + +### Parameters + +*feature*\ +[in] ISA feature to check. + +*avx10_version*\ +[in] AVX10 version to check. 0 if AVX10 version check isn't required. + +## Return value + +`__check_isa_support` returns `true` if the processor supports `feature` and `avx10_version` at run time, `false` otherwise. +`__check_arch_support` returns `true` if the `/arch` flag supports `feature` and `avx10_version` at compile time, `false` otherwise. + +## Requirements + +|Intrinsic|Architecture| +|---------------|------------------| +|`__check_isa_support`|x86, x64| +|`__check_arch_support`|x86, x64| + +**Header file** `` + +## Remarks + +The `__check_isa_support` intrinsic provides a faster alternative to the [`__cpuid`](cpuid-cpuidex.md) intrinsic to dynamically check for most frequently used CPU features. The `__check_arch_support` intrinsic provides an alternative to the [`predefined macros`](..\preprocessor\predefined-macros.md) for compile time code selection based on ISA extensions. + +The following feature values can be used in these intrinsics. These values are defined in `isa_availability.h`. + +|Feature Value Name|Description| +|---------------|------------------| +|`__IA_SUPPORT_VECTOR128`|Vector instructions with lengths up to 128 bits. This feature is enabled for SSE2 or later extensions| +|`__IA_SUPPORT_VECTOR256`|Vector instructions with lengths up to 256 bits. This feature is enabled for AVX2 or later extensions| +|`__IA_SUPPORT_VECTOR512`|Vector instructions with lengths up to 512 bits. This feature is enabled for AVX-512 or later extensions| +|`__IA_SUPPORT_AVX10`|AVX10 support. This feature is enabled for AVX10.1 or later extensions| +|`__IA_SUPPORT_SSE42`|SSE4.2 support| +|`__IA_SUPPORT_SV128X`|AVX-512 instructions for scalar of 128 bits. Can be used to signal that certain useful AVX-512 instruction like conversions can be used in scalar code| +|`__IA_SUPPORT_AVX10_2`|AVX10.2 support| +|`__IA_SUPPORT_APX`|APX support| +|`__IA_SUPPORT_FP16`|Half-precision floating-point instruction support| + +Multiple feature values can be combined using the OR(|) operator. + +The `__check_arch_support` intrinsic can always be evaluated at compile time, so using it in optimized code adds no extra instructions to execute. +Support for these intrinsics was added in Visual Studio 2022 version 17.10. + +## Example + +This example uses 256-bit AVX-512 instructions to vectorize conversion of double-precision values to 64-bit signed integer values. The tail loop for converting any source values not handled by the vector code is also used in case the vector code can't be executed. The compile-time support is checked before runtime support so that a runtime check can be avoided if possible. + +```cpp +// Compile this test with: /EHsc /O2 +#include +#include +#include +#include +using namespace std; + +#define CHECK_INSTRUCTION_SUPPORT(a,v) \ + (__check_arch_support((a),(v)) || __check_isa_support((a),(v))) + +int main() +{ + vector input = {0.3, 1.4, 2.5, 3.6, 4.7, 5.8, 6.9, 8.0, 9.1, 11.14}; + vector<__int64> output(10, 0); + int i = 0; + + if (CHECK_INSTRUCTION_SUPPORT(__IA_SUPPORT_SV128X | __IA_SUPPORT_VECTOR256, 0)) + { + for (; i < input.size() - 4; i += 4) + { + __m256i values = _mm256_cvttpd_epi64(_mm256_load_pd(&input[i])); + _mm256_storeu_epi64((void*)&output[i], values); + } + } + for (; i < input.size(); i++) + { + output[i] = input[i]; + } + + for (i = 0; i < output.size(); i++) { + cout << "output[" << i << "] = " << output[i] << endl; + } +} +``` + +```Output +output[0] = 0 +output[1] = 1 +output[2] = 2 +output[3] = 3 +output[4] = 4 +output[5] = 5 +output[6] = 6 +output[7] = 8 +output[8] = 9 +output[9] = 11 +``` + +**END Microsoft Specific** + +## See also + +[Compiler intrinsics](../intrinsics/compiler-intrinsics.md) diff --git a/docs/intrinsics/index.yml b/docs/intrinsics/index.yml index a6d53048f0..9a0f48891f 100644 --- a/docs/intrinsics/index.yml +++ b/docs/intrinsics/index.yml @@ -8,6 +8,7 @@ metadata: description: Visual Studio includes assemblers and compiler intrinsics for low-level programming tasks. ms.topic: landing-page ms.date: 05/26/2020 + ms.author: twhitney ms.custom: intro-landing-hub # linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new diff --git a/docs/intrinsics/interlockedcompareexchange-intrinsic-functions.md b/docs/intrinsics/interlockedcompareexchange-intrinsic-functions.md index d74d4cbf9a..591cbf0797 100644 --- a/docs/intrinsics/interlockedcompareexchange-intrinsic-functions.md +++ b/docs/intrinsics/interlockedcompareexchange-intrinsic-functions.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: _InterlockedCompareExchange intrinsic functions" title: "_InterlockedCompareExchange intrinsic functions" +description: "Learn more about: _InterlockedCompareExchange intrinsic functions" ms.date: 08/03/2022 f1_keywords: ["_InterlockedCompareExchange", "_InterlockedCompareExchange_acq", "_InterlockedCompareExchange_acq_cpp", "_InterlockedCompareExchange_cpp", "_InterlockedCompareExchange_HLEAcquire", "_InterlockedCompareExchange_HLERelease", "_InterlockedCompareExchange_nf", "_InterlockedCompareExchange_np", "_InterlockedCompareExchange_rel", "_InterlockedCompareExchange_rel_cpp", "_InterlockedCompareExchange8", "_InterlockedCompareExchange8_acq", "_InterlockedCompareExchange8_nf", "_InterlockedCompareExchange8_rel", "_InterlockedCompareExchange16", "_InterlockedCompareExchange16_acq", "_InterlockedCompareExchange16_acq_cpp", "_InterlockedCompareExchange16_cpp", "_InterlockedCompareExchange16_nf", "_InterlockedCompareExchange16_rel", "_InterlockedCompareExchange16_rel_cpp", "_InterlockedCompareExchange64", "_InterlockedCompareExchange64_acq", "_InterlockedCompareExchange64_acq_cpp", "_InterlockedCompareExchange64_cpp", "_InterlockedCompareExchange64_HLEAcquire", "_InterlockedCompareExchange64_HLERelease", "_InterlockedCompareExchange64_nf", "_InterlockedCompareExchange64_np", "_InterlockedCompareExchange64_rel", "_InterlockedCompareExchange64_rel_cpp"] helpviewer_keywords: ["_InterlockedCompareExchange intrinsic", "_InterlockedCompareExchange_acq intrinsic", "_InterlockedCompareExchange_acq_cpp intrinsic", "_InterlockedCompareExchange_cpp intrinsic", "_InterlockedCompareExchange_HLEAcquire intrinsic", "_InterlockedCompareExchange_HLERelease intrinsic", "_InterlockedCompareExchange_nf intrinsic", "_InterlockedCompareExchange_np intrinsic", "_InterlockedCompareExchange_rel intrinsic", "_InterlockedCompareExchange_rel_cpp intrinsic", "_InterlockedCompareExchange8 intrinsic", "_InterlockedCompareExchange8_acq intrinsic", "_InterlockedCompareExchange8_nf intrinsic", "_InterlockedCompareExchange8_rel intrinsic", "_InterlockedCompareExchange16 intrinsic", "_InterlockedCompareExchange16_acq intrinsic", "_InterlockedCompareExchange16_acq_cpp intrinsic", "_InterlockedCompareExchange16_cpp intrinsic", "_InterlockedCompareExchange16_nf intrinsic", "_InterlockedCompareExchange16_rel intrinsic", "_InterlockedCompareExchange16_rel_cpp intrinsic", "_InterlockedCompareExchange64 intrinsic", "_InterlockedCompareExchange64_acq intrinsic", "_InterlockedCompareExchange64_acq_cpp intrinsic", "_InterlockedCompareExchange64_cpp intrinsic", "_InterlockedCompareExchange64_HLEAcquire intrinsic", "_InterlockedCompareExchange64_HLERelease intrinsic", "_InterlockedCompareExchange64_nf intrinsic", "_InterlockedCompareExchange64_np intrinsic", "_InterlockedCompareExchange64_rel intrinsic", "_InterlockedCompareExchange64_rel_cpp intrinsic"] -ms.assetid: c3ad79c0-a523-4930-a3a4-69a65d7d5c81 --- # `_InterlockedCompareExchange` intrinsic functions @@ -152,7 +151,7 @@ The return value is the initial value pointed at by the `Destination` pointer. | Intrinsic | Architecture | Header | |--|--|--| | `_InterlockedCompareExchange`, `_InterlockedCompareExchange8`, `_InterlockedCompareExchange16`, `_InterlockedCompareExchange64` | x86, ARM, x64, ARM64 | \ | -| `_InterlockedCompareExchange_acq`, `_InterlockedCompareExchange_nf`, `_InterlockedCompareExchange_rel`, `_InterlockedCompareExchange8_acq`, `_InterlockedCompareExchange8_nf`, `_InterlockedCompareExchange8_rel`,`_InterlockedCompareExchange16_acq`, `_InterlockedCompareExchange16_nf`, `_InterlockedCompareExchange16_rel`, `_InterlockedCompareExchange64_acq`, `_InterlockedCompareExchange64_nf`, `_InterlockedCompareExchange64_rel`, | ARM, ARM64 | \ | +| `_InterlockedCompareExchange_acq`, `_InterlockedCompareExchange_nf`, `_InterlockedCompareExchange_rel`, `_InterlockedCompareExchange8_acq`, `_InterlockedCompareExchange8_nf`, `_InterlockedCompareExchange8_rel`, `_InterlockedCompareExchange16_acq`, `_InterlockedCompareExchange16_nf`, `_InterlockedCompareExchange16_rel`, `_InterlockedCompareExchange64_acq`, `_InterlockedCompareExchange64_nf`, `_InterlockedCompareExchange64_rel` | ARM, ARM64 | \ | | `_InterlockedCompareExchange_np`, `_InterlockedCompareExchange16_np`, `_InterlockedCompareExchange64_np` | x64 | \ | | `_InterlockedCompareExchange_HLEAcquire`, `_InterlockedCompareExchange_HLERelease`, `_InterlockedCompareExchange64_HLEAcquire`, `_InterlockedCompareExchange64_HLERelease` | x86, x64 | \ | diff --git a/docs/intrinsics/interlockedexchangeadd-intrinsic-functions.md b/docs/intrinsics/interlockedexchangeadd-intrinsic-functions.md index a105513296..a5e5134fc0 100644 --- a/docs/intrinsics/interlockedexchangeadd-intrinsic-functions.md +++ b/docs/intrinsics/interlockedexchangeadd-intrinsic-functions.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: _InterlockedExchangeAdd intrinsic functions" title: "_InterlockedExchangeAdd intrinsic functions" +description: "Learn more about: _InterlockedExchangeAdd intrinsic functions" ms.date: "09/02/2019" f1_keywords: ["_InterlockedExchangeAdd64_nf", "_InterlockedExchangeAdd64_rel", "_InterlockedExchangeAdd16_rel", "_InterlockedExchangeAdd_acq", "_InterlockedExchangeAdd_nf", "_InterlockedExchangeAdd_rel", "_InterlockedExchangeAdd8_acq", "_InterlockedExchangeAdd16_nf", "_InterlockedExchangeAdd_acq_cpp", "_InterlockedExchangeAdd64_acq_cpp", "_InterlockedExchangeAdd16_acq", "_InterlockedExchangeAdd_HLERelease", "_InterlockedExchangeAdd64_cpp", "_InterlockedExchangeAdd64_HLERelease", "_InterlockedExchangeAdd64_acq", "_InterlockedExchangeAdd8", "_InterlockedExchangeAdd64", "_InterlockedExchangeAdd8_nf", "_InterlockedExchangeAdd16", "_InterlockedExchangeAdd64_rel_cpp", "_InterlockedExchangeAdd_cpp", "_InterlockedExchangeAdd8_rel", "_InterlockedExchangeAdd_HLEAcquire", "_InterlockedExchangeAdd64_HLEAcquire", "_InterlockedExchangeAdd"] helpviewer_keywords: ["_InterlockedExchangeAdd8_nf intrinsic", "InterlockedExchangeAdd64_acq intrinsic", "_InterlockedExchangeAdd8_acq intrinsic", "_InterlockedExchangeAdd64 intrinsic", "_InterlockedExchangeAdd intrinsic", "_InterlockedExchangeAdd8_rel intrinsic", "_InterlockedExchangeAdd_acq intrinsic", "_InterlockedExchangeAdd_HLEAcquire intrinsic", "_InterlockedExchangeAdd8 intrinsic", "_InterlockedExchangeAdd_rel intrinsic", "_InterlockedExchangeAdd64_HLERelease intrinsic", "_InterlockedExchangeAdd64_nf intrinsic", "InterlockedExchangeAdd_rel intrinsic", "InterlockedExchangeAdd intrinsic", "_InterlockedExchangeAdd_nf intrinsic", "_InterlockedExchangeAdd16_rel intrinsic", "InterlockedExchangeAdd_acq intrinsic", "_InterlockedExchangeAdd64_HLEAcquire intrinsic", "_InterlockedExchangeAdd16 intrinsic", "_InterlockedExchangeAdd64_acq intrinsic", "InterlockedExchangeAdd64_rel intrinsic", "_InterlockedExchangeAdd16_acq intrinsic", "InterlockedExchangeAdd64 intrinsic", "_InterlockedExchangeAdd_HLERelease intrinsic", "_InterlockedExchangeAdd16_nf intrinsic", "_InterlockedExchangeAdd64_rel intrinsic"] -ms.assetid: 25809e1f-9c60-4492-9f7c-0fb59c8d13d2 --- # _InterlockedExchangeAdd intrinsic functions @@ -115,7 +114,7 @@ The return value is the initial value of the variable pointed to by the `Addend` |---------------|------------------|------------| |`_InterlockedExchangeAdd`, `_InterlockedExchangeAdd8`, `_InterlockedExchangeAdd16`|x86, ARM, x64, ARM64|\| |`_InterlockedExchangeAdd64`|ARM, x64, ARM64|\| -|`_InterlockedExchangeAdd_acq`, `_InterlockedExchangeAdd_rel`, `_InterlockedExchangeAdd_nf`, `_InterlockedExchangeAdd8_acq`, `_InterlockedExchangeAdd8_rel`, `_InterlockedExchangeAdd8_nf`,`_InterlockedExchangeAdd16_acq`, `_InterlockedExchangeAdd16_rel`, `_InterlockedExchangeAdd16_nf`, `_InterlockedExchangeAdd64_acq`, `_InterlockedExchangeAdd64_rel`, `_InterlockedExchangeAdd64_nf`|ARM, ARM64|\| +|`_InterlockedExchangeAdd_acq`, `_InterlockedExchangeAdd_rel`, `_InterlockedExchangeAdd_nf`, `_InterlockedExchangeAdd8_acq`, `_InterlockedExchangeAdd8_rel`, `_InterlockedExchangeAdd8_nf`, `_InterlockedExchangeAdd16_acq`, `_InterlockedExchangeAdd16_rel`, `_InterlockedExchangeAdd16_nf`, `_InterlockedExchangeAdd64_acq`, `_InterlockedExchangeAdd64_rel`, `_InterlockedExchangeAdd64_nf`|ARM, ARM64|\| |`_InterlockedExchangeAdd_HLEAcquire`, `_InterlockedExchangeAdd_HLERelease`|x86, x64|\| |`_InterlockedExchangeAdd64_HLEAcquire`, `_InterlockedExchangeAdd64_HLErelease`|x64|\| diff --git a/docs/intrinsics/mm-insert-si64-mm-inserti-si64.md b/docs/intrinsics/mm-insert-si64-mm-inserti-si64.md index 3c6f905373..aad03f0a47 100644 --- a/docs/intrinsics/mm-insert-si64-mm-inserti-si64.md +++ b/docs/intrinsics/mm-insert-si64-mm-inserti-si64.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: _mm_insert_si64, _mm_inserti_si64" title: "_mm_insert_si64, _mm_inserti_si64" +description: "Learn more about: _mm_insert_si64, _mm_inserti_si64" ms.date: "09/02/2019" f1_keywords: ["_mm_inserti_si64", "_mm_insert_si64"] helpviewer_keywords: ["insertq instruction", "_mm_insert_si64 intrinsic", "_mm_inserti_si64 intrinsic"] -ms.assetid: 897a4b36-8b08-4b00-a18f-7850f5732d7d --- # _mm_insert_si64, _mm_inserti_si64 @@ -21,7 +20,7 @@ __m128i _mm_insert_si64( ); __m128i _mm_inserti_si64( __m128i Source1, - __m128i Source2 + __m128i Source2, int Length, int Index ); diff --git a/docs/intrinsics/toc.yml b/docs/intrinsics/toc.yml index cfbc51772b..eb04364ed4 100644 --- a/docs/intrinsics/toc.yml +++ b/docs/intrinsics/toc.yml @@ -39,6 +39,8 @@ items: href: ../intrinsics/bittestandreset-bittestandreset64.md - name: _bittestandset, _bittestandset64 href: ../intrinsics/bittestandset-bittestandset64.md + - name: __check_isa_support, __check_arch_support + href: ../intrinsics/check-isa-arch-support.md - name: __cpuid, __cpuidex href: ../intrinsics/cpuid-cpuidex.md - name: __debugbreak diff --git a/docs/intrinsics/x64-amd64-intrinsics-list.md b/docs/intrinsics/x64-amd64-intrinsics-list.md index 92f7c81f83..967215bfa0 100644 --- a/docs/intrinsics/x64-amd64-intrinsics-list.md +++ b/docs/intrinsics/x64-amd64-intrinsics-list.md @@ -13,7 +13,7 @@ For information about individual intrinsics, see these resources, as appropriate - The header file. Many intrinsics are documented in comments in the header file. -- [Intel Intrinsics Guide](https://software.intel.com/sites/landingpage/IntrinsicsGuide). Use the search box to find specific intrinsics. +- [Intel Intrinsics Guide](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html). Use the search box to find specific intrinsics. - [Intel 64 and IA-32 Architectures Software Developer Manuals](https://software.intel.com/articles/intel-sdm) @@ -84,6 +84,8 @@ The following table lists the intrinsics available on x64 processors. The Techno | [`_castf64_u64`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castf64_u64) | | immintrin.h | `unsigned __int64 _castf64_u64 (double);` | | [`_castu32_f32`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castu32_f32) | | immintrin.h | `float _castu32_f32 (unsigned __int32);` | | [`_castu64_f64`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castu64_f64) | | immintrin.h | `double _castu64_f64 (unsigned __int64 a);` | +| [`__check_isa_support`](check-isa-arch-support.md) | | immintrin.h | `bool __check_isa_support(unsigned int, unsigned int);` | +| [`__check_arch_support`](check-isa-arch-support.md) | | immintrin.h | `bool __check_arch_support(unsigned int, unsigned int);` | | `_clac` | SMAP | intrin.h | `void _clac(void);` | | [`__cpuid`](cpuid-cpuidex.md) | | intrin.h | `void __cpuid(int *, int);` | | [`__cpuidex`](cpuid-cpuidex.md) | | intrin.h | `void __cpuidex(int *, int, int);` | diff --git a/docs/intrinsics/x86-intrinsics-list.md b/docs/intrinsics/x86-intrinsics-list.md index 7dbe84d0b7..502e7552b8 100644 --- a/docs/intrinsics/x86-intrinsics-list.md +++ b/docs/intrinsics/x86-intrinsics-list.md @@ -61,6 +61,8 @@ The following table lists the intrinsics available on x86 processors. The Techno | [`_castf64_u64`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castf64_u64) | | immintrin.h | `unsigned __int64 _castf64_u64 (double);` | | [`_castu32_f32`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castu32_f32) | | immintrin.h | `float _castu32_f32 (unsigned __int32);` | | [`_castu64_f64`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_castu64_f64) | | immintrin.h | `double _castu64_f64 (unsigned __int64 a);` | +| [`__check_isa_support`](check-isa-arch-support.md) | | immintrin.h | `bool __check_isa_support(unsigned int, unsigned int);` | +| [`__check_arch_support`](check-isa-arch-support.md) | | immintrin.h | `bool __check_arch_support(unsigned int, unsigned int);` | | `_clac` | SMAP | intrin.h | `void _clac(void);` | | [`__cpuid`](cpuid-cpuidex.md) | | intrin.h | `void __cpuid(int *, int);` | | [`__cpuidex`](cpuid-cpuidex.md) | | intrin.h | `void __cpuidex(int *, int, int);` | @@ -1137,7 +1139,7 @@ The following table lists the intrinsics available on x86 processors. The Techno | [`_mm256_set1_ps`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_set1_ps) | AVX | immintrin.h | `__m256 _mm256_set1_ps(float);` | | [`_mm256_setr_epi16`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_epi16) | AVX | immintrin.h | `(__m256i _mm256_setr_epi16(short, short, short, short, short, short, short, short, short, short, short, short, short, short, short, short);` | | [`_mm256_setr_epi32`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_epi32) | AVX | immintrin.h | `__m256i _mm256_setr_epi32(int, int, int, int, int, int, int, int);` | -| [`_mm256_setr_epi8`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_epi8) | AVX | immintrin.h | `(__m256i _mm256_setr_epi8(char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char,);` | +| [`_mm256_setr_epi8`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_epi8) | AVX | immintrin.h | `(__m256i _mm256_setr_epi8(char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char);` | | [`_mm256_setr_pd`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_pd) | AVX | immintrin.h | `__m256d _mm256_setr_pd(double, double, double, double);` | | [`_mm256_setr_ps`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setr_ps) | AVX | immintrin.h | `__m256 _mm256_setr_ps(float, float, float, float, float, float, float, float);` | | [`_mm256_setzero_pd`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_setzero_pd) | AVX | immintrin.h | `__m256d _mm256_setzero_pd(void);` | diff --git a/docs/linux/connect-to-your-remote-linux-computer.md b/docs/linux/connect-to-your-remote-linux-computer.md index b7147b0589..24030a4b84 100644 --- a/docs/linux/connect-to-your-remote-linux-computer.md +++ b/docs/linux/connect-to-your-remote-linux-computer.md @@ -1,9 +1,10 @@ --- -title: "Connect to your target Linux system in Visual Studio" -description: "How to connect to a remote Linux machine or Windows Subsystem for Linux from inside a Visual Studio C++ project." -ms.date: 03/14/2022 +title: "Connect to a Target Linux System by Using Visual Studio" +description: "Learn how to connect to a remote Linux machine or Windows Subsystem for Linux from inside a Visual Studio C++ project." +ms.topic: tutorial +ms.date: 03/21/2025 --- -# Connect to your target Linux system in Visual Studio +# Connect to your remote Linux system by using Visual Studio ::: moniker range="msvc-140" @@ -26,6 +27,7 @@ You can configure a Linux project to target a remote machine or the Windows Subs ::: moniker range=">=msvc-150" When using a remote connection, Visual Studio builds C++ Linux projects on the remote machine. It doesn't matter if it's a physical machine, a virtual machine in the cloud, or WSL. + To build the project, Visual Studio copies the source code to your remote Linux computer. Then, the code gets compiled based on Visual Studio settings. ::: moniker-end @@ -39,7 +41,7 @@ To build the project, Visual Studio copies the source code to your remote Linux ::: moniker range=">=msvc-150" -## Set up the SSH server on the remote system +## Set up the SSH server on the remote machine If `ssh` isn't already set up and running on your Linux system, follow these steps to install it. The examples in this article use Ubuntu 18.04 LTS with OpenSSH server version 7.6. However, the instructions should be the same for any distro using a moderately recent version of OpenSSH. @@ -58,7 +60,7 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste ## Set up the remote connection -1. In Visual Studio, choose **Tools > Options** on the menu bar to open the **Options** dialog. Then select **Cross Platform > Connection Manager** to open the Connection Manager dialog. +1. In Visual Studio on your local Windows system, choose **Tools > Options** on the menu bar to open the **Options** dialog. Then select **Cross Platform > Connection Manager** to open the Connection Manager dialog. If you haven't set up a connection in Visual Studio before, when you build your project for the first time, Visual Studio opens the Connection Manager dialog for you. @@ -69,11 +71,11 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste :::image-end::: To edit an existing connection, choose **Edit**. In either scenario, the **Connect to Remote System** window is displayed. - + :::image type="complex" source="media/connect-to-your-remote-linux-computer/connect-updated.png" alt-text="Screenshot of the Visual Studio Connect to Remote System window."::: In the Connect to Remote System window, there are fields for host name, port, user name, authentication type, and password. Port is set to 22. Authentication type is set to 'Password'. :::image-end::: - + 1. Enter the following information: | Entry | Description | @@ -84,23 +86,23 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste | **Authentication type** | Password and Private Key are both supported | | **Password** | Password for the entered user name | | **Private key file** | Private key file created for ssh connection | - | **Passphrase** | Passphrase used with private key selected above | - - You can't click the **Connect** button until all the required fields are completed and the port is set to an integer between 1 and 65535. - - You can use either a password or a key file and passphrase for authentication. For many development scenarios, password authentication is sufficient, but key files are more secure. If you already have a key pair, it's possible to reuse it. + | **Passphrase** | Passphrase used with private key selected previously | + + You can't select the **Connect** button until all the required fields are completed and the port is set to an integer between 1 and 65535. - Versions of Visual Studio before 17.10 support EC, RSA, and DSA keys for remote connections. Because of security concerns, RSA and DSA keys are no longer supported in VS 17.10 and later. Only EC keys are currently supported. To create a key pair compatible with the connection manager use the command: + You can use either a password or a key file and passphrase for authentication. Key files are more secure than username/password. If you already have a key pair, it's possible to reuse it. + + Versions of Visual Studio before 17.10 support Elliptic Curve (EC), Rivert-Shamir-Adleman (RSA), and Digital signature algorithm (DSA) keys for remote connections. Because of security concerns, DSA keys are no longer supported in VS 17.10 and later. RSA keys were also not supported in VS 17.10 and VS 17.11 but some types are supported again in VS 17.12 and later. To create a key pair compatible with the connection manager, you can use the command: `ssh-keygen -m pem -t ecdsa -f ` - + > [!NOTE] - > If using `ssh-keygen` to create the private key, you must specify the switch `-m pem`, or the key will not be accepted by Visual Studio. If your private key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`, you must convert it with `ssh-keygen -p -f -m pem`. + > If using `ssh-keygen` to create the private key, you must specify the switch `-m pem`, or the key isn't accepted by Visual Studio. If your private key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`, you must convert it with `ssh-keygen -p -f -m pem`. 1. Choose the **Connect** button to attempt a connection to the remote computer. If the connection succeeds, Visual Studio configures IntelliSense to use the remote headers. For more information, see [IntelliSense for headers on remote systems](configure-a-linux-project.md#remote_intellisense). - If the connection fails, an info bar with error information appears and the fields that you may need to change are outlined in red. + If the connection fails, an info bar with error information appears and the fields that you might need to change are outlined in red. :::image type="content" source="media/connect-to-your-remote-linux-computer/settings-connection-manager-error-updated.png" alt-text="Screenshot of the Visual Studio Connect to Remote System window. The host name and port fields are outlined in red to indicate incorrect entries."::: @@ -114,13 +116,13 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste ## Host key verification -In Visual Studio version 16.10 or later, you're asked to verify the server's host key fingerprint whenever Visual Studio connects to a remote system for the first time. You may be familiar with this process if you've used the OpenSSH command-line client or PuTTY before. The fingerprint identifies the server. Visual Studio uses the fingerprint to ensure it's connecting to the intended and trusted server. +In Visual Studio version 16.10 or later, you're asked to verify the server's host key fingerprint whenever Visual Studio connects to a remote system for the first time. You might be familiar with this process if you've used the OpenSSH command-line client or PuTTY before. The fingerprint identifies the server. Visual Studio uses the fingerprint to ensure it connects to the intended and trusted server. The first time Visual Studio establishes a new remote connection, you're asked to accept or deny the host key fingerprint presented by the server. Or, anytime there are changes to a cached fingerprint. You can also verify a fingerprint on demand: select a connection in the Connection Manager and choose **Verify**. If you upgrade to Visual Studio 16.10 or later from an older version, it treats any existing remote connections as new connections. You're prompted to accept the host key fingerprint first. Then, Visual Studio establishes a connection and caches the accepted fingerprint. -You can also update remote connections from `ConnectionManager.exe` using the `update` argument. +You can also update remote connections from *`ConnectionManager.exe`* using the `update` argument. ## Supported SSH algorithms @@ -131,19 +133,19 @@ Starting in Visual Studio version 16.9, support for older, insecure SSH algorith | Encryption | `aes128-cbc`
`aes128-ctr`
`aes192-cbc`
`aes192-ctr`
`aes256-cbc`
`aes256-ctr` | | HMAC | `hmac-sha2-256`
`hmac-sha2-512` | | Key exchange | `diffie-hellman-group14-sha256`
`diffie-hellman-group16-sha512`
`diffie-hellman-group-exchange-sha256`
`ecdh-sha2-nistp256`
`ecdh-sha2-nistp384`
`ecdh-sha2-nistp521` | -| Host key | `ecdsa-sha2-nistp256`
`ecdsa-sha2-nistp384`
`ecdsa-sha2-nistp521` | +| Host key | `ecdsa-sha2-nistp256`
`ecdsa-sha2-nistp384`
`ecdsa-sha2-nistp521`
`rsa-sha2-512`
`rsa-sha2-256` | ### Configure the SSH server First, a little background. You can't select the SSH algorithm to use from Visual Studio. Instead, the algorithm is determined during the initial handshake with the SSH server. Each side (client and server) provides a list of algorithms it supports, and then the first algorithm common to both is selected. The connection succeeds as long as there's at least one algorithm in common between Visual Studio and the server for encryption, HMAC, key exchange, and so on. -The Open SSH configuration file (*`sshd_config`*) doesn't configure which algorithm to use by default. The SSH server should use secure defaults when no algorithms are specified. Those defaults depend on the version and vendor of the SSH server. If Visual Studio doesn't support those defaults, you'll likely see an error like: "Could not connect to the remote system. No common client to server HMAC algorithm was found." The error may also appear if the SSH server is configured to use algorithms that Visual Studio doesn't support. +The Open SSH configuration file (*`sshd_config`*) doesn't configure which algorithm to use by default. The SSH server should use secure defaults when no algorithms are specified. Those defaults depend on the version and vendor of the SSH server. If Visual Studio doesn't support those defaults, you'll likely see an error like: *Could not connect to the remote system. No common client to server HMAC algorithm was found.* The error might also appear if the SSH server is configured to use algorithms that Visual Studio doesn't support. -The default SSH server on most modern Linux distributions should work with Visual Studio. However, you may be running an older SSH server that's configured to use older, insecure algorithms. The following example explains how to update to more secure versions. +The default SSH server on most modern Linux distributions should work with Visual Studio. However, you might be running an older SSH server that's configured to use older, insecure algorithms. The following example explains how to update to more secure versions. -In the following example, the SSH server uses the insecure `hmac-sha1` algorithm, which Visual Studio 16.9 doesn't support. If the SSH server uses OpenSSH, you can edit the `/etc/ssh/sshd_config` file as shown below to enable more secure algorithms. For other SSH servers, refer to the server's documentation for how to configure them. +In this example, the SSH server uses the insecure `hmac-sha1` algorithm, which Visual Studio 16.9 doesn't support. If the SSH server uses OpenSSH, you can edit the `/etc/ssh/sshd_config` file to enable more secure algorithms. For other SSH servers, refer to the server's documentation for how to configure them. -First, verify that the set of algorithms your server is using includes algorithms supported by Visual Studio. Run the following command on the remote machine to list the algorithms supported by the server: +First, verify that the set of algorithms your server is using includes algorithms supported by Visual Studio. Run the following command on the remote machine to list the algorithms supported by the server: ```bash ssh -Q cipher; ssh -Q mac; ssh -Q kex; ssh -Q key @@ -169,7 +171,7 @@ These examples can be added anywhere in `/etc/ssh/sshd_config`. Ensure that they After editing the file, restart the SSH server (`sudo service ssh restart` on Ubuntu) and attempt to connect again from Visual Studio. -#### Cipher example +#### Cipher example Add: `Ciphers ` For example: `Ciphers aes128-cbc,aes256-cbc` @@ -191,25 +193,25 @@ For example: `HostKeyAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384` ## Logging for remote connections - You can enable logging to help troubleshoot connection problems. On the menu bar, select **Tools > Options**. In the **Options** dialog, select **Cross Platform > Logging**: +You can enable logging to help troubleshoot connection problems. On the menu bar, select **Tools > Options**. In the **Options** dialog, select **Cross Platform > Logging**: - :::image type="complex" source="media/remote-logging-vs2019.png" alt-text="Screenshot of the Visual Studio options screen."::: - The options are open to Cross Platform > Connection Manager > Logging. Enable logging is checked, log to a file is checked, the logfile directory is set the documents folder, and log to the 'Cross Platform Logging' pane in the output window is checked. - :::image-end::: +:::image type="complex" source="media/remote-logging-vs2019.png" alt-text="Screenshot of the Visual Studio options screen."::: +The options are open to Cross Platform > Connection Manager > Logging. Enable logging is checked, log to a file is checked, the logfile directory is set the documents folder, and log to the 'Cross Platform Logging' pane in the output window is checked. +:::image-end::: - Logs include connections, all commands sent to the remote machine (their text, exit code and execution time), and all output from Visual Studio to the shell. Logging works for any cross-platform CMake project or MSBuild-based Linux project in Visual Studio. +Logs include connections, all commands sent to the remote machine (their text, exit code and execution time), and all output from Visual Studio to the shell. Logging works for any cross-platform CMake project or MSBuild-based Linux project in Visual Studio. - You can configure the output to go to a file or to the **Cross Platform Logging** pane in the Output window. For MSBuild-based Linux projects, MSBuild commands sent to the remote machine aren't routed to the **Output Window** because they're emitted out-of-process. Instead, they're logged to a file, with a prefix of "msbuild_". +You can configure the output to go to a file or to the **Cross Platform Logging** pane in the Output window. For MSBuild-based Linux projects, MSBuild commands sent to the remote machine aren't routed to the **Output Window** because they're emitted out-of-process. Instead, they're logged to a file, with a prefix of `msbuild_`. ## Command-line utility for the Connection Manager -**Visual Studio 2019 version 16.5 or later**: `ConnectionManager.exe` is a command-line utility to manage remote development connections outside of Visual Studio. It's useful for tasks such as provisioning a new development machine. Or, you can use it to set up Visual Studio for continuous integration. For examples and a complete reference to the ConnectionManager command, see [ConnectionManager reference](connectionmanager-reference.md). +**Visual Studio 2019 version 16.5 or later**: *`ConnectionManager.exe`* is a command-line utility to manage remote development connections outside of Visual Studio. It's useful for tasks such as provisioning a new development machine. Or, you can use it to set up Visual Studio for continuous integration. For examples and a complete reference to the `ConnectionManager` command, see [ConnectionManager reference](connectionmanager-reference.md). ::: moniker-end ::: moniker range=">=msvc-150" -## TCP Port Forwarding +## TCP port forwarding The `rsync` command is used by both MSBuild-based Linux projects and CMake projects to [copy headers from your remote system to Windows for use by IntelliSense](configure-a-linux-project.md#remote_intellisense). When you can't enable TCP port forwarding, disable the automatic download of remote headers. To disable it, use **Tools > Options > Cross Platform > Connection Manager > Remote Headers IntelliSense Manager**. If the remote system doesn't have TCP port forwarding enabled, this error appears when the download of remote headers for IntelliSense begins: @@ -231,7 +233,7 @@ Visual Studio's Linux support has a dependency on TCP port forwarding. Both `rsy ::: moniker range="msvc-150" -In Visual Studio 2017, you use the same steps to connect to WSL as you use for a remote Linux machine. Use `localhost` for the **Host Name**. +In Visual Studio 2017, you use the same steps to connect to Windows Subsystem for Linux (WSL) as you use for a remote Linux machine. Use `localhost` for the **Host Name**. ::: moniker-end @@ -247,7 +249,7 @@ sudo apt install g++ gdb make ninja-build rsync zip ### Fix WSL `localhost` connection problems -When connecting to Windows Subsystem for Linux (WSL) on `localhost`, you may run into a conflict with the Windows `ssh` client on port 22. In WSL, change the port that `ssh`expects requests from to 23 in `/etc/ssh/sshd_config`: +When connecting to WSL on `localhost`, you might run into a conflict with the Windows `ssh` client on port 22. In WSL, change the port that `ssh` expects requests from to 23 in `/etc/ssh/sshd_config`: ```bash Port 23 @@ -270,9 +272,9 @@ To configure an MSBuild project for WSL, see [Configure a Linux project](configu ::: moniker-end -## See Also +## See also -[Configure a Linux project](configure-a-linux-project.md)\ -[Configure a Linux CMake project](cmake-linux-project.md)\ -[Deploy, run, and debug your Linux project](deploy-run-and-debug-your-linux-project.md)\ -[Configure CMake debugging sessions](../build/configure-cmake-debugging-sessions.md) +- [Configure a Linux MSBuild C++ project in Visual Studio](configure-a-linux-project.md) +- [Create a CMake Linux project in Visual Studio](cmake-linux-project.md) +- [Deploy, run, and debug your Linux MSBuild project](deploy-run-and-debug-your-linux-project.md) +- [Configure CMake debugging sessions](../build/configure-cmake-debugging-sessions.md) \ No newline at end of file diff --git a/docs/linux/connectionmanager-reference.md b/docs/linux/connectionmanager-reference.md index 3fff906968..14b4e8c152 100644 --- a/docs/linux/connectionmanager-reference.md +++ b/docs/linux/connectionmanager-reference.md @@ -9,7 +9,7 @@ helpviewer_keywords: ["ConnectionManager program"] ::: moniker range="<=msvc-150" -ConnectionManager.exe is available in Visual Studio 2019 version 16.5 and later. +`ConnectionManager.exe` is available in Visual Studio 2019 version 16.5 and later. ::: moniker-end @@ -17,9 +17,9 @@ ConnectionManager.exe is available in Visual Studio 2019 version 16.5 and later. ConnectionManager.exe is a command-line utility to manage remote development connections outside of Visual Studio. It's useful for tasks such as provisioning a new development machine. Or, use it to set up Visual Studio for continuous integration. You can use it in a Developer Command Prompt window. For more information about the Developer Command Prompt, see [Use the Microsoft C++ toolset from the command line](../build/building-on-the-command-line.md). -ConnectionManager.exe is available in Visual Studio 2019 version 16.5 and later. It's part of the **Linux development with C++** workload in the Visual Studio Installer. It's also installed automatically when you choose the **Connection Manager** component in the installer. It's installed in *%VCIDEInstallDir%\\Linux\\bin\\ConnectionManagerExe\\ConnectionManager.exe*. +`ConnectionManager.exe` is available in Visual Studio 2019 version 16.5 and later. It's part of the **Linux development with C++** workload in the Visual Studio Installer. It's also installed automatically when you choose the **Connection Manager** component in the installer. It's installed in `%VCIDEInstallDir%\Linux\bin\ConnectionManagerExe\ConnectionManager.exe`. -The functionality of ConnectionManager.exe is also available in Visual Studio. To manage remote development connections in the IDE, on the menu bar, choose **Tools** > **Options** to open the Options dialog. In the Options dialog, select **Cross Platform** > **Connection Manager**. +The functionality of `ConnectionManager.exe` is also available in Visual Studio. To manage remote development connections in the IDE, on the menu bar, choose **Tools** > **Options** to open the Options dialog. In the Options dialog, select **Cross Platform** > **Connection Manager**. ## Syntax @@ -29,7 +29,13 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T - **`add`** *user\@host* \[**`--port`** *port*] \[**`--password`** *password*] \[**`--privatekey`** *privatekey_file*] - Authenticates and adds a new connection. By default, it uses port 22 and password authentication. (You'll be prompted to enter a password.) Use both **-`-password`** and **`--privatekey`** to specify a password for a private key. + Authenticates and adds a new connection. By default, it uses port 22 and password authentication. (You are prompted to enter a password.) + + You can use either a password or a key file and passphrase for authentication. Key files are more secure than username/password. If you already have a key pair, it's possible to reuse it. Use both **-`-password`** and **`--privatekey`** to specify a passphrase for a private key file. + + Versions of Visual Studio before 17.10 support Elliptic Curve (EC), Rivert-Shamir-Adleman (RSA), and Digital signature algorithm (DSA) keys for remote connections. Because of security concerns, RSA and DSA keys are no longer supported in VS 17.10 and later. Only EC keys are currently supported. + + To create a key pair compatible with the connection manager, use the command `ssh-keygen -m pem -t ecdsa -f `. If you use `ssh-keygen` to create the private key, you must specify the switch `-m pem`, or the key won't be accepted by Visual Studio. If your private key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`, you must convert it with `ssh-keygen -p -f -m pem`. - **`clean`** @@ -48,7 +54,7 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T Defines or modifies a property on a connection.\ If *value* is empty, then the property *key* is deleted.\ If authentication fails, no changes will be made.\ - If no connection is specified (what is meant by *default*, above), the user's default remote connection is used. + If no connection is specified, the user's default remote connection is used. - **`remove`** \[*connection_id* \| *user\@host* \[**`--port`** *port*]] @@ -57,7 +63,7 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T - **`remove-all`** Removes all stored connections. - + - **`update`** \[*default* \| *all* \| *connection_id* \| *user\@host* \[**`--port`** *port*]] \[**`--previous`**] [**`--fingerprint`**] Added in Visual Studio 16.10. Updates the host key fingerprint of the specified connection(s). @@ -135,7 +141,7 @@ ConnectionManager.exe remove 1975957870 | `port` | The port used for the connection.
Change the port for the specified connection: `ConnectionManager.exe modify -21212121 --property port=22`| | `shell` | The preferred shell to use on the remote system. Supported shells are `sh, csh, bash, tcsh, ksh, zsh, dash`
To set the preferred shell to be zsh for the remote machine on the specified connection: `ConnectionManager.exe modify -21212121 --property shell=zsh`
If the shell found on the Linux system isn't supported, then **`sh`** is used for all commands. | | `systemID` | The remote system type, such as `"OSX"`, `"Ubuntu"`. | -| `timeout` | The connection timeout in milliseconds. Change the timeout for the specified connection with: `ConnectionManager.exe modify -21212121 --property timeout=100` +| `timeout` | The connection timeout in milliseconds. Change the timeout for the specified connection with: `ConnectionManager.exe modify -21212121 --property timeout=100` | | `username` | The name of the user logged into the remote computer.
To add a connection for a user named `"user"` on localhost: `ConnectionManager.exe add user@127.0.0.1`| ## See also diff --git a/docs/linux/deploy-run-and-debug-your-linux-project.md b/docs/linux/deploy-run-and-debug-your-linux-project.md index 33d57455ee..e52bfcd132 100644 --- a/docs/linux/deploy-run-and-debug-your-linux-project.md +++ b/docs/linux/deploy-run-and-debug-your-linux-project.md @@ -1,7 +1,7 @@ --- title: "Deploy, run, and debug your Linux MSBuild C++ project in Visual Studio" description: "Describes how to compile, execute, and debug code on the remote target from inside a MSBuild-based Linux C++ project in Visual Studio." -ms.date: "08/08/2020" +ms.date: 12/5/2024 ms.custom: intro-deployment --- # Deploy, run, and debug your Linux MSBuild project @@ -33,72 +33,67 @@ There are several ways to interact with and debug your Linux project. GDB is used to debug applications running on Linux. When debugging on a remote system (not WSL) GDB can run in two different modes, which can be selected from the **Debugging Mode** option in the project's **Debugging** property page: ![Screenshot of the Visual Studio Linux Console App Property Pages dialog box with Configuration Properties > Debugging selected and Debugging Mode highlighted with G D B selected and highlighted from the dropdown list.](media/vs2019-debugger-settings.png) + + ::: moniker-end - ::: moniker-end + ::: moniker range="msvc-150" - ::: moniker range="msvc-150" - - GDB is used to debug applications running on Linux. GDB can run in two different modes, which can be selected from the **Debugging Mode** option in the project's **Debugging** property page: + GDB is used to debug applications running on Linux. GDB can run in two different modes, which can be selected from the **Debugging Mode** option in the project's **Debugging** property page: ![Screenshot of the Visual Studio 2017 Linux Console App Property Pages dialog box with Configuration Properties > Debugging selected and Debugging Mode highlighted with G D B selected and highlighted from the dropdown list.](media/vs2017-debugger-settings.png) + + ::: moniker-end - ::: moniker-end - - - In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. + - In **gdbserver** mode, GDB is run locally, which connects to gdbserver on the remote system. To use this, you must provide a local Windows path to GDB under **Debugger Path** in **Visual Studio 2022 version 17.6** and later, or under **GDB Path** in **Visual Studio 2019 version 16.11** and earlier. For more information about where to provide the path to GDB for CMake projects, see [Additional options allowed with the gdbserver configuration (16.7 or later)](../build/configure-cmake-debugging-sessions.md#additional-options-allowed-with-the-gdbserver-configuration-167-or-later). - In **gdb** mode, the Visual Studio debugger drives GDB on the remote system. This is a better option if the local version of GDB isn't compatible with the version installed on the target computer. This is the only mode that the Linux Console window supports. - > [!NOTE] - > If you are unable to hit breakpoints in gdbserver debugging mode, try gdb mode. gdb must first be [installed](download-install-and-setup-the-linux-development-workload.md) on the remote target. + > [!NOTE] + > If you are unable to hit breakpoints in gdbserver debugging mode, try gdb mode. gdb must first be [installed](download-install-and-setup-the-linux-development-workload.md) on the remote target. 1. Select the remote target using the standard **Debug** toolbar in Visual Studio. - When the remote target is available, you'll see it listed by either name or IP address. + When the remote target is available, you see it listed by name or IP address: ![Screenshot showing a Remote target IP address.](media/remote_target.png) - - If you haven't connected to the remote target yet, you'll see an instruction to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target. + + If you haven't connected to the remote target yet, you see instructions to use [Linux Connection Manager](connect-to-your-remote-linux-computer.md) to connect to the remote target: ![Screenshot showing the Remote Architecture, which is x64.](media/architecture.png) - -1. Set a breakpoint by clicking in the left gutter of some code that you know will execute. - - A red dot appears on the line of code where you set the breakpoint. + +1. Set a breakpoint by clicking in the left gutter of some code that you know will execute. A red dot appears on the line of code where you set the breakpoint. 1. Press **F5** (or **Debug > Start Debugging**) to start debugging. - When you start debugging, the application is compiled on the remote target before it starts. Any compilation errors will appear in the **Error List** window. + When you start debugging, the application is compiled on the remote target before it starts. Any compilation errors appear in the **Error List** window. - If there are no errors, the app will start and the debugger will pause at the breakpoint. + If there are no errors, the app starts and the debugger pauses at the breakpoint: ![Screenshot showing the app has hit a breakpoint.](media/hit_breakpoint.png) - - Now, you can interact with the application in its current state, view variables, and step through code by pressing command keys such as **F10** or **F11**. + + Now, you can interact with the application in its current state, view variables, and step through code by pressing command keys such as **F10** or **F11**. 1. If you want to use the Linux Console to interact with your app, select **Debug > Linux Console**. ![Screenshot showing the Linux Console menu item.](media/consolemenu.png) - - This console will display any console output from the target computer and take input and send it to the target computer. + + This console displays console output from the target computer and takes input and sends it to the target computer. ![Screenshot showing the Linux Console window.](media/consolewindow.png) - + ## Configure other debugging options (MSBuild projects) - Command-line arguments can be passed to the executable using the **Program Arguments** item in the project's **Debugging** property page. - You can export the `DISPLAY` environment variable by using the **Pre-Launch Command** in the project's **Debugging** property pages. For example: `export DISPLAY=:0.0` ![Screenshot showing the Program Arguments property in the Property Pages dialog.](media/settings_programarguments.png) - -- Specific debugger options can be passed to GDB using the **Additional Debugger Commands** entry. For example, you might want to ignore SIGILL (illegal instruction) signals. You could use the **handle** command to achieve this by adding the following to the **Additional Debugger Commands** entry as shown above: - - `handle SIGILL nostop noprint` - -- You can specify the path to the GDB used by Visual Studio using the **GDB Path** item in the project's **Debugging** property page. This property is available in Visual Studio 2019 version 16.9 and later. + +- Specific debugger options can be passed to GDB using the **Additional Debugger Commands** entry. For example, you might want to ignore SIGILL (illegal instruction) signals. You could use the **handle** command to achieve this by adding the following to the **Additional Debugger Commands** entry shown above: `handle SIGILL nostop noprint`. +- Specify the path to the GDB used by Visual Studio using the **GDB Path** item in the project's **Debugging** property page. This property is available in Visual Studio 2019 version 16.9 and later. ## Debug with Attach to Process -The [Debugging](prop-pages/debugging-linux.md) property page for Visual Studio projects, and the **Launch.vs.json** settings for CMake projects, have settings that enable you to attach to a running process. If you require more control beyond what is provided in those settings, you can place a file named `Microsoft.MIEngine.Options.xml` in the root of your solution or workspace. Here is a simple example: +The [Debugging](prop-pages/debugging-linux.md) property page for Visual Studio projects, and the **Launch.vs.json** settings for CMake projects, have settings that enable you to attach to a running process. If you require more control beyond what is provided in those settings, you can place a file named `Microsoft.MIEngine.Options.xml` in the root of your solution or workspace. Here's a simple example: ```xml @@ -115,7 +110,7 @@ ExePath="C:\temp\ConsoleApplication17\ConsoleApplication17\bin\x64\Debug\Console ``` -The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for more .so libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that, you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/master/src/MICore/LaunchOptions.xsd) on GitHub. +The **AttachOptionsForConnection** has most of the attributes you might need. The example above shows how to specify a location to search for more `.so` libraries. The child element **ServerOptions** enables attaching to the remote process with gdbserver instead. To do that, you need to specify a local gdb client (the one shipped in Visual Studio 2017 is shown above) and a local copy of the binary with symbols. The **SetupCommands** element enables you to pass commands directly to gdb. You can find all the options available in the [LaunchOptions.xsd schema](https://github.com/Microsoft/MIEngine/blob/main/src/MICore/LaunchOptions.xsd) on GitHub. ::: moniker range=">=msvc-160" @@ -123,13 +118,15 @@ The **AttachOptionsForConnection** has most of the attributes you might need. Th You can separate your remote build machine from your remote debug machine for both MSBuild-based Linux projects and CMake projects that target a remote Linux machine. For example, you can now cross-compile on x64 and deploy to an ARM device when targeting IoT scenarios. -By default, the remote debug machine is the same as the remote build machine (**Configuration Properties** > **General** > **Remote Build Machine**). To specify a new remote debug machine, right-click on the project in **Solution Explorer** and go to **Configuration Properties** > **Debugging** > **Remote Debug Machine**. +By default, the remote debug machine is the same as the remote build machine (**Configuration Properties** > **General** > **Remote Build Machine**). To specify a new remote debug machine, right-click on the project in **Solution Explorer** and go to **Configuration Properties** > **Debugging** > **Remote Debug Machine**: ![Screenshot showing the Linux remote debug machine property in the Property Pages dialog which shows the username, authentication type, and port.](media/linux-remote-debug-machine.png) -The drop-down menu for **Remote Debug Machine** is populated with all established remote connections. To add a new remote connection, navigate to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or search for "Connection Manager" in **Quick Launch**. You can also specify a new remote deploy directory in the project's Property Pages (**Configuration Properties** > **General** > **Remote Deploy Directory**). +The drop-down menu for **Remote Debug Machine** is populated with all established remote connections. + +To add a new remote connection, navigate to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or search for "Connection Manager" in **Quick Launch**. You can also specify a new remote deploy directory in the project's Property Pages (**Configuration Properties** > **General** > **Remote Deploy Directory**). -By default, only the files necessary for the process to debug will be deployed to the remote debug machine. You can use **Solution Explorer** to configure which source files will be deployed to the remote debug machine. When you click on a source file, you'll see a preview of its File Properties directly below the Solution Explorer. +By default, only the files necessary for the process to debug are deployed to the remote debug machine. You can use **Solution Explorer** to configure which source files are deployed to the remote debug machine. When you click on a source file, you see a preview of its File Properties directly below the Solution Explorer: ![Screenshot showing the properties of the file main.cpp with the property content = False highlighted.](media/linux-deployable-content.png) @@ -138,7 +135,6 @@ The **Content** property specifies whether the file will be deployed to the remo In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file or directory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names: ```xml - @@ -156,11 +152,11 @@ In some cases, you may require more control over your project's deployment. For ### CMake projects -For CMake projects that target a remote Linux machine, you can specify a new remote debug machine in launch.vs.json. By default, the value of "remoteMachineName" is synchronized with the "remoteMachineName" property in CMakeSettings.json, which corresponds to your remote build machine. These properties no longer need to match, and the value of "remoteMachineName" in launch.vs.json will dictate which remote machine is used for deploy and debug. +For CMake projects that target a remote Linux machine, you can specify a new remote debug machine in launch.vs.json. By default, the value of `"remoteMachineName"` is synchronized with the `"remoteMachineName"` property in `CMakeSettings.json`, which corresponds to your remote build machine. These properties no longer need to match, and the value of `"remoteMachineName"` in `launch.vs.json` dictate which remote machine is used for deploy and debug. ![The CMake remote debug machine specified in the launch_schema.json file. The remote Machine Name is ${debugInfo . remoteMachineName}](media/cmake-remote-debug-machine.png) -IntelliSense will suggest all a list of all established remote connections. You can add a new remote connection by navigating to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or searching for "Connection Manager" in **Quick Launch**. +IntelliSense suggests a list of all established remote connections. You can add a new remote connection by navigating to **Tools** > **Options** > **Cross Platform** > **Connection Manager** or searching for "Connection Manager" in **Quick Launch**. If you want complete control over your deployment, you can append the following code block(s) to the launch.vs.json file. Remember to replace the placeholder values with real values: diff --git a/docs/linux/download-install-and-setup-the-linux-development-workload.md b/docs/linux/download-install-and-setup-the-linux-development-workload.md index 7bd57ecbe5..7187b8f44d 100644 --- a/docs/linux/download-install-and-setup-the-linux-development-workload.md +++ b/docs/linux/download-install-and-setup-the-linux-development-workload.md @@ -1,14 +1,15 @@ --- -title: "Install the C++ Linux workload in Visual Studio" -description: "How to download, install, and set up the Linux workload for C++ in Visual Studio." -ms.date: "05/03/2020" +title: "Install the C++ Linux Workload in Visual Studio" +description: "Learn how to download, install, and set up the Linux workload for C++ in Visual Studio." +ms.date: 03/25/2025 +ms.topic: how-to ms.custom: intro-installation --- # Download, install, and set up the Linux workload ::: moniker range="msvc-140" -Linux projects are supported in Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio **Version** selector control for this article to Visual Studio 2017 or Visual Studio 2019. It's found at the top of the table of contents on this page. +Linux projects are supported in Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio **Version** selector for this article to Visual Studio 2017, Visual Studio 2019, or Visual Studio 2022. It's found at the top of the table of contents on this page. ::: moniker-end @@ -18,7 +19,7 @@ You can use the Visual Studio IDE on Windows to create, edit, and debug C++ proj You can work on your existing code base that uses CMake without having to convert it to a Visual Studio project. If your code base is cross-platform, you can target both Windows and Linux from within Visual Studio. For example, you can edit, build, and debug your code on Windows using Visual Studio. Then, quickly retarget the project for Linux to build and debug in a Linux environment. Linux header files are automatically copied to your local machine. Visual Studio uses them to provide full IntelliSense support (Statement Completion, Go to Definition, and so on). -For any of these scenarios, the **Linux development with C++** workload is required. +For any of these scenarios, the **Linux and embedded development with C++** workload is required. ::: moniker-end @@ -26,25 +27,25 @@ For any of these scenarios, the **Linux development with C++** workload is requi ## Visual Studio setup -1. Type "Visual Studio Installer" in the Windows search box: +1. Open the Visual Studio Installer from your Start menu. If you can't find it, type *Visual Studio Installer* in the Windows search box and look for the installer under the **Apps** results. - ![Screenshot of the Windows search box which contains the text: visual studio installer.](media/visual-studio-installer-search.png) + :::image type="content" source="media/visual-studio-installer-search.png" alt-text="Screenshot of the Windows search box that contains the text visual studio installer."::: -1. Look for the installer under the **Apps** results and double-click it. When the installer opens, choose **Modify**, and then click on the **Workloads** tab. Scroll down to **Other toolsets** and select the **Linux development with C++** workload. +1. When the installer opens, choose **Modify**, and then click on the **Workloads** tab. Scroll down to **Other toolsets** and select the **Linux and embedded development with C++** workload. - :::image type="complex" source="./media/linuxworkload.png" alt-text="Screenshot highlighting the Visual C++ for Linux Development workload item in Visual Studio Installer."::: - The Linux Development workload is selected. The Installation details pane is highlighted, which lists what's included in the workload. Which includes: Visual Studio C++ core features, Windows Universal C runtime, Visual C++ for Linux development. An optional component is also selected: Visual C++ tools for CMake and Linux. + :::image type="complex" source="./media/linux-workload.png" alt-text="Screenshot highlighting the Visual C++ for Linux and embedded development workload item in Visual Studio Installer."::: + The Linux and embedded development workload is selected. The Installation details pane is highlighted, which lists what's included in the workload. Which includes: Visual Studio C++ core features, Windows Universal C runtime, Visual C++ for Linux development. An optional component is also selected: Visual C++ tools for CMake and Linux. :::image-end::: -1. If you're targeting IoT or embedded platforms, go to the **Installation details** pane on the right. Under **Linux development with C++**, expand **Optional Components**, and choose the components you need. CMake support for Linux is selected by default. +1. If you're targeting IoT or embedded platforms, go to the **Installation details** pane on the right. Under **Linux and embedded development with C++**, expand **Optional Components**, and choose the components you need. CMake support for Linux is selected by default. 1. Click **Modify** to continue with the installation. ## Options for creating a Linux environment -If you don't already have a Linux machine, you can create a Linux Virtual Machine on Azure. For more information, see [Quickstart: Create a Linux virtual machine in the Azure portal](/azure/virtual-machines/linux/quick-create-portal). +If you don't already have a Linux machine, you can create a Linux virtual machine on Azure. For more information, see [Quickstart: Create a Linux virtual machine in the Azure portal](/azure/virtual-machines/linux/quick-create-portal). -On Windows 10 and later, you can install and target your favorite Linux distro on the Windows Subsystem for Linux (WSL). For more information, see [Windows Subsystem for Linux Installation Guide for Windows 10](/windows/wsl/install-win10). If you're unable to access the Windows Store, you can [manually download the WSL distro packages](/windows/wsl/install-manual). WSL is a convenient console environment, but it's not recommended for graphical applications. +On Windows 10 and later, you can install and target your favorite Linux distro on the Windows Subsystem for Linux (WSL). For more information, see [How to install Linux on Windows with WSL](/windows/wsl/install). If you're unable to access the Windows Store, you can [manually download the WSL distro packages](/windows/wsl/install-manual). WSL is a convenient console environment, but it's not recommended for graphical applications. ::: moniker-end @@ -103,7 +104,7 @@ The target Linux system must have **openssh-server**, **g++**, **gdb**, and **ma You might be prompted for your root password to run the `sudo` command. If so, enter it and continue. Once complete, the required services and tools are installed. -1. Ensure the ssh service is running on your Linux computer by running: +1. Ensure the ssh service is running on your Linux computer: ```bash sudo service ssh start @@ -141,7 +142,7 @@ The target machine running Fedora uses the **dnf** package installer. To downloa You might be prompted for your root password to run the sudo command. If so, enter it and continue. Once complete, the required services and tools are installed. -1. Ensure the ssh service is running on your Linux computer by running: +1. Ensure the ssh service is running on your Linux computer: ```bash sudo systemctl start sshd @@ -149,11 +150,9 @@ The target machine running Fedora uses the **dnf** package installer. To downloa This command starts the service and runs it in the background, ready to accept connections. -## Next Steps +## Related content -You're now ready to create or open a Linux project and configure it to run on the target system. For more information, see: - -- [Create a new Linux MSBuild C++ project](create-a-new-linux-project.md) -- [Configure a Linux CMake project](cmake-linux-project.md) +- [Create a Linux MSBuild C++ project in Visual Studio](create-a-new-linux-project.md) +- [Create a CMake Linux project in Visual Studio](cmake-linux-project.md) ::: moniker-end diff --git a/docs/linux/media/connection-manager-vs2019.png b/docs/linux/media/connection-manager-vs2019.png index d4da0b9797..cfeec7a3e2 100644 Binary files a/docs/linux/media/connection-manager-vs2019.png and b/docs/linux/media/connection-manager-vs2019.png differ diff --git a/docs/linux/media/linux-general-prop-page-vs2019.png b/docs/linux/media/linux-general-prop-page-vs2019.png deleted file mode 100644 index 7ca6c7ead4..0000000000 Binary files a/docs/linux/media/linux-general-prop-page-vs2019.png and /dev/null differ diff --git a/docs/linux/media/linux-remote-debug-machine.png b/docs/linux/media/linux-remote-debug-machine.png index 1ad440c868..17eb4d3f00 100644 Binary files a/docs/linux/media/linux-remote-debug-machine.png and b/docs/linux/media/linux-remote-debug-machine.png differ diff --git a/docs/linux/media/linux-workload.png b/docs/linux/media/linux-workload.png new file mode 100644 index 0000000000..8a8baa1142 Binary files /dev/null and b/docs/linux/media/linux-workload.png differ diff --git a/docs/linux/media/linuxworkload.png b/docs/linux/media/linuxworkload.png deleted file mode 100644 index 5904de11ec..0000000000 Binary files a/docs/linux/media/linuxworkload.png and /dev/null differ diff --git a/docs/linux/media/remote-build-machine-vs2019.png b/docs/linux/media/remote-build-machine-vs2019.png index 48fed59dbc..9d9d1c23cd 100644 Binary files a/docs/linux/media/remote-build-machine-vs2019.png and b/docs/linux/media/remote-build-machine-vs2019.png differ diff --git a/docs/linux/media/remote-file-explorer-download.png b/docs/linux/media/remote-file-explorer-download.png new file mode 100644 index 0000000000..befc41cb08 Binary files /dev/null and b/docs/linux/media/remote-file-explorer-download.png differ diff --git a/docs/linux/media/remote-file-explorer-menu-item.png b/docs/linux/media/remote-file-explorer-menu-item.png new file mode 100644 index 0000000000..a118df5a61 Binary files /dev/null and b/docs/linux/media/remote-file-explorer-menu-item.png differ diff --git a/docs/linux/media/remote-file-explorer-progress.png b/docs/linux/media/remote-file-explorer-progress.png new file mode 100644 index 0000000000..95e524bf70 Binary files /dev/null and b/docs/linux/media/remote-file-explorer-progress.png differ diff --git a/docs/linux/media/remote-file-explorer-toolbar.png b/docs/linux/media/remote-file-explorer-toolbar.png new file mode 100644 index 0000000000..16ea87e721 Binary files /dev/null and b/docs/linux/media/remote-file-explorer-toolbar.png differ diff --git a/docs/linux/media/remote-file-explorer-upload.png b/docs/linux/media/remote-file-explorer-upload.png new file mode 100644 index 0000000000..062b589e60 Binary files /dev/null and b/docs/linux/media/remote-file-explorer-upload.png differ diff --git a/docs/linux/media/remote-file-explorer.png b/docs/linux/media/remote-file-explorer.png new file mode 100644 index 0000000000..db9ab3b222 Binary files /dev/null and b/docs/linux/media/remote-file-explorer.png differ diff --git a/docs/linux/media/settings_general.png b/docs/linux/media/settings_general.png index 465474497c..549f9cec33 100644 Binary files a/docs/linux/media/settings_general.png and b/docs/linux/media/settings_general.png differ diff --git a/docs/linux/media/vs2019-debugger-settings.png b/docs/linux/media/vs2019-debugger-settings.png index 43d7f8787b..676aa732cb 100644 Binary files a/docs/linux/media/vs2019-debugger-settings.png and b/docs/linux/media/vs2019-debugger-settings.png differ diff --git a/docs/linux/remote-file-explorer.md b/docs/linux/remote-file-explorer.md new file mode 100644 index 0000000000..2f4ca5327e --- /dev/null +++ b/docs/linux/remote-file-explorer.md @@ -0,0 +1,112 @@ +--- +title: "Remote file explorer" +description: "Learn how to use Remote File Explorer to view, upload, and download files on a remote machine form within Visual Studio." +ms.topic: how-to +ms.date: 06/02/2025 +--- +# Remote File Explorer + +Learn how to use **Remote File Explorer** to view, upload, and download files on a remote machine from Visual Studio. With **Remote File Explorer**, perform common file operations such as: + +- Upload files from your local machine to a remote machine +- Download files from a remote machine to your local machine +- Create folders on a remote machine +- Delete files and folders on a remote machine +- Rename files and folders on a remote machine +- Search for files and folders on a remote machine + +## Prerequisites + +Visual Studio version 17.6 or later. + +Ensure that the **Linux and embedded development with C++** workload is installed. Run the Visual Studio Installer and ensure that the **Linux and embedded development with C++** workload is selected. Also ensure that the **Remote File Explorer for Linux** component is selected, and update your installation if necessary. + +:::image type="content" source="media/linux-workload.png" alt-text="Screenshot of the Visual Studio Installer. The **Linux and embedded development with C++** workload is selected. In the installation details pane, Remote File Explorer for Linux is selected."::: + +Install and configure Secure Shell (SSH) on the remote machine. To install SSH on Linux, run these commands on the remote machine: + +```bash +sudo apt update +sudo apt install openssh-server +sudo systemctl start ssh +sudo systemctl status ssh +``` + +## View and edit files on a remote machine + +In these examples, the remote machine is a Windows Subsystem for Linux instance running on localhost port 22. The project is a new CMake project created in Visual Studio. The sample project is on the remote machine in the `C:\Users\{username}\projects\` folder. + +To open the **Remote File Explorer** in Visual Studio, choose **View** > **Other Windows** > **Remote File Explorer**. + +:::image type="content" source="media/remote-file-explorer-menu-item.png" alt-text="Screenshot of the Visual Studio View menu. Remote File Explorer is highlighted."::: + +The **Remote File Explorer** window opens: + +:::image type="content" source="media/remote-file-explorer.png" alt-text="Screenshot of the Remote File Explorer. The folder system on the remote machine is visible."::: + +If you see a message to select or create a new connection in the **Connection Manager**, ensure that the SSH server is running on the remote machine. If your remote machine is running on Windows Subsystem for Linux (WSL), ensure that the WSL instance is running. Make sure the Visual Studio debug target dropdown is set to the remote instance. To connect to a different remote machine, in the **Remote File Explorer** window's **Select the host target** dropdown, select the remote target. It may appear in a form such as `username@hostname:port`. For example, `username@localhost:22`. You can also select **Add new connection** to add a new connection to the **Connection Manager**. For more information, see [Connection manager](connect-to-your-remote-linux-computer.md). + +Open and edit files directly from the **Remote File Explorer**. To open a file, double-click the file in the **Remote File Explorer** window. The file opens in the editor window. You can also right-click the file and select **Open** from the context menu or press **Ctrl+Enter**. When you save the file, the changes are saved directly to the remote machine. + +## Upload files to a remote machine + +To upload files or directories to the remote machine, right-click the folder in the **Remote File Explorer** window where you want to upload files, and select **Upload**. + +:::image type="content" source="media/remote-file-explorer-upload.png" alt-text="Screenshot of the Remote File Explorer showing the Upload a directory and Upload files menu options."::: + +Use the folder explorer window that opens to select the file or folder you want to upload. You can drag and drop files from your local machine onto the **Remote File Explorer** window. Alternatively, use the **Upload Files** or **Upload Folder** buttons to choose the items to upload: + +## Download files from a remote machine + +To download files or directories from the remote machine, right-click the folder or file in the **Remote File Explorer** window that you want to download and select **Download**. + +:::image type="content" source="media/remote-file-explorer-download.png" alt-text="Screenshot of the Remote File Explorer displaying the menu option: Download 'asset.txt'."::: + +Use the folder explorer window that opens to select where to download the file or folder. You can also use the **Download Item** button to choose the item you want to download. + +## Monitor and cancel file operations + +Monitor the progress of uploading or downloading items in the status window at the bottom of the **Remote File Explorer** window. Select the **Cancel** button to stop the operation. + +:::image type="content" source="media/remote-file-explorer-progress.png" alt-text="Screenshot of the Remote File Explorer showing the progress indicator. The Cancel button is highlighted."::: + +## Other file operations + +Rename files and folders, create new folders, delete files and folders, and search for files and folders. + +- Rename a file or folder: right-click the file or folder and select **Rename** from the context menu, or select the rename button on the toolbar. The filename becomes editable. Type the new name for the item and press **Enter**. +- Create a new folder: right-click in the **Remote File Explorer** window and select **New Folder**. Enter a name for the new folder and press **Enter**. +- Delete a file or folder: right-click the file or folder and select **Delete** from the context menu, or select the delete button on the toolbar. Confirm the deletion in the dialog that appears. Deleting files or folders from the remote machine is a permanent action and can't be undone. +- Refresh the view: right-click in the **Remote File Explorer** window and select **Refresh** from the context menu, or select the refresh button on the toolbar, or press **F5**. It only refreshes the view of what is selected. If you have a folder selected, it refreshes the view of that folder. If you have a file selected, it refreshes the view of that file. +- Search for files: enter text in the search box at the top of the **Remote File Explorer** window to find folders or files. The search is case-insensitive and searches all files and folders under the selected item. If a folder is selected, it searches all files and folders in that folder. If a file is selected, it searches all files and folders in the same directory as that file. + +## Remote File Explorer toolbar buttons + +The **Remote File Explorer** toolbar lets you access remote file operations: + +:::image type="content" source="media/remote-file-explorer-toolbar.png" alt-text="Screenshot of the Remote File Explorer toolbar." ::: + +The highlighted buttons are, from left to right: + +- **+**: Create a new Remote Explorer window. +- **Home**: Go to the `$HOME` directory of the currently signed-in user on the remote machine. +- **Settings**: Open the settings for the **Remote File Explorer**. +- **Upload Files**: Upload files from your local machine to the remote machine. +- **Upload Folder**: Upload a folder from your local machine to the remote machine. +- **Download Item**: Download a file or folder from the remote machine to your local machine. +- **Refresh Item**: Refresh the view of the selected item. +- **Rename Item**: Rename a file or folder on the remote machine. +- **Delete Item**: Delete a file or folder on the remote machine. +- **Search**: Search for files or folders on the remote machine. + +## Remote File Explorer settings + +To change the settings for the **Remote File Explorer**, select the **Settings** button on the toolbar. The **Remote File Explorer Settings** dialog opens with the following option: + +- **Enable Dynamic File Icons for Extension-less Files**: Shows icons based on file type by checking the mime-type. Useful for Linux files without extensions so that a correct file icon is shown instead of a generic document icon. May impact performance. + +## See also + +- [The Remote File Explorer tool window of Visual Studio (video)](/shows/pure-virtual-cpp-2023/the-remote-file-explorer-tool-window-of-visual-studio) +- [Connection manager](connect-to-your-remote-linux-computer.md) +- [Create a CMake Linux project in Visual Studio](cmake-linux-project.md) \ No newline at end of file diff --git a/docs/linux/set-up-fips-compliant-secure-remote-linux-development.md b/docs/linux/set-up-fips-compliant-secure-remote-linux-development.md index 5e18ef6e2a..fbfacf7a4f 100644 --- a/docs/linux/set-up-fips-compliant-secure-remote-linux-development.md +++ b/docs/linux/set-up-fips-compliant-secure-remote-linux-development.md @@ -48,7 +48,7 @@ The examples in this article use Ubuntu 18.04 LTS with OpenSSH server version 7. ``` > [!NOTE] - > `ssh-rsa` is the only FIPS compliant host key algorithm VS supports. The `aes*-ctr` algorithms are also FIPS compliant, but the implementation in Visual Studio isn't approved. The `ecdh-*` key exchange algorithms are FIPS compliant, but Visual Studio doesn't support them. + > `ssh-rsa`, `rsa-sha2-*`, and `ecdsa-sha2-*` are the only FIPS compliant host key algorithms VS supports. For more information about the algorithms Visual Studio supports, see [Supported SSH Algorithms](connect-to-your-remote-linux-computer.md#supported-ssh-algorithms). You're not limited to these options. You can configure `ssh` to use other ciphers, host key algorithms, and so on. Some other relevant security options you may want to consider are `PermitRootLogin`, `PasswordAuthentication`, and `PermitEmptyPasswords`. For more information, see the `man` page for `sshd_config` or the article [SSH Server Configuration](https://www.ssh.com/ssh/sshd_config). @@ -58,35 +58,35 @@ The examples in this article use Ubuntu 18.04 LTS with OpenSSH server version 7. sudo service ssh restart ``` -Next, you'll create an RSA key pair on your Windows computer. Then you'll copy the public key to the remote Linux system for use by `ssh`. +Next, you'll create an ECDSA key pair on your Windows computer. Then you'll copy the public key to the remote Linux system for use by ssh. -### To create and use an RSA key file +### To create and use an ECDSA key file -1. On the Windows machine, generate a public/private RSA key pair by using this command: +1. On the Windows machine, generate a public/private ECDSA key pair by using this command: ```cmd - ssh-keygen -t rsa -b 4096 -m PEM + ssh-keygen -t ecdsa -m PEM ``` - The command creates a public key and a private key. By default, the keys are saved to *`%USERPROFILE%\.ssh\id_rsa`* and *`%USERPROFILE%\\.ssh\\id_rsa.pub`*. (In PowerShell, use `$env:USERPROFILE` instead of the cmd macro `%USERPROFILE%`) If you change the key name, use the changed name in the steps that follow. We recommend you use a passphrase for increased security. + The command creates a public key and a private key. By default, the keys are saved to %USERPROFILE%\.ssh\id_ecdsa and %USERPROFILE%\.ssh\id_ecdsa.pub. (In PowerShell, use $env:USERPROFILE instead of the cmd macro %USERPROFILE%) Keys generated with RSA are also supported. If you change the key name, use the changed name in the steps that follow. We recommend you use a passphrase for increased security. 1. From Windows, copy the public key to the Linux machine: ```cmd - scp %USERPROFILE%\.ssh\id_rsa.pub user@hostname: + scp %USERPROFILE%\.ssh\id_ecdsa.pub user@hostname: ``` 1. On the Linux system, add the key to the list of authorized keys, and ensure the file has the correct permissions: ```bash - cat ~/id_rsa.pub >> ~/.ssh/authorized_keys + cat ~/id_ecdsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys ``` 1. Now, you can test to see if the new key works in `ssh`. Use it to sign in from Windows: ```cmd - ssh -i %USERPROFILE%\.ssh\id_rsa user@hostname + ssh -i %USERPROFILE%\.ssh\id_ecdsa user@hostname ``` You've successfully set up `ssh`, created and deployed encryption keys, and tested your connection. Now you're ready to set up the Visual Studio connection. diff --git a/docs/linux/toc.yml b/docs/linux/toc.yml index 06e6695271..34c5c53245 100644 --- a/docs/linux/toc.yml +++ b/docs/linux/toc.yml @@ -7,6 +7,8 @@ items: items: - name: Connect to your remote Linux computer href: ../linux/connect-to-your-remote-linux-computer.md + - name: Remote File Explorer + href: ../linux/remote-file-explorer.md - name: Set up FIPS-compliant secure remote Linux development href: ../linux/set-up-fips-compliant-secure-remote-linux-development.md - name: ConnectionManager reference diff --git a/docs/mfc/activation-verbs.md b/docs/mfc/activation-verbs.md index 5c97e74cb5..31e35ddfed 100644 --- a/docs/mfc/activation-verbs.md +++ b/docs/mfc/activation-verbs.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Activation: Verbs" title: "Activation: Verbs" -ms.date: "11/04/2016" -helpviewer_keywords: ["verbs [MFC]", "OLE [MFC], activation", "edit verb [MFC]", "activation [MFC], verbs", "OLE [MFC], editing", "Primary verb [MFC]", "OLE activation {MFC]"] -ms.assetid: eb56ff23-1de8-43ad-abeb-dc7346ba7b70 +description: "Learn more about: Activation: Verbs" +ms.date: 11/04/2016 +helpviewer_keywords: ["verbs [MFC]", "OLE [MFC], activation", "edit verb [MFC]", "activation [MFC], verbs", "OLE [MFC], editing", "Primary verb [MFC]", "OLE activation [MFC]"] --- # Activation: Verbs diff --git a/docs/mfc/codesnippet/CPP/accessing-the-embedded-month-calendar-control_2.cpp b/docs/mfc/codesnippet/CPP/accessing-the-embedded-month-calendar-control_2.cpp index 240dd065e7..fbc30334bf 100644 --- a/docs/mfc/codesnippet/CPP/accessing-the-embedded-month-calendar-control_2.cpp +++ b/docs/mfc/codesnippet/CPP/accessing-the-embedded-month-calendar-control_2.cpp @@ -1,4 +1,3 @@ - //create and initialize the font to be used LOGFONT logFont = {0}; logFont.lfHeight = -12; diff --git a/docs/mfc/codesnippet/CPP/cbitmapbutton-class_3.cpp b/docs/mfc/codesnippet/CPP/cbitmapbutton-class_3.cpp index 5bb7063b2a..a54aeb9049 100644 --- a/docs/mfc/codesnippet/CPP/cbitmapbutton-class_3.cpp +++ b/docs/mfc/codesnippet/CPP/cbitmapbutton-class_3.cpp @@ -1,4 +1,3 @@ - // Create the bitmap button (must include the BS_OWNERDRAW style). pmyButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, CRect(10, 10, 100, 100), pParentWnd, 1); diff --git a/docs/mfc/codesnippet/CPP/cmultidoctemplate-class_2.cpp b/docs/mfc/codesnippet/CPP/cmultidoctemplate-class_2.cpp index 0583ae03fb..63f44247ad 100644 --- a/docs/mfc/codesnippet/CPP/cmultidoctemplate-class_2.cpp +++ b/docs/mfc/codesnippet/CPP/cmultidoctemplate-class_2.cpp @@ -23,7 +23,7 @@ return FALSE; // After the following call, MFC is aware of the doc // template and will free it when the application is // shut down. The doc templates known to MFC will -// automatically be used when CWinApp:OnFileOpen() +// automatically be used when CWinApp::OnFileOpen() // or CWinApp::OnFileNew() are called. AddDocTemplate(pDocTemplate); \ No newline at end of file diff --git a/docs/mfc/codesnippet/CPP/connection-maps_3.cpp b/docs/mfc/codesnippet/CPP/connection-maps_3.cpp index cffe2a236b..cab527dac6 100644 --- a/docs/mfc/codesnippet/CPP/connection-maps_3.cpp +++ b/docs/mfc/codesnippet/CPP/connection-maps_3.cpp @@ -10,4 +10,4 @@ IUnknown* pUnkSink = mysink.GetInterface(&iid); //pUnkSrc is IUnknown of server obtained by CoCreateInstance(). //dwCookie is a cookie identifying the connection, and is needed //to terminate this connection. -AfxConnectionAdvise(pUnkSrc, IID_ISampleSink, pUnkSink, FALSE, &dwCookie); \ No newline at end of file +AfxConnectionAdvise(pUnkSrc, IID_ISampleSink, pUnkSink, TRUE, &dwCookie); \ No newline at end of file diff --git a/docs/mfc/codesnippet/CPP/connection-maps_4.cpp b/docs/mfc/codesnippet/CPP/connection-maps_4.cpp index 7fd1ae018a..8e5eed54a3 100644 --- a/docs/mfc/codesnippet/CPP/connection-maps_4.cpp +++ b/docs/mfc/codesnippet/CPP/connection-maps_4.cpp @@ -6,4 +6,4 @@ IUnknown* pUnkSink = mysink.GetInterface(&iid); //Terminate a connection between source and sink. //pUnkSrc is IUnknown of server obtained by CoCreateInstance(). //dwCookie is a value obtained through AfxConnectionAdvise(). -AfxConnectionUnadvise(pUnkSrc, IID_ISampleSink, pUnkSink, FALSE, dwCookie); \ No newline at end of file +AfxConnectionUnadvise(pUnkSrc, IID_ISampleSink, pUnkSink, TRUE, dwCookie); \ No newline at end of file diff --git a/docs/mfc/codesnippet/CPP/csingledoctemplate-class_2.cpp b/docs/mfc/codesnippet/CPP/csingledoctemplate-class_2.cpp index e811430289..bcd02c9f95 100644 --- a/docs/mfc/codesnippet/CPP/csingledoctemplate-class_2.cpp +++ b/docs/mfc/codesnippet/CPP/csingledoctemplate-class_2.cpp @@ -25,6 +25,6 @@ return FALSE; // After the following call, MFC is aware of the doc // template and will free it when the application is // shut down. The doc templates known to MFC will -// automatically be used when CWinApp:OnFileOpen() or +// automatically be used when CWinApp::OnFileOpen() or // CWinApp::OnFileNew() are called. AddDocTemplate(pDocTemplate); \ No newline at end of file diff --git a/docs/mfc/dynamic-object-creation.md b/docs/mfc/dynamic-object-creation.md index 508a2012a9..a7e77c3fe6 100644 --- a/docs/mfc/dynamic-object-creation.md +++ b/docs/mfc/dynamic-object-creation.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Dynamic Object Creation" title: "Dynamic Object Creation" +description: "Learn more about: Dynamic Object Creation" ms.date: "03/27/2020" helpviewer_keywords: ["object creation [MFC], dynamically at run time", "CObject class [MFC], dynamic object creation", "objects [MFC], creating dynamically at run time", "dynamic object creation [MFC]"] -ms.assetid: 3e0f51cb-3e24-4231-817f-1c0ce9f2d5df --- # Dynamic Object Creation @@ -17,5 +16,5 @@ This article explains how to create an object dynamically at run time. The proce ## See also -[Destroying Window Objects](tn017-destroying-window-objects.md) +[Destroying Window Objects](tn017-destroying-window-objects.md)\ [Using CObject](using-cobject.md) diff --git a/docs/mfc/mfc-activex-controls-using-fonts.md b/docs/mfc/mfc-activex-controls-using-fonts.md index d1db67fe5c..dc16f5d452 100644 --- a/docs/mfc/mfc-activex-controls-using-fonts.md +++ b/docs/mfc/mfc-activex-controls-using-fonts.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: MFC ActiveX Controls: Using Fonts" title: "MFC ActiveX Controls: Using Fonts" +description: "Learn more about: MFC ActiveX Controls: Using Fonts" ms.date: "11/19/2018" f1_keywords: ["OnFontChanged", "HeadingFont", "InternalFont"] helpviewer_keywords: ["notifications [MFC], MFC ActiveX controls fonts", "OnDraw method, MFC ActiveX controls", "InternalFont method [MFC]", "SetFont method [MFC]", "OnFontChanged method [MFC]", "IPropertyNotifySink class [MFC]", "MFC ActiveX controls [MFC], fonts", "Stock Font property [MFC]", "HeadingFont property [MFC]", "GetFont method [MFC]", "SelectStockFont method [MFC]", "fonts [MFC], ActiveX controls"] -ms.assetid: 7c51d602-3f5a-481d-84d1-a5d8a3a71761 --- # MFC ActiveX Controls: Using Fonts @@ -112,7 +111,7 @@ To implement a custom Font property, you use the Add Property Wizard to add the 1. Click **Finish**. -The Add Property Wizard creates the code to add the `HeadingFont` custom property to the `CSampleCtrl` class and the SAMPLE.IDL file. Because `HeadingFont` is a Get/Set property type, the Add Property Wizard modifies the `CSampleCtrl` class's dispatch map to include a DISP_PROPERTY_EX_ID[DISP_PROPERTY_EX](reference/dispatch-maps.md#disp_property_ex) macro entry: +The Add Property Wizard creates the code to add the `HeadingFont` custom property to the `CSampleCtrl` class and the SAMPLE.IDL file. Because `HeadingFont` is a Get/Set property type, the Add Property Wizard modifies the `CSampleCtrl` class's dispatch map to include a DISP_PROPERTY_EX_ID [DISP_PROPERTY_EX](reference/dispatch-maps.md#disp_property_ex) macro entry: [!code-cpp[NVC_MFC_AxFont#5](codesnippet/cpp/mfc-activex-controls-using-fonts_5.cpp)] @@ -215,6 +214,6 @@ After these changes have been made to your project, rebuild the project and use ## See also -[MFC ActiveX Controls](mfc-activex-controls.md)
-[MFC ActiveX Controls: Using Pictures in an ActiveX Control](mfc-activex-controls-using-pictures-in-an-activex-control.md)
+[MFC ActiveX Controls](mfc-activex-controls.md)\ +[MFC ActiveX Controls: Using Pictures in an ActiveX Control](mfc-activex-controls-using-pictures-in-an-activex-control.md)\ [MFC ActiveX Controls: Using Stock Property Pages](mfc-activex-controls-using-stock-property-pages.md) diff --git a/docs/mfc/reference/application-control.md b/docs/mfc/reference/application-control.md index 8c32271d69..71d0ea63f2 100644 --- a/docs/mfc/reference/application-control.md +++ b/docs/mfc/reference/application-control.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Application Control" title: "Application Control" -ms.date: "11/04/2016" +description: "Learn more about: Application Control" +ms.date: 11/04/2016 helpviewer_keywords: ["application control [MFC]"] -ms.assetid: c1f69f15-e0fe-4515-9f36-d63d31869deb --- # Application Control @@ -258,7 +257,7 @@ Nonzero if the server class is successfully registered; otherwise 0. Most applications can use `COleTemplateServer::Register` to register the application's document types. If your application's system-registry format does not fit the typical pattern, you can use `AfxOleRegisterServerClass` for more control. -The registry consists of a set of keys and values. The *rglpszRegister* and *rglpszOverwrite* arguments are arrays of pointers to strings, each consisting of a key and a value separated by a **NULL** character ( `'\0'`). Each of these strings can have replaceable parameters whose places are marked by the character sequences *%1* through *%5*. +The registry consists of a set of keys and values. The *rglpszRegister* and *rglpszOverwrite* arguments are arrays of pointers to strings, each consisting of a key and a value separated by a **NULL** character (`'\0'`). Each of these strings can have replaceable parameters whose places are marked by the character sequences *%1* through *%5*. The symbols are filled in as follows: diff --git a/docs/mfc/reference/buffercommand-enumeration.md b/docs/mfc/reference/buffercommand-enumeration.md index 347d457d89..23d430be1a 100644 --- a/docs/mfc/reference/buffercommand-enumeration.md +++ b/docs/mfc/reference/buffercommand-enumeration.md @@ -11,7 +11,7 @@ Used by [CMemFile::GetBufferPtr](cmemfile-class.md#getbufferptr) to determine wh ## Syntax -``` cpp +```cpp public enum BufferCommand { bufferRead, diff --git a/docs/mfc/reference/carchive-class.md b/docs/mfc/reference/carchive-class.md index 043ef933eb..8d8f606693 100644 --- a/docs/mfc/reference/carchive-class.md +++ b/docs/mfc/reference/carchive-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CArchive Class" title: "CArchive Class" -ms.date: "11/04/2016" +description: "Learn more about: CArchive Class" +ms.date: 11/04/2016 f1_keywords: ["CArchive", "AFX/CArchive", "AFX/CArchive::CArchive", "AFX/CArchive::Abort", "AFX/CArchive::Close", "AFX/CArchive::Flush", "AFX/CArchive::GetFile", "AFX/CArchive::GetObjectSchema", "AFX/CArchive::IsBufferEmpty", "AFX/CArchive::IsLoading", "AFX/CArchive::IsStoring", "AFX/CArchive::MapObject", "AFX/CArchive::Read", "AFX/CArchive::ReadClass", "AFX/CArchive::ReadObject", "AFX/CArchive::ReadString", "AFX/CArchive::SerializeClass", "AFX/CArchive::SetLoadParams", "AFX/CArchive::SetObjectSchema", "AFX/CArchive::SetStoreParams", "AFX/CArchive::Write", "AFX/CArchive::WriteClass", "AFX/CArchive::WriteObject", "AFX/CArchive::WriteString", "AFX/CArchive::m_pDocument"] helpviewer_keywords: ["CArchive [MFC], CArchive", "CArchive [MFC], Abort", "CArchive [MFC], Close", "CArchive [MFC], Flush", "CArchive [MFC], GetFile", "CArchive [MFC], GetObjectSchema", "CArchive [MFC], IsBufferEmpty", "CArchive [MFC], IsLoading", "CArchive [MFC], IsStoring", "CArchive [MFC], MapObject", "CArchive [MFC], Read", "CArchive [MFC], ReadClass", "CArchive [MFC], ReadObject", "CArchive [MFC], ReadString", "CArchive [MFC], SerializeClass", "CArchive [MFC], SetLoadParams", "CArchive [MFC], SetObjectSchema", "CArchive [MFC], SetStoreParams", "CArchive [MFC], Write", "CArchive [MFC], WriteClass", "CArchive [MFC], WriteObject", "CArchive [MFC], WriteString", "CArchive [MFC], m_pDocument"] --- @@ -74,7 +74,7 @@ You must create a [`CFile`](../../mfc/reference/cfile-class.md) object before yo When you construct a `CArchive` object, you attach it to an object of class `CFile` (or a derived class) that represents an open file. You also specify whether the archive will be used for loading or storing. A `CArchive` object can process not only primitive types but also objects of [`CObject`](../../mfc/reference/cobject-class.md)-derived classes designed for serialization. A serializable class usually has a `Serialize` member function, and it usually uses the [`DECLARE_SERIAL`](../../mfc/reference/run-time-object-model-services.md#declare_serial) and [`IMPLEMENT_SERIAL`](../../mfc/reference/run-time-object-model-services.md#implement_serial) macros, as described under class `CObject`. -The overloaded extraction ( `>>`) and insertion ( `<<`) operators are convenient archive programming interfaces that support both primitive types and `CObject`-derived classes. +The overloaded extraction (`>>`) and insertion (`<<`) operators are convenient archive programming interfaces that support both primitive types and `CObject`-derived classes. `CArchive` also supports programming with the MFC Windows Sockets classes [`CSocket`](../../mfc/reference/csocket-class.md) and [`CSocketFile`](../../mfc/reference/csocketfile-class.md). The [`IsBufferEmpty`](#isbufferempty) member function supports that usage. @@ -570,7 +570,7 @@ A [`CObject`](../../mfc/reference/cobject-class.md) pointer that must be safely ### Remarks -This function is normally called by the `CArchive` extraction ( `>>`) operator overloaded for a [`CObject`](../../mfc/reference/cobject-class.md) pointer. `ReadObject`, in turn, calls the `Serialize` function of the archived class. +This function is normally called by the `CArchive` extraction (`>>`) operator overloaded for a [`CObject`](../../mfc/reference/cobject-class.md) pointer. `ReadObject`, in turn, calls the `Serialize` function of the archived class. If you supply a nonzero *`pClass`* parameter, which is obtained by the [`RUNTIME_CLASS`](../../mfc/reference/run-time-object-model-services.md#runtime_class) macro, then the function verifies the run-time class of the archived object. This assumes you have used the `IMPLEMENT_SERIAL` macro in the implementation of the class. @@ -781,7 +781,7 @@ A constant pointer to the object being stored. ### Remarks -This function is normally called by the `CArchive` insertion ( `<<`) operator overloaded for `CObject`. `WriteObject`, in turn, calls the `Serialize` function of the archived class. +This function is normally called by the `CArchive` insertion (`<<`) operator overloaded for `CObject`. `WriteObject`, in turn, calls the `Serialize` function of the archived class. You must use the `IMPLEMENT_SERIAL` macro to enable archiving. `WriteObject` writes the ASCII class name to the archive. This class name is validated later during the load process. A special encoding scheme prevents unnecessary duplication of the class name for multiple objects of the class. This scheme also prevents redundant storage of objects that are targets of more than one pointer. diff --git a/docs/mfc/reference/casyncsocket-class.md b/docs/mfc/reference/casyncsocket-class.md index d68ce7630f..9d1d045acd 100644 --- a/docs/mfc/reference/casyncsocket-class.md +++ b/docs/mfc/reference/casyncsocket-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CAsyncSocket Class" title: "CAsyncSocket Class" -ms.date: "06/25/2020" +description: "Learn more about: CAsyncSocket Class" +ms.date: 06/25/2020 f1_keywords: ["CAsyncSocket", "AFXSOCK/CAsyncSocket", "AFXSOCK/CAsyncSocket::CAsyncSocket", "AFXSOCK/CAsyncSocket::Accept", "AFXSOCK/CAsyncSocket::AsyncSelect", "AFXSOCK/CAsyncSocket::Attach", "AFXSOCK/CAsyncSocket::Bind", "AFXSOCK/CAsyncSocket::Close", "AFXSOCK/CAsyncSocket::Connect", "AFXSOCK/CAsyncSocket::Create", "AFXSOCK/CAsyncSocket::Detach", "AFXSOCK/CAsyncSocket::FromHandle", "AFXSOCK/CAsyncSocket::GetLastError", "AFXSOCK/CAsyncSocket::GetPeerName", "AFXSOCK/CAsyncSocket::GetPeerNameEx", "AFXSOCK/CAsyncSocket::GetSockName", "AFXSOCK/CAsyncSocket::GetSockNameEx", "AFXSOCK/CAsyncSocket::GetSockOpt", "AFXSOCK/CAsyncSocket::IOCtl", "AFXSOCK/CAsyncSocket::Listen", "AFXSOCK/CAsyncSocket::Receive", "AFXSOCK/CAsyncSocket::ReceiveFrom", "AFXSOCK/CAsyncSocket::ReceiveFromEx", "AFXSOCK/CAsyncSocket::Send", "AFXSOCK/CAsyncSocket::SendTo", "AFXSOCK/CAsyncSocket::SendToEx", "AFXSOCK/CAsyncSocket::SetSockOpt", "AFXSOCK/CAsyncSocket::ShutDown", "AFXSOCK/CASyncSocket::Socket", "AFXSOCK/CAsyncSocket::OnAccept", "AFXSOCK/CAsyncSocket::OnClose", "AFXSOCK/CAsyncSocket::OnConnect", "AFXSOCK/CAsyncSocket::OnOutOfBandData", "AFXSOCK/CAsyncSocket::OnReceive", "AFXSOCK/CAsyncSocket::OnSend", "AFXSOCK/CAsyncSocket::m_hSocket"] helpviewer_keywords: ["CAsyncSocket [MFC], CAsyncSocket", "CAsyncSocket [MFC], Accept", "CAsyncSocket [MFC], AsyncSelect", "CAsyncSocket [MFC], Attach", "CAsyncSocket [MFC], Bind", "CAsyncSocket [MFC], Close", "CAsyncSocket [MFC], Connect", "CAsyncSocket [MFC], Create", "CAsyncSocket [MFC], Detach", "CAsyncSocket [MFC], FromHandle", "CAsyncSocket [MFC], GetLastError", "CAsyncSocket [MFC], GetPeerName", "CAsyncSocket [MFC], GetPeerNameEx", "CAsyncSocket [MFC], GetSockName", "CAsyncSocket [MFC], GetSockNameEx", "CAsyncSocket [MFC], GetSockOpt", "CAsyncSocket [MFC], IOCtl", "CAsyncSocket [MFC], Listen", "CAsyncSocket [MFC], Receive", "CAsyncSocket [MFC], ReceiveFrom", "CAsyncSocket [MFC], ReceiveFromEx", "CAsyncSocket [MFC], Send", "CAsyncSocket [MFC], SendTo", "CAsyncSocket [MFC], SendToEx", "CAsyncSocket [MFC], SetSockOpt", "CAsyncSocket [MFC], ShutDown", "CASyncSocket [MFC], Socket", "CAsyncSocket [MFC], OnAccept", "CAsyncSocket [MFC], OnClose", "CAsyncSocket [MFC], OnConnect", "CAsyncSocket [MFC], OnOutOfBandData", "CAsyncSocket [MFC], OnReceive", "CAsyncSocket [MFC], OnSend", "CAsyncSocket [MFC], m_hSocket"] -ms.assetid: cca4d5a1-aa0f-48bd-843e-ef0e2d7fc00b --- # `CAsyncSocket` Class @@ -844,7 +843,7 @@ This routine can be used on any socket in any state. It is used to get or retrie - `FIONREAD` Determine the maximum number of bytes that can be read with one `Receive` call from this socket. The *`lpArgument`* parameter points at a `DWORD` in which `IOCtl` stores the result. If this socket is of type `SOCK_STREAM`, `FIONREAD` returns the total amount of data which can be read in a single `Receive`; this is normally the same as the total amount of data queued on the socket. If this socket is of type `SOCK_DGRAM`, `FIONREAD` returns the size of the first datagram queued on the socket. -- `SIOCATMARK` Determine whether all out-of-band data has been read. This applies only to a socket of type `SOCK_STREAM` which has been configured for in-line reception of any out-of-band data ( `SO_OOBINLINE`). If no out-of-band data is waiting to be read, the operation returns nonzero. Otherwise it returns 0, and the next `Receive` or `ReceiveFrom` performed on the socket will retrieve some or all of the data preceding the "mark"; the application should use the `SIOCATMARK` operation to determine whether any data remains. If there is any normal data preceding the "urgent" (out-of-band) data, it will be received in order. (Note that a `Receive` or `ReceiveFrom` will never mix out-of-band and normal data in the same call.) The *`lpArgument`* parameter points at a `DWORD` in which `IOCtl` stores the result. +- `SIOCATMARK` Determine whether all out-of-band data has been read. This applies only to a socket of type `SOCK_STREAM` which has been configured for in-line reception of any out-of-band data (`SO_OOBINLINE`). If no out-of-band data is waiting to be read, the operation returns nonzero. Otherwise it returns 0, and the next `Receive` or `ReceiveFrom` performed on the socket will retrieve some or all of the data preceding the "mark"; the application should use the `SIOCATMARK` operation to determine whether any data remains. If there is any normal data preceding the "urgent" (out-of-band) data, it will be received in order. (Note that a `Receive` or `ReceiveFrom` will never mix out-of-band and normal data in the same call.) The *`lpArgument`* parameter points at a `DWORD` in which `IOCtl` stores the result. This function is a subset of `ioctl()` as used in Berkeley sockets. In particular, there is no command which is equivalent to `FIOASYNC`, while `SIOCATMARK` is the only socket-level command which is supported. diff --git a/docs/mfc/reference/cbasekeyframe-class.md b/docs/mfc/reference/cbasekeyframe-class.md index 03a3f49563..40785c05ad 100644 --- a/docs/mfc/reference/cbasekeyframe-class.md +++ b/docs/mfc/reference/cbasekeyframe-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CBaseKeyFrame Class" title: "CBaseKeyFrame Class" -ms.date: "11/04/2016" +description: "Learn more about: CBaseKeyFrame Class" +ms.date: 11/04/2016 f1_keywords: ["CBaseKeyFrame", "AFXANIMATIONCONTROLLER/CBaseKeyFrame", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::CBaseKeyFrame", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::AddToStoryboard", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::GetAnimationKeyframe", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::IsAdded", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::IsKeyframeAtOffset", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::m_bAdded", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::m_bIsKeyframeAtOffset", "AFXANIMATIONCONTROLLER/CBaseKeyFrame::m_keyframe"] helpviewer_keywords: ["CBaseKeyFrame [MFC], CBaseKeyFrame", "CBaseKeyFrame [MFC], AddToStoryboard", "CBaseKeyFrame [MFC], GetAnimationKeyframe", "CBaseKeyFrame [MFC], IsAdded", "CBaseKeyFrame [MFC], IsKeyframeAtOffset", "CBaseKeyFrame [MFC], m_bAdded", "CBaseKeyFrame [MFC], m_bIsKeyframeAtOffset", "CBaseKeyFrame [MFC], m_keyframe"] -ms.assetid: 285a2eff-e7c4-43be-b5aa-737727e6866d --- # CBaseKeyFrame Class @@ -115,7 +114,7 @@ BOOL IsAdded() const; ### Return Value -TRUE if a keyframe is added to a storyboard; otehrwise FALSE. +TRUE if a keyframe is added to a storyboard; otherwise FALSE. ### Remarks diff --git a/docs/mfc/reference/cbasepane-class.md b/docs/mfc/reference/cbasepane-class.md index b2c88c5ae6..b535d8ccdd 100644 --- a/docs/mfc/reference/cbasepane-class.md +++ b/docs/mfc/reference/cbasepane-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CBasePane Class" title: "CBasePane Class" -ms.date: "11/06/2018" +description: "Learn more about: CBasePane Class" +ms.date: 11/06/2018 f1_keywords: ["CBasePane", "AFXBASEPANE/CBasePane", "AFXBASEPANE/CBasePane::AccNotifyObjectFocusEvent", "AFXBASEPANE/CBasePane::AddPane", "AFXBASEPANE/CBasePane::AdjustDockingLayout", "AFXBASEPANE/CBasePane::AdjustLayout", "AFXBASEPANE/CBasePane::CalcFixedLayout", "AFXBASEPANE/CBasePane::CanAcceptPane", "AFXBASEPANE/CBasePane::CanAutoHide", "AFXBASEPANE/CBasePane::CanBeAttached", "AFXBASEPANE/CBasePane::CanBeClosed", "AFXBASEPANE/CBasePane::CanBeDocked", "AFXBASEPANE/CBasePane::CanBeResized", "AFXBASEPANE/CBasePane::CanBeTabbedDocument", "AFXBASEPANE/CBasePane::CanFloat", "AFXBASEPANE/CBasePane::CanFocus", "AFXBASEPANE/CBasePane::CopyState", "AFXBASEPANE/CBasePane::CreateDefaultMiniframe", "AFXBASEPANE/CBasePane::CreateEx", "AFXBASEPANE/CBasePane::DockPane", "AFXBASEPANE/CBasePane::DockPaneUsingRTTI", "AFXBASEPANE/CBasePane::DockToFrameWindow", "AFXBASEPANE/CBasePane::DoesAllowDynInsertBefore", "AFXBASEPANE/CBasePane::EnableDocking", "AFXBASEPANE/CBasePane::EnableGripper", "AFXBASEPANE/CBasePane::FloatPane", "AFXBASEPANE/CBasePane::get_accHelpTopic", "AFXBASEPANE/CBasePane::get_accSelection", "AFXBASEPANE/CBasePane::GetCaptionHeight", "AFXBASEPANE/CBasePane::GetControlBarStyle", "AFXBASEPANE/CBasePane::GetCurrentAlignment", "AFXBASEPANE/CBasePane::GetDockingMode", "AFXBASEPANE/CBasePane::GetDockSiteFrameWnd", "AFXBASEPANE/CBasePane::GetEnabledAlignment", "AFXBASEPANE/CBasePane::GetMFCStyle", "AFXBASEPANE/CBasePane::GetPaneIcon", "AFXBASEPANE/CBasePane::GetPaneRow", "AFXBASEPANE/CBasePane::GetPaneStyle", "AFXBASEPANE/CBasePane::GetParentDockSite", "AFXBASEPANE/CBasePane::GetParentMiniFrame", "AFXBASEPANE/CBasePane::GetParentTabbedPane", "AFXBASEPANE/CBasePane::GetParentTabWnd", "AFXBASEPANE/CBasePane::GetRecentVisibleState", "AFXBASEPANE/CBasePane::HideInPrintPreviewMode", "AFXBASEPANE/CBasePane::InsertPane", "AFXBASEPANE/CBasePane::IsAccessibilityCompatible", "AFXBASEPANE/CBasePane::IsAutoHideMode", "AFXBASEPANE/CBasePane::IsDialogControl", "AFXBASEPANE/CBasePane::IsDocked", "AFXBASEPANE/CBasePane::IsFloating", "AFXBASEPANE/CBasePane::IsHorizontal", "AFXBASEPANE/CBasePane::IsInFloatingMultiPaneFrameWnd", "AFXBASEPANE/CBasePane::IsMDITabbed", "AFXBASEPANE/CBasePane::IsPaneVisible", "AFXBASEPANE/CBasePane::IsPointNearDockSite", "AFXBASEPANE/CBasePane::IsResizable", "AFXBASEPANE/CBasePane::IsRestoredFromRegistry", "AFXBASEPANE/CBasePane::IsTabbed", "AFXBASEPANE/CBasePane::IsVisible", "AFXBASEPANE/CBasePane::LoadState", "AFXBASEPANE/CBasePane::MoveWindow", "AFXBASEPANE/CBasePane::OnAfterChangeParent", "AFXBASEPANE/CBasePane::OnBeforeChangeParent", "AFXBASEPANE/CBasePane::OnDrawCaption", "AFXBASEPANE/CBasePane::OnMovePaneDivider", "AFXBASEPANE/CBasePane::OnPaneContextMenu", "AFXBASEPANE/CBasePane::OnRemoveFromMiniFrame", "AFXBASEPANE/CBasePane::OnSetAccData", "AFXBASEPANE/CBasePane::PaneFromPoint", "AFXBASEPANE/CBasePane::RecalcLayout", "AFXBASEPANE/CBasePane::RemovePaneFromDockManager", "AFXBASEPANE/CBasePane::SaveState", "AFXBASEPANE/CBasePane::SelectDefaultFont", "AFXBASEPANE/CBasePane::SetControlBarStyle", "AFXBASEPANE/CBasePane::SetDockingMode", "AFXBASEPANE/CBasePane::SetPaneAlignment", "AFXBASEPANE/CBasePane::SetPaneStyle", "AFXBASEPANE/CBasePane::SetWindowPos", "AFXBASEPANE/CBasePane::ShowPane", "AFXBASEPANE/CBasePane::StretchPane", "AFXBASEPANE/CBasePane::UndockPane", "AFXBASEPANE/CBasePane::DoPaint"] helpviewer_keywords: ["CBasePane [MFC], AccNotifyObjectFocusEvent", "CBasePane [MFC], AddPane", "CBasePane [MFC], AdjustDockingLayout", "CBasePane [MFC], AdjustLayout", "CBasePane [MFC], CalcFixedLayout", "CBasePane [MFC], CanAcceptPane", "CBasePane [MFC], CanAutoHide", "CBasePane [MFC], CanBeAttached", "CBasePane [MFC], CanBeClosed", "CBasePane [MFC], CanBeDocked", "CBasePane [MFC], CanBeResized", "CBasePane [MFC], CanBeTabbedDocument", "CBasePane [MFC], CanFloat", "CBasePane [MFC], CanFocus", "CBasePane [MFC], CopyState", "CBasePane [MFC], CreateDefaultMiniframe", "CBasePane [MFC], CreateEx", "CBasePane [MFC], DockPane", "CBasePane [MFC], DockPaneUsingRTTI", "CBasePane [MFC], DockToFrameWindow", "CBasePane [MFC], DoesAllowDynInsertBefore", "CBasePane [MFC], EnableDocking", "CBasePane [MFC], EnableGripper", "CBasePane [MFC], FloatPane", "CBasePane [MFC], get_accHelpTopic", "CBasePane [MFC], get_accSelection", "CBasePane [MFC], GetCaptionHeight", "CBasePane [MFC], GetControlBarStyle", "CBasePane [MFC], GetCurrentAlignment", "CBasePane [MFC], GetDockingMode", "CBasePane [MFC], GetDockSiteFrameWnd", "CBasePane [MFC], GetEnabledAlignment", "CBasePane [MFC], GetMFCStyle", "CBasePane [MFC], GetPaneIcon", "CBasePane [MFC], GetPaneRow", "CBasePane [MFC], GetPaneStyle", "CBasePane [MFC], GetParentDockSite", "CBasePane [MFC], GetParentMiniFrame", "CBasePane [MFC], GetParentTabbedPane", "CBasePane [MFC], GetParentTabWnd", "CBasePane [MFC], GetRecentVisibleState", "CBasePane [MFC], HideInPrintPreviewMode", "CBasePane [MFC], InsertPane", "CBasePane [MFC], IsAccessibilityCompatible", "CBasePane [MFC], IsAutoHideMode", "CBasePane [MFC], IsDialogControl", "CBasePane [MFC], IsDocked", "CBasePane [MFC], IsFloating", "CBasePane [MFC], IsHorizontal", "CBasePane [MFC], IsInFloatingMultiPaneFrameWnd", "CBasePane [MFC], IsMDITabbed", "CBasePane [MFC], IsPaneVisible", "CBasePane [MFC], IsPointNearDockSite", "CBasePane [MFC], IsResizable", "CBasePane [MFC], IsRestoredFromRegistry", "CBasePane [MFC], IsTabbed", "CBasePane [MFC], IsVisible", "CBasePane [MFC], LoadState", "CBasePane [MFC], MoveWindow", "CBasePane [MFC], OnAfterChangeParent", "CBasePane [MFC], OnBeforeChangeParent", "CBasePane [MFC], OnDrawCaption", "CBasePane [MFC], OnMovePaneDivider", "CBasePane [MFC], OnPaneContextMenu", "CBasePane [MFC], OnRemoveFromMiniFrame", "CBasePane [MFC], OnSetAccData", "CBasePane [MFC], PaneFromPoint", "CBasePane [MFC], RecalcLayout", "CBasePane [MFC], RemovePaneFromDockManager", "CBasePane [MFC], SaveState", "CBasePane [MFC], SelectDefaultFont", "CBasePane [MFC], SetControlBarStyle", "CBasePane [MFC], SetDockingMode", "CBasePane [MFC], SetPaneAlignment", "CBasePane [MFC], SetPaneStyle", "CBasePane [MFC], SetWindowPos", "CBasePane [MFC], ShowPane", "CBasePane [MFC], StretchPane", "CBasePane [MFC], UndockPane", "CBasePane [MFC], DoPaint"] -ms.assetid: 8163dd51-d7c7-4def-9c74-61f8ecdfad82 --- # CBasePane Class @@ -80,7 +79,7 @@ class CBasePane : public CWnd |[CBasePane::GetMFCStyle](#getmfcstyle)|Returns the pane styles specific to MFC.| |[CBasePane::GetPaneIcon](#getpaneicon)|Returns a handle to the pane icon.| |`CBasePane::GetPaneRect`|Used internally.| -|[CBasePane::GetPaneRow](#getpanerow)|Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md)object where the pane is docked.| +|[CBasePane::GetPaneRow](#getpanerow)|Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md) object where the pane is docked.| |[CBasePane::GetPaneStyle](#getpanestyle)|Returns the pane style.| |[CBasePane::GetParentDockSite](#getparentdocksite)|Returns a pointer to the parent dock site.| |[CBasePane::GetParentMiniFrame](#getparentminiframe)|Returns a pointer to the parent mini-frame window.| @@ -892,7 +891,7 @@ By setting *m_dockMode* or overriding `GetDockingMode` you can control the docki ## CBasePane::GetDockSiteFrameWnd -Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md)object where the pane is docked. +Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md) object where the pane is docked. ``` virtual CWnd* GetDockSiteFrameWnd() const; @@ -967,7 +966,7 @@ The default implementation calls [CWnd::GetIcon](../../mfc/reference/cwnd-class. ## CBasePane::GetPaneRow -Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md)object where the pane is docked. +Returns a pointer to the [CDockingPanesRow](../../mfc/reference/cdockingpanesrow-class.md) object where the pane is docked. ``` CDockingPanesRow* GetPaneRow(); diff --git a/docs/mfc/reference/ccmdtarget-class.md b/docs/mfc/reference/ccmdtarget-class.md index 6d4a3bb06a..6c3bdf1fc0 100644 --- a/docs/mfc/reference/ccmdtarget-class.md +++ b/docs/mfc/reference/ccmdtarget-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CCmdTarget Class" title: "CCmdTarget Class" -ms.date: "11/04/2016" +description: "Learn more about: CCmdTarget Class" +ms.date: 11/04/2016 f1_keywords: ["CCmdTarget", "AFXWIN/CCmdTarget", "AFXWIN/CCmdTarget::CCmdTarget", "AFXWIN/CCmdTarget::BeginWaitCursor", "AFXWIN/CCmdTarget::DoOleVerb", "AFXWIN/CCmdTarget::EnableAutomation", "AFXWIN/CCmdTarget::EnableConnections", "AFXWIN/CCmdTarget::EnableTypeLib", "AFXWIN/CCmdTarget::EndWaitCursor", "AFXWIN/CCmdTarget::EnumOleVerbs", "AFXWIN/CCmdTarget::FromIDispatch", "AFXWIN/CCmdTarget::GetDispatchIID", "AFXWIN/CCmdTarget::GetIDispatch", "AFXWIN/CCmdTarget::GetTypeInfoCount", "AFXWIN/CCmdTarget::GetTypeInfoOfGuid", "AFXWIN/CCmdTarget::GetTypeLib", "AFXWIN/CCmdTarget::GetTypeLibCache", "AFXWIN/CCmdTarget::IsInvokeAllowed", "AFXWIN/CCmdTarget::IsResultExpected", "AFXWIN/CCmdTarget::OnCmdMsg", "AFXWIN/CCmdTarget::OnFinalRelease", "AFXWIN/CCmdTarget::RestoreWaitCursor"] helpviewer_keywords: ["CCmdTarget [MFC], CCmdTarget", "CCmdTarget [MFC], BeginWaitCursor", "CCmdTarget [MFC], DoOleVerb", "CCmdTarget [MFC], EnableAutomation", "CCmdTarget [MFC], EnableConnections", "CCmdTarget [MFC], EnableTypeLib", "CCmdTarget [MFC], EndWaitCursor", "CCmdTarget [MFC], EnumOleVerbs", "CCmdTarget [MFC], FromIDispatch", "CCmdTarget [MFC], GetDispatchIID", "CCmdTarget [MFC], GetIDispatch", "CCmdTarget [MFC], GetTypeInfoCount", "CCmdTarget [MFC], GetTypeInfoOfGuid", "CCmdTarget [MFC], GetTypeLib", "CCmdTarget [MFC], GetTypeLibCache", "CCmdTarget [MFC], IsInvokeAllowed", "CCmdTarget [MFC], IsResultExpected", "CCmdTarget [MFC], OnCmdMsg", "CCmdTarget [MFC], OnFinalRelease", "CCmdTarget [MFC], RestoreWaitCursor"] --- @@ -299,7 +299,7 @@ HRESULT GetTypeInfoOfGuid( ### Parameters *`lcid`*\ -A locale identifier ( `LCID`). +A locale identifier (`LCID`). *`guid`*\ The [GUID](/windows/win32/api/guiddef/ns-guiddef-guid) of the type description. diff --git a/docs/mfc/reference/ccommandlineinfo-class.md b/docs/mfc/reference/ccommandlineinfo-class.md index 944fb85dd1..0702885e23 100644 --- a/docs/mfc/reference/ccommandlineinfo-class.md +++ b/docs/mfc/reference/ccommandlineinfo-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CCommandLineInfo Class" title: "CCommandLineInfo Class" -ms.date: "11/04/2016" +description: "Learn more about: CCommandLineInfo Class" +ms.date: 11/04/2016 f1_keywords: ["CCommandLineInfo", "AFXWIN/CCommandLineInfo", "AFXWIN/CCommandLineInfo::CCommandLineInfo", "AFXWIN/CCommandLineInfo::ParseParam", "AFXWIN/CCommandLineInfo::m_bRunAutomated", "AFXWIN/CCommandLineInfo::m_bRunEmbedded", "AFXWIN/CCommandLineInfo::m_bShowSplash", "AFXWIN/CCommandLineInfo::m_nShellCommand", "AFXWIN/CCommandLineInfo::m_strDriverName", "AFXWIN/CCommandLineInfo::m_strFileName", "AFXWIN/CCommandLineInfo::m_strPortName", "AFXWIN/CCommandLineInfo::m_strPrinterName", "AFXWIN/CCommandLineInfo::m_strRestartIdentifier"] helpviewer_keywords: ["CCommandLineInfo [MFC], CCommandLineInfo", "CCommandLineInfo [MFC], ParseParam", "CCommandLineInfo [MFC], m_bRunAutomated", "CCommandLineInfo [MFC], m_bRunEmbedded", "CCommandLineInfo [MFC], m_bShowSplash", "CCommandLineInfo [MFC], m_nShellCommand", "CCommandLineInfo [MFC], m_strDriverName", "CCommandLineInfo [MFC], m_strFileName", "CCommandLineInfo [MFC], m_strPortName", "CCommandLineInfo [MFC], m_strPrinterName", "CCommandLineInfo [MFC], m_strRestartIdentifier"] --- @@ -83,7 +83,7 @@ CCommandLineInfo(); ### Remarks -The default is to show the splash screen ( `m_bShowSplash=TRUE`) and to execute the **New** command on the **File** menu ( `m_nShellCommand`**`=NewFile`**). +The default is to show the splash screen (`m_bShowSplash=TRUE`) and to execute the **New** command on the **File** menu (`m_nShellCommand`**`=NewFile`**). The application framework calls [`ParseParam`](#parseparam) to fill data members of this object. diff --git a/docs/mfc/reference/cd2dbitmap-class.md b/docs/mfc/reference/cd2dbitmap-class.md index 47d1045b09..9527c8a653 100644 --- a/docs/mfc/reference/cd2dbitmap-class.md +++ b/docs/mfc/reference/cd2dbitmap-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CD2DBitmap Class" title: "CD2DBitmap Class" +description: "Learn more about: CD2DBitmap Class" ms.date: "11/04/2016" f1_keywords: ["CD2DBitmap", "AFXRENDERTARGET/CD2DBitmap", "AFXRENDERTARGET/CD2DBitmap::CD2DBitmap", "AFXRENDERTARGET/CD2DBitmap::Attach", "AFXRENDERTARGET/CD2DBitmap::CopyFromBitmap", "AFXRENDERTARGET/CD2DBitmap::CopyFromMemory", "AFXRENDERTARGET/CD2DBitmap::CopyFromRenderTarget", "AFXRENDERTARGET/CD2DBitmap::Create", "AFXRENDERTARGET/CD2DBitmap::Destroy", "AFXRENDERTARGET/CD2DBitmap::Detach", "AFXRENDERTARGET/CD2DBitmap::Get", "AFXRENDERTARGET/CD2DBitmap::GetDPI", "AFXRENDERTARGET/CD2DBitmap::GetPixelFormat", "AFXRENDERTARGET/CD2DBitmap::GetPixelSize", "AFXRENDERTARGET/CD2DBitmap::GetSize", "AFXRENDERTARGET/CD2DBitmap::IsValid", "AFXRENDERTARGET/CD2DBitmap::CommonInit", "AFXRENDERTARGET/CD2DBitmap::m_bAutoDestroyHBMP", "AFXRENDERTARGET/CD2DBitmap::m_hBmpSrc", "AFXRENDERTARGET/CD2DBitmap::m_lpszType", "AFXRENDERTARGET/CD2DBitmap::m_pBitmap", "AFXRENDERTARGET/CD2DBitmap::m_sizeDest", "AFXRENDERTARGET/CD2DBitmap::m_strPath", "AFXRENDERTARGET/CD2DBitmap::m_uiResID"] helpviewer_keywords: ["CD2DBitmap [MFC], CD2DBitmap", "CD2DBitmap [MFC], CD2DBitmap", "CD2DBitmap [MFC], Attach", "CD2DBitmap [MFC], CopyFromBitmap", "CD2DBitmap [MFC], CopyFromMemory", "CD2DBitmap [MFC], CopyFromRenderTarget", "CD2DBitmap [MFC], Create", "CD2DBitmap [MFC], Destroy", "CD2DBitmap [MFC], Detach", "CD2DBitmap [MFC], Get", "CD2DBitmap [MFC], GetDPI", "CD2DBitmap [MFC], GetPixelFormat", "CD2DBitmap [MFC], GetPixelSize", "CD2DBitmap [MFC], GetSize", "CD2DBitmap [MFC], IsValid", "CD2DBitmap [MFC], CommonInit", "CD2DBitmap [MFC], m_bAutoDestroyHBMP", "CD2DBitmap [MFC], m_hBmpSrc", "CD2DBitmap [MFC], m_lpszType", "CD2DBitmap [MFC], m_pBitmap", "CD2DBitmap [MFC], m_sizeDest", "CD2DBitmap [MFC], m_strPath", "CD2DBitmap [MFC], m_uiResID"] -ms.assetid: 2b3686f1-812c-462b-b449-9f0cb6949bf6 --- # CD2DBitmap Class @@ -327,7 +326,7 @@ CD2DSizeU GetPixelSize() const; ### Return Value -The size, in pixels, of the bitmap.. +The size, in pixels, of the bitmap. ## CD2DBitmap::GetSize diff --git a/docs/mfc/reference/cd2dpathgeometry-class.md b/docs/mfc/reference/cd2dpathgeometry-class.md index 40f5c337f6..c8a9259457 100644 --- a/docs/mfc/reference/cd2dpathgeometry-class.md +++ b/docs/mfc/reference/cd2dpathgeometry-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CD2DPathGeometry Class" title: "CD2DPathGeometry Class" +description: "Learn more about: CD2DPathGeometry Class" ms.date: "11/04/2016" f1_keywords: ["CD2DPathGeometry", "AFXRENDERTARGET/CD2DPathGeometry", "AFXRENDERTARGET/CD2DPathGeometry::CD2DPathGeometry", "AFXRENDERTARGET/CD2DPathGeometry::Attach", "AFXRENDERTARGET/CD2DPathGeometry::Create", "AFXRENDERTARGET/CD2DPathGeometry::Destroy", "AFXRENDERTARGET/CD2DPathGeometry::Detach", "AFXRENDERTARGET/CD2DPathGeometry::GetFigureCount", "AFXRENDERTARGET/CD2DPathGeometry::GetSegmentCount", "AFXRENDERTARGET/CD2DPathGeometry::Open", "AFXRENDERTARGET/CD2DPathGeometry::Stream", "AFXRENDERTARGET/CD2DPathGeometry::m_pPathGeometry"] helpviewer_keywords: ["CD2DPathGeometry [MFC], CD2DPathGeometry", "CD2DPathGeometry [MFC], Attach", "CD2DPathGeometry [MFC], Create", "CD2DPathGeometry [MFC], Destroy", "CD2DPathGeometry [MFC], Detach", "CD2DPathGeometry [MFC], GetFigureCount", "CD2DPathGeometry [MFC], GetSegmentCount", "CD2DPathGeometry [MFC], Open", "CD2DPathGeometry [MFC], Stream", "CD2DPathGeometry [MFC], m_pPathGeometry"] -ms.assetid: 686216eb-5080-4242-ace5-8fa1ce96307c --- # CD2DPathGeometry Class @@ -127,7 +126,7 @@ Pointer to detached resource interface. ## CD2DPathGeometry::GetFigureCount -Retrieves tthe number of figures in the path geometry. +Retrieves the number of figures in the path geometry. ``` int GetFigureCount() const; diff --git a/docs/mfc/reference/cdaodatabase-class.md b/docs/mfc/reference/cdaodatabase-class.md index 81d9b3cb0d..a59cea4963 100644 --- a/docs/mfc/reference/cdaodatabase-class.md +++ b/docs/mfc/reference/cdaodatabase-class.md @@ -4,11 +4,13 @@ title: "CDaoDatabase Class" ms.date: "09/17/2019" f1_keywords: ["CDaoDatabase", "AFXDAO/CDaoDatabase", "AFXDAO/CDaoDatabase::CDaoDatabase", "AFXDAO/CDaoDatabase::CanTransact", "AFXDAO/CDaoDatabase::CanUpdate", "AFXDAO/CDaoDatabase::Close", "AFXDAO/CDaoDatabase::Create", "AFXDAO/CDaoDatabase::CreateRelation", "AFXDAO/CDaoDatabase::DeleteQueryDef", "AFXDAO/CDaoDatabase::DeleteRelation", "AFXDAO/CDaoDatabase::DeleteTableDef", "AFXDAO/CDaoDatabase::Execute", "AFXDAO/CDaoDatabase::GetConnect", "AFXDAO/CDaoDatabase::GetName", "AFXDAO/CDaoDatabase::GetQueryDefCount", "AFXDAO/CDaoDatabase::GetQueryDefInfo", "AFXDAO/CDaoDatabase::GetQueryTimeout", "AFXDAO/CDaoDatabase::GetRecordsAffected", "AFXDAO/CDaoDatabase::GetRelationCount", "AFXDAO/CDaoDatabase::GetRelationInfo", "AFXDAO/CDaoDatabase::GetTableDefCount", "AFXDAO/CDaoDatabase::GetTableDefInfo", "AFXDAO/CDaoDatabase::GetVersion", "AFXDAO/CDaoDatabase::IsOpen", "AFXDAO/CDaoDatabase::Open", "AFXDAO/CDaoDatabase::SetQueryTimeout", "AFXDAO/CDaoDatabase::m_pDAODatabase", "AFXDAO/CDaoDatabase::m_pWorkspace"] helpviewer_keywords: ["CDaoDatabase [MFC], CDaoDatabase", "CDaoDatabase [MFC], CanTransact", "CDaoDatabase [MFC], CanUpdate", "CDaoDatabase [MFC], Close", "CDaoDatabase [MFC], Create", "CDaoDatabase [MFC], CreateRelation", "CDaoDatabase [MFC], DeleteQueryDef", "CDaoDatabase [MFC], DeleteRelation", "CDaoDatabase [MFC], DeleteTableDef", "CDaoDatabase [MFC], Execute", "CDaoDatabase [MFC], GetConnect", "CDaoDatabase [MFC], GetName", "CDaoDatabase [MFC], GetQueryDefCount", "CDaoDatabase [MFC], GetQueryDefInfo", "CDaoDatabase [MFC], GetQueryTimeout", "CDaoDatabase [MFC], GetRecordsAffected", "CDaoDatabase [MFC], GetRelationCount", "CDaoDatabase [MFC], GetRelationInfo", "CDaoDatabase [MFC], GetTableDefCount", "CDaoDatabase [MFC], GetTableDefInfo", "CDaoDatabase [MFC], GetVersion", "CDaoDatabase [MFC], IsOpen", "CDaoDatabase [MFC], Open", "CDaoDatabase [MFC], SetQueryTimeout", "CDaoDatabase [MFC], m_pDAODatabase", "CDaoDatabase [MFC], m_pWorkspace"] -ms.assetid: 8ff5b342-964d-449d-bef1-d0ff56aadf6d --- # CDaoDatabase Class -Represents a connection to an Access database using Data Access Objects (DAO). DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. +Represents a connection to an Access database using Data Access Objects (DAO). + +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. ## Syntax @@ -41,7 +43,7 @@ class CDaoDatabase : public CObject |[CDaoDatabase::GetName](#getname)|Returns the name of the database currently in use.| |[CDaoDatabase::GetQueryDefCount](#getquerydefcount)|Returns the number of queries defined for the database.| |[CDaoDatabase::GetQueryDefInfo](#getquerydefinfo)|Returns information about a specified query defined in the database.| -|[CDaoDatabase::GetQueryTimeout](#getquerytimeout)|Returns the number of seconds after which database query operations will time out. Affects all subsequent open, add new, update, and edit operations and other operations on ODBC data sources (only) such as `Execute` calls.| +|[CDaoDatabase::GetQueryTimeout](#getquerytimeout)|Returns the number of seconds after which database query operations time out. Affects all subsequent open, add new, update, and edit operations and other operations on ODBC data sources (only) such as `Execute` calls.| |[CDaoDatabase::GetRecordsAffected](#getrecordsaffected)|Returns the number of records affected by the last update, edit, or add operation or by a call to `Execute`.| |[CDaoDatabase::GetRelationCount](#getrelationcount)|Returns the number of relations defined between tables in the database.| |[CDaoDatabase::GetRelationInfo](#getrelationinfo)|Returns information about a specified relation defined between tables in the database.| @@ -50,7 +52,7 @@ class CDaoDatabase : public CObject |[CDaoDatabase::GetVersion](#getversion)|Returns the version of the database engine associated with the database.| |[CDaoDatabase::IsOpen](#isopen)|Returns nonzero if the `CDaoDatabase` object is currently connected to a database.| |[CDaoDatabase::Open](#open)|Establishes a connection to a database.| -|[CDaoDatabase::SetQueryTimeout](#setquerytimeout)|Sets the number of seconds after which database query operations (on ODBC data sources only) will time out. Affects all subsequent open, add new, update, and delete operations.| +|[CDaoDatabase::SetQueryTimeout](#setquerytimeout)|Sets the number of seconds after which database query operations (on ODBC data sources only) time out. Affects all subsequent open, add new, update, and delete operations.| ### Public Data Members @@ -75,15 +77,15 @@ To create a new Microsoft Jet (.MDB) database, construct a `CDaoDatabase` object To open an existing database, construct a `CDaoDatabase` object and call its [Open](#open) member function. -Any of these techniques appends the DAO database object to the workspace's Databases collection and opens a connection to the data. When you then construct [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md), [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md), or [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) objects for operating on the connected database, pass the constructors for these objects a pointer to your `CDaoDatabase` object. When you finish using the connection, call the [Close](#close) member function and destroy the `CDaoDatabase` object. `Close` closes any recordsets you have not closed previously. +Any of these techniques appends the DAO database object to the workspace's Databases collection and opens a connection to the data. When you then construct [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md), [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md), or [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) objects for operating on the connected database, pass the constructors for these objects a pointer to your `CDaoDatabase` object. When you finish using the connection, call the [Close](#close) member function and destroy the `CDaoDatabase` object. `Close` closes any recordsets you have not already closed. ## Transactions -Database transaction processing is supplied at the workspace level — see the [BeginTrans](../../mfc/reference/cdaoworkspace-class.md#begintrans), [CommitTrans](../../mfc/reference/cdaoworkspace-class.md#committrans), and [Rollback](../../mfc/reference/cdaoworkspace-class.md#rollback) member functions of class `CDaoWorkspace`. +Database transaction processing is supplied at the workspace level—see the [BeginTrans](../../mfc/reference/cdaoworkspace-class.md#begintrans), [CommitTrans](../../mfc/reference/cdaoworkspace-class.md#committrans), and [Rollback](../../mfc/reference/cdaoworkspace-class.md#rollback) member functions of class `CDaoWorkspace`. ## ODBC Connections -The recommended way to work with ODBC data sources is to attach external tables to a Microsoft Jet (.MDB) database. +The recommended way to work with Open Database Base Connectivity (ODBC) data sources is to attach external tables to a Microsoft Jet (`.MDB`) database. ## Collections @@ -94,7 +96,7 @@ Each database maintains its own collections of tabledef, querydef, recordset, an ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) +[`CObject`](../../mfc/reference/cobject-class.md) `CDaoDatabase` @@ -168,15 +170,15 @@ virtual void Close(); ### Remarks -It is good practice to close these objects yourself before you call this member function. Closing a `CDaoDatabase` object removes it from the Databases collection in the associated [workspace](../../mfc/reference/cdaoworkspace-class.md). Because `Close` does not destroy the `CDaoDatabase` object, you can reuse the object by opening the same database or a different database. +It's good practice to close these objects yourself before you call this member function. Closing a `CDaoDatabase` object removes it from the Databases collection in the associated [workspace](../../mfc/reference/cdaoworkspace-class.md). Because `Close` doesn't destroy the `CDaoDatabase` object, you can reuse the object by opening the same database or a different database. > [!CAUTION] > Call the [Update](../../mfc/reference/cdaorecordset-class.md#update) member function (if there are pending edits) and the `Close` member function on all open recordset objects before you close a database. If you exit a function that declares [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) or `CDaoDatabase` objects on the stack, the database is closed, any unsaved changes are lost, all pending transactions are rolled back, and any pending edits to your data are lost. > [!CAUTION] -> If you try to close a database object while any recordset objects are open, or if you try to close a workspace object while any database objects belonging to that specific workspace are open, those recordset objects will be closed and any pending updates or edits will be rolled back. If you try to close a workspace object while any database objects belonging to it are open, the operation closes all database objects belonging to that specific workspace object, which may result in unclosed recordset objects being closed. If you do not close your database object, MFC reports an assertion failure in debug builds. +> If you try to close a database object while any recordset objects are open, or if you try to close a workspace object while any database objects belonging to that specific workspace are open, those recordset objects will be closed and any pending updates or edits will be rolled back. If you try to close a workspace object while any database objects belonging to it are open, the operation closes all database objects belonging to that specific workspace object, which may result in unclosed recordset objects being closed. If you don't close your database object, MFC reports an assertion failure in debug builds. -If the database object is defined outside the scope of a function, and you exit the function without closing it, the database object will remain open until explicitly closed or the module in which it is defined is out of scope. +If the database object is defined outside the scope of a function, and you exit the function without closing it, the database object will remain open until explicitly closed or the module in which it's defined is out of scope. ## CDaoDatabase::Create @@ -192,7 +194,7 @@ virtual void Create( ### Parameters *lpszName*
-A string expression that is the name of the database file that you are creating. It can be the full path and filename, such as "C:\\\MYDB.MDB". You must supply a name. If you do not supply a filename extension, .MDB is appended. If your network supports the uniform naming convention (UNC), you can also specify a network path, such as "\\\\\\\MYSERVER\\\MYSHARE\\\MYDIR\\\MYDB". Only Microsoft Jet (.MDB) database files can be created using this member function. (Double backslashes are required in string literals because "\\" is the C++ escape character.) +A string expression that is the name of the database file that you are creating. It can be the full path and filename, such as "C:\\\MYDB.MDB". You must supply a name. If you don't supply a filename extension, .MDB is appended. If your network supports the uniform naming convention (UNC), you can also specify a network path, such as "\\\\\\\MYSERVER\\\MYSHARE\\\MYDIR\\\MYDB". Only Microsoft Jet (.MDB) database files can be created using this member function. (Double backslashes are required in string literals because "\\" is the C++ escape character.) *lpszLocale*
A string expression used to specify collating order for creating the database. The default value is `dbLangGeneral`. Possible values are: @@ -243,11 +245,11 @@ An integer that indicates one or more options. Possible values are: If you omit the encryption constant, an unencrypted database is created. You can specify only one version constant. If you omit a version constant, a database that uses the Microsoft Jet database version 3.0 is created. > [!CAUTION] -> If a database is not encrypted, it is possible, even if you implement user/password security, to directly read the binary disk file that constitutes the database. +> If a database is not encrypted, it's possible, even if you implement user/password security, to directly read the binary disk file that constitutes the database. ### Remarks -`Create` creates the database file and the underlying DAO database object and initializes the C++ object. The object is appended to the associated workspace's Databases collection. The database object is in an open state; do not call `Open*` after `Create`. +`Create` creates the database file and the underlying DAO database object and initializes the C++ object. The object is appended to the associated workspace's Databases collection. The database object is in an open state; don't call `Open*` after `Create`. > [!NOTE] > With `Create`, you can create only Microsoft Jet (.MDB) databases. You cannot create ISAM databases or ODBC databases. @@ -274,10 +276,10 @@ void CreateRelation(CDaoRelationInfo& relinfo); The unique name of the relation object. The name must start with a letter and can contain a maximum of 40 characters. It can include numbers and underscore characters but cannot include punctuation or spaces. *lpszTable*
-The name of the primary table in the relation. If the table does not exist, MFC throws an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). +The name of the primary table in the relation. If the table doesn't exist, MFC throws an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). *lpszForeignTable*
-The name of the foreign table in the relation. If the table does not exist, MFC throws an exception of type `CDaoException`. +The name of the foreign table in the relation. If the table doesn't exist, MFC throws an exception of type `CDaoException`. *lAttributes*
A long value that contains information about the relationship type. You can use this value to enforce referential integrity, among other things. You can use the bitwise-OR operator (**`|`**) to combine any of the following values (as long as the combination makes sense): @@ -307,7 +309,7 @@ The relationship cannot involve a query or an attached table from an external da Use the first version of the function when the relation involves one field in each of the two tables. Use the second version when the relation involves multiple fields. The maximum number of fields in a relation is 14. -This action creates an underlying DAO relation object, but this is an MFC implementation detail since MFC's encapsulation of relation objects is contained within class `CDaoDatabase`. MFC does not supply a class for relations. +This action creates an underlying DAO relation object, but this is an MFC implementation detail since MFC's encapsulation of relation objects is contained within class `CDaoDatabase`. MFC doesn't supply a class for relations. If you set the relation object's attributes to activate cascade operations, the database engine automatically updates or deletes records in one or more other tables when changes are made to related primary key tables. @@ -317,7 +319,7 @@ For related information, see the topic "CreateRelation Method" in DAO Help. ## CDaoDatabase::DeleteQueryDef -Call this member function to delete the specified querydef — saved query — from the `CDaoDatabase` object's QueryDefs collection. +Call this member function to delete the specified querydef—saved query—from the `CDaoDatabase` object's QueryDefs collection. ```cpp void DeleteQueryDef(LPCTSTR lpszName); @@ -393,7 +395,7 @@ void Execute( Pointer to a null-terminated string containing a valid SQL command to execute. *nOptions*
-An integer that specifies options relating to the integrity of the query. You can use the bitwise-OR operator (**`|`**) to combine any of the following constants (provided the combination makes sense — for example, you would not combine `dbInconsistent` with `dbConsistent`): +An integer that specifies options relating to the integrity of the query. You can use the bitwise-OR operator (**`|`**) to combine any of the following constants provided the combination makes sense. For example, you would not combine `dbInconsistent` with `dbConsistent`: - `dbDenyWrite` Deny write permission to other users. @@ -412,16 +414,16 @@ An integer that specifies options relating to the integrity of the query. You ca ### Remarks -`Execute` works only for action queries or SQL pass-through queries that do not return results. It does not work for select queries, which return records. +`Execute` works only for action queries or SQL pass-through queries that don't return results. It doesn't work for select queries, which return records. For a definition and information about action queries, see the topics "Action Query" and "Execute Method" in DAO Help. > [!TIP] -> Given a syntactically correct SQL statement and proper permissions, the `Execute` member function will not fail even if not a single row can be modified or deleted. Therefore, always use the `dbFailOnError` option when using the `Execute` member function to run an update or delete query. This option causes MFC to throw an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md) and rolls back all successful changes if any of the records affected are locked and cannot be updated or deleted. Note that you can always call `GetRecordsAffected` to see how many records were affected. +> Given a syntactically correct SQL statement and proper permissions, the `Execute` member function won't fail even if not a single row can be modified or deleted. Therefore, always use the `dbFailOnError` option when using the `Execute` member function to run an update or delete query. This option causes MFC to throw an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md) and rolls back all successful changes if any of the records affected are locked and cannot be updated or deleted. Note that you can always call `GetRecordsAffected` to see how many records were affected. -Call the [GetRecordsAffected](#getrecordsaffected) member function of the database object to determine the number of records affected by the most recent `Execute` call. For example, `GetRecordsAffected` returns information about the number of records deleted, updated, or inserted when executing an action query. The count returned will not reflect changes in related tables when cascade updates or deletes are in effect. +Call the [GetRecordsAffected](#getrecordsaffected) member function of the database object to determine the number of records affected by the most recent `Execute` call. For example, `GetRecordsAffected` returns information about the number of records deleted, updated, or inserted when executing an action query. The count returned doesn't reflect changes in related tables when cascade updates or deletes are in effect. -`Execute` does not return a recordset. Using `Execute` on a query that selects records causes MFC to throw an exception of type `CDaoException`. (There is no `ExecuteSQL` member function analogous to `CDatabase::ExecuteSQL`.) +`Execute` doesn't return a recordset. Using `Execute` on a query that selects records causes MFC to throw an exception of type `CDaoException`. (There is no `ExecuteSQL` member function analogous to `CDatabase::ExecuteSQL`.) ## CDaoDatabase::GetConnect @@ -443,7 +445,7 @@ The string provides information about the source of an open database or a databa > Using the MFC DAO classes to connect to a data source via ODBC is less efficient than connecting via an attached table. > [!NOTE] -> The connection string is used to pass additional information to ODBC and certain ISAM drivers as needed. It is not used for .MDB databases. For Microsoft Jet database base tables, the connection string is an empty string ("") except when you use it for a SQL pass-through query as described under Return Value above. +> The connection string is used to pass additional information to ODBC and certain ISAM drivers as needed. It's not used for .MDB databases. For Microsoft Jet database base tables, the connection string is an empty string ("") except when you use it for a SQL pass-through query as described under Return Value above. See the [Open](#open) member function for a description of how the connection string is created. Once the connection string has been set in the `Open` call, you can later use it to check the setting to determine the type, path, user ID, Password, or ODBC data source of the database. @@ -552,7 +554,7 @@ A short integer containing the timeout value in seconds. ### Remarks -An operation might time out due to network access problems, excessive query processing time, and so on. While the setting is in effect, it affects all open, add new, update, and delete operations on any recordsets associated with this `CDaoDatabase` object. You can change the current timeout setting by calling [SetQueryTimeout](#setquerytimeout). Changing the query timeout value for a recordset after opening does not change the value for the recordset. For example, subsequent [Move](../../mfc/reference/cdaorecordset-class.md#move) operations do not use the new value. The default value is initially set when the database engine is initialized. +An operation might time out due to network access problems, excessive query processing time, and so on. While the setting is in effect, it affects all open, add new, update, and delete operations on any recordsets associated with this `CDaoDatabase` object. You can change the current timeout setting by calling [SetQueryTimeout](#setquerytimeout). Changing the query timeout value for a recordset after opening doesn't change the value for the recordset. For example, subsequent [Move](../../mfc/reference/cdaorecordset-class.md#move) operations don't use the new value. The default value is initially set when the database engine is initialized. The default value for query timeouts is taken from the Windows registry. If there is no registry setting, the default is 60 seconds. Not all databases support the ability to set a query timeout value. If you set a query timeout value of 0, no timeout occurs; and communication with the database may stop responding. This behavior may be useful during development. If the call fails, MFC throws an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). @@ -572,7 +574,7 @@ A long integer containing the number of records affected. ### Remarks -The value returned includes the number of records deleted, updated, or inserted by an action query run with `Execute`. The count returned will not reflect changes in related tables when cascade updates or deletes are in effect. +The value returned includes the number of records deleted, updated, or inserted by an action query run with `Execute`. The count returned doesn't reflect changes in related tables when cascade updates or deletes are in effect. For related information, see the topic "RecordsAffected Property" in DAO Help. @@ -746,7 +748,7 @@ Contains a pointer to the [CDaoWorkspace](../../mfc/reference/cdaoworkspace-clas ### Remarks -Use this pointer if you need to access the workspace directly — for example, to obtain pointers to other database objects in the workspace's Databases collection. +Use this pointer if you need to access the workspace directly. For example, to obtain pointers to other database objects in the workspace's Databases collection. ## CDaoDatabase::Open @@ -763,7 +765,7 @@ virtual void Open( ### Parameters *lpszName*
-A string expression that is the name of an existing Microsoft Jet (.MDB) database file. If the filename has an extension, it is required. If your network supports the uniform naming convention (UNC), you can also specify a network path, such as "\\\\\\\MYSERVER\\\MYSHARE\\\MYDIR\\\MYDB.MDB". (Double backslashes are required in string literals because "\\" is the C++ escape character.) +A string expression that is the name of an existing Microsoft Jet (.MDB) database file. If the filename has an extension, it's required. If your network supports the uniform naming convention (UNC), you can also specify a network path, such as "\\\\\\\MYSERVER\\\MYSHARE\\\MYDIR\\\MYDB.MDB". (Double backslashes are required in string literals because "\\" is the C++ escape character.) Some considerations apply when using *lpszName*. If it: @@ -771,7 +773,7 @@ Some considerations apply when using *lpszName*. If it: - Is an empty string ("") and *lpszConnect* is "ODBC;", a dialog box listing all registered ODBC data source names is displayed so the user can select a database. You should avoid direct connections to ODBC data sources; use an attached table instead. -- Otherwise does not refer to an existing database or valid ODBC data source name, MFC throws an exception of type `CDaoException`. +- Otherwise doesn't refer to an existing database or valid ODBC data source name, MFC throws an exception of type `CDaoException`. > [!NOTE] > For details about DAO error codes, see the DAOERR.H file. For related information, see the topic "Trappable Data Access Errors" in DAO Help. @@ -783,11 +785,11 @@ A Boolean value that is TRUE if the database is to be opened for exclusive (nons A Boolean value that is TRUE if the database is to be opened for read-only access and FALSE if the database is to be opened for read/write access. If you omit this argument, the database is opened for read/write access. All dependent recordsets inherit this attribute. *lpszConnect*
-A string expression used for opening the database. This string constitutes the ODBC connect arguments. You must supply the exclusive and read-only arguments to supply a source string. If the database is a Microsoft Jet database (.MDB), this string is empty (""). The syntax for the default value — **_T**("") — provides portability for Unicode as well as ANSI builds of your application. +A string expression used for opening the database. This string constitutes the ODBC connect arguments. You must supply the exclusive and read-only arguments to supply a source string. If the database is a Microsoft Jet database (.MDB), this string is empty (""). The syntax for the default value—**_T**("")—provides portability for Unicode as well as ANSI builds of your application. ### Remarks -`Open` associates the database with the underlying DAO object. You cannot use the database object to construct recordset, tabledef, or querydef objects until it is initialized. `Open` appends the database object to the associated workspace's Databases collection. +`Open` associates the database with the underlying DAO object. You cannot use the database object to construct recordset, tabledef, or querydef objects until it's initialized. `Open` appends the database object to the associated workspace's Databases collection. Use the parameters as follows: @@ -798,13 +800,13 @@ Use the parameters as follows: For related information, see the topic "OpenDatabase Method" in DAO Help. > [!NOTE] -> For better performance when accessing external databases, including ISAM databases and ODBC data sources, it is recommended that you attach external database tables to a Microsoft Jet engine database (.MDB) rather than connecting directly to the data source. +> For better performance when accessing external databases, including ISAM databases and ODBC data sources, it's recommended that you attach external database tables to a Microsoft Jet engine database (.MDB) rather than connecting directly to the data source. -It is possible for a connection attempt to time out if, for example, the DBMS host is unavailable. If the connection attempt fails, `Open` throws an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). +It's possible for a connection attempt to time out if, for example, the DBMS host is unavailable. If the connection attempt fails, `Open` throws an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). The remaining remarks apply only to ODBC databases: -If the database is an ODBC database and the parameters in your `Open` call do not contain enough information to make the connection, the ODBC driver opens a dialog box to obtain the necessary information from the user. When you call `Open`, your connection string, *lpszConnect*, is stored privately and is available by calling the [GetConnect](#getconnect) member function. +If the database is an ODBC database and the parameters in your `Open` call don't contain enough information to make the connection, the ODBC driver opens a dialog box to obtain the necessary information from the user. When you call `Open`, your connection string, *lpszConnect*, is stored privately and is available by calling the [GetConnect](#getconnect) member function. If you wish, you can open your own dialog box before you call `Open` to get information from the user, such as a password, then add that information to the connection string you pass to `Open`. Or you might want to save the connection string you pass (perhaps in the Windows registry) so you can reuse it the next time your application calls `Open` on a `CDaoDatabase` object. @@ -825,7 +827,7 @@ The number of seconds to allow before a query attempt times out. ### Remarks -An operation might time out because of network access problems, excessive query processing time, and so on. Call `SetQueryTimeout` before opening your recordset or before calling the recordset's [AddNew](../../mfc/reference/cdaorecordset-class.md#addnew), [Update](../../mfc/reference/cdaorecordset-class.md#update), or [Delete](../../mfc/reference/cdaorecordset-class.md#delete) member functions if you want to change the query timeout value. The setting affects all subsequent [Open](../../mfc/reference/cdaorecordset-class.md#open), `AddNew`, `Update`, and `Delete` calls to any recordsets associated with this `CDaoDatabase` object. Changing the query timeout value for a recordset after opening does not change the value for the recordset. For example, subsequent [Move](../../mfc/reference/cdaorecordset-class.md#move) operations do not use the new value. +An operation might time out because of network access problems, excessive query processing time, and so on. Call `SetQueryTimeout` before opening your recordset or before calling the recordset's [AddNew](../../mfc/reference/cdaorecordset-class.md#addnew), [Update](../../mfc/reference/cdaorecordset-class.md#update), or [Delete](../../mfc/reference/cdaorecordset-class.md#delete) member functions if you want to change the query timeout value. The setting affects all subsequent [Open](../../mfc/reference/cdaorecordset-class.md#open), `AddNew`, `Update`, and `Delete` calls to any recordsets associated with this `CDaoDatabase` object. Changing the query timeout value for a recordset after opening doesn't change the value for the recordset. For example, subsequent [Move](../../mfc/reference/cdaorecordset-class.md#move) operations don't use the new value. The default value for query timeouts is 60 seconds. Not all databases support the ability to set a query timeout value. If you set a query timeout value of 0, no timeout occurs; the communication with the database may stop responding. This behavior may be useful during development. diff --git a/docs/mfc/reference/cdaodatabaseinfo-structure.md b/docs/mfc/reference/cdaodatabaseinfo-structure.md index 0c65d02f3c..24d774536b 100644 --- a/docs/mfc/reference/cdaodatabaseinfo-structure.md +++ b/docs/mfc/reference/cdaodatabaseinfo-structure.md @@ -4,11 +4,13 @@ title: "CDaoDatabaseInfo Structure" ms.date: "09/17/2019" f1_keywords: ["CDaoDatabaseInfo"] helpviewer_keywords: ["CDaoDatabaseInfo structure [MFC]", "DAO (Data Access Objects), Databases collection"] -ms.assetid: 68e9e0da-8382-4fc6-8115-1b1519392ddb --- # CDaoDatabaseInfo Structure -The `CDaoDatabaseInfo` structure contains information about a database object defined for data access objects (DAO). DAO 3.6 is the final version, and it is considered obsolete. +The `CDaoDatabaseInfo` structure contains information about a database object defined for data access objects (DAO). + +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -94,7 +96,7 @@ Information retrieved by the [CDaoWorkspace::GetDatabaseInfo](../../mfc/referenc ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoerrorinfo-structure.md b/docs/mfc/reference/cdaoerrorinfo-structure.md index 686a487153..0848f939ef 100644 --- a/docs/mfc/reference/cdaoerrorinfo-structure.md +++ b/docs/mfc/reference/cdaoerrorinfo-structure.md @@ -4,11 +4,13 @@ title: "CDaoErrorInfo Structure" ms.date: "09/17/2019" f1_keywords: ["CDaoErrorInfo"] helpviewer_keywords: ["CDaoErrorInfo structure [MFC]", "DAO (Data Access Objects), Errors collection"] -ms.assetid: cd37ef71-b0b3-401d-bc2b-540c9147f532 --- # CDaoErrorInfo Structure -The `CDaoErrorInfo` structure contains information about an error object defined for data access objects (DAO). DAO 3.6 is the final version, and it is considered obsolete. +The `CDaoErrorInfo` structure contains information about an error object defined for data access objects (DAO). + +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -50,7 +52,7 @@ Information retrieved by the [CDaoException::GetErrorInfo](../../mfc/reference/c ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoexception-class.md b/docs/mfc/reference/cdaoexception-class.md index 10e48df062..7092121b13 100644 --- a/docs/mfc/reference/cdaoexception-class.md +++ b/docs/mfc/reference/cdaoexception-class.md @@ -4,15 +4,17 @@ title: "CDaoException Class" ms.date: "09/17/2019" f1_keywords: ["CDaoException", "AFXDAO/CDaoException", "AFXDAO/CDaoException::CDaoException", "AFXDAO/CDaoException::GetErrorCount", "AFXDAO/CDaoException::GetErrorInfo", "AFXDAO/CDaoException::m_nAfxDaoError", "AFXDAO/CDaoException::m_pErrorInfo", "AFXDAO/CDaoException::m_scode"] helpviewer_keywords: ["CDaoException [MFC], CDaoException", "CDaoException [MFC], GetErrorCount", "CDaoException [MFC], GetErrorInfo", "CDaoException [MFC], m_nAfxDaoError", "CDaoException [MFC], m_pErrorInfo", "CDaoException [MFC], m_scode"] -ms.assetid: b2b01fa9-7ce2-42a1-842e-40f13dc50da4 --- # CDaoException Class -Represents an exception condition arising from the MFC database classes based on data access objects (DAO). DAO 3.6 is the final version, and it is considered obsolete. +Represents an exception condition arising from the MFC database classes based on data access objects (DAO). + +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. ## Syntax -``` +```cpp class CDaoException : public CException ``` @@ -48,7 +50,7 @@ The class includes public data members you can use to determine the cause of the You can access exception objects within the scope of a [CATCH](../../mfc/reference/exception-processing.md#catch) expression. You can also throw `CDaoException` objects from your own code with the [AfxThrowDaoException](../../mfc/reference/exception-processing.md#afxthrowdaoexception) global function. -In MFC, all DAO errors are expressed as exceptions, of type `CDaoException`. When you catch an exception of this type, you can use `CDaoException` member functions to retrieve information from any DAO error objects stored in the database engine's Errors collection. As each error occurs, one or more error objects are placed in the Errors collection. (Normally the collection contains only one error object; if you are using an ODBC data source, you are more likely to get multiple error objects.) When another DAO operation generates an error, the Errors collection is cleared, and the new error object is placed in the Errors collection. DAO operations that do not generate an error have no effect on the Errors collection. +In MFC, all DAO errors are expressed as exceptions, of type `CDaoException`. When you catch an exception of this type, you can use `CDaoException` member functions to retrieve information from any DAO error objects stored in the database engine's Errors collection. As each error occurs, one or more error objects are placed in the Errors collection. (Normally the collection contains only one error object; if you're using an ODBC data source, you're more likely to get multiple error objects.) When another DAO operation generates an error, the Errors collection is cleared, and the new error object is placed in the Errors collection. DAO operations that do not generate an error have no effect on the Errors collection. For DAO error codes, see the file DAOERR.H. For related information, see the topic "Trappable Data Access Errors" in DAO Help. @@ -56,15 +58,15 @@ For more information about exception handling in general, or about `CDaoExceptio ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) +[`CObject`](../../mfc/reference/cobject-class.md) -[CException](../../mfc/reference/cexception-class.md) +[`CException`](../../mfc/reference/cexception-class.md) `CDaoException` ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoException::CDaoException @@ -78,13 +80,13 @@ CDaoException(); Ordinarily, the framework creates exception objects when its code throws an exception. You seldom need to construct an exception object explicitly. If you want to throw a `CDaoException` from your own code, call the global function [AfxThrowDaoException](../../mfc/reference/exception-processing.md#afxthrowdaoexception). -However, you might want to explicitly create an exception object if you are making direct calls to DAO via the DAO interface pointers that MFC classes encapsulate. In that case, you might need to retrieve error information from DAO. Suppose an error occurs in DAO when you call a DAO method via the DAODatabases interface to a workspace's Databases collection. +However, you might want to explicitly create an exception object if you're making direct calls to DAO via the DAO interface pointers that MFC classes encapsulate. In that case, you might need to retrieve error information from DAO. Suppose an error occurs in DAO when you call a DAO method via the DAODatabases interface to a workspace's Databases collection. ##### To retrieve the DAO error information 1. Construct a `CDaoException` object. -1. Call the exception object's [GetErrorCount](#geterrorcount) member function to determine how many error objects are in the database engine's Errors collection. (Normally only one, unless you are using an ODBC data source.) +1. Call the exception object's [GetErrorCount](#geterrorcount) member function to determine how many error objects are in the database engine's Errors collection. (Normally only one, unless you're using an ODBC data source.) 1. Call the exception object's [GetErrorInfo](#geterrorinfo) member function to retrieve one specific error object at a time, by index in the collection, via the exception object. Think of the exception object as a proxy for one DAO error object. @@ -110,10 +112,10 @@ The number of DAO error objects in the database engine's Errors collection. ### Remarks -This information is useful for looping through the Errors collection to retrieve each of the one or more DAO error objects in the collection. To retrieve an error object by index or by DAO error number, call the [GetErrorInfo](#geterrorinfo) member function. +This information is useful for looping through the Errors collection to retrieve each of one or more DAO error objects in the collection. To retrieve an error object by index or by DAO error number, call the [GetErrorInfo](#geterrorinfo) member function. > [!NOTE] -> Normally there is only one error object in the Errors collection. If you are working with an ODBC data source, however, there could be more than one. +> Normally there is only one error object in the Errors collection. If you're working with an ODBC data source, however, there could be more than one. ## CDaoException::GetErrorInfo @@ -156,13 +158,13 @@ This code is supplied in cases where a specific component of the MFC DAO classes Possible values are: -- NO_AFX_DAO_ERROR The most recent operation did not result in an MFC extended error. However, the operation could have produced other errors from DAO or OLE, so you should check [m_pErrorInfo](#m_perrorinfo) and possibly [m_scode](#m_scode). +- NO_AFX_DAO_ERROR The most recent operation didn't result in an MFC extended error. However, the operation could have produced other errors from DAO or OLE, so you should check [m_pErrorInfo](#m_perrorinfo) and possibly [m_scode](#m_scode). - AFX_DAO_ERROR_ENGINE_INITIALIZATION MFC could not initialize the Microsoft Jet database engine. OLE might have failed to initialize, or it might have been impossible to create an instance of the DAO database engine object. These problems usually suggest a bad installation of either DAO or OLE. -- AFX_DAO_ERROR_DFX_BIND An address used in a DAO record field exchange (DFX) function call does not exist or is invalid (the address was not used to bind data). You might have passed a bad address in a DFX call, or the address might have become invalid between DFX operations. +- AFX_DAO_ERROR_DFX_BIND An address used in a DAO record field exchange (DFX) function call doesn't exist or is invalid (the address wasn't used to bind data). You might have passed a bad address in a DFX call, or the address might have become invalid between DFX operations. -- AFX_DAO_ERROR_OBJECT_NOT_OPEN You attempted to open a recordset based on a querydef or a tabledef object that was not in an open state. +- AFX_DAO_ERROR_OBJECT_NOT_OPEN You attempted to open a recordset based on a querydef or a tabledef object that wasn't in an open state. ## CDaoException::m_pErrorInfo @@ -188,12 +190,11 @@ Contains a value of type `SCODE` that describes the error. ### Remarks -This is an OLE code. You will seldom need to use this value because, in almost all cases, more specific MFC or DAO error information is available in the other `CDaoException` data members. +This is an OLE code. You'll seldom need to use this value because, in almost all cases, more specific MFC or DAO error information is available in the other `CDaoException` data members. For information about SCODE, see the topic [Structure of OLE Error Codes](/windows/win32/com/structure-of-com-error-codes) in the Windows SDK. The SCODE data type maps to the HRESULT data type. ## See also -[CException Class](../../mfc/reference/cexception-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[CException Class](../../mfc/reference/cexception-class.md) +[CException Class](../../mfc/reference/cexception-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md) \ No newline at end of file diff --git a/docs/mfc/reference/cdaofieldexchange-class.md b/docs/mfc/reference/cdaofieldexchange-class.md index 44eab5cdfe..47e1f63124 100644 --- a/docs/mfc/reference/cdaofieldexchange-class.md +++ b/docs/mfc/reference/cdaofieldexchange-class.md @@ -1,16 +1,16 @@ --- -description: "Learn more about: CDaoFieldExchange Class" title: "CDaoFieldExchange Class" -ms.date: "09/17/2019" +description: "Learn more about: CDaoFieldExchange Class" +ms.date: 09/17/2019 f1_keywords: ["CDaoFieldExchange", "AFXDAO/CDaoFieldExchange", "AFXDAO/CDaoFieldExchange::IsValidOperation", "AFXDAO/CDaoFieldExchange::SetFieldType", "AFXDAO/CDaoFieldExchange::m_nOperation", "AFXDAO/CDaoFieldExchange::m_prs"] helpviewer_keywords: ["CDaoFieldExchange [MFC], IsValidOperation", "CDaoFieldExchange [MFC], SetFieldType", "CDaoFieldExchange [MFC], m_nOperation", "CDaoFieldExchange [MFC], m_prs"] -ms.assetid: 350a663e-92ff-44ab-ad53-d94efa2e5823 --- # CDaoFieldExchange Class Supports the DAO record field exchange (DFX) routines used by the DAO database classes. -DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -44,7 +44,7 @@ Use this class if you are writing data exchange routines for custom data types; > The DAO database classes are distinct from the MFC database classes based on Open Database Connectivity (ODBC). All DAO database class names have the "CDao" prefix. You can still access ODBC data sources with the DAO classes. In general, the MFC classes based on DAO are more capable than the MFC classes based on ODBC. The DAO-based classes can access data, including through ODBC drivers, via their own database engine. They also support Data Definition Language (DDL) operations, such as adding tables via the classes instead of having to call DAO yourself. > [!NOTE] -> DAO record field exchange (DFX) is very similar to record field exchange (RFX) in the ODBC-based MFC database classes ( `CDatabase`, `CRecordset`). If you understand RFX, you will find it easy to use DFX. +> DAO record field exchange (DFX) is very similar to record field exchange (RFX) in the ODBC-based MFC database classes (`CDatabase`, `CRecordset`). If you understand RFX, you will find it easy to use DFX. A `CDaoFieldExchange` object provides the context information needed for DAO record field exchange to take place. `CDaoFieldExchange` objects support a number of operations, including binding parameters and field data members and setting various flags on the fields of the current record. DFX operations are performed on recordset-class data members of types defined by the **`enum`** **FieldType** in `CDaoFieldExchange`. Possible **FieldType** values are: @@ -60,7 +60,7 @@ The [IsValidOperation](#isvalidoperation) member function is provided for writin ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoFieldExchange::IsValidOperation @@ -89,7 +89,7 @@ Identifies the operation to be performed on the [CDaoRecordset](../../mfc/refere The `CDaoFieldExchange` object supplies the context for a number of different DFX operations on the recordset. > [!NOTE] -> The PSEUDONULL value described under the MarkForAddNew and SetFieldNull operations below is a value used to mark fields Null. The DAO record field exchange mechanism (DFX) uses this value to determine which fields have been explicitly marked Null. PSEUDONULL is not required for [COleDateTime](../../atl-mfc-shared/reference/coledatetime-class.md) and [COleCurrency](../../mfc/reference/colecurrency-class.md) fields. +> The `PSEUDONULL` value described under the `MarkForAddNew` and `SetFieldNull` operations below is a value used to mark fields Null. The DAO record field exchange mechanism (DFX) uses this value to determine which fields have been explicitly marked Null. `PSEUDONULL` is not required for [`COleDateTime`](../../atl-mfc-shared/reference/coledatetime-class.md) and [`COleCurrency`](../../mfc/reference/colecurrency-class.md) fields. Possible values of `m_nOperation` are: diff --git a/docs/mfc/reference/cdaofieldinfo-structure.md b/docs/mfc/reference/cdaofieldinfo-structure.md index b816e163d4..1935ec2f72 100644 --- a/docs/mfc/reference/cdaofieldinfo-structure.md +++ b/docs/mfc/reference/cdaofieldinfo-structure.md @@ -4,13 +4,13 @@ title: "CDaoFieldInfo Structure" ms.date: "09/17/2019" f1_keywords: ["CDaoFieldInfo"] helpviewer_keywords: ["DAO (Data Access Objects), Fields collection", "CDaoFieldInfo structure [MFC]"] -ms.assetid: 91b13e3f-bdb8-440c-86fc-ba4181ea0182 --- # CDaoFieldInfo Structure The `CDaoFieldInfo` structure contains information about a field object defined for data access objects (DAO). -DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -146,7 +146,7 @@ Information retrieved by the `GetFieldInfo` member function (of the class that c ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoindexfieldinfo-structure.md b/docs/mfc/reference/cdaoindexfieldinfo-structure.md index 160831669c..c75e91b586 100644 --- a/docs/mfc/reference/cdaoindexfieldinfo-structure.md +++ b/docs/mfc/reference/cdaoindexfieldinfo-structure.md @@ -4,13 +4,13 @@ title: "CDaoIndexFieldInfo Structure" ms.date: "09/17/2019" f1_keywords: ["CDaoIndexFieldInfo"] helpviewer_keywords: ["CDaoIndexFieldInfo structure [MFC]", "DAO (Data Access Objects), Index Fields collection"] -ms.assetid: 097ee8a6-83b1-4db7-8f05-d62a2deefe19 --- # CDaoIndexFieldInfo Structure The `CDaoIndexFieldInfo` structure contains information about an index field object defined for data access objects (DAO). -DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -40,7 +40,7 @@ Call the `GetIndexInfo` member function of the containing tabledef or recordset ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoindexinfo-structure.md b/docs/mfc/reference/cdaoindexinfo-structure.md index 390978f486..e7558e5bae 100644 --- a/docs/mfc/reference/cdaoindexinfo-structure.md +++ b/docs/mfc/reference/cdaoindexinfo-structure.md @@ -4,12 +4,14 @@ title: "CDaoIndexInfo Structure" ms.date: "06/25/2018" f1_keywords: ["CDaoIndexInfo"] helpviewer_keywords: ["DAO (Data Access Objects), Indexes collection", "CDaoIndexInfo structure [MFC]"] -ms.assetid: 251d8285-78ce-4716-a0b3-ccc3395fc437 --- # CDaoIndexInfo Structure The `CDaoIndexInfo` structure contains information about an index object defined for data access objects (DAO). +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ```cpp @@ -98,7 +100,7 @@ Information retrieved by the `GetIndexInfo` member function of a tabledef object ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoparameterinfo-structure.md b/docs/mfc/reference/cdaoparameterinfo-structure.md index 50b0f3407d..d2d54d4df7 100644 --- a/docs/mfc/reference/cdaoparameterinfo-structure.md +++ b/docs/mfc/reference/cdaoparameterinfo-structure.md @@ -4,11 +4,13 @@ title: "CDaoParameterInfo Structure" ms.date: "09/17/2019" f1_keywords: ["CDaoParameterInfo"] helpviewer_keywords: ["CDaoParameterInfo structure [MFC]", "DAO (Data Access Objects), Parameters collection"] -ms.assetid: 45fd53cd-cb84-4e12-b48d-7f2979f898ad --- # CDaoParameterInfo Structure -The `CDaoParameterInfo` structure contains information about a parameter object defined for data access objects (DAO). DAO 3.6 is the final version, and it is considered obsolete. +The `CDaoParameterInfo` structure contains information about a parameter object defined for data access objects (DAO). + +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. ## Syntax @@ -36,7 +38,7 @@ The value of the parameter, stored in a [COleVariant](../../mfc/reference/coleva The references to Primary and Secondary above indicate how the information is returned by the [GetParameterInfo](../../mfc/reference/cdaoquerydef-class.md#getparameterinfo) member function in class `CDaoQueryDef`. -MFC does not encapsulate DAO parameter objects in a class. DAO querydef objects underlying MFC `CDaoQueryDef` objects store parameters in their Parameters collections. To access the parameter objects in a [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) object, call the querydef object's `GetParameterInfo` member function for a particular parameter name or an index into the Parameters collection. You can use the [CDaoQueryDef::GetParameterCount](../../mfc/reference/cdaoquerydef-class.md#getparametercount) member function in conjunction with `GetParameterInfo` to loop through the Parameters collection. +The Microsoft Foundation Classes (MFC) don't encapsulate DAO parameter objects in a class. DAO querydef objects underlying MFC `CDaoQueryDef` objects store parameters in their Parameters collections. To access the parameter objects in a [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) object, call the querydef object's `GetParameterInfo` member function for a particular parameter name or an index into the Parameters collection. You can use the [CDaoQueryDef::GetParameterCount](../../mfc/reference/cdaoquerydef-class.md#getparametercount) member function in conjunction with `GetParameterInfo` to loop through the Parameters collection. Information retrieved by the [CDaoQueryDef::GetParameterInfo](../../mfc/reference/cdaoquerydef-class.md#getparameterinfo) member function is stored in a `CDaoParameterInfo` structure. Call `GetParameterInfo` for the querydef object in whose Parameters collection the parameter object is stored. @@ -47,7 +49,7 @@ Information retrieved by the [CDaoQueryDef::GetParameterInfo](../../mfc/referenc ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoquerydef-class.md b/docs/mfc/reference/cdaoquerydef-class.md index a1613f393f..a8f573e692 100644 --- a/docs/mfc/reference/cdaoquerydef-class.md +++ b/docs/mfc/reference/cdaoquerydef-class.md @@ -4,15 +4,17 @@ title: "CDaoQueryDef Class" ms.date: "11/04/2016" f1_keywords: ["CDaoQueryDef", "AFXDAO/CDaoQueryDef", "AFXDAO/CDaoQueryDef::CDaoQueryDef", "AFXDAO/CDaoQueryDef::Append", "AFXDAO/CDaoQueryDef::CanUpdate", "AFXDAO/CDaoQueryDef::Close", "AFXDAO/CDaoQueryDef::Create", "AFXDAO/CDaoQueryDef::Execute", "AFXDAO/CDaoQueryDef::GetConnect", "AFXDAO/CDaoQueryDef::GetDateCreated", "AFXDAO/CDaoQueryDef::GetDateLastUpdated", "AFXDAO/CDaoQueryDef::GetFieldCount", "AFXDAO/CDaoQueryDef::GetFieldInfo", "AFXDAO/CDaoQueryDef::GetName", "AFXDAO/CDaoQueryDef::GetODBCTimeout", "AFXDAO/CDaoQueryDef::GetParameterCount", "AFXDAO/CDaoQueryDef::GetParameterInfo", "AFXDAO/CDaoQueryDef::GetParamValue", "AFXDAO/CDaoQueryDef::GetRecordsAffected", "AFXDAO/CDaoQueryDef::GetReturnsRecords", "AFXDAO/CDaoQueryDef::GetSQL", "AFXDAO/CDaoQueryDef::GetType", "AFXDAO/CDaoQueryDef::IsOpen", "AFXDAO/CDaoQueryDef::Open", "AFXDAO/CDaoQueryDef::SetConnect", "AFXDAO/CDaoQueryDef::SetName", "AFXDAO/CDaoQueryDef::SetODBCTimeout", "AFXDAO/CDaoQueryDef::SetParamValue", "AFXDAO/CDaoQueryDef::SetReturnsRecords", "AFXDAO/CDaoQueryDef::SetSQL", "AFXDAO/CDaoQueryDef::m_pDAOQueryDef", "AFXDAO/CDaoQueryDef::m_pDatabase"] helpviewer_keywords: ["CDaoQueryDef [MFC], CDaoQueryDef", "CDaoQueryDef [MFC], Append", "CDaoQueryDef [MFC], CanUpdate", "CDaoQueryDef [MFC], Close", "CDaoQueryDef [MFC], Create", "CDaoQueryDef [MFC], Execute", "CDaoQueryDef [MFC], GetConnect", "CDaoQueryDef [MFC], GetDateCreated", "CDaoQueryDef [MFC], GetDateLastUpdated", "CDaoQueryDef [MFC], GetFieldCount", "CDaoQueryDef [MFC], GetFieldInfo", "CDaoQueryDef [MFC], GetName", "CDaoQueryDef [MFC], GetODBCTimeout", "CDaoQueryDef [MFC], GetParameterCount", "CDaoQueryDef [MFC], GetParameterInfo", "CDaoQueryDef [MFC], GetParamValue", "CDaoQueryDef [MFC], GetRecordsAffected", "CDaoQueryDef [MFC], GetReturnsRecords", "CDaoQueryDef [MFC], GetSQL", "CDaoQueryDef [MFC], GetType", "CDaoQueryDef [MFC], IsOpen", "CDaoQueryDef [MFC], Open", "CDaoQueryDef [MFC], SetConnect", "CDaoQueryDef [MFC], SetName", "CDaoQueryDef [MFC], SetODBCTimeout", "CDaoQueryDef [MFC], SetParamValue", "CDaoQueryDef [MFC], SetReturnsRecords", "CDaoQueryDef [MFC], SetSQL", "CDaoQueryDef [MFC], m_pDAOQueryDef", "CDaoQueryDef [MFC], m_pDatabase"] -ms.assetid: 9676a4a3-c712-44d4-8c5d-d1cc78288d3a --- -# CDaoQueryDef Class +# `CDaoQueryDef` Class Represents a query definition, or "querydef," usually one saved in a database. +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. + ## Syntax -``` +```cpp class CDaoQueryDef : public CObject ``` @@ -39,7 +41,7 @@ class CDaoQueryDef : public CObject |[CDaoQueryDef::GetFieldCount](#getfieldcount)|Returns the number of fields defined by the querydef.| |[CDaoQueryDef::GetFieldInfo](#getfieldinfo)|Returns information about a specified field defined in the query.| |[CDaoQueryDef::GetName](#getname)|Returns the name of the querydef.| -|[CDaoQueryDef::GetODBCTimeout](#getodbctimeout)|Returns the timeout value used by ODBC (for an ODBC query) when the querydef is executed. This determines how long to allow for the query's action to complete.| +|[CDaoQueryDef::GetODBCTimeout](#getodbctimeout)|Returns the timeout value used by ODBC (for an ODBC query) when the querydef is executed which determines how long to allow for the query's action to complete.| |[CDaoQueryDef::GetParameterCount](#getparametercount)|Returns the number of parameters defined for the query.| |[CDaoQueryDef::GetParameterInfo](#getparameterinfo)|Returns information about a specified parameter to the query.| |[CDaoQueryDef::GetParamValue](#getparamvalue)|Returns the value of a specified parameter to the query.| @@ -65,10 +67,10 @@ class CDaoQueryDef : public CObject ## Remarks -A querydef is a data access object that contains the SQL statement that describes a query, and its properties, such as "Date Created" and "ODBC Timeout." You can also create temporary querydef objects without saving them, but it is convenient — and much more efficient — to save commonly reused queries in a database. A [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object maintains a collection, called the QueryDefs collection, that contains its saved querydefs. +A querydef is a data access object that contains the SQL statement that describes a query, and its properties, such as "Date Created" and "ODBC Timeout." You can also create temporary querydef objects without saving them, but it's convenient—and much more efficient—to save commonly reused queries in a database. A [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object maintains a collection, called the QueryDefs collection, that contains its saved querydefs. > [!NOTE] -> The DAO database classes are distinct from the MFC database classes based on Open Database Connectivity (ODBC). All DAO database class names have the "CDao" prefix. You can still access ODBC data sources with the DAO classes. In general, the MFC classes based on DAO are more capable than the MFC classes based on ODBC; the DAO-based classes can access data, including through ODBC drivers, via their own database engine. The DAO-based classes also support Data Definition Language (DDL) operations, such as adding tables via the classes, without having to call DAO directly. +> The DAO database classes are distinct from the Microsoft Foundation Class (MFC) database classes based on Open Database Connectivity (ODBC). All DAO database class names have the "CDao" prefix. You can still access ODBC data sources with the DAO classes. In general, the MFC classes based on DAO are more capable than the MFC classes based on ODBC; the DAO-based classes can access data, including through ODBC drivers, via their own database engine. The DAO-based classes also support Data Definition Language (DDL) operations, such as adding tables via the classes, without having to call DAO directly. ## Usage @@ -80,9 +82,9 @@ Use querydef objects either to work with an existing saved query or to create a - To use an existing saved query, call the querydef object's [Open](#open) member function, supplying the name of the saved query. - - To create a new saved query, call the querydef object's [Create](#create) member function, supplying the name of the query. Then call [Append](#append) to save the query by appending it to the database's QueryDefs collection. `Create` puts the querydef into an open state, so after calling `Create` you do not call `Open`. + - To create a new saved query, call the querydef object's [Create](#create) member function, supplying the name of the query. Then call [Append](#append) to save the query by appending it to the database's QueryDefs collection. `Create` puts the querydef into an open state, so after calling `Create` you don't call `Open`. - - To create a temporary querydef, call `Create`. Pass an empty string for the query name. Do not call `Append`. + - To create a temporary querydef, call `Create`. Pass an empty string for the query name. Don't call `Append`. When you finish using a querydef object, call its [Close](#close) member function; then destroy the querydef object. @@ -97,13 +99,13 @@ You can use a querydef object for any of the following purposes: - To call the object's `Execute` member function to directly execute an action query or a SQL pass-through query -You can use a querydef object for any type of query, including select, action, crosstab, delete, update, append, make-table, data definition, SQL pass-through, union, and bulk queries. The query's type is determined by the content of the SQL statement that you supply. For information about query types, see the `Execute` and [GetType](#gettype) member functions. Recordsets are commonly used for row-returning queries, usually those using the **SELECT ... FROM** keywords. `Execute` is most commonly used for bulk operations. For more information, see [Execute](#execute) and [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md). +You can use a querydef object for any type of query, including select, action, crosstab, delete, update, append, make-table, data definition, SQL pass-through, union, and bulk queries. The content of the SQL statement that you supply determines the query's type. For information about query types, see the `Execute` and [`GetType`](#gettype) member functions. Recordsets are commonly used for row-returning queries, usually queries using the **SELECT ... FROM** keywords. `Execute` is most commonly used for bulk operations. For more information, see [`Execute`](#execute) and [`CDaoRecordset`](../../mfc/reference/cdaorecordset-class.md). ## Querydefs and Recordsets -To use a querydef object to create a `CDaoRecordset` object, you typically create or open a querydef as described above. Then construct a recordset object, passing a pointer to your querydef object when you call [CDaoRecordset::Open](../../mfc/reference/cdaorecordset-class.md#open). The querydef you pass must be in an open state. For more information, see class [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md). +To use a querydef object to create a `CDaoRecordset` object, you typically create or open a querydef as described previously. Then construct a recordset object, passing a pointer to your querydef object when you call [`CDaoRecordset::Open`](../../mfc/reference/cdaorecordset-class.md#open). The querydef you pass must be in an open state. For more information, see class [`CDaoRecordset`](../../mfc/reference/cdaorecordset-class.md). -You cannot use a querydef to create a recordset (the most common use for a querydef) unless it is in an open state. Put the querydef into an open state by calling either `Open` or `Create`. +You can't use a querydef to create a recordset (the most common use for a querydef) unless it's in an open state. Put the querydef into an open state by calling either `Open` or `Create`. ## External Databases @@ -122,7 +124,7 @@ For related information, see the topics "QueryDef Object", "QueryDefs Collection ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoQueryDef::Append @@ -140,7 +142,7 @@ If you attempt to append a temporary querydef object, MFC throws an exception of ## CDaoQueryDef::CanUpdate -Call this member function to determine whether you can modify the querydef — such as changing its name or SQL string. +Call this member function to determine whether you can modify the querydef—such as changing its name or SQL string. ``` BOOL CanUpdate(); @@ -148,17 +150,17 @@ BOOL CanUpdate(); ### Return Value -Nonzero if you are permitted to modify the querydef; otherwise 0. +Nonzero if you can modify the querydef; otherwise 0. ### Remarks You can modify the querydef if: -- It is not based on a database that is open read-only. +- It's not based on a database that is open read-only. - You have update permissions for the database. - This depends on whether you have implemented security features. MFC does not provide support for security; you must implement it yourself by calling DAO directly or by using Microsoft Access. See the topic "Permissions Property" in DAO Help. + This depends on whether you implemented security features. MFC doesn't provide support for security; you must implement it yourself by calling DAO directly or by using Microsoft Access. See the topic "Permissions Property" in DAO Help. ## CDaoQueryDef::CDaoQueryDef @@ -181,7 +183,7 @@ The object can represent an existing querydef stored in the database's QueryDefs - If the object represents a new querydef to be saved, call the object's [Create](#create) member function. This adds the object to the database's QueryDefs collection. Then call `CDaoQueryDef` member functions to set the object's attributes. Finally, call [Append](#append). -- If the object represents a temporary querydef (not to be saved in the database), call `Create`, passing an empty string for the query's name. After calling `Create`, initialize the querydef by directly setting its attributes. Do not call `Append`. +- If the object represents a temporary querydef (not to be saved in the database), call `Create`, passing an empty string for the query's name. After calling `Create`, initialize the querydef by directly setting its attributes. Don't call `Append`. To set the attributes of the querydef, you can use the [SetName](#setname), [SetSQL](#setsql), [SetConnect](#setconnect), [SetODBCTimeout](#setodbctimeout), and [SetReturnsRecords](#setreturnsrecords) member functions. @@ -197,7 +199,7 @@ virtual void Close(); ### Remarks -Closing the querydef releases the underlying DAO object but does not destroy the saved DAO querydef object or the C++ `CDaoQueryDef` object. This is not the same as [CDaoDatabase::DeleteQueryDef](../../mfc/reference/cdaodatabase-class.md#deletequerydef), which deletes the querydef from the database's QueryDefs collection in DAO (if not a temporary querydef). +Closing the querydef releases the underlying DAO object but doesn't destroy the saved DAO querydef object or the C++ `CDaoQueryDef` object. This isn't the same as [CDaoDatabase::DeleteQueryDef](../../mfc/reference/cdaodatabase-class.md#deletequerydef), which deletes the querydef from the database's QueryDefs collection in DAO (if not a temporary querydef). ## CDaoQueryDef::Create @@ -212,16 +214,16 @@ virtual void Create( ### Parameters *lpszName*
-The unique name of the query saved in the database. For details about the string, see the topic "CreateQueryDef Method" in DAO Help. If you accept the default value, an empty string, a temporary querydef is created. Such a query is not saved in the QueryDefs collection. +The unique name of the query saved in the database. For details about the string, see the topic "CreateQueryDef Method" in DAO Help. If you accept the default value, an empty string, a temporary querydef is created. Such a query isn't saved in the QueryDefs collection. *lpszSQL*
The SQL string that defines the query. If you accept the default value of NULL, you must later call [SetSQL](#setsql) to set the string. Until then, the query is undefined. You can, however, use the undefined query to open a recordset; see Remarks for details. The SQL statement must be defined before you can append the querydef to the QueryDefs collection. ### Remarks -If you pass a name in *lpszName*, you can then call [Append](#append) to save the querydef in the database's QueryDefs collection. Otherwise, the object is a temporary querydef and is not saved. In either case, the querydef is in an open state, and you can either use it to create a [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) object or call the querydef's [Execute](#execute) member function. +If you pass a name in *lpszName*, you can then call [Append](#append) to save the querydef in the database's QueryDefs collection. Otherwise, the object is a temporary querydef and isn't saved. In either case, the querydef is in an open state, and you can either use it to create a [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) object or call the querydef's [Execute](#execute) member function. -If you do not supply a SQL statement in *lpszSQL*, you cannot run the query with `Execute` but you can use it to create a recordset. In that case, MFC uses the recordset's default SQL statement. +If you don't supply a SQL statement in *lpszSQL*, you can't run the query with `Execute` but you can use it to create a recordset. In that case, MFC uses the recordset's default SQL statement. ## CDaoQueryDef::Execute @@ -246,7 +248,7 @@ An integer that determines the characteristics of the query. For related informa - `dbFailOnError` Default value. Roll back updates if an error occurs and report the error to the user. -- `dbSeeChanges` Generate a run-time error if another user is changing data you are editing. +- `dbSeeChanges` Generate a run-time error if another user is changing data you're editing. > [!NOTE] > For an explanation of the terms "inconsistent" and "consistent," see the topic "Execute Method" in DAO Help. @@ -259,16 +261,16 @@ Querydef objects used for execution in this manner can only represent one of the - SQL pass-through queries -`Execute` does not work for queries that return records, such as select queries. `Execute` is commonly used for bulk operation queries, such as **UPDATE**, **INSERT**, or **SELECT INTO**, or for data definition language (DDL) operations. +`Execute` doesn't work for queries that return records, such as select queries. `Execute` is commonly used for bulk operation queries, such as **UPDATE**, **INSERT**, or **SELECT INTO**, or for data definition language (DDL) operations. > [!TIP] > The preferred way to work with ODBC data sources is to attach tables to a Microsoft Jet (.MDB) database. For more information, see the topic "Accessing External Databases with DAO" in DAO Help. -Call the [GetRecordsAffected](#getrecordsaffected) member function of the querydef object to determine the number of records affected by the most recent `Execute` call. For example, `GetRecordsAffected` returns information about the number of records deleted, updated, or inserted when executing an action query. The count returned will not reflect changes in related tables when cascade updates or deletes are in effect. +Call the [GetRecordsAffected](#getrecordsaffected) member function of the querydef object to determine the number of records affected by the most recent `Execute` call. For example, `GetRecordsAffected` returns information about the number of records deleted, updated, or inserted when executing an action query. The count returned doesn't reflect changes in related tables when cascade updates or deletes are in effect. If you include both `dbInconsistent` and `dbConsistent` or if you include neither, the result is the default, `dbInconsistent`. -`Execute` does not return a recordset. Using `Execute` on a query that selects records causes MFC to throw an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). +`Execute` doesn't return a recordset. Using `Execute` on a query that selects records causes MFC to throw an exception of type [CDaoException](../../mfc/reference/cdaoexception-class.md). ## CDaoQueryDef::GetConnect @@ -280,11 +282,11 @@ CString GetConnect(); ### Return Value -A [CString](../../atl-mfc-shared/reference/cstringt-class.md) containing the connection string for the querydef. +A [`CString`](../../atl-mfc-shared/reference/cstringt-class.md) containing the connection string for the querydef. ### Remarks -This function is used only with ODBC data sources and certain ISAM drivers. It is not used with Microsoft Jet (.MDB) databases; in this case, `GetConnect` returns an empty string. For more information, see [SetConnect](#setconnect). +This function is used only with ODBC data sources and certain ISAM drivers. It's not used with Microsoft Jet (`.MDB`) databases; in this case, `GetConnect` returns an empty string. For more information, see [`SetConnect`](#setconnect). > [!TIP] > The preferred way to work with ODBC tables is to attach them to an .MDB database. For more information, see the topic "Accessing External Databases with DAO" in DAO Help. @@ -309,7 +311,7 @@ For related information, see the topic "DateCreated, LastUpdated Properties" in ## CDaoQueryDef::GetDateLastUpdated -Call this member function to get the date the querydef object was last updated — when any of its properties were changed, such as its name, its SQL string, or its connection string. +Call this member function to get the date the querydef object was last updated—when any of its properties were changed, such as its name, its SQL string, or its connection string. ``` COleDateTime GetDateLastUpdated(); @@ -317,7 +319,7 @@ COleDateTime GetDateLastUpdated(); ### Return Value -A [COleDateTime](../../atl-mfc-shared/reference/coledatetime-class.md) object containing the date and time the querydef was last updated. +A [`COleDateTime`](../../atl-mfc-shared/reference/coledatetime-class.md) object containing the date and time the querydef was last updated. ### Remarks @@ -337,7 +339,7 @@ The number of fields defined in the query. ### Remarks -`GetFieldCount` is useful for looping through all fields in the querydef. For that purpose, use `GetFieldCount` in conjunction with [GetFieldInfo](#getfieldinfo). +`GetFieldCount` is useful for looping through all fields in the querydef. For that purpose, use `GetFieldCount` with [`GetFieldInfo`](#getfieldinfo). ## CDaoQueryDef::GetFieldInfo @@ -373,7 +375,7 @@ Options that specify which information about the field to retrieve. The availabl - AFX_DAO_ALL_INFO Primary and secondary information plus: Default Value, Validation Text, Validation Rule *lpszName*
-A string containing the name of the desired field, for lookup by name. You can use a [CString](../../atl-mfc-shared/reference/cstringt-class.md). +A string containing the name of the desired field, for lookup by name. You can use a [`CString`](../../atl-mfc-shared/reference/cstringt-class.md). ### Remarks @@ -428,7 +430,7 @@ The number of parameters defined in the query. ### Remarks -`GetParameterCount` is useful for looping through all parameters in the querydef. For that purpose, use `GetParameterCount` in conjunction with [GetParameterInfo](#getparameterinfo). +`GetParameterCount` is useful for looping through all parameters in the querydef. For that purpose, use `GetParameterCount` with [`GetParameterInfo`](#getparameterinfo). For related information, see the topics "Parameter Object", "Parameters Collection", and "PARAMETERS Declaration (SQL)" in DAO Help. @@ -450,23 +452,23 @@ void GetParameterInfo( ### Parameters -*nIndex*
+*`nIndex`*
The zero-based index of the desired parameter in the querydef's Parameters collection, for lookup by index. -*paraminfo*
+*`paraminfo`*
A reference to a [CDaoParameterInfo](../../mfc/reference/cdaoparameterinfo-structure.md) object that returns the information requested. -*dwInfoOptions*
+*`dwInfoOptions`*
Options that specify which information about the parameter to retrieve. The available option is listed here along with what it causes the function to return: -- AFX_DAO_PRIMARY_INFO (Default) Name, Type +- `AFX_DAO_PRIMARY_INFO` (Default) Name, Type -*lpszName*
-A string containing the name of the desired parameter, for lookup by name. You can use a [CString](../../atl-mfc-shared/reference/cstringt-class.md). +*`lpszName`*
+A string containing the name of the desired parameter, for lookup by name. You can use a [`CString`](../../atl-mfc-shared/reference/cstringt-class.md). ### Remarks -For a description of the information returned in *paraminfo*, see the [CDaoParameterInfo](../../mfc/reference/cdaoparameterinfo-structure.md) structure. This structure has members that correspond to the descriptive information under *dwInfoOptions* above. +For a description of the information returned in *`paraminfo`*, see the [`CDaoParameterInfo`](../../mfc/reference/cdaoparameterinfo-structure.md) structure. This structure has members that correspond to the descriptive information under *`dwInfoOptions`* above. For related information, see the topic "PARAMETERS Declaration (SQL)" in DAO Help. @@ -499,7 +501,7 @@ For related information, see the topic "PARAMETERS Declaration (SQL)" in DAO Hel ## CDaoQueryDef::GetRecordsAffected -Call this member function to determine how many records were affected by the last call of [Execute](#execute). +Call this member function to determine how many records are affected by the last call of [Execute](#execute). ``` long GetRecordsAffected(); @@ -511,9 +513,9 @@ The number of records affected. ### Remarks -The count returned will not reflect changes in related tables when cascade updates or deletes are in effect. +The count returned doesn't reflect changes in related tables when cascade updates or deletes are in effect. -For related information see the topic "RecordsAffected Property" in DAO Help. +For related information, see the topic "RecordsAffected Property" in DAO Help. ## CDaoQueryDef::GetReturnsRecords @@ -547,7 +549,7 @@ The SQL statement that defines the query on which the querydef is based. ### Remarks -You will then probably parse the string for keywords, table names, and so on. +You can parse the string for keywords, table names, and so on. For related information, see the topics "SQL Property", "Comparison of Microsoft Jet Database Engine SQL and ANSI SQL", and "Querying a Database with SQL in Code" in DAO Help. @@ -587,7 +589,7 @@ The query type is set by what you specify in the querydef's SQL string when you - `dbQSetOperation` Union -- `dbQSPTBulk` Used with `dbQSQLPassThrough` to specify a query that does not return records. +- `dbQSPTBulk` Used with `dbQSQLPassThrough` to specify a query that doesn't return records. > [!NOTE] > To create a SQL pass-through query, don't set the `dbSQLPassThrough` constant. This is set automatically by the Microsoft Jet database engine when you create a querydef object and set the connection string. @@ -608,7 +610,7 @@ Nonzero if the `CDaoQueryDef` object is currently open; otherwise 0. ### Remarks -A querydef must be in an open state before you use it to call [Execute](#execute) or to create a [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) object. To put a querydef into an open state call either [Create](#create) (for a new querydef) or [Open](#open) (for an existing querydef). +A querydef must be in an open state before you use it to call [`Execute`](#execute) or to create a [`CDaoRecordset`](../../mfc/reference/cdaorecordset-class.md) object. To put a querydef into an open state, call either [`Create`](#create) (for a new querydef) or [`Open`](#open) (for an existing querydef). ## CDaoQueryDef::m_pDatabase @@ -616,7 +618,7 @@ Contains a pointer to the [CDaoDatabase](../../mfc/reference/cdaodatabase-class. ### Remarks -Use this pointer if you need to access the database directly — for example, to obtain pointers to other querydef or recordset objects in the database's collections. +Use this pointer if you need to access the database directly. For example, to obtain pointers to other querydef or recordset objects in the database's collections. ## CDaoQueryDef::m_pDAOQueryDef @@ -624,7 +626,7 @@ Contains a pointer to the OLE interface for the underlying DAO querydef object. ### Remarks -This pointer is provided for completeness and consistency with the other classes. However, because MFC rather fully encapsulates DAO querydefs, you are unlikely to need it. If you do use it, do so cautiously — in particular, do not change the value of the pointer unless you know what you are doing. +This pointer is provided for completeness and consistency with the other classes. However, because MFC rather fully encapsulates DAO querydefs, you're unlikely to need it. If you do use it, do so cautiously. In particular, don't change the value of the pointer unless you know what you're doing. ## CDaoQueryDef::Open @@ -637,11 +639,11 @@ virtual void Open(LPCTSTR lpszName = NULL); ### Parameters *lpszName*
-A string that contains the name of the saved querydef to open. You can use a [CString](../../atl-mfc-shared/reference/cstringt-class.md). +A string that contains the name of the saved querydef to open. You can use a [`CString`](../../atl-mfc-shared/reference/cstringt-class.md). ### Remarks -Once the querydef is open, you can call its [Execute](#execute) member function or use the querydef to create a [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) object. +Once the querydef is open, you can call its [`Execute`](#execute) member function or use the querydef to create a [`CDaoRecordset`](../../mfc/reference/cdaorecordset-class.md) object. ## CDaoQueryDef::SetConnect @@ -658,7 +660,7 @@ A string that contains a connection string for the associated [CDaoDatabase](../ ### Remarks -The connection string is used to pass additional information to ODBC and certain ISAM drivers as needed. It is not used for Microsoft Jet (.MDB) databases. +The connection string is used to pass additional information to ODBC and certain ISAM drivers as needed. It's not used for Microsoft Jet (`.MDB`) databases. > [!TIP] > The preferred way to work with ODBC tables is to attach them to an .MDB database. @@ -669,7 +671,7 @@ For more information about the connection string's structure and examples of con ## CDaoQueryDef::SetName -Call this member function if you want to change the name of a querydef that is not temporary. +Call this member function if you want to change the name of a querydef that isn't temporary. ```cpp void SetName(LPCTSTR lpszName); @@ -699,7 +701,7 @@ The number of seconds before a query times out. ### Remarks -This member function lets you override the default number of seconds before subsequent operations on the connected data source "time out." An operation might time out due to network access problems, excessive query processing time, and so on. Call `SetODBCTimeout` prior to executing a query with this querydef if you want to change the query timeout value. (As ODBC reuses connections, the timeout value is the same for all clients on the same connection.) +This member function lets you override the default number of seconds before subsequent operations on the connected data source "time out." An operation might time out due to network access problems, excessive query processing time, and so on. Call `SetODBCTimeout` before executing a query with this querydef if you want to change the query timeout value. (As ODBC reuses connections, the timeout value is the same for all clients on the same connection.) The default value for query timeouts is 60 seconds. @@ -730,7 +732,7 @@ The ordinal position of the parameter in the querydef's Parameters collection. Y ### Remarks -The parameter must already have been established as part of the querydef's SQL string. You can access the parameter either by name or by its ordinal position in the collection. +The parameter must already be established as part of the querydef's SQL string. You can access the parameter either by name or by its ordinal position in the collection. Specify the value to set as a `COleVariant` object. For information about setting the desired value and type in your `COleVariant` object, see class [COleVariant](../../mfc/reference/colevariant-class.md). @@ -770,9 +772,9 @@ A typical use of `SetSQL` is setting up a querydef object for use in a SQL pass- ## See also -[CObject Class](../../mfc/reference/cobject-class.md)
+[`CObject` Class](../../mfc/reference/cobject-class.md)
[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[CDaoRecordset Class](../../mfc/reference/cdaorecordset-class.md)
-[CDaoDatabase Class](../../mfc/reference/cdaodatabase-class.md)
-[CDaoTableDef Class](../../mfc/reference/cdaotabledef-class.md)
-[CDaoException Class](../../mfc/reference/cdaoexception-class.md) +[`CDaoRecordset` Class](../../mfc/reference/cdaorecordset-class.md)
+[`CDaoDatabase` Class](../../mfc/reference/cdaodatabase-class.md)
+[`CDaoTableDef` Class](../../mfc/reference/cdaotabledef-class.md)
+[`CDaoException` Class](../../mfc/reference/cdaoexception-class.md) diff --git a/docs/mfc/reference/cdaoquerydefinfo-structure.md b/docs/mfc/reference/cdaoquerydefinfo-structure.md index c42b9f3333..78fed0c2d2 100644 --- a/docs/mfc/reference/cdaoquerydefinfo-structure.md +++ b/docs/mfc/reference/cdaoquerydefinfo-structure.md @@ -4,12 +4,14 @@ title: "CDaoQueryDefInfo Structure" ms.date: "11/04/2016" f1_keywords: ["CDaoQueryDefInfo"] helpviewer_keywords: ["DAO (Data Access Objects), QueryDefs collection", "CDaoQueryDefInfo structure [MFC]"] -ms.assetid: e20837dc-e78d-4171-a195-1b4075fb5d2a --- # CDaoQueryDefInfo Structure The `CDaoQueryDefInfo` structure contains information about a querydef object defined for data access objects (DAO). +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. + ## Syntax ``` @@ -33,43 +35,43 @@ struct CDaoQueryDefInfo Uniquely names the querydef object. For more information, see the topic "Name Property" in DAO Help. Call [CDaoQueryDef::GetName](../../mfc/reference/cdaoquerydef-class.md#getname) to retrieve this property directly. *m_nType*
-A value that indicates the operational type of a querydef object. The value can be one of the following: +A value that indicates the operational type of a querydef object. The value can be one of: -- `dbQSelect` Select — the query selects records. +- `dbQSelect` Select: the query selects records. -- `dbQAction` Action — the query moves or changes data but does not return records. +- `dbQAction` Action: the query moves or changes data but doesn't return records. -- `dbQCrosstab` Crosstab — the query returns data in a spreadsheet-like format. +- `dbQCrosstab` Crosstab: the query returns data in a spreadsheet-like format. -- `dbQDelete` Delete — the query deletes a set of specified rows. +- `dbQDelete` Delete: the query deletes a set of specified rows. -- `dbQUpdate` Update — the query changes a set of records. +- `dbQUpdate` Update: the query changes a set of records. -- `dbQAppend` Append — the query adds new records to the end of a table or query. +- `dbQAppend` Append: the query adds new records to the end of a table or query. -- `dbQMakeTable` Make-table — the query creates a new table from a recordset. +- `dbQMakeTable` Make-table: the query creates a new table from a recordset. -- `dbQDDL` Data-definition — the query affects the structure of tables or their parts. +- `dbQDDL` Data-definition: the query affects the structure of tables or their parts. -- `dbQSQLPassThrough` Pass-through — the SQL statement is passed directly to the database backend, without intermediate processing. +- `dbQSQLPassThrough` Pass-through: the SQL statement is passed directly to the database backend, without intermediate processing. -- `dbQSetOperation` Union — the query creates a snapshot-type recordset object containing data from all specified records in two or more tables with any duplicate records removed. To include the duplicates, add the keyword **ALL** in the querydef's SQL statement. +- `dbQSetOperation` Union: the query creates a snapshot-type recordset object containing data from all specified records in two or more tables with any duplicate records removed. To include the duplicates, add the keyword **ALL** in the querydef's SQL statement. -- `dbQSPTBulk` Used with `dbQSQLPassThrough` to specify a query that does not return records. +- `dbQSPTBulk` Used with `dbQSQLPassThrough` to specify a query that doesn't return records. > [!NOTE] -> To create a SQL pass-through query, you do not set the `dbQSQLPassThrough` constant. This is set automatically by the Microsoft Jet database engine when you create a querydef object and set the Connect property. +> To create a SQL pass-through query, you do not set the `dbQSQLPassThrough` constant. This is set automatically by the Microsoft Jet database engine when you create a querydef object and set the `Connect` property. For more information, see the topic "Type Property" in DAO Help. *m_dateCreated*
-The date and time the querydef was created. To directly retrieve the date the querydef was created, call the [GetDateCreated](../../mfc/reference/cdaotabledef-class.md#getdatecreated) member function of the `CDaoTableDef` object associated with the table. See Comments below for more information. Also see the topic "DateCreated, LastUpdated Properties" in DAO Help. +The date and time the querydef was created. To directly retrieve the date the querydef was created, call the [GetDateCreated](../../mfc/reference/cdaotabledef-class.md#getdatecreated) member function of the `CDaoTableDef` object associated with the table. For more information, see [Remarks](#remarks). Also see the topic "DateCreated, LastUpdated Properties" in DAO Help. *m_dateLastUpdated*
-The date and time of the most recent change made to the querydef. To directly retrieve the date the table was last updated, call the [GetDateLastUpdated](../../mfc/reference/cdaoquerydef-class.md#getdatelastupdated) member function of the querydef. See Comments below for more information. And see the topic "DateCreated, LastUpdated Properties" in DAO Help. +The date and time of the most recent change made to the querydef. To directly retrieve the date the table was last updated, call the [GetDateLastUpdated](../../mfc/reference/cdaoquerydef-class.md#getdatelastupdated) member function of the querydef. For more information, see [Remarks](#remarks). Also see the topic "DateCreated, LastUpdated Properties" in DAO Help. *m_bUpdatable*
-Indicates whether changes can be made to a querydef object. If this property is TRUE, the querydef is updatable; otherwise, it is not. Updatable means the querydef object's query definition can be changed. The Updatable property of a querydef object is set to TRUE if the query definition can be updated, even if the resulting recordset is not updatable. To retrieve this property directly, call the querydef's [CanUpdate](../../mfc/reference/cdaoquerydef-class.md#canupdate) member function. For more information, see the topic "Updatable Property" in DAO Help. +Indicates whether changes can be made to a querydef object. If this property is TRUE, the querydef is updatable; otherwise, it isn't. Updatable means the querydef object's query definition can be changed. The Updatable property of a querydef object is set to TRUE if the query definition can be updated, even if the resulting recordset isn't updatable. To retrieve this property directly, call the querydef's [CanUpdate](../../mfc/reference/cdaoquerydef-class.md#canupdate) member function. For more information, see the topic "Updatable Property" in DAO Help. *m_bReturnsRecords*
Indicates whether a SQL pass-through query to an external database returns records. If this property is TRUE, the query returns records. To directly retrieve this property, call [CDaoQueryDef::GetReturnsRecords](../../mfc/reference/cdaoquerydef-class.md#getreturnsrecords). Not all SQL pass-through queries to external databases return records. For example, a SQL **UPDATE** statement updates records without returning records, while a SQL **SELECT** statement does return records. For more information, see the topic "ReturnsRecords Property" in DAO Help. @@ -81,21 +83,21 @@ The SQL statement that defines the query executed by a querydef object. The SQL Provides information about the source of a database used in a pass-through query. This information takes the form of a connect string. For more information about connect strings, and for information about retrieving the value of this property directly, see the [CDaoDatabase::GetConnect](../../mfc/reference/cdaodatabase-class.md#getconnect) member function. *m_nODBCTimeout*
-The number of seconds the Microsoft Jet database engine waits before a timeout error occurs when a query is run on an ODBC database. When you're using an ODBC database, such as Microsoft SQL Server, there may be delays because of network traffic or heavy use of the ODBC server. Rather than waiting indefinitely, you can specify how long the Microsoft Jet engine waits before it produces an error. The default timeout value is 60 seconds. You can retrieve the value of this property directly by calling the querydef's [GetODBCTimeout](../../mfc/reference/cdaoquerydef-class.md#getodbctimeout) member function. For more information, see the topic "ODBCTimeout Property" in DAO Help. +The number of seconds the Microsoft Jet database engine waits before a timeout error occurs when a query is run on an Open Database Connectivity (ODBC) database. When you're using an ODBC database, such as Microsoft SQL Server, there may be delays because of network traffic or heavy use of the ODBC server. Rather than waiting indefinitely, you can specify how long the Microsoft Jet engine waits before it produces an error. The default timeout value is 60 seconds. You can retrieve the value of this property directly by calling the querydef's [GetODBCTimeout](../../mfc/reference/cdaoquerydef-class.md#getodbctimeout) member function. For more information, see the topic "ODBCTimeout Property" in DAO Help. ## Remarks -The querydef is an object of class [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md). The references to Primary, Secondary, and All above indicate how the information is returned by the [GetQueryDefInfo](../../mfc/reference/cdaodatabase-class.md#getquerydefinfo) member function in class `CDaoDatabase`. +The querydef is an object of class [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md). The references to Primary, Secondary, and All indicate how the information is returned by the [GetQueryDefInfo](../../mfc/reference/cdaodatabase-class.md#getquerydefinfo) member function in class `CDaoDatabase`. -Information retrieved by the [CDaoDatabase::GetQueryDefInfo](../../mfc/reference/cdaodatabase-class.md#getquerydefinfo) member function is stored in a `CDaoQueryDefInfo` structure. Call `GetQueryDefInfo` for the database object in whose QueryDefs collection the querydef object is stored. `CDaoQueryDefInfo` also defines a `Dump` member function in debug builds. You can use `Dump` to dump the contents of a `CDaoQueryDefInfo` object. Class `CDaoDatabase` also supplies member functions for directly accessing all of the properties returned in a `CDaoQueryDefInfo` object, so you will probably seldom need to call `GetQueryDefInfo`. +Information retrieved by the [CDaoDatabase::GetQueryDefInfo](../../mfc/reference/cdaodatabase-class.md#getquerydefinfo) member function is stored in a `CDaoQueryDefInfo` structure. Call `GetQueryDefInfo` for the database object in whose QueryDefs collection the querydef object is stored. `CDaoQueryDefInfo` also defines a `Dump` member function in debug builds. You can use `Dump` to dump the contents of a `CDaoQueryDefInfo` object. Class `CDaoDatabase` also supplies member functions for directly accessing all of the properties returned in a `CDaoQueryDefInfo` object, so you seldom call `GetQueryDefInfo`. -When you append a new field or parameter object to the Fields or Parameters collection of a querydef object, an exception is thrown if the underlying database does not support the data type specified for the new object. +When you append a new field or parameter object to the Fields or Parameters collection of a querydef object, an exception is thrown if the underlying database doesn't support the data type specified for the new object. The date and time settings are derived from the computer on which the querydef was created or last updated. In a multiuser environment, users should get these settings directly from the file server using the **net time** command to avoid discrepancies in the DateCreated and LastUpdated property settings. ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaorecordset-class.md b/docs/mfc/reference/cdaorecordset-class.md index 1e04df6fb4..4525538078 100644 --- a/docs/mfc/reference/cdaorecordset-class.md +++ b/docs/mfc/reference/cdaorecordset-class.md @@ -1,15 +1,18 @@ --- -description: "Learn more about: CDaoRecordset Class" title: "CDaoRecordset Class" -ms.date: "08/27/2018" +description: "Learn more about: CDaoRecordset Class" +ms.date: 08/27/2018 f1_keywords: ["CDaoRecordset", "AFXDAO/CDaoRecordset", "AFXDAO/CDaoRecordset::CDaoRecordset", "AFXDAO/CDaoRecordset::AddNew", "AFXDAO/CDaoRecordset::CanAppend", "AFXDAO/CDaoRecordset::CanBookmark", "AFXDAO/CDaoRecordset::CancelUpdate", "AFXDAO/CDaoRecordset::CanRestart", "AFXDAO/CDaoRecordset::CanScroll", "AFXDAO/CDaoRecordset::CanTransact", "AFXDAO/CDaoRecordset::CanUpdate", "AFXDAO/CDaoRecordset::Close", "AFXDAO/CDaoRecordset::Delete", "AFXDAO/CDaoRecordset::DoFieldExchange", "AFXDAO/CDaoRecordset::Edit", "AFXDAO/CDaoRecordset::FillCache", "AFXDAO/CDaoRecordset::Find", "AFXDAO/CDaoRecordset::FindFirst", "AFXDAO/CDaoRecordset::FindLast", "AFXDAO/CDaoRecordset::FindNext", "AFXDAO/CDaoRecordset::FindPrev", "AFXDAO/CDaoRecordset::GetAbsolutePosition", "AFXDAO/CDaoRecordset::GetBookmark", "AFXDAO/CDaoRecordset::GetCacheSize", "AFXDAO/CDaoRecordset::GetCacheStart", "AFXDAO/CDaoRecordset::GetCurrentIndex", "AFXDAO/CDaoRecordset::GetDateCreated", "AFXDAO/CDaoRecordset::GetDateLastUpdated", "AFXDAO/CDaoRecordset::GetDefaultDBName", "AFXDAO/CDaoRecordset::GetDefaultSQL", "AFXDAO/CDaoRecordset::GetEditMode", "AFXDAO/CDaoRecordset::GetFieldCount", "AFXDAO/CDaoRecordset::GetFieldInfo", "AFXDAO/CDaoRecordset::GetFieldValue", "AFXDAO/CDaoRecordset::GetIndexCount", "AFXDAO/CDaoRecordset::GetIndexInfo", "AFXDAO/CDaoRecordset::GetLastModifiedBookmark", "AFXDAO/CDaoRecordset::GetLockingMode", "AFXDAO/CDaoRecordset::GetName", "AFXDAO/CDaoRecordset::GetParamValue", "AFXDAO/CDaoRecordset::GetPercentPosition", "AFXDAO/CDaoRecordset::GetRecordCount", "AFXDAO/CDaoRecordset::GetSQL", "AFXDAO/CDaoRecordset::GetType", "AFXDAO/CDaoRecordset::GetValidationRule", "AFXDAO/CDaoRecordset::GetValidationText", "AFXDAO/CDaoRecordset::IsBOF", "AFXDAO/CDaoRecordset::IsDeleted", "AFXDAO/CDaoRecordset::IsEOF", "AFXDAO/CDaoRecordset::IsFieldDirty", "AFXDAO/CDaoRecordset::IsFieldNull", "AFXDAO/CDaoRecordset::IsFieldNullable", "AFXDAO/CDaoRecordset::IsOpen", "AFXDAO/CDaoRecordset::Move", "AFXDAO/CDaoRecordset::MoveFirst", "AFXDAO/CDaoRecordset::MoveLast", "AFXDAO/CDaoRecordset::MoveNext", "AFXDAO/CDaoRecordset::MovePrev", "AFXDAO/CDaoRecordset::Open", "AFXDAO/CDaoRecordset::Requery", "AFXDAO/CDaoRecordset::Seek", "AFXDAO/CDaoRecordset::SetAbsolutePosition", "AFXDAO/CDaoRecordset::SetBookmark", "AFXDAO/CDaoRecordset::SetCacheSize", "AFXDAO/CDaoRecordset::SetCacheStart", "AFXDAO/CDaoRecordset::SetCurrentIndex", "AFXDAO/CDaoRecordset::SetFieldDirty", "AFXDAO/CDaoRecordset::SetFieldNull", "AFXDAO/CDaoRecordset::SetFieldValue", "AFXDAO/CDaoRecordset::SetFieldValueNull", "AFXDAO/CDaoRecordset::SetLockingMode", "AFXDAO/CDaoRecordset::SetParamValue", "AFXDAO/CDaoRecordset::SetParamValueNull", "AFXDAO/CDaoRecordset::SetPercentPosition", "AFXDAO/CDaoRecordset::Update", "AFXDAO/CDaoRecordset::m_bCheckCacheForDirtyFields", "AFXDAO/CDaoRecordset::m_nFields", "AFXDAO/CDaoRecordset::m_nParams", "AFXDAO/CDaoRecordset::m_pDAORecordset", "AFXDAO/CDaoRecordset::m_pDatabase", "AFXDAO/CDaoRecordset::m_strFilter", "AFXDAO/CDaoRecordset::m_strSort"] helpviewer_keywords: ["CDaoRecordset [MFC], CDaoRecordset", "CDaoRecordset [MFC], AddNew", "CDaoRecordset [MFC], CanAppend", "CDaoRecordset [MFC], CanBookmark", "CDaoRecordset [MFC], CancelUpdate", "CDaoRecordset [MFC], CanRestart", "CDaoRecordset [MFC], CanScroll", "CDaoRecordset [MFC], CanTransact", "CDaoRecordset [MFC], CanUpdate", "CDaoRecordset [MFC], Close", "CDaoRecordset [MFC], Delete", "CDaoRecordset [MFC], DoFieldExchange", "CDaoRecordset [MFC], Edit", "CDaoRecordset [MFC], FillCache", "CDaoRecordset [MFC], Find", "CDaoRecordset [MFC], FindFirst", "CDaoRecordset [MFC], FindLast", "CDaoRecordset [MFC], FindNext", "CDaoRecordset [MFC], FindPrev", "CDaoRecordset [MFC], GetAbsolutePosition", "CDaoRecordset [MFC], GetBookmark", "CDaoRecordset [MFC], GetCacheSize", "CDaoRecordset [MFC], GetCacheStart", "CDaoRecordset [MFC], GetCurrentIndex", "CDaoRecordset [MFC], GetDateCreated", "CDaoRecordset [MFC], GetDateLastUpdated", "CDaoRecordset [MFC], GetDefaultDBName", "CDaoRecordset [MFC], GetDefaultSQL", "CDaoRecordset [MFC], GetEditMode", "CDaoRecordset [MFC], GetFieldCount", "CDaoRecordset [MFC], GetFieldInfo", "CDaoRecordset [MFC], GetFieldValue", "CDaoRecordset [MFC], GetIndexCount", "CDaoRecordset [MFC], GetIndexInfo", "CDaoRecordset [MFC], GetLastModifiedBookmark", "CDaoRecordset [MFC], GetLockingMode", "CDaoRecordset [MFC], GetName", "CDaoRecordset [MFC], GetParamValue", "CDaoRecordset [MFC], GetPercentPosition", "CDaoRecordset [MFC], GetRecordCount", "CDaoRecordset [MFC], GetSQL", "CDaoRecordset [MFC], GetType", "CDaoRecordset [MFC], GetValidationRule", "CDaoRecordset [MFC], GetValidationText", "CDaoRecordset [MFC], IsBOF", "CDaoRecordset [MFC], IsDeleted", "CDaoRecordset [MFC], IsEOF", "CDaoRecordset [MFC], IsFieldDirty", "CDaoRecordset [MFC], IsFieldNull", "CDaoRecordset [MFC], IsFieldNullable", "CDaoRecordset [MFC], IsOpen", "CDaoRecordset [MFC], Move", "CDaoRecordset [MFC], MoveFirst", "CDaoRecordset [MFC], MoveLast", "CDaoRecordset [MFC], MoveNext", "CDaoRecordset [MFC], MovePrev", "CDaoRecordset [MFC], Open", "CDaoRecordset [MFC], Requery", "CDaoRecordset [MFC], Seek", "CDaoRecordset [MFC], SetAbsolutePosition", "CDaoRecordset [MFC], SetBookmark", "CDaoRecordset [MFC], SetCacheSize", "CDaoRecordset [MFC], SetCacheStart", "CDaoRecordset [MFC], SetCurrentIndex", "CDaoRecordset [MFC], SetFieldDirty", "CDaoRecordset [MFC], SetFieldNull", "CDaoRecordset [MFC], SetFieldValue", "CDaoRecordset [MFC], SetFieldValueNull", "CDaoRecordset [MFC], SetLockingMode", "CDaoRecordset [MFC], SetParamValue", "CDaoRecordset [MFC], SetParamValueNull", "CDaoRecordset [MFC], SetPercentPosition", "CDaoRecordset [MFC], Update", "CDaoRecordset [MFC], m_bCheckCacheForDirtyFields", "CDaoRecordset [MFC], m_nFields", "CDaoRecordset [MFC], m_nParams", "CDaoRecordset [MFC], m_pDAORecordset", "CDaoRecordset [MFC], m_pDatabase", "CDaoRecordset [MFC], m_strFilter", "CDaoRecordset [MFC], m_strSort"] -ms.assetid: 2322067f-1027-4662-a5d7-aa2fc7488630 --- # CDaoRecordset Class Represents a set of records selected from a data source. +> [!NOTE] +> Data Access Object (DAO) is supported through Office 2013. DAO 3.6 is the final version, and is obsolete. + + ## Syntax ```cpp @@ -69,11 +72,11 @@ class CDaoRecordset : public CObject |[CDaoRecordset::GetRecordCount](#getrecordcount)|Returns the number of records accessed in a recordset object.| |[CDaoRecordset::GetSQL](#getsql)|Gets the SQL string used to select records for the recordset.| |[CDaoRecordset::GetType](#gettype)|Called to determine the type of a recordset: table-type, dynaset-type, or snapshot-type.| -|[CDaoRecordset::GetValidationRule](#getvalidationrule)|Returns a `CString` containing the value that validates data as it is entered into a field.| -|[CDaoRecordset::GetValidationText](#getvalidationtext)|Retrieves the text that is displayed when a validation rule is not satisfied.| -|[CDaoRecordset::IsBOF](#isbof)|Returns nonzero if the recordset has been positioned before the first record. There is no current record.| +|[CDaoRecordset::GetValidationRule](#getvalidationrule)|Returns a `CString` containing the value that validates data as it's entered into a field.| +|[CDaoRecordset::GetValidationText](#getvalidationtext)|Retrieves the text that is displayed when a validation rule isn't satisfied.| +|[CDaoRecordset::IsBOF](#isbof)|Returns nonzero if the recordset has been positioned before the first record. There's no current record.| |[CDaoRecordset::IsDeleted](#isdeleted)|Returns nonzero if the recordset is positioned on a deleted record.| -|[CDaoRecordset::IsEOF](#iseof)|Returns nonzero if the recordset has been positioned after the last record. There is no current record.| +|[CDaoRecordset::IsEOF](#iseof)|Returns nonzero if the recordset has been positioned after the last record. There's no current record.| |[CDaoRecordset::IsFieldDirty](#isfielddirty)|Returns nonzero if the specified field in the current record has been changed.| |[CDaoRecordset::IsFieldNull](#isfieldnull)|Returns nonzero if the specified field in the current record is Null (having no value).| |[CDaoRecordset::IsFieldNullable](#isfieldnullable)|Returns nonzero if the specified field in the current record can be set to Null (having no value).| @@ -107,7 +110,7 @@ class CDaoRecordset : public CObject |----------|-----------------| |[CDaoRecordset::m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields)|Contains a flag indicating whether fields are automatically marked as changed.| |[CDaoRecordset::m_nFields](#m_nfields)|Contains the number of field data members in the recordset class and the number of columns selected by the recordset from the data source.| -|[CDaoRecordset::m_nParams](#m_nparams)|Contains the number of parameter data members in the recordset class — the number of parameters passed with the recordset's query| +|[CDaoRecordset::m_nParams](#m_nparams)|Contains the number of parameter data members in the recordset class—the number of parameters passed with the recordset's query| |[CDaoRecordset::m_pDAORecordset](#m_pdaorecordset)|A pointer to the DAO interface underlying the recordset object.| |[CDaoRecordset::m_pDatabase](#m_pdatabase)|Source database for this result set. Contains a pointer to a [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object.| |[CDaoRecordset::m_strFilter](#m_strfilter)|Contains a string used to construct a SQL **WHERE** statement.| @@ -121,9 +124,9 @@ Known as "recordsets," `CDaoRecordset` objects are available in the following th - Dynaset-type recordsets are the result of a query that can have updateable records. These recordsets are a set of records that you can use to examine, add, change, or delete records from an underlying database table or tables. Dynaset-type recordsets can contain fields from one or more tables in a database. -- Snapshot-type recordsets are a static copy of a set of records that you can use to find data or generate reports. These recordsets can contain fields from one or more tables in a database but cannot be updated. +- Snapshot-type recordsets are a static copy of a set of records that you can use to find data or generate reports. These recordsets can contain fields from one or more tables in a database but can't be updated. -Each form of recordset represents a set of records fixed at the time the recordset is opened. When you scroll to a record in a table-type recordset or a dynaset-type recordset, it reflects changes made to the record after the recordset is opened, either by other users or by other recordsets in your application. (A snapshot-type recordset cannot be updated.) You can use `CDaoRecordset` directly or derive an application-specific recordset class from `CDaoRecordset`. You can then: +Each form of recordset represents a set of records fixed at the time the recordset is opened. When you scroll to a record in a table-type recordset or a dynaset-type recordset, it reflects changes made to the record after the recordset is opened, either by other users or by other recordsets in your application. (A snapshot-type recordset can't be updated.) You can use `CDaoRecordset` directly or derive an application-specific recordset class from `CDaoRecordset`. You can then: - Scroll through the records. @@ -146,7 +149,7 @@ Class `CDaoRecordset` supplies an interface similar to that of class `CRecordset You can either use `CDaoRecordset` directly or derive a class from `CDaoRecordset`. To use a recordset class in either case, open a database and construct a recordset object, passing the constructor a pointer to your `CDaoDatabase` object. You can also construct a `CDaoRecordset` object and let MFC create a temporary `CDaoDatabase` object for you. Then call the recordset's [Open](#open) member function, specifying whether the object is a table-type recordset, a dynaset-type recordset, or a snapshot-type recordset. Calling `Open` selects data from the database and retrieves the first record. -Use the object's member functions and data members to scroll through the records and operate on them. The operations available depend on whether the object is a table-type recordset, a dynaset-type recordset, or a snapshot-type recordset, and whether it is updateable or read-only — this depends on the capability of the database or Open Database Connectivity (ODBC) data source. To refresh records that may have been changed or added since the `Open` call, call the object's [Requery](#requery) member function. Call the object's `Close` member function and destroy the object when you finish with it. +Use the object's member functions and data members to scroll through the records and operate on them. The operations available depend on whether the object is a table-type recordset, a dynaset-type recordset, or a snapshot-type recordset, and whether it's updateable or read-only — this depends on the capability of the database or Open Database Connectivity (ODBC) data source. To refresh records that may have been changed or added since the `Open` call, call the object's [Requery](#requery) member function. Call the object's `Close` member function and destroy the object when you finish with it. `CDaoRecordset` uses DAO record field exchange (DFX) to support reading and updating of record fields through type-safe C++ members of your `CDaoRecordset` or `CDaoRecordset`-derived class. You can also implement dynamic binding of columns in a database without using the DFX mechanism using [GetFieldValue](#getfieldvalue) and [SetFieldValue](#setfieldvalue). @@ -160,7 +163,7 @@ For related information, see the topic "Recordset Object" in DAO Help. ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoRecordset::AddNew @@ -172,7 +175,7 @@ virtual void AddNew(); ### Remarks -The record's fields are initially Null. (In database terminology, Null means "having no value" and is not the same as NULL in C++.) To complete the operation, you must call the [Update](#update) member function. `Update` saves your changes to the data source. +The record's fields are initially Null. (In database terminology, Null means "having no value" and isn't the same as NULL in C++.) To complete the operation, you must call the [Update](#update) member function. `Update` saves your changes to the data source. > [!CAUTION] > If you edit a record and then scroll to another record without calling `Update`, your changes are lost without warning. @@ -181,7 +184,7 @@ If you add a record to a dynaset-type recordset by calling [AddNew](#addnew), th The position of the new record depends on the type of recordset: -- In a dynaset-type recordset, where the new record is inserted is not guaranteed. This behavior changed with Microsoft Jet 3.0 for reasons of performance and concurrency. If your goal is to make the newly added record the current record, get the bookmark of the last modified record and move to that bookmark: +- In a dynaset-type recordset, where the new record is inserted isn't guaranteed. This behavior changed with Microsoft Jet 3.0 for reasons of performance and concurrency. If your goal is to make the newly added record the current record, get the bookmark of the last modified record and move to that bookmark: [!code-cpp[NVC_MFCDatabase#1](../../mfc/codesnippet/cpp/cdaorecordset-class_1.cpp)] @@ -189,13 +192,13 @@ The position of the new record depends on the type of recordset: The record that was current before you used `AddNew` remains current. If you want to make the new record current and the recordset supports bookmarks, call [SetBookmark](#setbookmark) to the bookmark identified by the LastModified property setting of the underlying DAO recordset object. Doing so is useful for determining the value for counter (auto-increment) fields in an added record. For more information, see [GetLastModifiedBookmark](#getlastmodifiedbookmark). -If the database supports transactions, you can make your `AddNew` call part of a transaction. For more information about transactions, see class [CDaoWorkspace](../../mfc/reference/cdaoworkspace-class.md). Note that you should call [CDaoWorkspace::BeginTrans](../../mfc/reference/cdaoworkspace-class.md#begintrans) before calling `AddNew`. +If the database supports transactions, you can make your `AddNew` call part of a transaction. For more information about transactions, see class [CDaoWorkspace](../../mfc/reference/cdaoworkspace-class.md). You should call [CDaoWorkspace::BeginTrans](../../mfc/reference/cdaoworkspace-class.md#begintrans) before calling `AddNew`. -It is illegal to call `AddNew` for a recordset whose [Open](#open) member function has not been called. A `CDaoException` is thrown if you call `AddNew` for a recordset that cannot be appended. You can determine whether the recordset is updateable by calling [CanAppend](#canappend). +It's illegal to call `AddNew` for a recordset whose [`Open`](#open) member function hasn't been called. A `CDaoException` is thrown if you call `AddNew` for a recordset that can't be appended. You can determine whether the recordset is updateable by calling [CanAppend](#canappend). -The framework marks changed field data members to ensure they will be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you will seldom need to call [SetFieldDirty](#setfielddirty) yourself, but you might sometimes want to ensure that columns will be explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of **PSEUDO NULL**. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). +The framework marks changed field data members to ensure they'll be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you'll seldom need to call [SetFieldDirty](#setfielddirty) yourself, but you might sometimes want to ensure that columns are explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of **PSEUDO NULL**. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). -If the double-buffering mechanism is not being used, then changing the value of the field does not automatically set the field as dirty. In this case, it will be necessary to explicitly set the field dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. +If the double-buffering mechanism isn't being used, then changing the value of the field doesn't automatically set the field as dirty. In this case, it's necessary to explicitly set the field dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. > [!NOTE] > If records are double-buffered (that is, automatic field checking is enabled), calling `CancelUpdate` will restore the member variables to the values they had before `AddNew` or `Edit` was called. @@ -212,7 +215,7 @@ BOOL CanAppend() const; ### Return Value -Nonzero if the recordset allows adding new records; otherwise 0. `CanAppend` will return 0 if you opened the recordset as read-only. +Nonzero if the recordset allows adding new records; otherwise 0. `CanAppend` returns 0 if you opened the recordset as read-only. ### Remarks @@ -232,7 +235,7 @@ Nonzero if the recordset supports bookmarks, otherwise 0. ### Remarks -If you are using recordsets based entirely on Microsoft Jet database engine tables, bookmarks can be used except on snapshot-type recordsets flagged as forward-only scrolling recordsets. Other database products (external ODBC data sources) may not support bookmarks. +If you're using recordsets based entirely on Microsoft Jet database engine tables, bookmarks can be used except on snapshot-type recordsets flagged as forward-only scrolling recordsets. Other database products (external ODBC data sources) may not support bookmarks. For related information, see the topic "Bookmarkable Property" in DAO Help. @@ -246,12 +249,12 @@ virtual void CancelUpdate(); ### Remarks -For example, if an application calls the `Edit` or `AddNew` member function and has not called [Update](#update), `CancelUpdate` cancels any changes made after `Edit` or `AddNew` was called. +For example, if an application calls the `Edit` or `AddNew` member function and hasn't called [`Update`](#update), `CancelUpdate` cancels any changes made after `Edit` or `AddNew` was called. > [!NOTE] > If records are double-buffered (that is, automatic field checking is enabled), calling `CancelUpdate` will restore the member variables to the values they had before `AddNew` or `Edit` was called. -If there is no `Edit` or `AddNew` operation pending, `CancelUpdate` causes MFC to throw an exception. Call the [GetEditMode](#geteditmode) member function to determine if there is a pending operation that can be canceled. +If there's no `Edit` or `AddNew` operation pending, `CancelUpdate` causes MFC to throw an exception. Call the [GetEditMode](#geteditmode) member function to determine if there's a pending operation that can be canceled. For related information, see the topic "CancelUpdate Method" in DAO Help. @@ -269,9 +272,9 @@ Nonzero if `Requery` can be called to run the recordset's query again, otherwise ### Remarks -Table-type recordsets do not support `Requery`. +Table-type recordsets don't support `Requery`. -If `Requery` is not supported, call [Close](#close) then [Open](#open) to refresh the data. You can call `Requery` to update a recordset object's underlying parameter query after the parameter values have been changed. +If `Requery` isn't supported, call [Close](#close) then [Open](#open) to refresh the data. You can call `Requery` to update a recordset object's underlying parameter query after the parameter values have been changed. For related information, see the topic "Restartable Property" in DAO Help. @@ -338,7 +341,7 @@ CDaoRecordset(CDaoDatabase* pDatabase = NULL); ### Parameters *pDatabase*
-Contains a pointer to a [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object or the value NULL. If not NULL and the `CDaoDatabase` object's `Open` member function has not been called to connect it to the data source, the recordset attempts to open it for you during its own [Open](#open) call. If you pass NULL, a `CDaoDatabase` object is constructed and connected for you using the data source information you specified if you derived your recordset class from `CDaoRecordset`. +Contains a pointer to a [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object or the value NULL. If not NULL and the `CDaoDatabase` object's `Open` member function hasn't been called to connect it to the data source, the recordset attempts to open it for you during its own [Open](#open) call. If you pass NULL, a `CDaoDatabase` object is constructed and connected for you using the data source information you specified if you derived your recordset class from `CDaoRecordset`. ### Remarks @@ -347,7 +350,7 @@ You can either use `CDaoRecordset` directly or derive an application-specific cl > [!NOTE] > If you derive a `CDaoRecordset` class, your derived class must supply its own constructor. In the constructor of your derived class, call the constructor `CDaoRecordset::CDaoRecordset`, passing the appropriate parameters along to it. -Pass NULL to your recordset constructor to have a `CDaoDatabase` object constructed and connected for you automatically. This is a useful shortcut that does not require you to construct and connect a `CDaoDatabase` object prior to constructing your recordset. If the `CDaoDatabase` object is not open, a [CDaoWorkspace](../../mfc/reference/cdaoworkspace-class.md) object will also be created for you that uses the default workspace. For more information, see [CDaoDatabase::CDaoDatabase](../../mfc/reference/cdaodatabase-class.md#cdaodatabase). +Pass NULL to your recordset constructor to have a `CDaoDatabase` object constructed and connected for you automatically. This is a useful shortcut that doesn't require you to construct and connect a `CDaoDatabase` object prior to constructing your recordset. If the `CDaoDatabase` object isn't open, a [CDaoWorkspace](../../mfc/reference/cdaoworkspace-class.md) object will also be created for you that uses the default workspace. For more information, see [CDaoDatabase::CDaoDatabase](../../mfc/reference/cdaodatabase-class.md#cdaodatabase). ## CDaoRecordset::Close @@ -359,7 +362,7 @@ virtual void Close(); ### Remarks -Because `Close` does not destroy the `CDaoRecordset` object, you can reuse the object by calling `Open` on the same data source or a different data source. +Because `Close` doesn't destroy the `CDaoRecordset` object, you can reuse the object by calling `Open` on the same data source or a different data source. All pending [AddNew](#addnew) or [Edit](#edit) statements are canceled, and all pending transactions are rolled back. If you want to preserve pending additions or edits, call [Update](#update) before you call `Close` for each recordset. @@ -379,14 +382,14 @@ virtual void Delete(); After a successful deletion, the recordset's field data members are set to a Null value, and you must explicitly call one of the recordset navigation member functions ( [Move](#move), [Seek](#seek), [SetBookmark](#setbookmark), and so on) in order to move off the deleted record. When you delete records from a recordset, there must be a current record in the recordset before you call `Delete`; otherwise, MFC throws an exception. -`Delete` removes the current record and makes it inaccessible. Although you cannot edit or use the deleted record, it remains current. Once you move to another record, however, you cannot make the deleted record current again. +`Delete` removes the current record and makes it inaccessible. Although you can't edit or use the deleted record, it remains current. Once you move to another record, however, you can't make the deleted record current again. > [!CAUTION] -> The recordset must be updatable and there must be a valid record current in the recordset when you call `Delete`. For example, if you delete a record but do not scroll to a new record before you call `Delete` again, `Delete` throws a [CDaoException](../../mfc/reference/cdaoexception-class.md). +> The recordset must be updatable and there must be a valid record current in the recordset when you call `Delete`. For example, if you delete a record but don't scroll to a new record before you call `Delete` again, `Delete` throws a [CDaoException](../../mfc/reference/cdaoexception-class.md). You can undelete a record if you use transactions and you call the [CDaoWorkspace::Rollback](../../mfc/reference/cdaoworkspace-class.md#rollback) member function. If the base table is the primary table in a cascade delete relationship, deleting the current record may also delete one or more records in a foreign table. For more information, see the definition "cascade delete" in DAO Help. -Unlike `AddNew` and `Edit`, a call to `Delete` is not followed by a call to `Update`. +Unlike `AddNew` and `Edit`, a call to `Delete` isn't followed by a call to `Update`. For related information, see the topics "AddNew Method", "Edit Method", "Delete Method", "Update Method", and "Updatable Property" in DAO Help. @@ -405,9 +408,9 @@ Contains a pointer to a `CDaoFieldExchange` object. The framework will already h ### Remarks -It also binds your parameter data members, if any, to parameter placeholders in the SQL statement string for the recordset's selection. The exchange of field data, called DAO record field exchange (DFX), works in both directions: from the recordset object's field data members to the fields of the record on the data source, and from the record on the data source to the recordset object. If you are binding columns dynamically, you are not required to implement `DoFieldExchange`. +It also binds your parameter data members, if any, to parameter placeholders in the SQL statement string for the recordset's selection. The exchange of field data, called DAO record field exchange (DFX), works in both directions: from the recordset object's field data members to the fields of the record on the data source, and from the record on the data source to the recordset object. If you're binding columns dynamically, you're not required to implement `DoFieldExchange`. -The only action you must normally take to implement `DoFieldExchange` for your derived recordset class is to create the class with ClassWizard and specify the names and data types of the field data members. You might also add code to what ClassWizard writes to specify parameter data members. If all fields are to be bound dynamically, this function will be inactive unless you specify parameter data members. +The only action you must normally take to implement `DoFieldExchange` for your derived recordset class is to create the class with ClassWizard and specify the names and data types of the field data members. You might also add code to what ClassWizard writes to specify parameter data members. If all fields are to be bound dynamically, this function is inactive unless you specify parameter data members. When you declare your derived recordset class with ClassWizard, the wizard writes an override of `DoFieldExchange` for you, which resembles the following example: @@ -428,20 +431,20 @@ Once you call the `Edit` member function, changes made to the current record's f > [!CAUTION] > If you edit a record and then perform any operation that moves to another record without first calling `Update`, your changes are lost without warning. In addition, if you close the recordset or the parent database, your edited record is discarded without warning. -In some cases, you may want to update a column by making it Null (containing no data). To do so, call `SetFieldNull` with a parameter of TRUE to mark the field Null; this also causes the column to be updated. If you want a field to be written to the data source even though its value has not changed, call `SetFieldDirty` with a parameter of TRUE. This works even if the field had the value Null. +In some cases, you may want to update a column by making it Null (containing no data). To do so, call `SetFieldNull` with a parameter of TRUE to mark the field Null; this also causes the column to be updated. If you want a field to be written to the data source even though its value hasn't changed, call `SetFieldDirty` with a parameter of TRUE. This works even if the field had the value Null. -The framework marks changed field data members to ensure they will be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you will seldom need to call [SetFieldDirty](#setfielddirty) yourself, but you might sometimes want to ensure that columns will be explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of **PSEUDO NULL**. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). +The framework marks changed field data members to ensure they'll be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you'll seldom need to call [SetFieldDirty](#setfielddirty) yourself, but you might sometimes want to ensure that columns are explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of **PSEUDO NULL**. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). -If the double-buffering mechanism is not being used, then changing the value of the field does not automatically set the field as dirty. In this case, it will be necessary to explicitly set the field dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. +If the double-buffering mechanism isn't being used, then changing the value of the field doesn't automatically set the field as dirty. In this case, it's necessary to explicitly set the field dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. -When the recordset object is pessimistically locked in a multiuser environment, the record remains locked from the time `Edit` is used until the updating is complete. If the recordset is optimistically locked, the record is locked and compared with the pre-edited record just before it is updated in the database. If the record has changed since you called `Edit`, the `Update` operation fails and MFC throws an exception. You can change the locking mode with `SetLockingMode`. +When the recordset object is pessimistically locked in a multiuser environment, the record remains locked from the time `Edit` is used until the updating is complete. If the recordset is optimistically locked, the record is locked and compared with the pre-edited record just before it's updated in the database. If the record has changed since you called `Edit`, the `Update` operation fails and MFC throws an exception. You can change the locking mode with `SetLockingMode`. > [!NOTE] > Optimistic locking is always used on external database formats, such as ODBC and installable ISAM. -The current record remains current after you call `Edit`. To call `Edit`, there must be a current record. If there is no current record or if the recordset does not refer to an open table-type or dynaset-type recordset object, an exception occurs. Calling `Edit` causes a `CDaoException` to be thrown under the following conditions: +The current record remains current after you call `Edit`. To call `Edit`, there must be a current record. If there's no current record or if the recordset doesn't refer to an open table-type or dynaset-type recordset object, an exception occurs. Calling `Edit` causes a `CDaoException` to be thrown under the following conditions: -- There is no current record. +- There's no current record. - The database or recordset is read-only. @@ -451,7 +454,7 @@ The current record remains current after you call `Edit`. To call `Edit`, there - Another user has locked the page containing your record. -If the data source supports transactions, you can make the `Edit` call part of a transaction. Note that you should call `CDaoWorkspace::BeginTrans` before calling `Edit` and after the recordset has been opened. Also note that calling `CDaoWorkspace::CommitTrans` is not a substitute for calling `Update` to complete the `Edit` operation. For more information about transactions, see class `CDaoWorkspace`. +If the data source supports transactions, you can make the `Edit` call part of a transaction. You should call `CDaoWorkspace::BeginTrans` before calling `Edit` and after the recordset has been opened. Calling `CDaoWorkspace::CommitTrans` isn't a substitute for calling `Update` to complete the `Edit` operation. For more information about transactions, see class `CDaoWorkspace`. For related information, see the topics "AddNew Method", "Edit Method", "Delete Method", "Update Method", and "Updatable Property" in DAO Help. @@ -475,13 +478,13 @@ A [COleVariant](../../mfc/reference/colevariant-class.md) specifying a bookmark. ### Remarks -Caching improves the performance of an application that retrieves, or fetches, data from a remote server. A cache is space in local memory that holds the data most recently fetched from the server on the assumption that the data will probably be requested again while the application is running. When data is requested, the Microsoft Jet database engine checks the cache for the data first rather than fetching it from the server, which takes more time. Using data caching on non-ODBC data sources has no effect as the data is not saved in the cache. +Caching improves the performance of an application that retrieves, or fetches, data from a remote server. A cache is space in local memory that holds the data most recently fetched from the server on the assumption that the data will probably be requested again while the application is running. When data is requested, the Microsoft Jet database engine checks the cache for the data first rather than fetching it from the server, which takes more time. Using data caching on non-ODBC data sources has no effect as the data isn't saved in the cache. Rather than waiting for the cache to be filled with records as they are fetched, you can explicitly fill the cache at any time by calling the `FillCache` member function. This is a faster way to fill the cache because `FillCache` fetches several records at once instead of one at a time. For example, while each screenful of records is being displayed, you can have your application call `FillCache` to fetch the next screenful of records. -Any ODBC database accessed with recordset objects can have a local cache. To create the cache, open a recordset object from the remote data source, and then call the `SetCacheSize` and `SetCacheStart` member functions of the recordset. If *lSize* and *lBookmark* create a range that is partly or wholly outside the range specified by `SetCacheSize` and `SetCacheStart`, the portion of the recordset outside this range is ignored and is not loaded into the cache. If `FillCache` requests more records than remain in the remote data source, only the remaining records are fetched, and no exception is thrown. +Any ODBC database accessed with recordset objects can have a local cache. To create the cache, open a recordset object from the remote data source, and then call the `SetCacheSize` and `SetCacheStart` member functions of the recordset. If *lSize* and *lBookmark* create a range that is partly or wholly outside the range specified by `SetCacheSize` and `SetCacheStart`, the portion of the recordset outside this range is ignored and isn't loaded into the cache. If `FillCache` requests more records than remain in the remote data source, only the remaining records are fetched, and no exception is thrown. -Records fetched from the cache do not reflect changes made concurrently to the source data by other users. +Records fetched from the cache don't reflect changes made concurrently to the source data by other users. `FillCache` fetches only records not already cached. To force an update of all the cached data, call the `SetCacheSize` member function with an *lSize* parameter equal to 0, call `SetCacheSize` again with the *lSize* parameter equal to the size of the cache you originally requested, and then call `FillCache`. @@ -526,7 +529,7 @@ You can find the first, next, previous, or last instance of the string. `Find` i To locate a record in a table-type recordset, call the [Seek](#seek) member function. > [!TIP] -> The smaller the set of records you have, the more effective `Find` will be. In general, and especially with ODBC data, it is better to create a new query that retrieves just the records you want. +> The smaller the set of records you have, the more effective `Find` is. In general, and especially with ODBC data, it's better to create a new query that retrieves just the records you want. For related information, see the topic "FindFirst, FindLast, FindNext, FindPrevious Methods" in DAO Help. @@ -553,7 +556,7 @@ The `FindFirst` member function begins its search from the beginning of the reco If you want to include all the records in your search (not just those that meet a specific condition) use one of the Move operations to move from record to record. To locate a record in a table-type recordset, call the `Seek` member function. -If a record matching the criteria is not located, the current record pointer is undetermined, and `FindFirst` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. +If a record matching the criteria isn't located, the current record pointer is undetermined, and `FindFirst` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. > [!CAUTION] > If you edit the current record, be sure to save the changes by calling the `Update` member function before you move to another record. If you move to another record without updating, your changes are lost without warning. @@ -568,17 +571,17 @@ The `Find` member functions search from the location and in the direction specif |`FindPrevious`|Current record|Beginning of recordset| > [!NOTE] -> When you call `FindLast`, the Microsoft Jet database engine fully populates your recordset before beginning the search, if this has not already been done. The first search may take longer than subsequent searches. +> When you call `FindLast`, the Microsoft Jet database engine fully populates your recordset before beginning the search, if this hasn't already been done. The first search may take longer than subsequent searches. -Using one of the Find operations is not the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. +Using one of the Find operations isn't the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. Keep the following in mind when using the Find operations: -- If `Find` returns nonzero, the current record is not defined. In this case, you must position the current record pointer back to a valid record. +- If `Find` returns nonzero, the current record isn't defined. In this case, you must position the current record pointer back to a valid record. -- You cannot use a Find operation with a forward-only scrolling snapshot-type recordset. +- You can't use a Find operation with a forward-only scrolling snapshot-type recordset. -- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you are not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. +- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you're not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. - When working with ODBC databases and large dynasets, you may discover that using the Find operations is slow, especially when working with large recordsets. You can improve performance by using SQL queries with customized **ORDERBY** or **WHERE** clauses, parameter queries, or `CDaoQuerydef` objects that retrieve specific indexed records. @@ -607,20 +610,20 @@ The `FindLast` member function begins its search at the end of the recordset and If you want to include all the records in your search (not just those that meet a specific condition) use one of the Move operations to move from record to record. To locate a record in a table-type recordset, call the `Seek` member function. -If a record matching the criteria is not located, the current record pointer is undetermined, and `FindLast` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence after the first occurrence, and so on. +If a record matching the criteria isn't located, the current record pointer is undetermined, and `FindLast` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence after the first occurrence, and so on. > [!CAUTION] > If you edit the current record, be sure you save the changes by calling the `Update` member function before you move to another record. If you move to another record without updating, your changes are lost without warning. -Using one of the Find operations is not the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. +Using one of the Find operations isn't the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. Keep the following in mind when using the Find operations: -- If `Find` returns nonzero, the current record is not defined. In this case, you must position the current record pointer back to a valid record. +- If `Find` returns nonzero, the current record isn't defined. In this case, you must position the current record pointer back to a valid record. -- You cannot use a Find operation with a forward-only scrolling snapshot-type recordset. +- You can't use a Find operation with a forward-only scrolling snapshot-type recordset. -- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you are not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. +- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you're not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. - When working with ODBC databases and large dynasets, you may discover that using the Find operations is slow, especially when working with large recordsets. You can improve performance by using SQL queries with customized **ORDERBY** or **WHERE** clauses, parameter queries, or `CDaoQuerydef` objects that retrieve specific indexed records. @@ -649,20 +652,20 @@ The `FindNext` member function begins its search at the current record and searc If you want to include all the records in your search (not just those that meet a specific condition) use one of the Move operations to move from record to record. To locate a record in a table-type recordset, call the `Seek` member function. -If a record matching the criteria is not located, the current record pointer is undetermined, and `FindNext` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. +If a record matching the criteria isn't located, the current record pointer is undetermined, and `FindNext` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. > [!CAUTION] > If you edit the current record, be sure you save the changes by calling the `Update` member function before you move to another record. If you move to another record without updating, your changes are lost without warning. -Using one of the Find operations is not the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. +Using one of the Find operations isn't the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. Keep the following in mind when using the Find operations: -- If `Find` returns nonzero, the current record is not defined. In this case, you must position the current record pointer back to a valid record. +- If `Find` returns nonzero, the current record isn't defined. In this case, you must position the current record pointer back to a valid record. -- You cannot use a Find operation with a forward-only scrolling snapshot-type recordset. +- You can't use a Find operation with a forward-only scrolling snapshot-type recordset. -- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you are not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. +- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you're not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. - When working with ODBC databases and large dynasets, you may discover that using the Find operations is slow, especially when working with large recordsets. You can improve performance by using SQL queries with customized **ORDERBY** or **WHERE** clauses, parameter queries, or `CDaoQuerydef` objects that retrieve specific indexed records. @@ -691,20 +694,20 @@ The `FindPrev` member function begins its search at the current record and searc If you want to include all the records in your search (not just those that meet a specific condition) use one of the Move operations to move from record to record. To locate a record in a table-type recordset, call the `Seek` member function. -If a record matching the criteria is not located, the current record pointer is undetermined, and `FindPrev` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. +If a record matching the criteria isn't located, the current record pointer is undetermined, and `FindPrev` returns zero. If the recordset contains more than one record that satisfies the criteria, `FindFirst` locates the first occurrence, `FindNext` locates the next occurrence, and so on. > [!CAUTION] > If you edit the current record, be sure you save the changes by calling the `Update` member function before you move to another record. If you move to another record without updating, your changes are lost without warning. -Using one of the Find operations is not the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. +Using one of the Find operations isn't the same as calling `MoveFirst` or `MoveNext`, however, which simply makes the first or next record current without specifying a condition. You can follow a Find operation with a Move operation. Keep the following in mind when using the Find operations: -- If `Find` returns nonzero, the current record is not defined. In this case, you must position the current record pointer back to a valid record. +- If `Find` returns nonzero, the current record isn't defined. In this case, you must position the current record pointer back to a valid record. -- You cannot use a Find operation with a forward-only scrolling snapshot-type recordset. +- You can't use a Find operation with a forward-only scrolling snapshot-type recordset. -- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you are not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. +- You should use the U.S. date format (month-day-year) when you search for fields containing dates, even if you're not using the U.S. version of the Microsoft Jet database engine; otherwise, matching records may not be found. - When working with ODBC databases and large dynasets, you may discover that using the Find operations is slow, especially when working with large recordsets. You can improve performance by using SQL queries with customized **ORDERBY** or **WHERE** clauses, parameter queries, or `CDaoQuerydef` objects that retrieve specific indexed records. @@ -726,10 +729,10 @@ An integer from 0 to the number of records in the recordset. Corresponds to the The AbsolutePosition property value of the underlying DAO object is zero-based; a setting of 0 refers to the first record in the recordset. You can determine the number of populated records in the recordset by calling [GetRecordCount](#getrecordcount). Calling `GetRecordCount` may take some time because it must access all records to determine the count. -If there is no current record, as when there are no records in the recordset, - 1 is returned. If the current record is deleted, the AbsolutePosition property value is not defined, and MFC throws an exception if it is referenced. For dynaset-type recordsets, new records are added to the end of the sequence. +If there's no current record, as when there are no records in the recordset, - 1 is returned. If the current record is deleted, the AbsolutePosition property value isn't defined, and MFC throws an exception if it's referenced. For dynaset-type recordsets, new records are added to the end of the sequence. > [!NOTE] -> This property is not intended to be used as a surrogate record number. Bookmarks are still the recommended way of retaining and returning to a given position and are the only way to position the current record across all types of recordset objects. In particular, the position of a given record changes when record(s) preceding it are deleted. There is also no assurance that a given record will have the same absolute position if the recordset is re-created again because the order of individual records within a recordset is not guaranteed unless it is created with a SQL statement using an **ORDERBY** clause. +> This property isn't intended to be used as a surrogate record number. Bookmarks are still the recommended way of retaining and returning to a given position and are the only way to position the current record across all types of recordset objects. In particular, the position of a given record changes when record(s) preceding it are deleted. There's also no assurance that a given record will have the same absolute position if the recordset is re-created again because the order of individual records within a recordset isn't guaranteed unless it's created with a SQL statement using an **ORDERBY** clause. > [!NOTE] > This member function is valid only for dynaset-type and snapshot-type recordsets. @@ -752,7 +755,7 @@ Returns a value representing the bookmark on the current record. When a recordset object is created or opened, each of its records already has a unique bookmark if it supports them. Call `CanBookmark` to determine whether a recordset supports bookmarks. -You can save the bookmark for the current record by assigning the value of the bookmark to a `COleVariant` object. To quickly return to that record at any time after moving to a different record, call `SetBookmark` with a parameter corresponding to the value of that `COleVariant` object. +You can save the bookmark for the current record by assigning the value of the bookmark to a `COleVariant` object. To quickly return to that record after moving to a different record, call `SetBookmark` with a parameter corresponding to the value of that `COleVariant` object. > [!NOTE] > Calling [Requery](#requery) changes DAO bookmarks. @@ -773,7 +776,7 @@ A value that specifies the number of records in a dynaset-type recordset contain ### Remarks -Data caching improves the performance of an application that retrieves data from a remote server through dynaset-type recordset objects. A cache is a space in local memory that holds the data most recently retrieved from the server in the event that the data will be requested again while the application is running. When data is requested, the Microsoft Jet database engine checks the cache for the requested data first rather than retrieving it from the server, which takes more time. Data that does not come from an ODBC data source is not saved in the cache. +Data caching improves the performance of an application that retrieves data from a remote server through dynaset-type recordset objects. A cache is a space in local memory that holds the data most recently retrieved from the server in case the data is requested again while the application is running. When data is requested, the Microsoft Jet database engine checks the cache for the requested data first rather than retrieving it from the server, which takes more time. Data that doesn't come from an ODBC data source isn't saved in the cache. Any ODBC data source, such as an attached table, can have a local cache. @@ -796,7 +799,7 @@ A `COleVariant` that specifies the bookmark of the first record in the recordset The Microsoft Jet database engine requests records within the cache range from the cache, and it requests records outside the cache range from the server. > [!NOTE] -> Records retrieved from the cache do not reflect changes made concurrently to the source data by other users. +> Records retrieved from the cache don't reflect changes made concurrently to the source data by other users. For related information, see the topic "CacheSize, CacheStart Properties" in DAO Help. @@ -1015,7 +1018,7 @@ The two versions of `GetFieldValue` that return a value return a [COleVariant](. You can look up a field by name or by ordinal position. > [!NOTE] -> It is more efficient to call one of the versions of this member function that takes a `COleVariant` object reference as a parameter, rather than calling a version that returns a `COleVariant` object. The latter versions of this function are kept for backward compatibility. +> It's more efficient to call one of the versions of this member function that takes a `COleVariant` object reference as a parameter, rather than calling a version that returns a `COleVariant` object. The latter versions of this function are kept for backward compatibility. Use `GetFieldValue` and [SetFieldValue](#setfieldvalue) to dynamically bind fields at run time rather than statically binding columns using the [DoFieldExchange](#dofieldexchange) mechanism. @@ -1037,7 +1040,7 @@ The number of indexes in the table-type recordset. ### Remarks -`GetIndexCount` is useful for looping through all indexes in the recordset. For that purpose, use `GetIndexCount` in conjunction with [GetIndexInfo](#getindexinfo). If you call this member function on dynaset-type or snapshot-type recordsets, MFC throws an exception. +`GetIndexCount` is useful for looping through all indexes in the recordset. For that purpose, use `GetIndexCount` with [`GetIndexInfo`](#getindexinfo). If you call this member function on dynaset-type or snapshot-type recordsets, MFC throws an exception. For related information, see the topic "Attributes Property" in DAO Help. @@ -1099,9 +1102,9 @@ A `COleVariant` containing a bookmark that indicates the most recently added or ### Remarks -When a recordset object is created or opened, each of its records already has a unique bookmark if it supports them. Call [GetBookmark](#getbookmark) to determine if the recordset supports bookmarks. If the recordset does not support bookmarks, a `CDaoException` is thrown. +When a recordset object is created or opened, each of its records already has a unique bookmark if it supports them. Call [GetBookmark](#getbookmark) to determine if the recordset supports bookmarks. If the recordset doesn't support bookmarks, a `CDaoException` is thrown. -When you add a record, it appears at the end of the recordset, and is not the current record. To make the new record current, call `GetLastModifiedBookmark` and then call `SetBookmark` to return to the newly added record. +When you add a record, it appears at the end of the recordset, and isn't the current record. To make the new record current, call `GetLastModifiedBookmark` and then call `SetBookmark` to return to the newly added record. For related information, see the topic "LastModified Property" in DAO Help. @@ -1119,7 +1122,7 @@ Nonzero if the type of locking is pessimistic, otherwise 0 for optimistic record ### Remarks -When pessimistic locking is in effect, the data page containing the record you are editing is locked as soon as you call the [Edit](#edit) member function. The page is unlocked when you call the [Update](#update) or [Close](#close) member function or any of the Move or Find operations. +When pessimistic locking is in effect, the data page containing the record you're editing is locked as soon as you call the [Edit](#edit) member function. The page is unlocked when you call the [Update](#update) or [Close](#close) member function or any of the Move or Find operations. When optimistic locking is in effect, the data page containing the record is locked only while the record is being updated with the `Update` member function. @@ -1188,7 +1191,7 @@ A number between 0 and 100 that indicates the approximate location of the curren You can move to the last record by calling [MoveLast](#movelast) to complete the population of all recordsets, but this may take a significant amount of time. -You can call `GetPercentPosition` on all three types of recordset objects, including tables without indexes. However, you cannot call `GetPercentPosition` on forward-only scrolling snapshots, or on a recordset opened from a pass-through query against an external database. If there is no current record, or he current record has been deleted, a `CDaoException` is thrown. +You can call `GetPercentPosition` on all three types of recordset objects, including tables without indexes. However, you can't call `GetPercentPosition` on forward-only scrolling snapshots, or on a recordset opened from a pass-through query against an external database. If there's no current record, or the current record has been deleted, a `CDaoException` is thrown. For related information, see the topic "PercentPosition Property" in DAO Help. @@ -1206,13 +1209,13 @@ Returns the number of records accessed in a recordset object. ### Remarks -`GetRecordCount` does not indicate how many records are contained in a dynaset-type or snapshot-type recordset until all records have been accessed. This member function call may take a significant amount of time to complete. +`GetRecordCount` doesn't indicate how many records are contained in a dynaset-type or snapshot-type recordset until all records have been accessed. This member function call may take a significant amount of time to complete. Once the last record has been accessed, the return value indicates the total number of undeleted records in the recordset. To force the last record to be accessed, call the `MoveLast` or `FindLast` member function for the recordset. You can also use a SQL Count to determine the approximate number of records your query will return. -As your application deletes records in a dynaset-type recordset, the return value of `GetRecordCount` decreases. However, records deleted by other users are not reflected by `GetRecordCount` until the current record is positioned to a deleted record. If you execute a transaction that affects the record count and subsequently roll back the transaction, `GetRecordCount` will not reflect the actual number of remaining records. +As your application deletes records in a dynaset-type recordset, the return value of `GetRecordCount` decreases. However, records deleted by other users aren't reflected by `GetRecordCount` until the current record is positioned to a deleted record. If you execute a transaction that affects the record count and subsequently roll back the transaction, `GetRecordCount` won't reflect the actual number of remaining records. -The value of `GetRecordCount` from a snapshot-type recordset is not affected by changes in the underlying tables. +The value of `GetRecordCount` from a snapshot-type recordset isn't affected by changes in the underlying tables. The value of `GetRecordCount` from a table-type recordset reflects the approximate number of records in the table and is affected immediately as table records are added and deleted. @@ -1275,11 +1278,11 @@ CString GetValidationRule(); ### Return Value -A `CString` object containing a value that validates the data in a record as it is changed or added to a table. +A `CString` object containing a value that validates the data in a record as it's changed or added to a table. ### Remarks -This rule is text-based, and is applied each time the underlying table is changed. If the data is not legal, MFC throws an exception. The returned error message is the text of the ValidationText property of the underlying field object, if specified, or the text of the expression specified by the ValidationRule property of the underlying field object. You can call [GetValidationText](#getvalidationtext) to obtain the text of the error message. +This rule is text-based, and is applied each time the underlying table is changed. If the data isn't legal, MFC throws an exception. The returned error message is the text of the ValidationText property of the underlying field object, if specified, or the text of the expression specified by the ValidationRule property of the underlying field object. You can call [GetValidationText](#getvalidationtext) to obtain the text of the error message. For example, a field in a record that requires the day of the month might have a validation rule such as "DAY BETWEEN 1 AND 31." @@ -1295,7 +1298,7 @@ CString GetValidationText(); ### Return Value -A `CString` object containing the text of the message that is displayed if the value of a field does not satisfy the validation rule of the underlying field object. +A `CString` object containing the text of the message that is displayed if the value of a field doesn't satisfy the validation rule of the underlying field object. ### Remarks @@ -1327,7 +1330,7 @@ Effect of specific methods on `IsBOF` and `IsEOF` settings: - An `AddNew` call followed by an `Update` call that successfully inserts a new record will cause `IsBOF` to return 0, but only if `IsEOF` is already nonzero. The state of `IsEOF` will always remain unchanged. As defined by the Microsoft Jet database engine, the current record pointer of an empty recordset is at the end of a file, so any new record is inserted after the current record. -- Any `Delete` call, even if it removes the only remaining record from a recordset, will not change the value of `IsBOF` or `IsEOF`. +- Any `Delete` call, even if it removes the only remaining record from a recordset, won't change the value of `IsBOF` or `IsEOF`. This table shows which Move operations are allowed with different combinations of `IsBOF`/ `IsEOF`. @@ -1338,9 +1341,9 @@ This table shows which Move operations are allowed with different combinations o |Both nonzero|Exception|Exception|Exception|Exception| |Both 0|Allowed|Allowed|Allowed|Allowed| -Allowing a Move operation does not mean that the operation will successfully locate a record. It merely indicates that an attempt to perform the specified Move operation is allowed and will not generate an exception. The value of the `IsBOF` and `IsEOF` member functions may change as a result of the attempted move. +Allowing a Move operation doesn't mean that the operation will successfully locate a record. It merely indicates that an attempt to perform the specified Move operation is allowed and won't generate an exception. The value of the `IsBOF` and `IsEOF` member functions may change as a result of the attempted move. -The effect of Move operations that do not locate a record on the value of `IsBOF` and `IsEOF` settings is shown in the following table. +The effect of Move operations that don't locate a record on the value of `IsBOF` and `IsEOF` settings is shown in the following table. |Operations|IsBOF|IsEOF| |------|-----------|-----------| @@ -1368,9 +1371,9 @@ Nonzero if the recordset is positioned on a deleted record; otherwise 0. If you scroll to a record and `IsDeleted` returns TRUE (nonzero), then you must scroll to another record before you can perform any other recordset operations. > [!NOTE] -> You don't need to check the deleted status for records in a snapshot or table-type recordset. Because records cannot be deleted from a snapshot, there is no need to call `IsDeleted`. For table-type recordsets, deleted records are actually removed from the recordset. Once a record has been deleted, either by you, another user, or in another recordset, you cannot scroll back to that record. Therefore, there is no need to call `IsDeleted`. +> You don't need to check the deleted status for records in a snapshot or table-type recordset. Because records can't be deleted from a snapshot, there's no need to call `IsDeleted`. For table-type recordsets, deleted records are actually removed from the recordset. Once a record has been deleted, either by you, another user, or in another recordset, you can't scroll back to that record. Therefore, there's no need to call `IsDeleted`. -When you delete a record from a dynaset, it is removed from the recordset and you cannot scroll back to that record. However, if a record in a dynaset is deleted either by another user or in another recordset based on the same table, `IsDeleted` will return TRUE when you later scroll to that record. +When you delete a record from a dynaset, it's removed from the recordset and you can't scroll back to that record. However, if a record in a dynaset is deleted either by another user or in another recordset based on the same table, `IsDeleted` returns TRUE when you later scroll to that record. For related information, see the topics "Delete Method", "LastModified Property", and "EditMode Property" in DAO Help. @@ -1400,7 +1403,7 @@ Effect of specific methods on `IsBOF` and `IsEOF` settings: - An `AddNew` call followed by an `Update` call that successfully inserts a new record will cause `IsBOF` to return 0, but only if `IsEOF` is already nonzero. The state of `IsEOF` will always remain unchanged. As defined by the Microsoft Jet database engine, the current record pointer of an empty recordset is at the end of a file, so any new record is inserted after the current record. -- Any `Delete` call, even if it removes the only remaining record from a recordset, will not change the value of `IsBOF` or `IsEOF`. +- Any `Delete` call, even if it removes the only remaining record from a recordset, won't change the value of `IsBOF` or `IsEOF`. This table shows which Move operations are allowed with different combinations of `IsBOF`/ `IsEOF`. @@ -1411,9 +1414,9 @@ This table shows which Move operations are allowed with different combinations o |Both nonzero|Exception|Exception|Exception|Exception| |Both 0|Allowed|Allowed|Allowed|Allowed| -Allowing a Move operation does not mean that the operation will successfully locate a record. It merely indicates that an attempt to perform the specified Move operation is allowed and will not generate an exception. The value of the `IsBOF` and `IsEOF` member functions may change as a result of the attempted Move. +Allowing a Move operation doesn't mean that the operation will successfully locate a record. It merely indicates that an attempt to perform the specified Move operation is allowed and won't generate an exception. The value of the `IsBOF` and `IsEOF` member functions may change as a result of the attempted Move. -The effect of Move operations that do not locate a record on the value of `IsBOF` and `IsEOF` settings is shown in the following table. +The effect of Move operations that don't locate a record on the value of `IsBOF` and `IsEOF` settings is shown in the following table. |Operations|IsBOF|IsEOF| |------|-----------|-----------| @@ -1443,7 +1446,7 @@ Nonzero if the specified field data member is flagged as dirty; otherwise 0. ### Remarks -The data in all dirty field data members will be transferred to the record on the data source when the current record is updated by a call to the `Update` member function of `CDaoRecordset` (following a call to `Edit` or `AddNew`). With this knowledge, you can take further steps, such as unflagging the field data member to mark the column so it will not be written to the data source. +The data in all dirty field data members are transferred to the record on the data source when the current record is updated by a call to the `Update` member function of `CDaoRecordset` (following a call to `Edit` or `AddNew`). With this knowledge, you can take further steps, such as unflagging the field data member to mark the column so it won't be written to the data source. `IsFieldDirty` is implemented through `DoFieldExchange`. @@ -1466,7 +1469,7 @@ Nonzero if the specified field data member is flagged as Null; otherwise 0. ### Remarks -(In database terminology, Null means "having no value" and is not the same as NULL in C++.) If a field data member is flagged as Null, it is interpreted as a column of the current record for which there is no value. +(In database terminology, Null means "having no value" and isn't the same as NULL in C++.) If a field data member is flagged as Null, it's interpreted as a column of the current record for which there's no value. > [!NOTE] > In certain situations, using `IsFieldNull` can be inefficient, as the following code example illustrates: @@ -1474,11 +1477,11 @@ Nonzero if the specified field data member is flagged as Null; otherwise 0. [!code-cpp[NVC_MFCDatabase#5](../../mfc/codesnippet/cpp/cdaorecordset-class_5.cpp)] > [!NOTE] -> If you are using dynamic record binding, without deriving from `CDaoRecordset`, be sure to use VT_NULL as shown in the example. +> If you're using dynamic record binding, without deriving from `CDaoRecordset`, be sure to use VT_NULL as shown in the example. ## CDaoRecordset::IsFieldNullable -Call this member function to determine whether the specified field data member is "nullable" (can be set to a Null value; C++ NULL is not the same as Null, which, in database terminology, means "having no value"). +Call this member function to determine whether the specified field data member is "nullable" (can be set to a Null value; C++ NULL isn't the same as Null, which, in database terminology, means "having no value"). ```cpp BOOL IsFieldNullable(void* pv); @@ -1495,7 +1498,7 @@ Nonzero if the specified field data member can be made Null; otherwise 0. ### Remarks -A field that cannot be Null must have a value. If you attempt to set such a field to Null when adding or updating a record, the data source rejects the addition or update, and `Update` will throw an exception. The exception occurs when you call `Update`, not when you call `SetFieldNull`. +A field that can't be Null must have a value. If you attempt to set such a field to Null when adding or updating a record, the data source rejects the addition or update, and `Update` will throw an exception. The exception occurs when you call `Update`, not when you call `SetFieldNull`. ## CDaoRecordset::IsOpen @@ -1507,7 +1510,7 @@ BOOL IsOpen() const; ### Return Value -Nonzero if the recordset object's `Open` or `Requery` member function has previously been called and the recordset has not been closed; otherwise 0. +Nonzero if the recordset object's `Open` or `Requery` member function has previously been called and the recordset hasn't been closed; otherwise 0. ### Remarks @@ -1534,7 +1537,7 @@ The framework uses this number to manage interaction between the field data memb > [!NOTE] > This number must correspond to the number of output columns registered in `DoFieldExchange` after a call to `SetFieldType` with the parameter `CDaoFieldExchange::outputColumn`. -You can bind columns dynamically by way of `CDaoRecordset::GetFieldValue` and `CDaoRecordset::SetFieldValue`. If you do so, you do not need to increment the count in `m_nFields` to reflect the number of DFX function calls in your `DoFieldExchange` member function. +You can bind columns dynamically by way of `CDaoRecordset::GetFieldValue` and `CDaoRecordset::SetFieldValue`. If you do so, you don't need to increment the count in `m_nFields` to reflect the number of DFX function calls in your `DoFieldExchange` member function. ## CDaoRecordset::m_nParams @@ -1569,7 +1572,7 @@ Contains a pointer to the `CDaoDatabase` object through which the recordset is c This variable is set in two ways. Typically, you pass a pointer to an already open `CDaoDatabase` object when you construct the recordset object. If you pass NULL instead, `CDaoRecordset` creates a `CDaoDatabase` object for you and opens it. In either case, `CDaoRecordset` stores the pointer in this variable. -Normally you will not directly need to use the pointer stored in `m_pDatabase`. If you write your own extensions to `CDaoRecordset`, however, you might need to use the pointer. For example, you might need the pointer if you throw your own `CDaoException`(s). +Normally you'll not directly need to use the pointer stored in `m_pDatabase`. If you write your own extensions to `CDaoRecordset`, however, you might need to use the pointer. For example, you might need the pointer if you throw your own `CDaoException`(s). For related information, see the topic "Database Object" in DAO Help. @@ -1579,9 +1582,9 @@ Contains a string that is used to construct the **WHERE** clause of a SQL statem ### Remarks -It does not include the reserved word **WHERE** to filter the recordset. The use of this data member is not applicable to table-type recordsets. The use of `m_strFilter` has no effect when opening a recordset using a `CDaoQueryDef` pointer. +It doesn't include the reserved word **WHERE** to filter the recordset. The use of this data member isn't applicable to table-type recordsets. The use of `m_strFilter` has no effect when opening a recordset using a `CDaoQueryDef` pointer. -Use the U.S. date format (month-day-year) when you filter fields containing dates, even if you are not using the U.S. version of the Microsoft Jet database engine; otherwise, the data may not be filtered as you expect. +Use the U.S. date format (month-day-year) when you filter fields containing dates, even if you're not using the U.S. version of the Microsoft Jet database engine; otherwise, the data may not be filtered as you expect. For related information, see the topic "Filter Property" in DAO Help. @@ -1593,7 +1596,7 @@ Contains a string containing the **ORDERBY** clause of a SQL statement without t You can sort on dynaset- and snapshot-type recordset objects. -You cannot sort table-type recordset objects. To determine the sort order of a table-type recordset, call [SetCurrentIndex](#setcurrentindex). +You can't sort table-type recordset objects. To determine the sort order of a table-type recordset, call [SetCurrentIndex](#setcurrentindex). The use of *m_strSort* has no effect when opening a recordset using a `CDaoQueryDef` pointer. @@ -1620,12 +1623,12 @@ You can move forward or backward. `Move( 1 )` is equivalent to `MoveNext`, and ` > Calling any of the `Move` functions throws an exception if the recordset has no records. In general, call both `IsBOF` and `IsEOF` before a Move operation to determine whether the recordset has any records. After you call `Open` or `Requery`, call either `IsBOF` or `IsEOF`. > [!NOTE] -> If you have scrolled past the beginning or end of the recordset ( `IsBOF` or `IsEOF` returns nonzero), a call to `Move` throws a `CDaoException`. +> If you have scrolled past the beginning or end of the recordset (`IsBOF` or `IsEOF` returns nonzero), a call to `Move` throws a `CDaoException`. > [!NOTE] > If you call any of the `Move` functions while the current record is being updated or added, the updates are lost without warning. -When you call `Move` on a forward-only scrolling snapshot, the *lRows* parameter must be a positive integer and bookmarks are not allowed, so you can move forward only. +When you call `Move` on a forward-only scrolling snapshot, the *lRows* parameter must be a positive integer and bookmarks aren't allowed, so you can move forward only. To make the first, last, next, or previous record in a recordset the current record, call the `MoveFirst`, `MoveLast`, `MoveNext`, or `MovePrev` member function. @@ -1641,7 +1644,7 @@ void MoveFirst(); ### Remarks -You do not have to call `MoveFirst` immediately after you open the recordset. At that time, the first record (if any) is automatically the current record. +You don't have to call `MoveFirst` immediately after you open the recordset. At that time, the first record (if any) is automatically the current record. > [!CAUTION] > Calling any of the `Move` functions throws an exception if the recordset has no records. In general, call both `IsBOF` and `IsEOF` before a Move operation to determine whether the recordset has any records. After you call `Open` or `Requery`, call either `IsBOF` or `IsEOF`. @@ -1651,11 +1654,11 @@ You do not have to call `MoveFirst` immediately after you open the recordset. At Use the `Move` functions to move from record to record without applying a condition. Use the Find operations to locate records in a dynaset-type or snapshot-type recordset object that satisfy a certain condition. To locate a record in a table-type recordset object, call `Seek`. -If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you do not set the current index, the order of returned records is undefined. +If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you don't set the current index, the order of returned records is undefined. If you call `MoveLast` on a recordset object based on a SQL query or querydef, the query is forced to completion and the recordset object is fully populated. -You cannot call the `MoveFirst` or `MovePrev` member function with a forward-only scrolling snapshot. +You can't call the `MoveFirst` or `MovePrev` member function with a forward-only scrolling snapshot. To move the position of the current record in a recordset object a specific number of records forward or backward, call `Move`. @@ -1679,7 +1682,7 @@ void MoveLast(); Use the `Move` functions to move from record to record without applying a condition. Use the Find operations to locate records in a dynaset-type or snapshot-type recordset object that satisfy a certain condition. To locate a record in a table-type recordset object, call `Seek`. -If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you do not set the current index, the order of returned records is undefined. +If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you don't set the current index, the order of returned records is undefined. If you call `MoveLast` on a recordset object based on a SQL query or querydef, the query is forced to completion and the recordset object is fully populated. @@ -1697,7 +1700,7 @@ void MoveNext(); ### Remarks -It is recommended that you call `IsBOF` before you attempt to move to the previous record. A call to `MovePrev` will throw a `CDaoException` if `IsBOF` returns nonzero, indicating either that you have already scrolled before the first record or that no records were selected by the recordset. +It's recommended that you call `IsBOF` before you attempt to move to the previous record. A call to `MovePrev` throws a `CDaoException` if `IsBOF` returns nonzero, indicating either that you have already scrolled before the first record or that no records were selected by the recordset. > [!CAUTION] > Calling any of the `Move` functions throws an exception if the recordset has no records. In general, call both `IsBOF` and `IsEOF` before a Move operation to determine whether the recordset has any records. After you call `Open` or `Requery`, call either `IsBOF` or `IsEOF`. @@ -1707,7 +1710,7 @@ It is recommended that you call `IsBOF` before you attempt to move to the previo Use the `Move` functions to move from record to record without applying a condition. Use the Find operations to locate records in a dynaset-type or snapshot-type recordset object that satisfy a certain condition. To locate a record in a table-type recordset object, call `Seek`. -If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you do not set the current index, the order of returned records is undefined. +If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you don't set the current index, the order of returned records is undefined. To move the position of the current record in a recordset object a specific number of records forward or backward, call `Move`. @@ -1723,7 +1726,7 @@ void MovePrev(); ### Remarks -It is recommended that you call `IsBOF` before you attempt to move to the previous record. A call to `MovePrev` will throw a `CDaoException` if `IsBOF` returns nonzero, indicating either that you have already scrolled before the first record or that no records were selected by the recordset. +It's recommended that you call `IsBOF` before you attempt to move to the previous record. A call to `MovePrev` throws a `CDaoException` if `IsBOF` returns nonzero, indicating either that you have already scrolled before the first record or that no records were selected by the recordset. > [!CAUTION] > Calling any of the `Move` functions throws an exception if the recordset has no records. In general, call both `IsBOF` and `IsEOF` before a Move operation to determine whether the recordset has any records. After you call `Open` or `Requery`, call either `IsBOF` or `IsEOF`. @@ -1733,9 +1736,9 @@ It is recommended that you call `IsBOF` before you attempt to move to the previo Use the `Move` functions to move from record to record without applying a condition. Use the Find operations to locate records in a dynaset-type or snapshot-type recordset object that satisfy a certain condition. To locate a record in a table-type recordset object, call `Seek`. -If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you do not set the current index, the order of returned records is undefined. +If the recordset refers to a table-type recordset, movement follows the table's current index. You can set the current index by using the Index property of the underlying DAO object. If you don't set the current index, the order of returned records is undefined. -You cannot call the `MoveFirst` or `MovePrev` member function with a forward-only scrolling snapshot. +You can't call the `MoveFirst` or `MovePrev` member function with a forward-only scrolling snapshot. To move the position of the current record in a recordset object a specific number of records forward or backward, call `Move`. @@ -1791,11 +1794,11 @@ One or more of the options listed below. The default value is 0. Possible values - `dbForwardOnly` The recordset is a forward-only scrolling snapshot. -- `dbSeeChanges` Generate an exception if another user is changing data you are editing. +- `dbSeeChanges` Generate an exception if another user is changing data you're editing. -- `dbDenyWrite` Other users cannot modify or add records. +- `dbDenyWrite` Other users can't modify or add records. -- `dbDenyRead` Other users cannot view records (table-type recordset only). +- `dbDenyRead` Other users can't view records (table-type recordset only). - `dbReadOnly` You can only view records; other users can modify them. @@ -1807,10 +1810,10 @@ One or more of the options listed below. The default value is 0. Possible values > The constants `dbConsistent` and `dbInconsistent` are mutually exclusive. You can use one or the other, but not both in a given instance of `Open`. *pTableDef*
-A pointer to a [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md) object. This version is valid only for table-type recordsets. When using this option, the `CDaoDatabase` pointer used to construct the `CDaoRecordset` is not used; rather, the database in which the tabledef resides is used. +A pointer to a [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md) object. This version is valid only for table-type recordsets. When using this option, the `CDaoDatabase` pointer used to construct the `CDaoRecordset` isn't used; rather, the database in which the tabledef resides is used. *pQueryDef*
-A pointer to a [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) object. This version is valid only for dynaset-type and snapshot-type recordsets. When using this option, the `CDaoDatabase` pointer used to construct the `CDaoRecordset` is not used; rather, the database in which the querydef resides is used. +A pointer to a [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) object. This version is valid only for dynaset-type and snapshot-type recordsets. When using this option, the `CDaoDatabase` pointer used to construct the `CDaoRecordset` isn't used; rather, the database in which the querydef resides is used. ### Remarks @@ -1818,21 +1821,21 @@ Before calling `Open`, you must construct the recordset object. There are severa - When you construct the recordset object, pass a pointer to a `CDaoDatabase` object that is already open. -- When you construct the recordset object, pass a pointer to a `CDaoDatabase` object that is not open. The recordset opens a `CDaoDatabase` object, but will not close it when the recordset object closes. +- When you construct the recordset object, pass a pointer to a `CDaoDatabase` object that isn't open. The recordset opens a `CDaoDatabase` object, but will not close it when the recordset object closes. - When you construct the recordset object, pass a NULL pointer. The recordset object calls `GetDefaultDBName` to get the name of the Microsoft Access .MDB file to open. The recordset then opens a `CDaoDatabase` object and keeps it open as long as the recordset is open. When you call `Close` on the recordset, the `CDaoDatabase` object is also closed. > [!NOTE] > When the recordset opens the `CDaoDatabase` object, it opens the data source with nonexclusive access. -For the version of `Open` that uses the *lpszSQL* parameter, once the recordset is open you can retrieve records in one of several ways. The first option is to have DFX functions in your `DoFieldExchange`. The second option is to use dynamic binding by calling the `GetFieldValue` member function. These options can be implemented separately or in combination. If they are combined, you will have to pass in the SQL statement yourself on the call to `Open`. +For the version of `Open` that uses the *lpszSQL* parameter, once the recordset is open you can retrieve records in one of several ways. The first option is to have DFX functions in your `DoFieldExchange`. The second option is to use dynamic binding by calling the `GetFieldValue` member function. These options can be implemented separately or in combination. If they are combined, you'll have to pass in the SQL statement yourself on the call to `Open`. -When you use the second version of `Open` where you pass in a `CDaoTableDef` object, the resulting columns will be available for you to bind via `DoFieldExchange` and the DFX mechanism, and/or bind dynamically via `GetFieldValue`. +When you use the second version of `Open` where you pass in a `CDaoTableDef` object, the resulting columns are available for you to bind via `DoFieldExchange` and the DFX mechanism, and/or bind dynamically via `GetFieldValue`. > [!NOTE] > You can only call `Open` using a `CDaoTableDef` object for table-type recordsets. -When you use the third version of `Open` where you pass in a `CDaoQueryDef` object, that query will be executed, and the resulting columns will be available for you to bind via `DoFieldExchange` and the DFX mechanism, and/or bind dynamically via `GetFieldValue`. +When you use the third version of `Open` where you pass in a `CDaoQueryDef` object, that query is executed, and the resulting columns are available for you to bind via `DoFieldExchange` and the DFX mechanism, and/or bind dynamically via `GetFieldValue`. > [!NOTE] > You can only call `Open` using a `CDaoQueryDef` object for dynaset-type and snapshot-type recordsets. @@ -1853,9 +1856,9 @@ The field data members of your recordset class are bound to the columns of the d If you want to set options for the recordset, such as a filter or sort, set `m_strSort` or `m_strFilter` after you construct the recordset object but before you call `Open`. If you want to refresh the records in the recordset after the recordset is already open, call `Requery`. -If you call `Open` on a dynaset-type or snapshot-type recordset, or if the data source refers to a SQL statement or a tabledef that represents an attached table, you cannot use `dbOpenTable` for the type argument; if you do, MFC throws an exception. To determine whether a tabledef object represents an attached table, create a [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md) object and call its [GetConnect](../../mfc/reference/cdaotabledef-class.md#getconnect) member function. +If you call `Open` on a dynaset-type or snapshot-type recordset, or if the data source refers to a SQL statement or a tabledef that represents an attached table, you can't use `dbOpenTable` for the type argument; if you do, MFC throws an exception. To determine whether a tabledef object represents an attached table, create a [CDaoTableDef](../../mfc/reference/cdaotabledef-class.md) object and call its [GetConnect](../../mfc/reference/cdaotabledef-class.md#getconnect) member function. -Use the `dbSeeChanges` flag if you wish to trap changes made by another user or another program on your machine when you are editing or deleting the same record. For example, if two users start editing the same record, the first user to call the `Update` member function succeeds. When `Update` is called by the second user, a `CDaoException` is thrown. Similarly, if the second user tries to call `Delete` to delete the record, and it has already been changed by the first user, a `CDaoException` occurs. +Use the `dbSeeChanges` flag if you wish to trap changes made by another user or another program on your machine when you're editing or deleting the same record. For example, if two users start editing the same record, the first user to call the `Update` member function succeeds. When `Update` is called by the second user, a `CDaoException` is thrown. Similarly, if the second user tries to call `Delete` to delete the record, and it has already been changed by the first user, a `CDaoException` occurs. Typically, if the user gets this `CDaoException` while updating, your code should refresh the contents of the fields and retrieve the newly modified values. If the exception occurs in the process of deleting, your code could display the new record data to the user and a message indicating that the data has recently changed. At this point, your code can request a confirmation that the user still wants to delete the record. @@ -1878,15 +1881,15 @@ If any records are returned, the first record becomes the current record. In order for the recordset to reflect the additions and deletions that you or other users are making to the data source, you must rebuild the recordset by calling `Requery`. If the recordset is a dynaset, it automatically reflects updates that you or other users make to its existing records (but not additions). If the recordset is a snapshot, you must call `Requery` to reflect edits by other users as well as additions and deletions. -For either a dynaset or a snapshot, call `Requery` any time you want to rebuild the recordset using parameter values. Set the new filter or sort by setting [m_strFilter](#m_strfilter) and [m_strSort](#m_strsort) before calling `Requery`. Set new parameters by assigning new values to parameter data members before calling `Requery`. +For either a dynaset or a snapshot, call `Requery` when you want to rebuild the recordset using parameter values. Set the new filter or sort by setting [`m_strFilter`](#m_strfilter) and [`m_strSort`](#m_strsort) before calling `Requery`. Set new parameters by assigning new values to parameter data members before calling `Requery`. -If the attempt to rebuild the recordset fails, the recordset is closed. Before you call `Requery`, you can determine whether the recordset can be requeried by calling the [CanRestart](#canrestart) member function. `CanRestart` does not guarantee that `Requery` will succeed. +If the attempt to rebuild the recordset fails, the recordset is closed. Before you call `Requery`, you can determine whether the recordset can be requeried by calling the [`CanRestart`](#canrestart) member function. `CanRestart` doesn't guarantee that `Requery` will succeed. > [!CAUTION] > Call `Requery` only after you have called `Open`. > [!NOTE] -> Calling [Requery](#requery) changes DAO bookmarks. +> Calling [`Requery`](#requery) changes DAO bookmarks. You can't call `Requery` on a dynaset-type or snapshot-type recordset if calling `CanRestart` returns 0, nor can you use it on a table-type recordset. @@ -1932,7 +1935,7 @@ A pointer to an array of variants. The array size corresponds to the number of f An integer corresponding to the size of the array, which is the number of fields in the index. > [!NOTE] -> Do not specify wildcards in the keys. Wildcards will cause `Seek` to return no matching records. +> on't specify wildcards in the keys. Wildcards will cause `Seek` to return no matching records. ### Return Value @@ -1942,19 +1945,19 @@ Nonzero if matching records are found, otherwise 0. Use the second (array) version of `Seek` to handle indexes of four fields or more. -`Seek` enables high-performance index searching on table-type recordsets. You must set the current index by calling `SetCurrentIndex` before calling `Seek`. If the index identifies a nonunique key field or fields, `Seek` locates the first record that satisfies the criteria. If you do not set an index, an exception is thrown. +`Seek` enables high-performance index searching on table-type recordsets. You must set the current index by calling `SetCurrentIndex` before calling `Seek`. If the index identifies a nonunique key field or fields, `Seek` locates the first record that satisfies the criteria. If you don't set an index, an exception is thrown. -Note that if you are not creating a UNICODE recordset, the `COleVariant` objects must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. +If you're not creating a UNICODE recordset, the `COleVariant` objects must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. When you call `Seek`, you pass one or more key values and a comparison operator ("<", "\<=", "=", ">=", or ">"). `Seek` searches through the specified key fields and locates the first record that satisfies the criteria specified by *lpszComparison* and *pKey1*. Once found, `Seek` returns nonzero, and makes that record current. If `Seek` fails to locate a match, `Seek` returns zero, and the current record is undefined. When using DAO directly, you must explicitly check the NoMatch property. If `lpszComparison` is "=", ">=", or ">", `Seek` starts at the beginning of the index. If *lpszComparison* is "<" or "<=", `Seek` starts at the end of the index and searches backward unless there are duplicate index entries at the end. In this case, `Seek` starts at an arbitrary entry among the duplicate index entries at the end of the index. -There does not have to be a current record when you use `Seek`. +There doesn't have to be a current record when you use `Seek`. To locate a record in a dynaset-type or snapshot-type recordset that satisfies a specific condition, use the Find operations. To include all records, not just those that satisfy a specific condition, use the Move operations to move from record to record. -You cannot call `Seek` on an attached table of any type because attached tables must be opened as dynaset-type or snapshot-type recordsets. However, if you call `CDaoDatabase::Open` to directly open an installable ISAM database, you can call `Seek` on tables in that database, although the performance may be slow. +You can't call `Seek` on an attached table of any type because attached tables must be opened as dynaset-type or snapshot-type recordsets. However, if you call `CDaoDatabase::Open` to directly open an installable ISAM database, you can call `Seek` on tables in that database, although the performance may be slow. For related information, see the topic "Seek Method" in DAO Help. @@ -1980,10 +1983,10 @@ Calling `SetAbsolutePosition` enables you to position the current record pointer The AbsolutePosition property value of the underlying DAO object is zero-based; a setting of 0 refers to the first record in the recordset. Setting a value greater than the number of populated records causes MFC to throw an exception. You can determine the number of populated records in the recordset by calling the `GetRecordCount` member function. -If the current record is deleted, the AbsolutePosition property value is not defined, and MFC throws an exception if it is referenced. New records are added to the end of the sequence. +If the current record is deleted, the AbsolutePosition property value isn't defined, and MFC throws an exception if it's referenced. New records are added to the end of the sequence. > [!NOTE] -> This property is not intended to be used as a surrogate record number. Bookmarks are still the recommended way of retaining and returning to a given position and are the only way to position the current record across all types of recordset objects that support bookmarks. In particular, the position of a given record changes when record(s) preceding it are deleted. There is also no assurance that a given record will have the same absolute position if the recordset is re-created again because the order of individual records within a recordset is not guaranteed unless it is created with a SQL statement using an **ORDERBY** clause. +> This property isn't intended to be used as a surrogate record number. Bookmarks are still the recommended way of retaining and returning to a given position and are the only way to position the current record across all types of recordset objects that support bookmarks. In particular, the position of a given record changes when record(s) preceding it are deleted. There's also no assurance that a given record will have the same absolute position if the recordset is re-created again because the order of individual records within a recordset isn't guaranteed unless it's created with a SQL statement using an **ORDERBY** clause. For related information, see the topic "AbsolutePosition Property" in DAO Help. @@ -2007,7 +2010,7 @@ When a recordset object is created or opened, each of its records already has a > [!NOTE] > Calling [Requery](#requery) changes DAO bookmarks. -Note that if you are not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. +If you're not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. For related information, see the topics "Bookmark Property" and Bookmarkable Property" in DAO Help. @@ -2022,13 +2025,13 @@ void SetCacheSize(long lSize); ### Parameters *lSize*
-Specifies the number of records. A typical value is 100. A setting of 0 turns off caching. The setting must be between 5 and 1200 records. The cache may use a considerable amount of memory. +Specifies the number of records. A typical value is 100. A setting of 0 turns off caching. The setting must be between 5 and 1,200 records. The cache may use a considerable amount of memory. ### Remarks -A cache is a space in local memory that holds the data most recently retrieved from the server in the event that the data will be requested again while the application is running. Data caching improves the performance of an application that retrieves data from a remote server through dynaset-type recordset objects. When data is requested, the Microsoft Jet database engine checks the cache for the requested data first rather than retrieving it from the server, which takes more time. Data that does not come from an ODBC data source is not saved in the cache. +A cache is a space in local memory that holds the data most recently retrieved from the server in case the data is requested again while the application is running. Data caching improves the performance of an application that retrieves data from a remote server through dynaset-type recordset objects. When data is requested, the Microsoft Jet database engine checks the cache for the requested data first rather than retrieving it from the server, which takes more time. Data that doesn't come from an ODBC data source isn't saved in the cache. -Any ODBC data source, such as an attached table, can have a local cache. To create the cache, open a recordset object from the remote data source, call the `SetCacheSize` and `SetCacheStart` member functions, and then call the `FillCache` member function or step through the records by using one of the Move operations. The *lSize* parameter of the `SetCacheSize` member function can be based on the number of records your application can work with at one time. For example, if you are using a recordset as the source of the data to be displayed on screen, you could pass the `SetCacheSize` *lSize* parameter as 20 to display 20 records at one time. +Any ODBC data source, such as an attached table, can have a local cache. To create the cache, open a recordset object from the remote data source, call the `SetCacheSize` and `SetCacheStart` member functions, and then call the `FillCache` member function or step through the records by using one of the Move operations. The *lSize* parameter of the `SetCacheSize` member function can be based on the number of records your application can work with at one time. For example, if you're using a recordset as the source of the data to be displayed on screen, you could pass the `SetCacheSize` *lSize* parameter as 20 to display 20 records at one time. For related information, see the topic "CacheSize, CacheStart Properties" in DAO Help. @@ -2051,11 +2054,11 @@ You can use the bookmark value of any record for the *varBookmark* parameter of The Microsoft Jet database engine requests records within the cache range from the cache, and it requests records outside the cache range from the server. -Records retrieved from the cache do not reflect changes made concurrently to the source data by other users. +Records retrieved from the cache don't reflect changes made concurrently to the source data by other users. To force an update of all the cached data, pass the *lSize* parameter of `SetCacheSize` as 0, call `SetCacheSize` again with the size of the cache you originally requested, and then call the `FillCache` member function. -Note that if you are not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. +If you're not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. For related information, see the topic CacheSize, CacheStart Properties" in DAO Help. @@ -2074,7 +2077,7 @@ A pointer containing the name of the index to be set. ### Remarks -Records in base tables are not stored in any particular order. Setting an index changes the order of records returned from the database, but it does not affect the order in which the records are stored. The specified index must already be defined. If you try to use an index object that does not exist, or if the index is not set when you call [Seek](#seek), MFC throws an exception. +Records in base tables aren't stored in any particular order. Setting an index changes the order of records returned from the database, but it doesn't affect the order in which the records are stored. The specified index must already be defined. If you try to use an index object that doesn't exist, or if the index isn't set when you call [Seek](#seek), MFC throws an exception. You can create a new index for the table by calling [CDaoTableDef::CreateIndex](../../mfc/reference/cdaotabledef-class.md#createindex) and appending the new index to the Indexes collection of the underlying tabledef by calling [CDaoTableDef::Append](../../mfc/reference/cdaotabledef-class.md#append), and then reopening the recordset. @@ -2095,18 +2098,18 @@ void SetFieldDirty( ### Parameters *pv*
-Contains the address of a field data member in the recordset or NULL. If NULL, all field data members in the recordset are flagged. (C++ NULL is not the same as Null in database terminology, which means "having no value.") +Contains the address of a field data member in the recordset or NULL. If NULL, all field data members in the recordset are flagged. (C++ NULL isn't the same as Null in database terminology, which means "having no value.") *bDirty*
TRUE if the field data member is to be flagged as "dirty" (changed). Otherwise FALSE if the field data member is to be flagged as "clean" (unchanged). ### Remarks -Marking fields as unchanged ensures the field is not updated. +Marking fields as unchanged ensures the field isn't updated. -The framework marks changed field data members to ensure they will be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you will seldom need to call `SetFieldDirty` yourself, but you might sometimes want to ensure that columns will be explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of PSEUDONULL. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). +The framework marks changed field data members to ensure they'll be written to the record on the data source by the DAO record field exchange (DFX) mechanism. Changing the value of a field generally sets the field dirty automatically, so you'll seldom need to call `SetFieldDirty` yourself, but you might sometimes want to ensure that columns are explicitly updated or inserted regardless of what value is in the field data member. The DFX mechanism also employs the use of PSEUDONULL. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). -If the double-buffering mechanism is not being used, then changing the value of the field does not automatically set the field as dirty. In this case, it will be necessary to explicitly set the field as dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. +If the double-buffering mechanism isn't being used, then changing the value of the field doesn't automatically set the field as dirty. In this case, it's necessary to explicitly set the field as dirty. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. > [!NOTE] > Call this member function only after you have called [Edit](#edit) or [AddNew](#addnew). @@ -2115,13 +2118,13 @@ Using NULL for the first argument of the function will apply the function to all [!code-cpp[NVC_MFCDatabase#6](../../mfc/codesnippet/cpp/cdaorecordset-class_6.cpp)] -will set only `outputColumn` fields to NULL; **param** fields will be unaffected. +will set only `outputColumn` fields to NULL; **param** fields are unaffected. To work on a **param**, you must supply the actual address of the individual **param** you want to work on, such as: [!code-cpp[NVC_MFCDatabase#7](../../mfc/codesnippet/cpp/cdaorecordset-class_7.cpp)] -This means you cannot set all **param** fields to NULL, as you can with `outputColumn` fields. +This means you can't set all **param** fields to NULL, as you can with `outputColumn` fields. `SetFieldDirty` is implemented through `DoFieldExchange`. @@ -2138,7 +2141,7 @@ void SetFieldNull( ### Parameters *pv*
-Contains the address of a field data member in the recordset or NULL. If NULL, all field data members in the recordset are flagged. (C++ NULL is not the same as Null in database terminology, which means "having no value.") +Contains the address of a field data member in the recordset or NULL. If NULL, all field data members in the recordset are flagged. (C++ NULL isn't the same as Null in database terminology, which means "having no value.") *bNull*
Nonzero if the field data member is to be flagged as having no value (Null). Otherwise 0 if the field data member is to be flagged as non-Null. @@ -2147,11 +2150,11 @@ Nonzero if the field data member is to be flagged as having no value (Null). Oth `SetFieldNull` is used for fields bound in the `DoFieldExchange` mechanism. -When you add a new record to a recordset, all field data members are initially set to a Null value and flagged as "dirty" (changed). When you retrieve a record from a data source, its columns either already have values or are Null. If it is not appropriate to make a field Null, a [CDaoException](../../mfc/reference/cdaoexception-class.md) is thrown. +When you add a new record to a recordset, all field data members are initially set to a Null value and flagged as "dirty" (changed). When you retrieve a record from a data source, its columns either already have values or are Null. If it isn't appropriate to make a field Null, a [CDaoException](../../mfc/reference/cdaoexception-class.md) is thrown. -If you are using the double-buffering mechanism, for example, if you specifically wish to designate a field of the current record as not having a value, call `SetFieldNull` with *bNull* set to TRUE to flag it as Null. If a field was previously marked Null and you now want to give it a value, simply set its new value. You do not have to remove the Null flag with `SetFieldNull`. To determine whether the field is allowed to be Null, call [IsFieldNullable](#isfieldnullable). +If you're using the double-buffering mechanism, for example, if you specifically wish to designate a field of the current record as not having a value, call `SetFieldNull` with *bNull* set to TRUE to flag it as Null. If a field was previously marked Null and you now want to give it a value, set its new value. You don't have to remove the Null flag with `SetFieldNull`. To determine whether the field is allowed to be Null, call [IsFieldNullable](#isfieldnullable). -If you are not using the double-buffering mechanism, then changing the value of the field does not automatically set the field as dirty and non-Null. You must specifically set the fields dirty and non-Null. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. +If you're not using the double-buffering mechanism, then changing the value of the field doesn't automatically set the field as dirty and non-Null. You must specifically set the fields dirty and non-Null. The flag contained in [m_bCheckCacheForDirtyFields](#m_bcheckcachefordirtyfields) controls this automatic field checking. The DFX mechanism employs the use of PSEUDONULL. For more information, see [CDaoFieldExchange::m_nOperation](../../mfc/reference/cdaofieldexchange-class.md#m_noperation). @@ -2162,7 +2165,7 @@ Using NULL for the first argument of the function will apply the function only t [!code-cpp[NVC_MFCDatabase#8](../../mfc/codesnippet/cpp/cdaorecordset-class_8.cpp)] -will set only `outputColumn` fields to NULL; **param** fields will be unaffected. +will set only `outputColumn` fields to NULL; **param** fields are unaffected. ## CDaoRecordset::SetFieldValue @@ -2204,7 +2207,7 @@ A pointer to a string containing the value of the field's contents. Use `SetFieldValue` and [GetFieldValue](#getfieldvalue) to dynamically bind fields at run time rather than statically binding columns using the [DoFieldExchange](#dofieldexchange) mechanism. -Note that if you are not creating a UNICODE recordset, you must either use a form of `SetFieldValue` that does not contain a `COleVariant` parameter, or the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. +If you're not creating a UNICODE recordset, you must either use a form of `SetFieldValue` that doesn't contain a `COleVariant` parameter, or the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. For related information, see the topics "Field Object" and "Value Property" in DAO Help. @@ -2227,7 +2230,7 @@ The name of the field in the recordset, for lookup by name. ### Remarks -C++ NULL is not the same as Null, which, in database terminology, means "having no value." +C++ NULL isn't the same as Null, which, in database terminology, means "having no value." For related information, see the topics "Field Object" and "Value Property" in DAO Help. @@ -2246,7 +2249,7 @@ A flag that indicates the type of locking. ### Remarks -When pessimistic locking is in effect, the 2K page containing the record you are editing is locked as soon as you call the `Edit` member function. The page is unlocked when you call the `Update` or `Close` member function or any of the Move or Find operations. +When pessimistic locking is in effect, the 2K page containing the record you're editing is locked as soon as you call the `Edit` member function. The page is unlocked when you call the `Update` or `Close` member function or any of the Move or Find operations. When optimistic locking is in effect, the 2K page containing the record is locked only while the record is being updated with the `Update` member function. @@ -2285,7 +2288,7 @@ The name of the parameter whose value you want to set. The parameter must already have been established as part of the recordset's SQL string. You can access the parameter either by name or by its index position in the collection. -Specify the value to set as a `COleVariant` object. For information about setting the desired value and type in your `COleVariant` object, see class [COleVariant](../../mfc/reference/colevariant-class.md). Note that if you are not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. +Specify the value to set as a `COleVariant` object. For information about setting the desired value and type in your `COleVariant` object, see class [COleVariant](../../mfc/reference/colevariant-class.md). If you're not creating a UNICODE recordset, the `COleVariant` object must be explicitly declared ANSI. This can be done by using the [COleVariant::COleVariant](../../mfc/reference/colevariant-class.md#colevariant)**(** *lpszSrc* **,** *vtSrc* **)** form of constructor with *vtSrc* set to `VT_BSTRT` (ANSI) or by using the `COleVariant` function [SetString](../../mfc/reference/colevariant-class.md#setstring)**(** *lpszSrc* **,** *vtSrc* **)** with *vtSrc* set to `VT_BSTRT`. ## CDaoRecordset::SetParamValueNull @@ -2306,7 +2309,7 @@ The name of the field in the recordset, for lookup by name. ### Remarks -C++ NULL is not the same as Null, which, in database terminology, means "having no value." +C++ NULL isn't the same as Null, which, in database terminology, means "having no value." ## CDaoRecordset::SetPercentPosition @@ -2328,7 +2331,7 @@ When working with a dynaset-type or snapshot-type recordset, first populate the Once you call `SetPercentPosition`, the record at the approximate position corresponding to that value becomes current. > [!NOTE] -> Calling `SetPercentPosition` to move the current record to a specific record in a recordset is not recommended. Call the [SetBookmark](#setbookmark) member function instead. +> Calling `SetPercentPosition` to move the current record to a specific record in a recordset isn't recommended. Call the [SetBookmark](#setbookmark) member function instead. For related information, see the topic "PercentPosition Property" in DAO Help. @@ -2351,7 +2354,7 @@ If the data source supports transactions, you can make the `Update` call (and it > [!CAUTION] > If you call `Update` without first calling either `AddNew` or `Edit`, `Update` throws a `CDaoException`. If you call `AddNew` or `Edit`, you must call `Update` before you call [MoveNext](#movenext) or close either the recordset or the data source connection. Otherwise, your changes are lost without notification. -When the recordset object is pessimistically locked in a multiuser environment, the record remains locked from the time `Edit` is used until the updating is complete. If the recordset is optimistically locked, the record is locked and compared with the pre-edited record just before it is updated in the database. If the record has changed since you called `Edit`, the `Update` operation fails and MFC throws an exception. You can change the locking mode with `SetLockingMode`. +When the recordset object is pessimistically locked in a multiuser environment, the record remains locked from the time `Edit` is used until the updating is complete. If the recordset is optimistically locked, the record is locked and compared with the pre-edited record just before it's updated in the database. If the record has changed since you called `Edit`, the `Update` operation fails and MFC throws an exception. You can change the locking mode with `SetLockingMode`. > [!NOTE] > Optimistic locking is always used on external database formats, such as ODBC and installable ISAM. diff --git a/docs/mfc/reference/cdaorecordview-class.md b/docs/mfc/reference/cdaorecordview-class.md index 616077e525..e2baaabc9e 100644 --- a/docs/mfc/reference/cdaorecordview-class.md +++ b/docs/mfc/reference/cdaorecordview-class.md @@ -4,12 +4,14 @@ title: "CDaoRecordView Class" ms.date: "11/04/2016" f1_keywords: ["CDaoRecordView", "AFXDAO/CDaoRecordView", "AFXDAO/CDaoRecordView::CDaoRecordView", "AFXDAO/CDaoRecordView::IsOnFirstRecord", "AFXDAO/CDaoRecordView::IsOnLastRecord", "AFXDAO/CDaoRecordView::OnGetRecordset", "AFXDAO/CDaoRecordView::OnMove"] helpviewer_keywords: ["CDaoRecordView [MFC], CDaoRecordView", "CDaoRecordView [MFC], IsOnFirstRecord", "CDaoRecordView [MFC], IsOnLastRecord", "CDaoRecordView [MFC], OnGetRecordset", "CDaoRecordView [MFC], OnMove"] -ms.assetid: 5aa7d0e2-bd05-413e-b216-80c404ce18ac --- # CDaoRecordView Class A view that displays database records in controls. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ``` @@ -70,7 +72,7 @@ For more information about declaring and using your record view and recordset cl ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoRecordView::CDaoRecordView diff --git a/docs/mfc/reference/cdaorelationfieldinfo-structure.md b/docs/mfc/reference/cdaorelationfieldinfo-structure.md index f77f5502ff..af98cdba7e 100644 --- a/docs/mfc/reference/cdaorelationfieldinfo-structure.md +++ b/docs/mfc/reference/cdaorelationfieldinfo-structure.md @@ -4,12 +4,14 @@ title: "CDaoRelationFieldInfo Structure" ms.date: "11/04/2016" f1_keywords: ["CDaoRelationFieldInfo"] helpviewer_keywords: ["DAO (Data Access Objects), Relations collection", "CDaoRelationFieldInfo structure [MFC]"] -ms.assetid: 47cb89ca-dc80-47ce-96fd-cc4b88512558 --- # CDaoRelationFieldInfo Structure The `CDaoRelationFieldInfo` structure contains information about a field in a relation defined for data access objects (DAO). +> [!NOTE] +> Data Access Objects (DAO) is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ``` @@ -30,15 +32,15 @@ The name of the field in the foreign table of the relation. ## Remarks -A DAO relation object specifies the fields in a primary table and the fields in a foreign table that define the relation. The references to Primary in the structure definition above indicate how the information is returned in the `m_pFieldInfos` member of a [CDaoRelationInfo](../../mfc/reference/cdaorelationinfo-structure.md) object obtained by calling the [GetRelationInfo](../../mfc/reference/cdaodatabase-class.md#getrelationinfo) member function of class `CDaoDatabase`. +A DAO relation object specifies the fields in a primary table and the fields in a foreign table that define the relation. The references to Primary in the structure definition indicate how the information is returned in the `m_pFieldInfos` member of a [CDaoRelationInfo](../../mfc/reference/cdaorelationinfo-structure.md) object obtained by calling the [GetRelationInfo](../../mfc/reference/cdaodatabase-class.md#getrelationinfo) member function of class `CDaoDatabase`. -Relation objects and relation field objects are not represented by an MFC class. Instead, the DAO objects underlying MFC objects of class [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) contain a collection of relation objects, called the Relations collection. Each relation object, in turn, contains a collection of relation field objects. Each relation field object correlates a field in the primary table with a field in the foreign table. Taken together, the relation field objects define a group of fields in each table, which together define the relation. `CDaoDatabase` lets you access relation objects with a `CDaoRelationInfo` object by calling the `GetRelationInfo` member function. The `CDaoRelationInfo` object, then, has a data member, `m_pFieldInfos`, that points to an array of `CDaoRelationFieldInfo` objects. +Relation objects and relation field objects aren't represented by an MFC class. Instead, the DAO objects underlying MFC objects of class [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) contain a collection of relation objects, called the Relations collection. Each relation object, in turn, contains a collection of relation field objects. Each relation field object correlates a field in the primary table with a field in the foreign table. Taken together, the relation field objects define a group of fields in each table, which together define the relation. `CDaoDatabase` lets you access relation objects with a `CDaoRelationInfo` object by calling the `GetRelationInfo` member function. The `CDaoRelationInfo` object has a data member, `m_pFieldInfos`, that points to an array of `CDaoRelationFieldInfo` objects. -Call the [GetRelationInfo](../../mfc/reference/cdaodatabase-class.md#getrelationinfo) member function of the containing `CDaoDatabase` object in whose Relations collection is stored the relation object you are interested in. Then access the `m_pFieldInfos` member of the [CDaoRelationInfo](../../mfc/reference/cdaorelationinfo-structure.md) object. `CDaoRelationFieldInfo` also defines a `Dump` member function in debug builds. You can use `Dump` to dump the contents of a `CDaoRelationFieldInfo` object. +Call the [GetRelationInfo](../../mfc/reference/cdaodatabase-class.md#getrelationinfo) member function of the containing `CDaoDatabase` object in whose Relations collection is stored the relation object you're interested in. Then access the `m_pFieldInfos` member of the [CDaoRelationInfo](../../mfc/reference/cdaorelationinfo-structure.md) object. `CDaoRelationFieldInfo` also defines a `Dump` member function in debug builds. You can use `Dump` to dump the contents of a `CDaoRelationFieldInfo` object. ## Requirements -**Header:** afxdao.h +**Header:** `afxdao`.h ## See also diff --git a/docs/mfc/reference/cdaorelationinfo-structure.md b/docs/mfc/reference/cdaorelationinfo-structure.md index 5152258fe0..d93623b3d7 100644 --- a/docs/mfc/reference/cdaorelationinfo-structure.md +++ b/docs/mfc/reference/cdaorelationinfo-structure.md @@ -4,11 +4,13 @@ title: "CDaoRelationInfo Structure" ms.date: "06/25/2018" f1_keywords: ["CDaoRelationInfo"] helpviewer_keywords: ["DAO (Data Access Objects), Relations collection", "CDaoRelationInfo structure [MFC]"] -ms.assetid: 92dda090-fe72-4090-84ec-429498a48aad --- # CDaoRelationInfo Structure -The `CDaoRelationInfo` structure contains information about a relation defined between fields of two tables in a [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) object. +The `CDaoRelationInfo` structure contains information about a relation defined between fields of two tables in a [`CDaoDatabase`](../../mfc/reference/cdaodatabase-class.md) object. + +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax @@ -71,7 +73,7 @@ Information retrieved by the [CDaoDatabase::GetRelationInfo](../../mfc/reference ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaotabledef-class.md b/docs/mfc/reference/cdaotabledef-class.md index a527297ab3..5ad89da173 100644 --- a/docs/mfc/reference/cdaotabledef-class.md +++ b/docs/mfc/reference/cdaotabledef-class.md @@ -4,12 +4,14 @@ title: "CDaoTableDef Class" ms.date: "11/04/2016" f1_keywords: ["CDaoTableDef", "AFXDAO/CDaoTableDef", "AFXDAO/CDaoTableDef::CDaoTableDef", "AFXDAO/CDaoTableDef::Append", "AFXDAO/CDaoTableDef::CanUpdate", "AFXDAO/CDaoTableDef::Close", "AFXDAO/CDaoTableDef::Create", "AFXDAO/CDaoTableDef::CreateField", "AFXDAO/CDaoTableDef::CreateIndex", "AFXDAO/CDaoTableDef::DeleteField", "AFXDAO/CDaoTableDef::DeleteIndex", "AFXDAO/CDaoTableDef::GetAttributes", "AFXDAO/CDaoTableDef::GetConnect", "AFXDAO/CDaoTableDef::GetDateCreated", "AFXDAO/CDaoTableDef::GetDateLastUpdated", "AFXDAO/CDaoTableDef::GetFieldCount", "AFXDAO/CDaoTableDef::GetFieldInfo", "AFXDAO/CDaoTableDef::GetIndexCount", "AFXDAO/CDaoTableDef::GetIndexInfo", "AFXDAO/CDaoTableDef::GetName", "AFXDAO/CDaoTableDef::GetRecordCount", "AFXDAO/CDaoTableDef::GetSourceTableName", "AFXDAO/CDaoTableDef::GetValidationRule", "AFXDAO/CDaoTableDef::GetValidationText", "AFXDAO/CDaoTableDef::IsOpen", "AFXDAO/CDaoTableDef::Open", "AFXDAO/CDaoTableDef::RefreshLink", "AFXDAO/CDaoTableDef::SetAttributes", "AFXDAO/CDaoTableDef::SetConnect", "AFXDAO/CDaoTableDef::SetName", "AFXDAO/CDaoTableDef::SetSourceTableName", "AFXDAO/CDaoTableDef::SetValidationRule", "AFXDAO/CDaoTableDef::SetValidationText", "AFXDAO/CDaoTableDef::m_pDAOTableDef", "AFXDAO/CDaoTableDef::m_pDatabase"] helpviewer_keywords: ["CDaoTableDef [MFC], CDaoTableDef", "CDaoTableDef [MFC], Append", "CDaoTableDef [MFC], CanUpdate", "CDaoTableDef [MFC], Close", "CDaoTableDef [MFC], Create", "CDaoTableDef [MFC], CreateField", "CDaoTableDef [MFC], CreateIndex", "CDaoTableDef [MFC], DeleteField", "CDaoTableDef [MFC], DeleteIndex", "CDaoTableDef [MFC], GetAttributes", "CDaoTableDef [MFC], GetConnect", "CDaoTableDef [MFC], GetDateCreated", "CDaoTableDef [MFC], GetDateLastUpdated", "CDaoTableDef [MFC], GetFieldCount", "CDaoTableDef [MFC], GetFieldInfo", "CDaoTableDef [MFC], GetIndexCount", "CDaoTableDef [MFC], GetIndexInfo", "CDaoTableDef [MFC], GetName", "CDaoTableDef [MFC], GetRecordCount", "CDaoTableDef [MFC], GetSourceTableName", "CDaoTableDef [MFC], GetValidationRule", "CDaoTableDef [MFC], GetValidationText", "CDaoTableDef [MFC], IsOpen", "CDaoTableDef [MFC], Open", "CDaoTableDef [MFC], RefreshLink", "CDaoTableDef [MFC], SetAttributes", "CDaoTableDef [MFC], SetConnect", "CDaoTableDef [MFC], SetName", "CDaoTableDef [MFC], SetSourceTableName", "CDaoTableDef [MFC], SetValidationRule", "CDaoTableDef [MFC], SetValidationText", "CDaoTableDef [MFC], m_pDAOTableDef", "CDaoTableDef [MFC], m_pDatabase"] -ms.assetid: 7c5d2254-8475-43c4-8a6c-2d32ead194c9 --- # CDaoTableDef Class Represents the stored definition of a base table or an attached table. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ``` @@ -114,7 +116,7 @@ When you finish using a tabledef object, call its [Close](../../mfc/reference/cd ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoTableDef::Append diff --git a/docs/mfc/reference/cdaotabledefinfo-structure.md b/docs/mfc/reference/cdaotabledefinfo-structure.md index eef34d4ef3..ca83c7daed 100644 --- a/docs/mfc/reference/cdaotabledefinfo-structure.md +++ b/docs/mfc/reference/cdaotabledefinfo-structure.md @@ -4,12 +4,14 @@ title: "CDaoTableDefInfo Structure" ms.date: "11/04/2016" f1_keywords: ["CDaoTableDefInfo"] helpviewer_keywords: ["CDaoTableDefInfo structure [MFC]", "DAO (Data Access Objects), TableDefs collection"] -ms.assetid: c01ccebb-5615-434e-883c-4f60eac943dd --- # CDaoTableDefInfo Structure The `CDaoTableDefInfo` structure contains information about a tabledef object defined for data access objects (DAO). +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ``` @@ -82,7 +84,7 @@ The date and time settings are derived from the computer on which the base table ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdaoworkspace-class.md b/docs/mfc/reference/cdaoworkspace-class.md index 0b0f9fb591..777678f429 100644 --- a/docs/mfc/reference/cdaoworkspace-class.md +++ b/docs/mfc/reference/cdaoworkspace-class.md @@ -4,15 +4,17 @@ title: "CDaoWorkspace Class" ms.date: "11/04/2016" f1_keywords: ["CDaoWorkspace", "AFXDAO/CDaoWorkspace", "AFXDAO/CDaoWorkspace::CDaoWorkspace", "AFXDAO/CDaoWorkspace::Append", "AFXDAO/CDaoWorkspace::BeginTrans", "AFXDAO/CDaoWorkspace::Close", "AFXDAO/CDaoWorkspace::CommitTrans", "AFXDAO/CDaoWorkspace::CompactDatabase", "AFXDAO/CDaoWorkspace::Create", "AFXDAO/CDaoWorkspace::GetDatabaseCount", "AFXDAO/CDaoWorkspace::GetDatabaseInfo", "AFXDAO/CDaoWorkspace::GetIniPath", "AFXDAO/CDaoWorkspace::GetIsolateODBCTrans", "AFXDAO/CDaoWorkspace::GetLoginTimeout", "AFXDAO/CDaoWorkspace::GetName", "AFXDAO/CDaoWorkspace::GetUserName", "AFXDAO/CDaoWorkspace::GetVersion", "AFXDAO/CDaoWorkspace::GetWorkspaceCount", "AFXDAO/CDaoWorkspace::GetWorkspaceInfo", "AFXDAO/CDaoWorkspace::Idle", "AFXDAO/CDaoWorkspace::IsOpen", "AFXDAO/CDaoWorkspace::Open", "AFXDAO/CDaoWorkspace::RepairDatabase", "AFXDAO/CDaoWorkspace::Rollback", "AFXDAO/CDaoWorkspace::SetDefaultPassword", "AFXDAO/CDaoWorkspace::SetDefaultUser", "AFXDAO/CDaoWorkspace::SetIniPath", "AFXDAO/CDaoWorkspace::SetIsolateODBCTrans", "AFXDAO/CDaoWorkspace::SetLoginTimeout", "AFXDAO/CDaoWorkspace::m_pDAOWorkspace"] helpviewer_keywords: ["CDaoWorkspace [MFC], CDaoWorkspace", "CDaoWorkspace [MFC], Append", "CDaoWorkspace [MFC], BeginTrans", "CDaoWorkspace [MFC], Close", "CDaoWorkspace [MFC], CommitTrans", "CDaoWorkspace [MFC], CompactDatabase", "CDaoWorkspace [MFC], Create", "CDaoWorkspace [MFC], GetDatabaseCount", "CDaoWorkspace [MFC], GetDatabaseInfo", "CDaoWorkspace [MFC], GetIniPath", "CDaoWorkspace [MFC], GetIsolateODBCTrans", "CDaoWorkspace [MFC], GetLoginTimeout", "CDaoWorkspace [MFC], GetName", "CDaoWorkspace [MFC], GetUserName", "CDaoWorkspace [MFC], GetVersion", "CDaoWorkspace [MFC], GetWorkspaceCount", "CDaoWorkspace [MFC], GetWorkspaceInfo", "CDaoWorkspace [MFC], Idle", "CDaoWorkspace [MFC], IsOpen", "CDaoWorkspace [MFC], Open", "CDaoWorkspace [MFC], RepairDatabase", "CDaoWorkspace [MFC], Rollback", "CDaoWorkspace [MFC], SetDefaultPassword", "CDaoWorkspace [MFC], SetDefaultUser", "CDaoWorkspace [MFC], SetIniPath", "CDaoWorkspace [MFC], SetIsolateODBCTrans", "CDaoWorkspace [MFC], SetLoginTimeout", "CDaoWorkspace [MFC], m_pDAOWorkspace"] -ms.assetid: 64f60de6-4df1-4d4a-a65b-c489b5257d52 --- # CDaoWorkspace Class -Manages a named, password-protected database session from login to logoff, by a single user. DAO is supported through Office 2013. DAO 3.6 is the final version, and it is considered obsolete. +Manages a named, password-protected database session from login to logoff, by a single user. + +> [!NOTE] +> Data Access Objects (DAO) is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. ## Syntax -``` +```cpp class CDaoWorkspace : public CObject ``` @@ -48,7 +50,7 @@ class CDaoWorkspace : public CObject |[CDaoWorkspace::IsOpen](#isopen)|Returns nonzero if the workspace is open.| |[CDaoWorkspace::Open](#open)|Explicitly opens a workspace object associated with DAO's default workspace.| |[CDaoWorkspace::RepairDatabase](#repairdatabase)|Attempts to repair a damaged database.| -|[CDaoWorkspace::Rollback](#rollback)|Ends the current transaction and does not save the changes.| +|[CDaoWorkspace::Rollback](#rollback)|Ends the current transaction and doesn't save the changes.| |[CDaoWorkspace::SetDefaultPassword](#setdefaultpassword)|Sets the password that the database engine uses when a workspace object is created without a specific password.| |[CDaoWorkspace::SetDefaultUser](#setdefaultuser)|Sets the user name that the database engine uses when a workspace object is created without a specific user name.| |[CDaoWorkspace::SetIniPath](#setinipath)|Sets the location of the Microsoft Jet database engine's initialization settings in the Windows registry.| @@ -63,18 +65,18 @@ class CDaoWorkspace : public CObject ## Remarks -In most cases, you will not need multiple workspaces, and you will not need to create explicit workspace objects; when you open database and recordset objects, they use DAO's default workspace. However, if needed, you can run multiple sessions at a time by creating additional workspace objects. Each workspace object can contain multiple open database objects in its own Databases collection. In MFC, a workspace is primarily a transaction manager, specifying a set of open databases all in the same "transaction space." +In most cases, you won't need multiple workspaces, and you won't need to create explicit workspace objects; when you open database and recordset objects, they use DAO's default workspace. However, if needed, you can run multiple sessions at a time by creating more workspace objects. Each workspace object can contain multiple open database objects in its own Databases collection. In MFC, a workspace is primarily a transaction manager, specifying a set of open databases all in the same "transaction space." > [!NOTE] > The DAO database classes are distinct from the MFC database classes based on Open Database Connectivity (ODBC). All DAO database class names have a "CDao" prefix. In general, the MFC classes based on DAO are more capable than the MFC classes based on ODBC. The DAO-based classes access data through the Microsoft Jet database engine, including ODBC drivers. They also support Data Definition Language (DDL) operations, such as creating databases and adding tables and fields via the classes, without having to call DAO directly. ## Capabilities -Class `CDaoWorkspace` provides the following: +Class `CDaoWorkspace` provides: - Explicit access, if needed, to a default workspace, created by initializing the database engine. Usually you use DAO's default workspace implicitly by creating database and recordset objects. -- A transaction space in which transactions apply to all databases open in the workspace. You can create additional workspaces to manage separate transaction spaces. +- A transaction space in which transactions apply to all databases open in the workspace. You can create more workspaces to manage separate transaction spaces. - An interface to many properties of the underlying Microsoft Jet database engine (see the static member functions). Opening or creating a workspace, or calling a static member function before open or create, initializes the database engine. @@ -82,7 +84,7 @@ Class `CDaoWorkspace` provides the following: ## Security -MFC does not implement the Users and Groups collections in DAO, which are used for security control. If you need those aspects of DAO, you must program them yourself via direct calls to DAO interfaces. For information, see [Technical Note 54](../../mfc/tn054-calling-dao-directly-while-using-mfc-dao-classes.md). +MFC doesn't implement the Users and Groups collections in DAO, which are used for security control. If you need those aspects of DAO, you must program them yourself via direct calls to DAO interfaces. For information, see [Technical Note 54](../../mfc/tn054-calling-dao-directly-while-using-mfc-dao-classes.md). ## Usage @@ -90,17 +92,17 @@ You can use class `CDaoWorkspace` to: - Explicitly open the default workspace. - Usually your use of the default workspace is implicit — when you open new [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) or [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) objects. But you might need to access it explicitly — for example, to access database engine properties or the Workspaces collection. See "Implicit Use of the Default Workspace" below. + Usually your use of the default workspace is implicit when you open new [CDaoDatabase](../../mfc/reference/cdaodatabase-class.md) or [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md) objects. But you might need to access it explicitly. For example, to access database engine properties or the Workspaces collection. See "Implicit Use of the Default Workspace" below. - Create new workspaces. Call [Append](#append) if you want to add them to the Workspaces collection. - Open an existing workspace in the Workspaces collection. -Creating a new workspace that does not already exist in the Workspaces collection is described under the [Create](#create) member function. Workspace objects do not persist in any way between datababase engine sessions. If your application links MFC statically, ending the application uninitializes the database engine. If your application links with MFC dynamically, the database engine is uninitialized when the MFC DLL is unloaded. +Creating a new workspace that doesn't already exist in the Workspaces collection is described under the [Create](#create) member function. Workspace objects don't persist in any way between database engine sessions. If your application links MFC statically, ending the application uninitializes the database engine. If your application links with MFC dynamically, the database engine is uninitialized when the MFC DLL is unloaded. Explicitly opening the default workspace, or opening an existing workspace in the Workspaces collection, is described under the [Open](#open) member function. -End a workspace session by closing the workspace with the [Close](#close) member function. `Close` closes any databases you have not closed previously, rolling back any uncommitted transactions. +End a workspace session by closing the workspace with the [Close](#close) member function. `Close` closes any databases you haven't closed and rolls back any uncommitted transactions. ## Transactions @@ -110,7 +112,7 @@ DAO manages transactions at the workspace level; hence, transactions on a worksp MFC uses DAO's default workspace implicitly under the following circumstances: -- If you create a new `CDaoDatabase` object but do not do so through an existing `CDaoWorkspace` object, MFC creates a temporary workspace object for you, which corresponds to DAO's default workspace. If you do so for multiple databases, all of the database objects are associated with the default workspace. You can access a database's workspace through a `CDaoDatabase` data member. +- If you create a new `CDaoDatabase` object but don't do so through an existing `CDaoWorkspace` object, MFC creates a temporary workspace object for you, which corresponds to DAO's default workspace. If you do so for multiple databases, all of the database objects are associated with the default workspace. You can access a database's workspace through a `CDaoDatabase` data member. - Similarly, if you create a `CDaoRecordset` object without supplying a pointer to a `CDaoDatabase` object, MFC creates a temporary database object and, by extension, a temporary workspace object. You can access a recordset's database, and indirectly its workspace, through a `CDaoRecordset` data member. @@ -122,13 +124,13 @@ For information about calling DAO directly and about DAO security, see [Technica ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) +[`CObject`](../../mfc/reference/cobject-class.md) `CDaoWorkspace` ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## CDaoWorkspace::Append @@ -140,7 +142,7 @@ virtual void Append(); ### Remarks -`Append` appends a newly created workspace object to the database engine's Workspaces collection. Workspaces do not persist between database engine sessions; they are stored only in memory, not on disk. You do not have to append a workspace; if you do not, you can still use it. +`Append` appends a newly created workspace object to the database engine's Workspaces collection. Workspaces don't persist between database engine sessions; they're stored only in memory, not on disk. You don't have to append a workspace; if you don't, you can still use it. An appended workspace remains in the Workspaces collection, in an active, open state, until you call its [Close](#close) member function. @@ -201,13 +203,13 @@ Closing an open workspace object releases the underlying DAO object and, if the > [!CAUTION] > Closing a workspace object closes any open databases in the workspace. This results in any recordsets open in the databases being closed as well, and any pending edits or updates are rolled back. For related information, see the [CDaoDatabase::Close](../../mfc/reference/cdaodatabase-class.md#close), [CDaoRecordset::Close](../../mfc/reference/cdaorecordset-class.md#close), [CDaoTableDef::Close](../../mfc/reference/cdaotabledef-class.md#close), and [CDaoQueryDef::Close](../../mfc/reference/cdaoquerydef-class.md#close) member functions. -Workspace objects are not permanent; they only exist while references to them exist. This means that when the database engine session ends, the workspace and its Databases collection do not persist. You must re-create them for the next session by opening your workspace and database(s) again. +Workspace objects aren't permanent; they only exist while references to them exist. This means that when the database engine session ends, the workspace, and its Databases collection don't persist. You must re-create them for the next session by opening your workspace and database(s) again. For related information, see the topic "Close Method" in DAO Help. ## CDaoWorkspace::CommitTrans -Call this member function to commit a transaction — save a group of edits and updates to one or more databases in the workspace. +Call this member function to commit a transaction which saves a group of edits and updates to one or more databases in the workspace. ```cpp void CommitTrans(); @@ -218,12 +220,12 @@ void CommitTrans(); A transaction consists of a series of changes to the database's data or its structure, beginning with a call to [BeginTrans](#begintrans). When you complete the transaction, either commit it or roll it back (cancel the changes) with [Rollback](#rollback). By default, without transactions, updates to records are committed immediately. Calling `BeginTrans` causes commitment of updates to be delayed until you call `CommitTrans`. > [!CAUTION] -> Within one workspace, transactions are always global to the workspace and are not limited to only one database or recordset. If you perform operations on more than one database or recordset within a workspace transaction, `CommitTrans` commits all pending updates, and `Rollback` restores all operations on those databases and recordsets. +> Within one workspace, transactions are always global to the workspace and aren't limited to only one database or recordset. If you perform operations on more than one database or recordset within a workspace transaction, `CommitTrans` commits all pending updates, and `Rollback` restores all operations on those databases and recordsets. When you close a database or workspace with pending transactions, the transactions are all rolled back. > [!NOTE] -> This is not a two-phase commit mechanism. If one update fails to commit, others still will commit. +> This isn't a two-phase commit mechanism. If one update fails to commit, others still will commit. ## CDaoWorkspace::CompactDatabase @@ -250,13 +252,13 @@ static void PASCAL CompactDatabase( The name of an existing, closed database. It can be a full path and filename, such as "C:\\\MYDB.MDB". If the filename has an extension, you must specify it. If your network supports the uniform naming convention (UNC), you can also specify a network path, such as "\\\\\\\MYSERVER\\\MYSHARE\\\MYDIR\\\MYDB.MDB". (Double backslashes are required in the path strings because "\\" is the C++ escape character.) *lpszDestName*
-The full path of the compacted database that you are creating. You can also specify a network path as with *lpszSrcName*. You cannot use the *lpszDestName* argument to specify the same database file as *lpszSrcName*. +The full path of the compacted database that you are creating. You can also specify a network path as with *lpszSrcName*. You can't use the *lpszDestName* argument to specify the same database file as *lpszSrcName*. *lpszPassword*
-A password, used when you want to compact a password-protected database. Note that if you use the version of `CompactDatabase` that takes a password, you must supply all parameters. Also, because this is a connect parameter, it requires special formatting, as follows: ;PWD= *lpszPassword*. For example: ;PWD="Happy". (The leading semicolon is required.) +A password, used when you want to compact a password-protected database. If you use the version of `CompactDatabase` that takes a password, you must supply all parameters. Also, because this is a connect parameter, it requires special formatting, as follows: ;PWD= *lpszPassword*. For example: ;PWD="Happy". (The leading semicolon is required.) *lpszLocale*
-A string expression used to specify collating order for creating *lpszDestName*. If you omit this argument by accepting the default value of `dbLangGeneral` (see below), the locale of the new database is the same as that of the old database. Possible values are: +A string expression used to specify collating order for creating *lpszDestName*. If you omit this argument by accepting the default value of `dbLangGeneral` (see below), the locale of the new database is the same as the old database. Possible values are: - `dbLangGeneral` English, German, French, Portuguese, Italian, and Modern Spanish @@ -289,7 +291,7 @@ A string expression used to specify collating order for creating *lpszDestName*. - `dbLangTurkish` Turkish *nOptions*
-Indicates one or more options for the target database, *lpszDestName*. If you omit this argument by accepting the default value, the *lpszDestName* will have the same encryption and the same version as *lpszSrcName*. You can combine the `dbEncrypt` or `dbDecrypt` option with one of the version options using the bitwise-OR operator. Possible values, which specify a database format, not a database engine version, are: +Indicates one or more options for the target database, *lpszDestName*. If you omit this argument by accepting the default value, the *lpszDestName* has the same encryption and the same version as *lpszSrcName*. You can combine the `dbEncrypt` or `dbDecrypt` option with one of the version options using the bitwise-OR operator. Possible values, which specify a database format, not a database engine version, are: - `dbEncrypt` Encrypt the database while compacting. @@ -303,17 +305,17 @@ Indicates one or more options for the target database, *lpszDestName*. If you om - `dbVersion30` Create a database that uses the Microsoft Jet database engine version 3.0 while compacting. -You can use `dbEncrypt` or `dbDecrypt` in the options argument to specify whether to encrypt or to decrypt the database as it is compacted. If you omit an encryption constant or if you include both `dbDecrypt` and `dbEncrypt`, *lpszDestName* will have the same encryption as *lpszSrcName*. You can use one of the version constants in the options argument to specify the version of the data format for the compacted database. This constant affects only the version of the data format of *lpszDestName*. You can specify only one version constant. If you omit a version constant, *lpszDestName* will have the same version as *lpszSrcName*. You can compact *lpszDestName* only to a version that is the same or later than that of *lpszSrcName*. +You can use `dbEncrypt` or `dbDecrypt` in the options argument to specify whether to encrypt or to decrypt the database as it is compacted. If you omit an encryption constant or if you include both `dbDecrypt` and `dbEncrypt`, *`lpszDestName`* has the same encryption as *`lpszSrcName`*. You can use one of the version constants in the options argument to specify the version of the data format for the compacted database. This constant affects only the version of the data format of *`lpszDestName`*. You can specify only one version constant. If you omit a version constant, *`lpszDestName`* will have the same version as *`lpszSrcName`*. You can compact *`lpszDestName`* only to a version that is the same or later than *`lpszSrcName`*. > [!CAUTION] -> If a database is not encrypted, it is possible, even if you implement user/password security, to directly read the binary disk file that constitutes the database. +> If a database isn't encrypted, it is possible, even if you implement user/password security, to directly read the binary disk file that constitutes the database. ### Remarks As you change data in a database, the database file can become fragmented and use more disk space than necessary. Periodically, you should compact your database to defragment the database file. The compacted database is usually smaller. You can also choose to change the collating order, the encryption, or the version of the data format while you copy and compact the database. > [!CAUTION] -> The `CompactDatabase` member function will not correctly convert a complete Microsoft Access database from one version to another. Only the data format is converted. Microsoft Access-defined objects, such as forms and reports, are not converted. However, the data is correctly converted. +> The `CompactDatabase` member function won't correctly convert a complete Microsoft Access database from one version to another. Only the data format is converted. Microsoft Access-defined objects, such as forms and reports, aren't converted. However, the data is correctly converted. > [!TIP] > You can also use `CompactDatabase` to copy a database file. @@ -352,11 +354,11 @@ The overall creation process is: 1. Optionally call [Append](#append) if you want to add the workspace to the database engine's Workspaces collection. You can work with the workspace without appending it. -After the `Create` call, the workspace object is in an open state, ready for use. You do not call `Open` after `Create`. You do not call `Create` if the workspace already exists in the Workspaces collection. `Create` initializes the database engine if it has not already been initialized for your application. +After the `Create` call, the workspace object is in an open state, ready for use. You don't call `Open` after `Create`. You don't call `Create` if the workspace already exists in the Workspaces collection. `Create` initializes the database engine if it hasn't already been initialized for your application. ## CDaoWorkspace::GetDatabaseCount -Call this member function to retrieve the number of DAO database objects in the workspace's Databases collection — the number of open databases in the workspace. +Call this member function to retrieve the number of DAO database objects in the workspace's Databases collection. Which is the number of open databases in the workspace. ``` short GetDatabaseCount(); @@ -422,7 +424,7 @@ static CString PASCAL GetIniPath(); ### Return Value -A [CString](../../atl-mfc-shared/reference/cstringt-class.md) containing the registry location. +A [`CString`](../../atl-mfc-shared/reference/cstringt-class.md) containing the registry location. ### Remarks @@ -444,9 +446,9 @@ Nonzero if ODBC transactions are isolated; otherwise 0. ### Remarks -In some situations, you might need to have multiple simultaneous transactions pending on the same ODBC database. To do this, you need to open a separate workspace for each transaction. Keep in mind that although each workspace can have its own ODBC connection to the database, this slows system performance. Because transaction isolation is not normally required, ODBC connections from multiple workspace objects opened by the same user are shared by default. +In some situations, you might need to have multiple simultaneous transactions pending on the same ODBC database. To do this, you need to open a separate workspace for each transaction. Keep in mind that although each workspace can have its own ODBC connection to the database, this slows system performance. Because transaction isolation isn't normally required, ODBC connections from multiple workspace objects opened by the same user are shared by default. -Some ODBC servers, such as Microsoft SQL Server, do not allow simultaneous transactions on a single connection. If you need to have more than one transaction at a time pending against such a database, set the IsolateODBCTrans property to TRUE on each workspace as soon as you open it. This forces a separate ODBC connection for each workspace. +Some ODBC servers, such as Microsoft SQL Server, don't allow simultaneous transactions on a single connection. If you need to have more than one transaction at a time pending against such a database, set the IsolateODBCTrans property to TRUE on each workspace as soon as you open it. This forces a separate ODBC connection for each workspace. For related information, see the topic "IsolateODBCTrans Property" in DAO Help. @@ -466,7 +468,7 @@ The number of seconds before an error occurs when you attempt to log in to an OD This value represents the number of seconds before an error occurs when you attempt to log in to an ODBC database. The default LoginTimeout setting is 20 seconds. When LoginTimeout is set to 0, no timeout occurs and the communication with the data source might stop responding. -When you are attempting to log in to an ODBC database, such as Microsoft SQL Server, the connection may fail as a result of network errors or because the server is not running. Rather than waiting for the default 20 seconds to connect, you can specify how long the database engine waits before it produces an error. Logging in to the server happens implicitly as part of a number of different events, such as running a query on an external server database. +When you are attempting to log in to an ODBC database, such as Microsoft SQL Server, the connection may fail as a result of network errors or because the server isn't running. Rather than waiting for the default 20 seconds to connect, you can specify how long the database engine waits before it produces an error. Logging in to the server happens implicitly as part of different events, such as running a query on an external server database. For related information, see the topic "LoginTimeout Property" in DAO Help. @@ -480,7 +482,7 @@ CString GetName(); ### Return Value -A [CString](../../atl-mfc-shared/reference/cstringt-class.md) containing the user-defined name of the DAO workspace object. +A [`CString`](../../atl-mfc-shared/reference/cstringt-class.md) containing the user-defined name of the DAO workspace object. ### Remarks @@ -498,7 +500,7 @@ CString GetUserName(); ### Return Value -A [CString](../../atl-mfc-shared/reference/cstringt-class.md) that represents the owner of the workspace object. +A [`CString`](../../atl-mfc-shared/reference/cstringt-class.md) that represents the owner of the workspace object. ### Remarks @@ -516,7 +518,7 @@ static CString PASCAL GetVersion(); ### Return Value -A [CString](../../atl-mfc-shared/reference/cstringt-class.md) that indicates the version of the database engine associated with the object. +A [`CString`](../../atl-mfc-shared/reference/cstringt-class.md) that indicates the version of the database engine associated with the object. ### Remarks @@ -538,7 +540,7 @@ The number of open workspaces in the Workspaces collection. ### Remarks -This count does not include any open workspaces not appended to the collection. `GetWorkspaceCount` is useful if you need to loop through all defined workspaces in the Workspaces collection. To obtain information about a given workspace in the collection, see [GetWorkspaceInfo](#getworkspaceinfo). Typical usage is to call `GetWorkspaceCount` for the number of open workspaces, then use that number as a loop index for repeated calls to `GetWorkspaceInfo`. +This count doesn't include any open workspaces not appended to the collection. `GetWorkspaceCount` is useful if you need to loop through all defined workspaces in the Workspaces collection. To obtain information about a given workspace in the collection, see [GetWorkspaceInfo](#getworkspaceinfo). Typical usage is to call `GetWorkspaceCount` for the number of open workspaces, then use that number as a loop index for repeated calls to `GetWorkspaceInfo`. ## CDaoWorkspace::GetWorkspaceInfo @@ -595,20 +597,20 @@ An action to take during the idle processing. Currently the only valid action is ### Remarks -This is often true in multiuser, multitasking environments in which there is not enough background processing time to keep all records in a recordset current. +This is often true in multiuser, multitasking environments in which there isn't enough background processing time to keep all records in a recordset current. > [!NOTE] -> Calling `Idle` is not necessary with databases created with version 3.0 of the Microsoft Jet database engine. Use `Idle` only for databases created with earlier versions. +> Calling `Idle` isn't necessary with databases created with version 3.0 of the Microsoft Jet database engine. Use `Idle` only for databases created with earlier versions. Usually, read locks are removed and data in local dynaset-type recordset objects is updated only when no other actions (including mouse movements) are occurring. If you periodically call `Idle`, you provide the database engine with time to catch up on background processing tasks by releasing unneeded read locks. Specifying the `dbFreeLocks` constant as an argument delays processing until all read locks are released. -This member function is not needed in single-user environments unless multiple instances of an application are running. The `Idle` member function may increase performance in a multiuser environment because it forces the database engine to flush data to disk, releasing locks on memory. You can also release read locks by making operations part of a transaction. +This member function isn't needed in single-user environments unless multiple instances of an application are running. The `Idle` member function may increase performance in a multiuser environment because it forces the database engine to flush data to disk, releasing locks on memory. You can also release read locks by making operations part of a transaction. For related information, see the topic "Idle Method" in DAO Help. ## CDaoWorkspace::IsOpen -Call this member function to determine whether the `CDaoWorkspace` object is open — that is, whether the MFC object has been initialized by a call to [Open](#open) or a call to [Create](#create). +Call this member function to determine whether the `CDaoWorkspace` object is open. Which means either the MFC object has been initialized by a call to [Open](#open) or a call to [Create](#create). ``` BOOL IsOpen() const; @@ -647,15 +649,15 @@ The name of the DAO workspace object to open — a string with up to 14 characte ### Remarks -After constructing a `CDaoWorkspace` object, call this member function to do one of the following: +After constructing a `CDaoWorkspace` object, call this member function to do one of: - Explicitly open the default workspace. Pass NULL for *lpszName*. - Open an existing `CDaoWorkspace` object, a member of the Workspaces collection, by name. Pass a valid name for an existing workspace object. -`Open` puts the workspace object into an open state and also initializes the database engine if it has not already been initialized for your application. +`Open` puts the workspace object into an open state and also initializes the database engine if it hasn't already been initialized for your application. -Although many `CDaoWorkspace` member functions can only be called after the workspace has been opened, the following member functions, which operate on the database engine, are available after construction of the C++ object but before a call to `Open`: +Although many `CDaoWorkspace` member functions can only be called after the workspace is opened, the following member functions, which operate on the database engine, are available after construction of the C++ object but before a call to `Open`: :::row::: :::column span=""::: @@ -692,9 +694,9 @@ The path and filename for an existing Microsoft Jet engine database file. If you ### Remarks -You must close the database specified by *lpszName* before you repair it. In a multiuser environment, other users cannot have *lpszName* open while you are repairing it. If *lpszName* is not closed or is not available for exclusive use, an error occurs. +You must close the database specified by *lpszName* before you repair it. In a multiuser environment, other users can't have *lpszName* open while you are repairing it. If *lpszName* isn't closed or isn't available for exclusive use, an error occurs. -This member function attempts to repair a database that was marked as possibly corrupt by an incomplete write operation. This can occur if an application using the Microsoft Jet database engine is closed unexpectedly because of a power outage or computer hardware problem. If you complete the operation and call the [Close](../../mfc/reference/cdaodatabase-class.md#close) member function or you quit the application in a usual way, the database will not be marked as possibly corrupt. +This member function attempts to repair a database that was marked as possibly corrupt by an incomplete write operation. This can occur if an application using the Microsoft Jet database engine is closed unexpectedly because of a power outage or computer hardware problem. If you complete the operation and call the [Close](../../mfc/reference/cdaodatabase-class.md#close) member function or you quit the application in a usual way, the database won't be marked as possibly corrupt. > [!NOTE] > After repairing a database, it is also a good idea to compact it using the [CompactDatabase](#compactdatabase) member function to defragment the file and to recover disk space. @@ -712,7 +714,7 @@ void Rollback(); ### Remarks > [!CAUTION] -> Within one workspace object, transactions are always global to the workspace and are not limited to only one database or recordset. If you perform operations on more than one database or recordset within a workspace transaction, `Rollback` restores all operations on all of those databases and recordsets. +> Within one workspace object, transactions are always global to the workspace and aren't limited to only one database or recordset. If you perform operations on more than one database or recordset within a workspace transaction, `Rollback` restores all operations on all of those databases and recordsets. If you close a workspace object without saving or rolling back any pending transactions, the transactions are automatically rolled back. If you call [CommitTrans](#committrans) or `Rollback` without first calling [BeginTrans](#begintrans), an error occurs. @@ -734,11 +736,11 @@ The default password. A password can be up to 14 characters long and can contain ### Remarks -The default password that you set applies to new workspaces you create after the call. When you create subsequent workspaces, you do not need to specify a password in the [Create](#create) call. +The default password that you set applies to new workspaces you create after the call. When you create subsequent workspaces, you don't need to specify a password in the [Create](#create) call. To use this member function: -1. Construct a `CDaoWorkspace` object but do not call `Create`. +1. Construct a `CDaoWorkspace` object but don't call `Create`. 1. Call `SetDefaultPassword` and, if you like, [SetDefaultUser](#setdefaultuser). @@ -763,11 +765,11 @@ The default user name. A user name can be 1 - 20 characters long and include alp ### Remarks -The default user name that you set applies to new workspaces you create after the call. When you create subsequent workspaces, you do not need to specify a user name in the [Create](#create) call. +The default user name that you set applies to new workspaces you create after the call. When you create subsequent workspaces, you don't need to specify a user name in the [Create](#create) call. To use this member function: -1. Construct a `CDaoWorkspace` object but do not call `Create`. +1. Construct a `CDaoWorkspace` object but don't call `Create`. 1. Call `SetDefaultUser` and, if you like, [SetDefaultPassword](#setdefaultpassword). @@ -797,7 +799,7 @@ Call `SetIniPath` only if you need to specify special settings. For more informa > [!NOTE] > Call `SetIniPath` during application installation, not when the application runs. `SetIniPath` must be called before you open any workspaces, databases, or recordsets; otherwise, MFC throws an exception. -You can use this mechanism to configure the database engine with user-provided registry settings. The scope of this attribute is limited to your application and cannot be changed without restarting your application. +You can use this mechanism to configure the database engine with user-provided registry settings. The scope of this attribute is limited to your application and can't be changed without restarting your application. ## CDaoWorkspace::SetIsolateODBCTrans @@ -814,9 +816,9 @@ Pass TRUE if you want to begin isolating ODBC transactions. Pass FALSE if you wa ### Remarks -In some situations, you might need to have multiple simultaneous transactions pending on the same ODBC database. To do this, you need to open a separate workspace for each transaction. Although each workspace can have its own ODBC connection to the database, this slows system performance. Because transaction isolation is not normally required, ODBC connections from multiple workspace objects opened by the same user are shared by default. +In some situations, you might need to have multiple simultaneous transactions pending on the same ODBC database. To do this, you need to open a separate workspace for each transaction. Although each workspace can have its own ODBC connection to the database, this slows system performance. Because transaction isolation isn't normally required, ODBC connections from multiple workspace objects opened by the same user are shared by default. -Some ODBC servers, such as Microsoft SQL Server, do not allow simultaneous transactions on a single connection. If you need to have more than one transaction at a time pending against such a database, set the IsolateODBCTrans property to TRUE on each workspace as soon as you open it. This forces a separate ODBC connection for each workspace. +Some ODBC servers, such as Microsoft SQL Server, don't allow simultaneous transactions on a single connection. If you need to have more than one transaction at a time pending against such a database, set the IsolateODBCTrans property to TRUE on each workspace as soon as you open it. This forces a separate ODBC connection for each workspace. ## CDaoWorkspace::SetLoginTimeout @@ -835,16 +837,16 @@ The number of seconds before an error occurs when you attempt to log in to an OD This value represents the number of seconds before an error occurs when you attempt to log in to an ODBC database. The default LoginTimeout setting is 20 seconds. When LoginTimeout is set to 0, no timeout occurs and the communication with the data source might stop responding. -When you are attempting to log in to an ODBC database, such as Microsoft SQL Server, the connection may fail as a result of network errors or because the server is not running. Rather than waiting for the default 20 seconds to connect, you can specify how long the database engine waits before it produces an error. Logging on to the server happens implicitly as part of a number of different events, such as running a query on an external server database. The timeout value is determined by the current setting of the LoginTimeout property. +When you are attempting to log in to an ODBC database, such as Microsoft SQL Server, the connection may fail as a result of network errors or because the server isn't running. Rather than waiting for the default 20 seconds to connect, you can specify how long the database engine waits before it produces an error. Logging on to the server happens implicitly as part of a number of different events, such as running a query on an external server database. The timeout value is determined by the current setting of the LoginTimeout property. For related information, see the topic "LoginTimeout Property" in DAO Help. ## See also -[CObject Class](../../mfc/reference/cobject-class.md)
+[`CObject` Class](../../mfc/reference/cobject-class.md)
[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[CDaoDatabase Class](../../mfc/reference/cdaodatabase-class.md)
-[CDaoRecordset Class](../../mfc/reference/cdaorecordset-class.md)
-[CDaoTableDef Class](../../mfc/reference/cdaotabledef-class.md)
-[CDaoQueryDef Class](../../mfc/reference/cdaoquerydef-class.md)
-[CDaoException Class](../../mfc/reference/cdaoexception-class.md) +[`CDaoDatabase` Class](../../mfc/reference/cdaodatabase-class.md)
+[`CDaoRecordset` Class](../../mfc/reference/cdaorecordset-class.md)
+[`CDaoTableDef` Class](../../mfc/reference/cdaotabledef-class.md)
+[`CDaoQueryDef` Class](../../mfc/reference/cdaoquerydef-class.md)
+[`CDaoException` Class](../../mfc/reference/cdaoexception-class.md) diff --git a/docs/mfc/reference/cdaoworkspaceinfo-structure.md b/docs/mfc/reference/cdaoworkspaceinfo-structure.md index 790e286f32..906f4cc2f3 100644 --- a/docs/mfc/reference/cdaoworkspaceinfo-structure.md +++ b/docs/mfc/reference/cdaoworkspaceinfo-structure.md @@ -4,12 +4,14 @@ title: "CDaoWorkspaceInfo Structure" ms.date: "11/04/2016" f1_keywords: ["CDaoWorkspaceInfo"] helpviewer_keywords: ["CDaoWorkspaceInfo structure [MFC]", "DAO (Data Access Objects), Workspaces collection"] -ms.assetid: a1f4b25e-f9c6-4196-b075-d1df99c54124 --- # CDaoWorkspaceInfo Structure The `CDaoWorkspaceInfo` structure contains information about a workspace defined for data access objects (DAO) database access. +> [!NOTE] +> DAO is supported through Office 2013. DAO 3.6 is the final version, and it's considered obsolete. + ## Syntax ``` @@ -40,7 +42,7 @@ Information retrieved by the [CDaoWorkspace::GetWorkspaceInfo](../../mfc/referen ## Requirements -**Header:** afxdao.h +**Header:** `afxdao.h` ## See also diff --git a/docs/mfc/reference/cdc-class.md b/docs/mfc/reference/cdc-class.md index fef69aae5e..f40795d15e 100644 --- a/docs/mfc/reference/cdc-class.md +++ b/docs/mfc/reference/cdc-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CDC Class" title: "CDC Class" +description: "Learn more about: CDC Class" ms.date: "11/19/2018" f1_keywords: ["CDC", "AFXWIN/CDC", "AFXWIN/CDC::CDC", "AFXWIN/CDC::AbortDoc", "AFXWIN/CDC::AbortPath", "AFXWIN/CDC::AddMetaFileComment", "AFXWIN/CDC::AlphaBlend", "AFXWIN/CDC::AngleArc", "AFXWIN/CDC::Arc", "AFXWIN/CDC::ArcTo", "AFXWIN/CDC::Attach", "AFXWIN/CDC::BeginPath", "AFXWIN/CDC::BitBlt", "AFXWIN/CDC::Chord", "AFXWIN/CDC::CloseFigure", "AFXWIN/CDC::CreateCompatibleDC", "AFXWIN/CDC::CreateDC", "AFXWIN/CDC::CreateIC", "AFXWIN/CDC::DeleteDC", "AFXWIN/CDC::DeleteTempMap", "AFXWIN/CDC::Detach", "AFXWIN/CDC::DPtoHIMETRIC", "AFXWIN/CDC::DPtoLP", "AFXWIN/CDC::Draw3dRect", "AFXWIN/CDC::DrawDragRect", "AFXWIN/CDC::DrawEdge", "AFXWIN/CDC::DrawEscape", "AFXWIN/CDC::DrawFocusRect", "AFXWIN/CDC::DrawFrameControl", "AFXWIN/CDC::DrawIcon", "AFXWIN/CDC::DrawState", "AFXWIN/CDC::DrawText", "AFXWIN/CDC::DrawTextEx", "AFXWIN/CDC::Ellipse", "AFXWIN/CDC::EndDoc", "AFXWIN/CDC::EndPage", "AFXWIN/CDC::EndPath", "AFXWIN/CDC::EnumObjects", "AFXWIN/CDC::Escape", "AFXWIN/CDC::ExcludeClipRect", "AFXWIN/CDC::ExcludeUpdateRgn", "AFXWIN/CDC::ExtFloodFill", "AFXWIN/CDC::ExtTextOut", "AFXWIN/CDC::FillPath", "AFXWIN/CDC::FillRect", "AFXWIN/CDC::FillRgn", "AFXWIN/CDC::FillSolidRect", "AFXWIN/CDC::FlattenPath", "AFXWIN/CDC::FloodFill", "AFXWIN/CDC::FrameRect", "AFXWIN/CDC::FrameRgn", "AFXWIN/CDC::FromHandle", "AFXWIN/CDC::GetArcDirection", "AFXWIN/CDC::GetAspectRatioFilter", "AFXWIN/CDC::GetBkColor", "AFXWIN/CDC::GetBkMode", "AFXWIN/CDC::GetBoundsRect", "AFXWIN/CDC::GetBrushOrg", "AFXWIN/CDC::GetCharABCWidths", "AFXWIN/CDC::GetCharABCWidthsI", "AFXWIN/CDC::GetCharacterPlacement", "AFXWIN/CDC::GetCharWidth", "AFXWIN/CDC::GetCharWidthI", "AFXWIN/CDC::GetClipBox", "AFXWIN/CDC::GetColorAdjustment", "AFXWIN/CDC::GetCurrentBitmap", "AFXWIN/CDC::GetCurrentBrush", "AFXWIN/CDC::GetCurrentFont", "AFXWIN/CDC::GetCurrentPalette", "AFXWIN/CDC::GetCurrentPen", "AFXWIN/CDC::GetCurrentPosition", "AFXWIN/CDC::GetDCBrushColor", "AFXWIN/CDC::GetDCPenColor", "AFXWIN/CDC::GetDeviceCaps", "AFXWIN/CDC::GetFontData", "AFXWIN/CDC::GetFontLanguageInfo", "AFXWIN/CDC::GetGlyphOutline", "AFXWIN/CDC::GetGraphicsMode", "AFXWIN/CDC::GetHalftoneBrush", "AFXWIN/CDC::GetKerningPairs", "AFXWIN/CDC::GetLayout", "AFXWIN/CDC::GetMapMode", "AFXWIN/CDC::GetMiterLimit", "AFXWIN/CDC::GetNearestColor", "AFXWIN/CDC::GetOutlineTextMetrics", "AFXWIN/CDC::GetOutputCharWidth", "AFXWIN/CDC::GetOutputTabbedTextExtent", "AFXWIN/CDC::GetOutputTextExtent", "AFXWIN/CDC::GetOutputTextMetrics", "AFXWIN/CDC::GetPath", "AFXWIN/CDC::GetPixel", "AFXWIN/CDC::GetPolyFillMode", "AFXWIN/CDC::GetROP2", "AFXWIN/CDC::GetSafeHdc", "AFXWIN/CDC::GetStretchBltMode", "AFXWIN/CDC::GetTabbedTextExtent", "AFXWIN/CDC::GetTextAlign", "AFXWIN/CDC::GetTextCharacterExtra", "AFXWIN/CDC::GetTextColor", "AFXWIN/CDC::GetTextExtent", "AFXWIN/CDC::GetTextExtentExPointI", "AFXWIN/CDC::GetTextExtentPointI", "AFXWIN/CDC::GetTextFace", "AFXWIN/CDC::GetTextMetrics", "AFXWIN/CDC::GetViewportExt", "AFXWIN/CDC::GetViewportOrg", "AFXWIN/CDC::GetWindow", "AFXWIN/CDC::GetWindowExt", "AFXWIN/CDC::GetWindowOrg", "AFXWIN/CDC::GetWorldTransform", "AFXWIN/CDC::GradientFill", "AFXWIN/CDC::GrayString", "AFXWIN/CDC::HIMETRICtoDP", "AFXWIN/CDC::HIMETRICtoLP", "AFXWIN/CDC::IntersectClipRect", "AFXWIN/CDC::InvertRect", "AFXWIN/CDC::InvertRgn", "AFXWIN/CDC::IsPrinting", "AFXWIN/CDC::LineTo", "AFXWIN/CDC::LPtoDP", "AFXWIN/CDC::LPtoHIMETRIC", "AFXWIN/CDC::MaskBlt", "AFXWIN/CDC::ModifyWorldTransform", "AFXWIN/CDC::MoveTo", "AFXWIN/CDC::OffsetClipRgn", "AFXWIN/CDC::OffsetViewportOrg", "AFXWIN/CDC::OffsetWindowOrg", "AFXWIN/CDC::PaintRgn", "AFXWIN/CDC::PatBlt", "AFXWIN/CDC::Pie", "AFXWIN/CDC::PlayMetaFile", "AFXWIN/CDC::PlgBlt", "AFXWIN/CDC::PolyBezier", "AFXWIN/CDC::PolyBezierTo", "AFXWIN/CDC::PolyDraw", "AFXWIN/CDC::Polygon", "AFXWIN/CDC::Polyline", "AFXWIN/CDC::PolylineTo", "AFXWIN/CDC::PolyPolygon", "AFXWIN/CDC::PolyPolyline", "AFXWIN/CDC::PtVisible", "AFXWIN/CDC::RealizePalette", "AFXWIN/CDC::Rectangle", "AFXWIN/CDC::RectVisible", "AFXWIN/CDC::ReleaseAttribDC", "AFXWIN/CDC::ReleaseOutputDC", "AFXWIN/CDC::ResetDC", "AFXWIN/CDC::RestoreDC", "AFXWIN/CDC::RoundRect", "AFXWIN/CDC::SaveDC", "AFXWIN/CDC::ScaleViewportExt", "AFXWIN/CDC::ScaleWindowExt", "AFXWIN/CDC::ScrollDC", "AFXWIN/CDC::SelectClipPath", "AFXWIN/CDC::SelectClipRgn", "AFXWIN/CDC::SelectObject", "AFXWIN/CDC::SelectPalette", "AFXWIN/CDC::SelectStockObject", "AFXWIN/CDC::SetAbortProc", "AFXWIN/CDC::SetArcDirection", "AFXWIN/CDC::SetAttribDC", "AFXWIN/CDC::SetBkColor", "AFXWIN/CDC::SetBkMode", "AFXWIN/CDC::SetBoundsRect", "AFXWIN/CDC::SetBrushOrg", "AFXWIN/CDC::SetColorAdjustment", "AFXWIN/CDC::SetDCBrushColor", "AFXWIN/CDC::SetDCPenColor", "AFXWIN/CDC::SetGraphicsMode", "AFXWIN/CDC::SetLayout", "AFXWIN/CDC::SetMapMode", "AFXWIN/CDC::SetMapperFlags", "AFXWIN/CDC::SetMiterLimit", "AFXWIN/CDC::SetOutputDC", "AFXWIN/CDC::SetPixel", "AFXWIN/CDC::SetPixelV", "AFXWIN/CDC::SetPolyFillMode", "AFXWIN/CDC::SetROP2", "AFXWIN/CDC::SetStretchBltMode", "AFXWIN/CDC::SetTextAlign", "AFXWIN/CDC::SetTextCharacterExtra", "AFXWIN/CDC::SetTextColor", "AFXWIN/CDC::SetTextJustification", "AFXWIN/CDC::SetViewportExt", "AFXWIN/CDC::SetViewportOrg", "AFXWIN/CDC::SetWindowExt", "AFXWIN/CDC::SetWindowOrg", "AFXWIN/CDC::SetWorldTransform", "AFXWIN/CDC::StartDoc", "AFXWIN/CDC::StartPage", "AFXWIN/CDC::StretchBlt", "AFXWIN/CDC::StrokeAndFillPath", "AFXWIN/CDC::StrokePath", "AFXWIN/CDC::TabbedTextOut", "AFXWIN/CDC::TextOut", "AFXWIN/CDC::TransparentBlt", "AFXWIN/CDC::UpdateColors", "AFXWIN/CDC::WidenPath", "AFXWIN/CDC::m_hAttribDC", "AFXWIN/CDC::m_hDC"] helpviewer_keywords: ["CDC [MFC], CDC", "CDC [MFC], AbortDoc", "CDC [MFC], AbortPath", "CDC [MFC], AddMetaFileComment", "CDC [MFC], AlphaBlend", "CDC [MFC], AngleArc", "CDC [MFC], Arc", "CDC [MFC], ArcTo", "CDC [MFC], Attach", "CDC [MFC], BeginPath", "CDC [MFC], BitBlt", "CDC [MFC], Chord", "CDC [MFC], CloseFigure", "CDC [MFC], CreateCompatibleDC", "CDC [MFC], CreateDC", "CDC [MFC], CreateIC", "CDC [MFC], DeleteDC", "CDC [MFC], DeleteTempMap", "CDC [MFC], Detach", "CDC [MFC], DPtoHIMETRIC", "CDC [MFC], DPtoLP", "CDC [MFC], Draw3dRect", "CDC [MFC], DrawDragRect", "CDC [MFC], DrawEdge", "CDC [MFC], DrawEscape", "CDC [MFC], DrawFocusRect", "CDC [MFC], DrawFrameControl", "CDC [MFC], DrawIcon", "CDC [MFC], DrawState", "CDC [MFC], DrawText", "CDC [MFC], DrawTextEx", "CDC [MFC], Ellipse", "CDC [MFC], EndDoc", "CDC [MFC], EndPage", "CDC [MFC], EndPath", "CDC [MFC], EnumObjects", "CDC [MFC], Escape", "CDC [MFC], ExcludeClipRect", "CDC [MFC], ExcludeUpdateRgn", "CDC [MFC], ExtFloodFill", "CDC [MFC], ExtTextOut", "CDC [MFC], FillPath", "CDC [MFC], FillRect", "CDC [MFC], FillRgn", "CDC [MFC], FillSolidRect", "CDC [MFC], FlattenPath", "CDC [MFC], FloodFill", "CDC [MFC], FrameRect", "CDC [MFC], FrameRgn", "CDC [MFC], FromHandle", "CDC [MFC], GetArcDirection", "CDC [MFC], GetAspectRatioFilter", "CDC [MFC], GetBkColor", "CDC [MFC], GetBkMode", "CDC [MFC], GetBoundsRect", "CDC [MFC], GetBrushOrg", "CDC [MFC], GetCharABCWidths", "CDC [MFC], GetCharABCWidthsI", "CDC [MFC], GetCharacterPlacement", "CDC [MFC], GetCharWidth", "CDC [MFC], GetCharWidthI", "CDC [MFC], GetClipBox", "CDC [MFC], GetColorAdjustment", "CDC [MFC], GetCurrentBitmap", "CDC [MFC], GetCurrentBrush", "CDC [MFC], GetCurrentFont", "CDC [MFC], GetCurrentPalette", "CDC [MFC], GetCurrentPen", "CDC [MFC], GetCurrentPosition", "CDC [MFC], GetDCBrushColor", "CDC [MFC], GetDCPenColor", "CDC [MFC], GetDeviceCaps", "CDC [MFC], GetFontData", "CDC [MFC], GetFontLanguageInfo", "CDC [MFC], GetGlyphOutline", "CDC [MFC], GetGraphicsMode", "CDC [MFC], GetHalftoneBrush", "CDC [MFC], GetKerningPairs", "CDC [MFC], GetLayout", "CDC [MFC], GetMapMode", "CDC [MFC], GetMiterLimit", "CDC [MFC], GetNearestColor", "CDC [MFC], GetOutlineTextMetrics", "CDC [MFC], GetOutputCharWidth", "CDC [MFC], GetOutputTabbedTextExtent", "CDC [MFC], GetOutputTextExtent", "CDC [MFC], GetOutputTextMetrics", "CDC [MFC], GetPath", "CDC [MFC], GetPixel", "CDC [MFC], GetPolyFillMode", "CDC [MFC], GetROP2", "CDC [MFC], GetSafeHdc", "CDC [MFC], GetStretchBltMode", "CDC [MFC], GetTabbedTextExtent", "CDC [MFC], GetTextAlign", "CDC [MFC], GetTextCharacterExtra", "CDC [MFC], GetTextColor", "CDC [MFC], GetTextExtent", "CDC [MFC], GetTextExtentExPointI", "CDC [MFC], GetTextExtentPointI", "CDC [MFC], GetTextFace", "CDC [MFC], GetTextMetrics", "CDC [MFC], GetViewportExt", "CDC [MFC], GetViewportOrg", "CDC [MFC], GetWindow", "CDC [MFC], GetWindowExt", "CDC [MFC], GetWindowOrg", "CDC [MFC], GetWorldTransform", "CDC [MFC], GradientFill", "CDC [MFC], GrayString", "CDC [MFC], HIMETRICtoDP", "CDC [MFC], HIMETRICtoLP", "CDC [MFC], IntersectClipRect", "CDC [MFC], InvertRect", "CDC [MFC], InvertRgn", "CDC [MFC], IsPrinting", "CDC [MFC], LineTo", "CDC [MFC], LPtoDP", "CDC [MFC], LPtoHIMETRIC", "CDC [MFC], MaskBlt", "CDC [MFC], ModifyWorldTransform", "CDC [MFC], MoveTo", "CDC [MFC], OffsetClipRgn", "CDC [MFC], OffsetViewportOrg", "CDC [MFC], OffsetWindowOrg", "CDC [MFC], PaintRgn", "CDC [MFC], PatBlt", "CDC [MFC], Pie", "CDC [MFC], PlayMetaFile", "CDC [MFC], PlgBlt", "CDC [MFC], PolyBezier", "CDC [MFC], PolyBezierTo", "CDC [MFC], PolyDraw", "CDC [MFC], Polygon", "CDC [MFC], Polyline", "CDC [MFC], PolylineTo", "CDC [MFC], PolyPolygon", "CDC [MFC], PolyPolyline", "CDC [MFC], PtVisible", "CDC [MFC], RealizePalette", "CDC [MFC], Rectangle", "CDC [MFC], RectVisible", "CDC [MFC], ReleaseAttribDC", "CDC [MFC], ReleaseOutputDC", "CDC [MFC], ResetDC", "CDC [MFC], RestoreDC", "CDC [MFC], RoundRect", "CDC [MFC], SaveDC", "CDC [MFC], ScaleViewportExt", "CDC [MFC], ScaleWindowExt", "CDC [MFC], ScrollDC", "CDC [MFC], SelectClipPath", "CDC [MFC], SelectClipRgn", "CDC [MFC], SelectObject", "CDC [MFC], SelectPalette", "CDC [MFC], SelectStockObject", "CDC [MFC], SetAbortProc", "CDC [MFC], SetArcDirection", "CDC [MFC], SetAttribDC", "CDC [MFC], SetBkColor", "CDC [MFC], SetBkMode", "CDC [MFC], SetBoundsRect", "CDC [MFC], SetBrushOrg", "CDC [MFC], SetColorAdjustment", "CDC [MFC], SetDCBrushColor", "CDC [MFC], SetDCPenColor", "CDC [MFC], SetGraphicsMode", "CDC [MFC], SetLayout", "CDC [MFC], SetMapMode", "CDC [MFC], SetMapperFlags", "CDC [MFC], SetMiterLimit", "CDC [MFC], SetOutputDC", "CDC [MFC], SetPixel", "CDC [MFC], SetPixelV", "CDC [MFC], SetPolyFillMode", "CDC [MFC], SetROP2", "CDC [MFC], SetStretchBltMode", "CDC [MFC], SetTextAlign", "CDC [MFC], SetTextCharacterExtra", "CDC [MFC], SetTextColor", "CDC [MFC], SetTextJustification", "CDC [MFC], SetViewportExt", "CDC [MFC], SetViewportOrg", "CDC [MFC], SetWindowExt", "CDC [MFC], SetWindowOrg", "CDC [MFC], SetWorldTransform", "CDC [MFC], StartDoc", "CDC [MFC], StartPage", "CDC [MFC], StretchBlt", "CDC [MFC], StrokeAndFillPath", "CDC [MFC], StrokePath", "CDC [MFC], TabbedTextOut", "CDC [MFC], TextOut", "CDC [MFC], TransparentBlt", "CDC [MFC], UpdateColors", "CDC [MFC], WidenPath", "CDC [MFC], m_hAttribDC", "CDC [MFC], m_hDC"] @@ -764,7 +764,7 @@ Specifies the bounding rectangle (in logical units). You can pass either a `LPRE *`ptStart`*\ Specifies the x- and y-coordinates of the point that defines the chord's starting point (in logical units). This point doesn't have to lie exactly on the chord. You can pass either a `POINT` structure or a `CPoint` object for this parameter. -*`ptEnd*`\ +*`ptEnd`*\ Specifies the x- and y-coordinates of the point that defines the chord's ending point (in logical units). This point doesn't have to lie exactly on the chord. You can pass either a [`POINT`](/windows/win32/api/windef/ns-windef-point) structure or a [`CPoint`](../../atl-mfc-shared/reference/cpoint-class.md) object for this parameter. ### Return Value @@ -928,7 +928,7 @@ The `DeleteDC` function is generally used to delete device contexts created with ## `CDC::DeleteTempMap` -Called automatically by the `CWinApp` idle-time handler, `DeleteTempMap` deletes any temporary `CDC` objects created by `FromHandle`, but doesn't destroy the device context handles ( `hDC`s) temporarily associated with the `CDC` objects. +Called automatically by the `CWinApp` idle-time handler, `DeleteTempMap` deletes any temporary `CDC` objects created by `FromHandle`, but doesn't destroy the device context handles (`hDC`s) temporarily associated with the `CDC` objects. ``` static void PASCAL DeleteTempMap(); @@ -3145,7 +3145,7 @@ The device context must contain a closed path. The points of the path are return ## `CDC::GetPixel` -Retrieves the RGB color value of the pixel at the point specified by *`x`* and *`y*`. +Retrieves the RGB color value of the pixel at the point specified by *`x`* and *`y`*. ``` COLORREF GetPixel( diff --git a/docs/mfc/reference/cdialog-class.md b/docs/mfc/reference/cdialog-class.md index 099d0e3718..fa6866e8b8 100644 --- a/docs/mfc/reference/cdialog-class.md +++ b/docs/mfc/reference/cdialog-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CDialog Class" title: "CDialog Class" -ms.date: "09/07/2019" +description: "Learn more about: CDialog Class" +ms.date: 09/07/2019 f1_keywords: ["CDialog", "AFXWIN/CDialog", "AFXWIN/CDialog::CDialog", "AFXWIN/CDialog::Create", "AFXWIN/CDialog::CreateIndirect", "AFXWIN/CDialog::DoModal", "AFXWIN/CDialog::EndDialog", "AFXWIN/CDialog::GetDefID", "AFXWIN/CDialog::GotoDlgCtrl", "AFXWIN/CDialog::InitModalIndirect", "AFXWIN/CDialog::MapDialogRect", "AFXWIN/CDialog::NextDlgCtrl", "AFXWIN/CDialog::OnInitDialog", "AFXWIN/CDialog::OnSetFont", "AFXWIN/CDialog::PrevDlgCtrl", "AFXWIN/CDialog::SetDefID", "AFXWIN/CDialog::SetHelpID", "AFXWIN/CDialog::OnCancel", "AFXWIN/CDialog::OnOK"] helpviewer_keywords: ["CDialog [MFC], CDialog", "CDialog [MFC], Create", "CDialog [MFC], CreateIndirect", "CDialog [MFC], DoModal", "CDialog [MFC], EndDialog", "CDialog [MFC], GetDefID", "CDialog [MFC], GotoDlgCtrl", "CDialog [MFC], InitModalIndirect", "CDialog [MFC], MapDialogRect", "CDialog [MFC], NextDlgCtrl", "CDialog [MFC], OnInitDialog", "CDialog [MFC], OnSetFont", "CDialog [MFC], PrevDlgCtrl", "CDialog [MFC], SetDefID", "CDialog [MFC], SetHelpID", "CDialog [MFC], OnCancel", "CDialog [MFC], OnOK"] -ms.assetid: ca64b77e-2cd2-47e3-8eff-c2645ad578f9 --- # CDialog Class @@ -287,7 +286,7 @@ DWORD GetDefID() const; ### Return Value -A 32-bit value ( `DWORD`). If the default pushbutton has an ID value, the high-order word contains DC_HASDEFID and the low-order word contains the ID value. If the default pushbutton does not have an ID value, the return value is 0. +A 32-bit value (`DWORD`). If the default pushbutton has an ID value, the high-order word contains DC_HASDEFID and the low-order word contains the ID value. If the default pushbutton does not have an ID value, the return value is 0. ### Remarks diff --git a/docs/mfc/reference/cdockablepane-class.md b/docs/mfc/reference/cdockablepane-class.md index 159c429e7f..7b65d85589 100644 --- a/docs/mfc/reference/cdockablepane-class.md +++ b/docs/mfc/reference/cdockablepane-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CDockablePane Class" title: "CDockablePane Class" +description: "Learn more about: CDockablePane Class" ms.date: "07/02/2019" f1_keywords: ["CDockablePane", "AFXDOCKABLEPANE/CDockablePane", "AFXDOCKABLEPANE/CDockablePane::CDockablePane", "AFXDOCKABLEPANE/CDockablePane::AttachToTabWnd", "AFXDOCKABLEPANE/CDockablePane::CalcFixedLayout", "AFXDOCKABLEPANE/CDockablePane::CanAcceptMiniFrame", "AFXDOCKABLEPANE/CDockablePane::CanAcceptPane", "AFXDOCKABLEPANE/CDockablePane::CanAutoHide", "AFXDOCKABLEPANE/CDockablePane::CanBeAttached", "AFXDOCKABLEPANE/CDockablePane::ConvertToTabbedDocument", "AFXDOCKABLEPANE/CDockablePane::CopyState", "AFXDOCKABLEPANE/CDockablePane::Create", "AFXDOCKABLEPANE/CDockablePane::CreateDefaultPaneDivider", "AFXDOCKABLEPANE/CDockablePane::CreateEx", "AFXDOCKABLEPANE/CDockablePane::CreateTabbedPane", "AFXDOCKABLEPANE/CDockablePane::DockPaneContainer", "AFXDOCKABLEPANE/CDockablePane::DockPaneStandard", "AFXDOCKABLEPANE/CDockablePane::DockToRecentPos", "AFXDOCKABLEPANE/CDockablePane::DockToWindow", "AFXDOCKABLEPANE/CDockablePane::EnableAutohideAll", "AFXDOCKABLEPANE/CDockablePane::EnableGripper", "AFXDOCKABLEPANE/CDockablePane::GetAHRestoredRect", "AFXDOCKABLEPANE/CDockablePane::GetAHSlideMode", "AFXDOCKABLEPANE/CDockablePane::GetCaptionHeight", "AFXDOCKABLEPANE/CDockablePane::GetDefaultPaneDivider", "AFXDOCKABLEPANE/CDockablePane::GetDockingStatus", "AFXDOCKABLEPANE/CDockablePane::GetDragSensitivity", "AFXDOCKABLEPANE/CDockablePane::GetLastPercentInPaneContainer", "AFXDOCKABLEPANE/CDockablePane::GetTabArea", "AFXDOCKABLEPANE/CDockablePane::GetTabbedPaneRTC", "AFXDOCKABLEPANE/CDockablePane::HasAutoHideMode", "AFXDOCKABLEPANE/CDockablePane::HitTest", "AFXDOCKABLEPANE/CDockablePane::IsAutohideAllEnabled", "AFXDOCKABLEPANE/CDockablePane::IsAutoHideMode", "AFXDOCKABLEPANE/CDockablePane::IsDocked", "AFXDOCKABLEPANE/CDockablePane::IsHideInAutoHideMode", "AFXDOCKABLEPANE/CDockablePane::IsInFloatingMultiPaneFrameWnd", "AFXDOCKABLEPANE/CDockablePane::IsResizable", "AFXDOCKABLEPANE/CDockablePane::IsTabLocationBottom", "AFXDOCKABLEPANE/CDockablePane::IsTracked", "AFXDOCKABLEPANE/CDockablePane::IsVisible", "AFXDOCKABLEPANE/CDockablePane::OnAfterChangeParent", "AFXDOCKABLEPANE/CDockablePane::OnAfterDockFromMiniFrame", "AFXDOCKABLEPANE/CDockablePane::OnBeforeChangeParent", "AFXDOCKABLEPANE/CDockablePane::OnBeforeFloat", "AFXDOCKABLEPANE/CDockablePane::RemoveFromDefaultPaneDividier", "AFXDOCKABLEPANE/CDockablePane::ReplacePane", "AFXDOCKABLEPANE/CDockablePane::RestoreDefaultPaneDivider", "AFXDOCKABLEPANE/CDockablePane::SetAutoHideMode", "AFXDOCKABLEPANE/CDockablePane::SetAutoHideParents", "AFXDOCKABLEPANE/CDockablePane::SetLastPercentInPaneContainer", "AFXDOCKABLEPANE/CDockablePane::SetRestoredDefaultPaneDivider", "AFXDOCKABLEPANE/CDockablePane::SetTabbedPaneRTC", "AFXDOCKABLEPANE/CDockablePane::ShowPane", "AFXDOCKABLEPANE/CDockablePane::Slide", "AFXDOCKABLEPANE/CDockablePane::ToggleAutoHide", "AFXDOCKABLEPANE/CDockablePane::UndockPane", "AFXDOCKABLEPANE/CDockablePane::CheckAutoHideCondition", "AFXDOCKABLEPANE/CDockablePane::CheckStopSlideCondition", "AFXDOCKABLEPANE/CDockablePane::DrawCaption", "AFXDOCKABLEPANE/CDockablePane::OnPressButtons", "AFXDOCKABLEPANE/CDockablePane::OnSlide", "AFXDOCKABLEPANE/CDockablePane::m_bDisableAnimation", "AFXDOCKABLEPANE/CDockablePane::m_bHideInAutoHideMode", "AFXDOCKABLEPANE/CDockablePane::m_nSlideSteps"] helpviewer_keywords: ["CDockablePane [MFC], CDockablePane", "CDockablePane [MFC], AttachToTabWnd", "CDockablePane [MFC], CalcFixedLayout", "CDockablePane [MFC], CanAcceptMiniFrame", "CDockablePane [MFC], CanAcceptPane", "CDockablePane [MFC], CanAutoHide", "CDockablePane [MFC], CanBeAttached", "CDockablePane [MFC], ConvertToTabbedDocument", "CDockablePane [MFC], CopyState", "CDockablePane [MFC], Create", "CDockablePane [MFC], CreateDefaultPaneDivider", "CDockablePane [MFC], CreateEx", "CDockablePane [MFC], CreateTabbedPane", "CDockablePane [MFC], DockPaneContainer", "CDockablePane [MFC], DockPaneStandard", "CDockablePane [MFC], DockToRecentPos", "CDockablePane [MFC], DockToWindow", "CDockablePane [MFC], EnableAutohideAll", "CDockablePane [MFC], EnableGripper", "CDockablePane [MFC], GetAHRestoredRect", "CDockablePane [MFC], GetAHSlideMode", "CDockablePane [MFC], GetCaptionHeight", "CDockablePane [MFC], GetDefaultPaneDivider", "CDockablePane [MFC], GetDockingStatus", "CDockablePane [MFC], GetDragSensitivity", "CDockablePane [MFC], GetLastPercentInPaneContainer", "CDockablePane [MFC], GetTabArea", "CDockablePane [MFC], GetTabbedPaneRTC", "CDockablePane [MFC], HasAutoHideMode", "CDockablePane [MFC], HitTest", "CDockablePane [MFC], IsAutohideAllEnabled", "CDockablePane [MFC], IsAutoHideMode", "CDockablePane [MFC], IsDocked", "CDockablePane [MFC], IsHideInAutoHideMode", "CDockablePane [MFC], IsInFloatingMultiPaneFrameWnd", "CDockablePane [MFC], IsResizable", "CDockablePane [MFC], IsTabLocationBottom", "CDockablePane [MFC], IsTracked", "CDockablePane [MFC], IsVisible", "CDockablePane [MFC], OnAfterChangeParent", "CDockablePane [MFC], OnAfterDockFromMiniFrame", "CDockablePane [MFC], OnBeforeChangeParent", "CDockablePane [MFC], OnBeforeFloat", "CDockablePane [MFC], RemoveFromDefaultPaneDividier", "CDockablePane [MFC], ReplacePane", "CDockablePane [MFC], RestoreDefaultPaneDivider", "CDockablePane [MFC], SetAutoHideMode", "CDockablePane [MFC], SetAutoHideParents", "CDockablePane [MFC], SetLastPercentInPaneContainer", "CDockablePane [MFC], SetRestoredDefaultPaneDivider", "CDockablePane [MFC], SetTabbedPaneRTC", "CDockablePane [MFC], ShowPane", "CDockablePane [MFC], Slide", "CDockablePane [MFC], ToggleAutoHide", "CDockablePane [MFC], UndockPane", "CDockablePane [MFC], CheckAutoHideCondition", "CDockablePane [MFC], CheckStopSlideCondition", "CDockablePane [MFC], DrawCaption", "CDockablePane [MFC], OnPressButtons", "CDockablePane [MFC], OnSlide", "CDockablePane [MFC], m_bDisableAnimation", "CDockablePane [MFC], m_bHideInAutoHideMode", "CDockablePane [MFC], m_nSlideSteps"] @@ -874,7 +874,7 @@ One of the following status values: The framework calls this method to handle docking of a floating pane. -For floating toolbars or docking panes that use the `DT_IMMEDIATE` docking mode, the framework delays the dock command to enable the user to move the window out of the client area of the parent frame before docking occurs. The length of the delay is measured in milliseconds and is controlled by the [`CDockingManager::m_nTimeOutBeforeToolBarDock`](../../mfc/reference/cdockingmanager-class.md#m_ntimeoutbeforetoolbardock) data member.. The default value of [`CDockingManager::m_nTimeOutBeforeToolBarDock`](../../mfc/reference/cdockingmanager-class.md#m_ntimeoutbeforetoolbardock) is 200. This behavior emulates the docking behavior of Microsoft Word 2007. +For floating toolbars or docking panes that use the `DT_IMMEDIATE` docking mode, the framework delays the dock command to enable the user to move the window out of the client area of the parent frame before docking occurs. The length of the delay is measured in milliseconds and is controlled by the [`CDockingManager::m_nTimeOutBeforeToolBarDock`](../../mfc/reference/cdockingmanager-class.md#m_ntimeoutbeforetoolbardock) data member. The default value of [`CDockingManager::m_nTimeOutBeforeToolBarDock`](../../mfc/reference/cdockingmanager-class.md#m_ntimeoutbeforetoolbardock) is 200. This behavior emulates the docking behavior of Microsoft Word 2007. For delayed docking states (`CS_DELAY_DOCK` and `CS_DELAY_DOCK_TO_TAB`), the framework doesn't perform docking until the user releases the mouse button. If a pane uses the `DT_STANDARD` docking mode, the framework displays a rectangle at the projected docking location. If a pane uses the `DT_SMART` docking mode, the framework displays smart docking markers and semi-transparent rectangles at the projected docking location. To specify the docking mode for your pane, call the [`CBasePane::SetDockingMode`](../../mfc/reference/cbasepane-class.md#setdockingmode) method. For more information about smart docking, see [`CDockingManager::GetSmartDockingParams`](../../mfc/reference/cdockingmanager-class.md#getsmartdockingparams). @@ -1201,7 +1201,7 @@ virtual void OnAfterChangeParent(CWnd* pWndOldParent); ### Parameters -[in] *`pWndOldParent`*\ +[in] *`pWndOldParent`* ### Remarks diff --git a/docs/mfc/reference/cdocobjectserver-class.md b/docs/mfc/reference/cdocobjectserver-class.md index 70f2fed087..b99f2715ac 100644 --- a/docs/mfc/reference/cdocobjectserver-class.md +++ b/docs/mfc/reference/cdocobjectserver-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CDocObjectServer Class" title: "CDocObjectServer Class" -ms.date: "09/12/2018" +description: "Learn more about: CDocObjectServer Class" +ms.date: 09/12/2018 f1_keywords: ["CDocObjectServer", "AFXDOCOB/CDocObjectServer", "AFXDOCOB/CDocObjectServer::CDocObjectServer", "AFXDOCOB/CDocObjectServer::ActivateDocObject", "AFXDOCOB/CDocObjectServer::OnActivateView", "AFXDOCOB/CDocObjectServer::OnApplyViewState", "AFXDOCOB/CDocObjectServer::OnSaveViewState"] helpviewer_keywords: ["CDocObjectServer [MFC], CDocObjectServer", "CDocObjectServer [MFC], ActivateDocObject", "CDocObjectServer [MFC], OnActivateView", "CDocObjectServer [MFC], OnApplyViewState", "CDocObjectServer [MFC], OnSaveViewState"] -ms.assetid: 18cd0dff-0616-4472-b8d9-66c081bc383a --- # CDocObjectServer Class @@ -94,7 +93,7 @@ A pointer to the `IOleDocumentSite` interface implemented by the container. ### Remarks -When a DocObject is active, the client site OLE interface ( `IOleDocumentSite`) is what allows the DocObject server to communicate with its client (the container). When a DocObject server is activated, it first checks that the container implements the `IOleDocumentSite` interface. If so, [COleServerDoc::GetDocObjectServer](../../mfc/reference/coleserverdoc-class.md#getdocobjectserver) is called to see if the container supports DocObjects. By default, `GetDocObjectServer` returns NULL. You must override `COleServerDoc::GetDocObjectServer` to construct a new `CDocObjectServer` object or a derived object of your own, with pointers to the `COleServerDoc` container and its `IOleDocumentSite` interface as arguments to the constructor. +When a DocObject is active, the client site OLE interface (`IOleDocumentSite`) is what allows the DocObject server to communicate with its client (the container). When a DocObject server is activated, it first checks that the container implements the `IOleDocumentSite` interface. If so, [COleServerDoc::GetDocObjectServer](../../mfc/reference/coleserverdoc-class.md#getdocobjectserver) is called to see if the container supports DocObjects. By default, `GetDocObjectServer` returns NULL. You must override `COleServerDoc::GetDocObjectServer` to construct a new `CDocObjectServer` object or a derived object of your own, with pointers to the `COleServerDoc` container and its `IOleDocumentSite` interface as arguments to the constructor. ## CDocObjectServer::OnActivateView diff --git a/docs/mfc/reference/ceditview-class.md b/docs/mfc/reference/ceditview-class.md index 618fca8547..19e9d78e46 100644 --- a/docs/mfc/reference/ceditview-class.md +++ b/docs/mfc/reference/ceditview-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CEditView Class" title: "CEditView Class" -ms.date: "11/04/2016" +description: "Learn more about: CEditView Class" +ms.date: 11/04/2016 f1_keywords: ["CEditView", "AFXEXT/CEditView", "AFXEXT/CEditView::CEditView", "AFXEXT/CEditView::FindText", "AFXEXT/CEditView::GetBufferLength", "AFXEXT/CEditView::GetEditCtrl", "AFXEXT/CEditView::GetPrinterFont", "AFXEXT/CEditView::GetSelectedText", "AFXEXT/CEditView::LockBuffer", "AFXEXT/CEditView::PrintInsideRect", "AFXEXT/CEditView::SerializeRaw", "AFXEXT/CEditView::SetPrinterFont", "AFXEXT/CEditView::SetTabStops", "AFXEXT/CEditView::UnlockBuffer", "AFXEXT/CEditView::OnFindNext", "AFXEXT/CEditView::OnReplaceAll", "AFXEXT/CEditView::OnReplaceSel", "AFXEXT/CEditView::OnTextNotFound", "AFXEXT/CEditView::dwStyleDefault"] helpviewer_keywords: ["CEditView [MFC], CEditView", "CEditView [MFC], FindText", "CEditView [MFC], GetBufferLength", "CEditView [MFC], GetEditCtrl", "CEditView [MFC], GetPrinterFont", "CEditView [MFC], GetSelectedText", "CEditView [MFC], LockBuffer", "CEditView [MFC], PrintInsideRect", "CEditView [MFC], SerializeRaw", "CEditView [MFC], SetPrinterFont", "CEditView [MFC], SetTabStops", "CEditView [MFC], UnlockBuffer", "CEditView [MFC], OnFindNext", "CEditView [MFC], OnReplaceAll", "CEditView [MFC], OnReplaceSel", "CEditView [MFC], OnTextNotFound", "CEditView [MFC], dwStyleDefault"] -ms.assetid: bf38255c-fcbe-450c-95b2-3c5e35f86c37 --- # CEditView Class @@ -427,7 +426,7 @@ Width of each tab stop, in dialog units. ### Remarks -Only a single tab-stop width is supported. ( `CEdit` objects support multiple tab widths.) Widths are in dialog units, which equal one-fourth of the average character width (based on uppercase and lowercase alphabetic characters only) of the font used at the time of printing or displaying. You should not use `CEdit::SetTabStops` because `CEditView` must cache the tab-stop value. +Only a single tab-stop width is supported. (`CEdit` objects support multiple tab widths.) Widths are in dialog units, which equal one-fourth of the average character width (based on uppercase and lowercase alphabetic characters only) of the font used at the time of printing or displaying. You should not use `CEdit::SetTabStops` because `CEditView` must cache the tab-stop value. This function modifies only the tabs of the object for which it is called. To change the tab stops for each `CEditView` object in your application, call each object's `SetTabStops` function. diff --git a/docs/mfc/reference/cfile-class.md b/docs/mfc/reference/cfile-class.md index 85224ecfbd..1621e32746 100644 --- a/docs/mfc/reference/cfile-class.md +++ b/docs/mfc/reference/cfile-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CFile Class" title: "CFile Class" -ms.date: "06/12/2018" +description: "Learn more about: CFile Class" +ms.date: 06/12/2018 f1_keywords: ["CFile", "AFX/CFile", "AFX/CFile::CFile", "AFX/CFile::Abort", "AFX/CFile::Close", "AFX/CFile::Duplicate", "AFX/CFile::Flush", "AFX/CFile::GetFileName", "AFX/CFile::GetFilePath", "AFX/CFile::GetFileTitle", "AFX/CFile::GetLength", "AFX/CFile::GetPosition", "AFX/CFile::GetStatus", "AFX/CFile::LockRange", "AFX/CFile::Open", "AFX/CFile::Read", "AFX/CFile::Remove", "AFX/CFile::Rename", "AFX/CFile::Seek", "AFX/CFile::SeekToBegin", "AFX/CFile::SeekToEnd", "AFX/CFile::SetFilePath", "AFX/CFile::SetLength", "AFX/CFile::SetStatus", "AFX/CFile::UnlockRange", "AFX/CFile::Write", "AFX/CFile::hFileNull", "AFX/CFile::m_hFile", "AFX/CFile::m_pTM"] helpviewer_keywords: ["CFile [MFC], CFile", "CFile [MFC], Abort", "CFile [MFC], Close", "CFile [MFC], Duplicate", "CFile [MFC], Flush", "CFile [MFC], GetFileName", "CFile [MFC], GetFilePath", "CFile [MFC], GetFileTitle", "CFile [MFC], GetLength", "CFile [MFC], GetPosition", "CFile [MFC], GetStatus", "CFile [MFC], LockRange", "CFile [MFC], Open", "CFile [MFC], Read", "CFile [MFC], Remove", "CFile [MFC], Rename", "CFile [MFC], Seek", "CFile [MFC], SeekToBegin", "CFile [MFC], SeekToEnd", "CFile [MFC], SetFilePath", "CFile [MFC], SetLength", "CFile [MFC], SetStatus", "CFile [MFC], UnlockRange", "CFile [MFC], Write", "CFile [MFC], hFileNull", "CFile [MFC], m_hFile", "CFile [MFC], m_pTM"] -ms.assetid: b2eb5757-d499-4e67-b044-dd7d1abaa0f8 --- # CFile Class @@ -277,7 +276,7 @@ The name of the file. For example, when you call `GetFileName` to generate a message to the user about the file `c:\windows\write\myfile.wri`, the filename, `myfile.wri`, is returned. -To return the entire path of the file, including the name, call [GetFilePath](#getfilepath). To return the title of the file ( `myfile`), call [GetFileTitle](#getfiletitle). +To return the entire path of the file, including the name, call [GetFilePath](#getfilepath). To return the title of the file (`myfile`), call [GetFileTitle](#getfiletitle). ### Example diff --git a/docs/mfc/reference/cfindreplacedialog-class.md b/docs/mfc/reference/cfindreplacedialog-class.md index e2354f49f9..e24c9f2471 100644 --- a/docs/mfc/reference/cfindreplacedialog-class.md +++ b/docs/mfc/reference/cfindreplacedialog-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CFindReplaceDialog Class" title: "CFindReplaceDialog Class" -ms.date: "11/04/2016" +description: "Learn more about: CFindReplaceDialog Class" +ms.date: 11/04/2016 f1_keywords: ["CFindReplaceDialog", "AFXDLGS/CFindReplaceDialog", "AFXDLGS/CFindReplaceDialog::CFindReplaceDialog", "AFXDLGS/CFindReplaceDialog::Create", "AFXDLGS/CFindReplaceDialog::FindNext", "AFXDLGS/CFindReplaceDialog::GetFindString", "AFXDLGS/CFindReplaceDialog::GetNotifier", "AFXDLGS/CFindReplaceDialog::GetReplaceString", "AFXDLGS/CFindReplaceDialog::IsTerminating", "AFXDLGS/CFindReplaceDialog::MatchCase", "AFXDLGS/CFindReplaceDialog::MatchWholeWord", "AFXDLGS/CFindReplaceDialog::ReplaceAll", "AFXDLGS/CFindReplaceDialog::ReplaceCurrent", "AFXDLGS/CFindReplaceDialog::SearchDown", "AFXDLGS/CFindReplaceDialog::m_fr"] helpviewer_keywords: ["CFindReplaceDialog [MFC], CFindReplaceDialog", "CFindReplaceDialog [MFC], Create", "CFindReplaceDialog [MFC], FindNext", "CFindReplaceDialog [MFC], GetFindString", "CFindReplaceDialog [MFC], GetNotifier", "CFindReplaceDialog [MFC], GetReplaceString", "CFindReplaceDialog [MFC], IsTerminating", "CFindReplaceDialog [MFC], MatchCase", "CFindReplaceDialog [MFC], MatchWholeWord", "CFindReplaceDialog [MFC], ReplaceAll", "CFindReplaceDialog [MFC], ReplaceCurrent", "CFindReplaceDialog [MFC], SearchDown", "CFindReplaceDialog [MFC], m_fr"] -ms.assetid: 610f0b5d-b398-4ef6-8c05-e9d6641e50a8 --- # CFindReplaceDialog Class @@ -142,7 +141,7 @@ Nonzero if the dialog box object was successfully created; otherwise 0. ### Remarks -In order for the parent window to be notified of find/replace requests, you must use the Windows [RegisterWindowMessage](/windows/win32/api/winuser/nf-winuser-registerwindowmessagew) function whose return value is a message number unique to the application's instance. Your frame window should have a message map entry that declares the callback function ( `OnFindReplace` in the example that follows) that handles this registered message. The following code fragment is an example of how to do this for a frame window class named `CMyRichEditView`: +In order for the parent window to be notified of find/replace requests, you must use the Windows [RegisterWindowMessage](/windows/win32/api/winuser/nf-winuser-registerwindowmessagew) function whose return value is a message number unique to the application's instance. Your frame window should have a message map entry that declares the callback function (`OnFindReplace` in the example that follows) that handles this registered message. The following code fragment is an example of how to do this for a frame window class named `CMyRichEditView`: [!code-cpp[NVC_MFCDocView#171](../../mfc/codesnippet/cpp/cfindreplacedialog-class_2.h)]   diff --git a/docs/mfc/reference/cfont-class.md b/docs/mfc/reference/cfont-class.md index 768ca7bd6a..2b22401550 100644 --- a/docs/mfc/reference/cfont-class.md +++ b/docs/mfc/reference/cfont-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CFont Class" title: "CFont Class" -ms.date: "11/04/2016" +description: "Learn more about: CFont Class" +ms.date: 11/04/2016 f1_keywords: ["CFont", "AFXWIN/CFont", "AFXWIN/CFont::CFont", "AFXWIN/CFont::CreateFont", "AFXWIN/CFont::CreateFontIndirect", "AFXWIN/CFont::CreatePointFont", "AFXWIN/CFont::CreatePointFontIndirect", "AFXWIN/CFont::FromHandle", "AFXWIN/CFont::GetLogFont"] helpviewer_keywords: ["CFont [MFC], CFont", "CFont [MFC], CreateFont", "CFont [MFC], CreateFontIndirect", "CFont [MFC], CreatePointFont", "CFont [MFC], CreatePointFontIndirect", "CFont [MFC], FromHandle", "CFont [MFC], GetLogFont"] -ms.assetid: 3fad6bfe-d6ce-4ab9-967a-5ce0aa102800 --- # `CFont` Class @@ -102,7 +101,7 @@ BOOL CreateFont( ### Parameters *`nHeight`*
-Specifies the desired height (in logical units) of the font. See the `lfHeight` member of the [`LOGFONT`](/windows/win32/api/wingdi/ns-wingdi-logfontw)structure in the Windows SDK for a description. The absolute value of *`nHeight`* must not exceed 16,384 device units after it is converted. For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size or the smallest font if all the fonts exceed the requested size. +Specifies the desired height (in logical units) of the font. See the `lfHeight` member of the [`LOGFONT`](/windows/win32/api/wingdi/ns-wingdi-logfontw) structure in the Windows SDK for a description. The absolute value of *`nHeight`* must not exceed 16,384 device units after it is converted. For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size or the smallest font if all the fonts exceed the requested size. *`nWidth`*
Specifies the average width (in logical units) of characters in the font. If *`nWidth`* is 0, the aspect ratio of the device will be matched against the digitization aspect ratio of the available fonts to find the closest match, which is determined by the absolute value of the difference. @@ -173,7 +172,7 @@ When you finish with the `CFont` object created by the `CreateFont` function, us ## `CFont::CreateFontIndirect` -Initializes a `CFont` object with the characteristics given in a [`LOGFONT`](/windows/win32/api/wingdi/ns-wingdi-logfontw)structure. +Initializes a `CFont` object with the characteristics given in a [`LOGFONT`](/windows/win32/api/wingdi/ns-wingdi-logfontw) structure. ``` BOOL CreateFontIndirect(const LOGFONT* lpLogFont); diff --git a/docs/mfc/reference/cframewnd-class.md b/docs/mfc/reference/cframewnd-class.md index 969f96a322..c3d7b3aa2b 100644 --- a/docs/mfc/reference/cframewnd-class.md +++ b/docs/mfc/reference/cframewnd-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CFrameWnd Class" title: "CFrameWnd Class" -ms.date: "11/04/2016" +description: "Learn more about: CFrameWnd Class" +ms.date: 11/04/2016 f1_keywords: ["CFrameWnd", "AFXWIN/CFrameWnd", "AFXWIN/CFrameWnd::CFrameWnd", "AFXWIN/CFrameWnd::ActivateFrame", "AFXWIN/CFrameWnd::BeginModalState", "AFXWIN/CFrameWnd::Create", "AFXWIN/CFrameWnd::CreateView", "AFXWIN/CFrameWnd::DockControlBar", "AFXWIN/CFrameWnd::EnableDocking", "AFXWIN/CFrameWnd::EndModalState", "AFXWIN/CFrameWnd::FloatControlBar", "AFXWIN/CFrameWnd::GetActiveDocument", "AFXWIN/CFrameWnd::GetActiveFrame", "AFXWIN/CFrameWnd::GetActiveView", "AFXWIN/CFrameWnd::GetControlBar", "AFXWIN/CFrameWnd::GetDockState", "AFXWIN/CFrameWnd::GetMenuBarState", "AFXWIN/CFrameWnd::GetMenuBarVisibility", "AFXWIN/CFrameWnd::GetMessageBar", "AFXWIN/CFrameWnd::GetMessageString", "AFXWIN/CFrameWnd::GetTitle", "AFXWIN/CFrameWnd::InitialUpdateFrame", "AFXWIN/CFrameWnd::InModalState", "AFXWIN/CFrameWnd::IsTracking", "AFXWIN/CFrameWnd::LoadAccelTable", "AFXWIN/CFrameWnd::LoadBarState", "AFXWIN/CFrameWnd::LoadFrame", "AFXWIN/CFrameWnd::NegotiateBorderSpace", "AFXWIN/CFrameWnd::OnBarCheck", "AFXWIN/CFrameWnd::OnContextHelp", "AFXWIN/CFrameWnd::OnSetPreviewMode", "AFXWIN/CFrameWnd::OnUpdateControlBarMenu", "AFXWIN/CFrameWnd::RecalcLayout", "AFXWIN/CFrameWnd::SaveBarState", "AFXWIN/CFrameWnd::SetActivePreviewView", "AFXWIN/CFrameWnd::SetActiveView", "AFXWIN/CFrameWnd::SetDockState", "AFXWIN/CFrameWnd::SetMenuBarState", "AFXWIN/CFrameWnd::SetMenuBarVisibility", "AFXWIN/CFrameWnd::SetMessageText", "AFXWIN/CFrameWnd::SetProgressBarPosition", "AFXWIN/CFrameWnd::SetProgressBarRange", "AFXWIN/CFrameWnd::SetProgressBarState", "AFXWIN/CFrameWnd::SetTaskbarOverlayIcon", "AFXWIN/CFrameWnd::SetTitle", "AFXWIN/CFrameWnd::ShowControlBar", "AFXWIN/CFrameWnd::ShowOwnedWindows", "AFXWIN/CFrameWnd::OnCreateClient", "AFXWIN/CFrameWnd::OnHideMenuBar", "AFXWIN/CFrameWnd::OnShowMenuBar", "AFXWIN/CFrameWnd::m_bAutoMenuEnable", "AFXWIN/CFrameWnd::rectDefault"] helpviewer_keywords: ["CFrameWnd [MFC], CFrameWnd", "CFrameWnd [MFC], ActivateFrame", "CFrameWnd [MFC], BeginModalState", "CFrameWnd [MFC], Create", "CFrameWnd [MFC], CreateView", "CFrameWnd [MFC], DockControlBar", "CFrameWnd [MFC], EnableDocking", "CFrameWnd [MFC], EndModalState", "CFrameWnd [MFC], FloatControlBar", "CFrameWnd [MFC], GetActiveDocument", "CFrameWnd [MFC], GetActiveFrame", "CFrameWnd [MFC], GetActiveView", "CFrameWnd [MFC], GetControlBar", "CFrameWnd [MFC], GetDockState", "CFrameWnd [MFC], GetMenuBarState", "CFrameWnd [MFC], GetMenuBarVisibility", "CFrameWnd [MFC], GetMessageBar", "CFrameWnd [MFC], GetMessageString", "CFrameWnd [MFC], GetTitle", "CFrameWnd [MFC], InitialUpdateFrame", "CFrameWnd [MFC], InModalState", "CFrameWnd [MFC], IsTracking", "CFrameWnd [MFC], LoadAccelTable", "CFrameWnd [MFC], LoadBarState", "CFrameWnd [MFC], LoadFrame", "CFrameWnd [MFC], NegotiateBorderSpace", "CFrameWnd [MFC], OnBarCheck", "CFrameWnd [MFC], OnContextHelp", "CFrameWnd [MFC], OnSetPreviewMode", "CFrameWnd [MFC], OnUpdateControlBarMenu", "CFrameWnd [MFC], RecalcLayout", "CFrameWnd [MFC], SaveBarState", "CFrameWnd [MFC], SetActivePreviewView", "CFrameWnd [MFC], SetActiveView", "CFrameWnd [MFC], SetDockState", "CFrameWnd [MFC], SetMenuBarState", "CFrameWnd [MFC], SetMenuBarVisibility", "CFrameWnd [MFC], SetMessageText", "CFrameWnd [MFC], SetProgressBarPosition", "CFrameWnd [MFC], SetProgressBarRange", "CFrameWnd [MFC], SetProgressBarState", "CFrameWnd [MFC], SetTaskbarOverlayIcon", "CFrameWnd [MFC], SetTitle", "CFrameWnd [MFC], ShowControlBar", "CFrameWnd [MFC], ShowOwnedWindows", "CFrameWnd [MFC], OnCreateClient", "CFrameWnd [MFC], OnHideMenuBar", "CFrameWnd [MFC], OnShowMenuBar", "CFrameWnd [MFC], m_bAutoMenuEnable", "CFrameWnd [MFC], rectDefault"] -ms.assetid: e2220aba-5bf4-4002-b960-fbcafcad01f1 --- # `CFrameWnd` Class @@ -420,7 +419,7 @@ If there is no active MDI child or the application is a single document interfac ## `CFrameWnd::GetActiveView` -Call this member function to obtain a pointer to the active view (if any) attached to a frame window ( `CFrameWnd`). +Call this member function to obtain a pointer to the active view (if any) attached to a frame window (`CFrameWnd`). ``` CView* GetActiveView() const; @@ -432,7 +431,7 @@ A pointer to the current [`CView`](../../mfc/reference/cview-class.md). If there ### Remarks -This function returns `NULL` when called for an MDI main frame window ( `CMDIFrameWnd`). In an MDI application, the MDI main frame window does not have a view associated with it. Instead, each individual child window ( `CMDIChildWnd`) has one or more associated views. The active view in an MDI application can be obtained by first finding the active MDI child window and then finding the active view for that child window. The active MDI child window can be found by calling the function `MDIGetActive` or `GetActiveFrame` as demonstrated in the following: +This function returns `NULL` when called for an MDI main frame window (`CMDIFrameWnd`). In an MDI application, the MDI main frame window does not have a view associated with it. Instead, each individual child window (`CMDIChildWnd`) has one or more associated views. The active view in an MDI application can be obtained by first finding the active MDI child window and then finding the active view for that child window. The active MDI child window can be found by calling the function `MDIGetActive` or `GetActiveFrame` as demonstrated in the following: [!code-cpp[NVC_MFCWindowing#2](../../mfc/reference/codesnippet/cpp/cframewnd-class_2.cpp)] diff --git a/docs/mfc/reference/cframewndex-class.md b/docs/mfc/reference/cframewndex-class.md index e54a96c15b..6c54057b89 100644 --- a/docs/mfc/reference/cframewndex-class.md +++ b/docs/mfc/reference/cframewndex-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CFrameWndEx Class" title: "CFrameWndEx Class" +description: "Learn more about: CFrameWndEx Class" ms.date: "11/04/2016" f1_keywords: ["CFrameWndEx", "AFXFRAMEWNDEX/CFrameWndEx", "AFXFRAMEWNDEX/CFrameWndEx::ActiveItemRecalcLayout", "AFXFRAMEWNDEX/CFrameWndEx::AddPane", "AFXFRAMEWNDEX/CFrameWndEx::AdjustDockingLayout", "AFXFRAMEWNDEX/CFrameWndEx::DelayUpdateFrameMenu", "AFXFRAMEWNDEX/CFrameWndEx::DockPane", "AFXFRAMEWNDEX/CFrameWndEx::DockPaneLeftOf", "AFXFRAMEWNDEX/CFrameWndEx::EnableAutoHidePanes", "AFXFRAMEWNDEX/CFrameWndEx::EnableDocking", "AFXFRAMEWNDEX/CFrameWndEx::EnableFullScreenMainMenu", "AFXFRAMEWNDEX/CFrameWndEx::EnableFullScreenMode", "AFXFRAMEWNDEX/CFrameWndEx::EnableLoadDockState", "AFXFRAMEWNDEX/CFrameWndEx::EnablePaneMenu", "AFXFRAMEWNDEX/CFrameWndEx::GetActivePopup", "AFXFRAMEWNDEX/CFrameWndEx::GetDefaultResId", "AFXFRAMEWNDEX/CFrameWndEx::GetDockingManager", "AFXFRAMEWNDEX/CFrameWndEx::GetMenuBar", "AFXFRAMEWNDEX/CFrameWndEx::GetPane", "AFXFRAMEWNDEX/CFrameWndEx::GetRibbonBar", "AFXFRAMEWNDEX/CFrameWndEx::GetTearOffBars", "AFXFRAMEWNDEX/CFrameWndEx::GetToolbarButtonToolTipText", "AFXFRAMEWNDEX/CFrameWndEx::InsertPane", "AFXFRAMEWNDEX/CFrameWndEx::IsFullScreen", "AFXFRAMEWNDEX/CFrameWndEx::IsMenuBarAvailable", "AFXFRAMEWNDEX/CFrameWndEx::IsPointNearDockSite", "AFXFRAMEWNDEX/CFrameWndEx::IsPrintPreview", "AFXFRAMEWNDEX/CFrameWndEx::LoadFrame", "AFXFRAMEWNDEX/CFrameWndEx::NegotiateBorderSpace", "AFXFRAMEWNDEX/CFrameWndEx::OnActivate", "AFXFRAMEWNDEX/CFrameWndEx::OnActivateApp", "AFXFRAMEWNDEX/CFrameWndEx::OnChangeVisualManager", "AFXFRAMEWNDEX/CFrameWndEx::OnClose", "AFXFRAMEWNDEX/CFrameWndEx::OnCloseDockingPane", "AFXFRAMEWNDEX/CFrameWndEx::OnCloseMiniFrame", "AFXFRAMEWNDEX/CFrameWndEx::OnClosePopupMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnCmdMsg", "AFXFRAMEWNDEX/CFrameWndEx::OnContextHelp", "AFXFRAMEWNDEX/CFrameWndEx::OnCreate", "AFXFRAMEWNDEX/CFrameWndEx::OnDestroy", "AFXFRAMEWNDEX/CFrameWndEx::OnDrawMenuImage", "AFXFRAMEWNDEX/CFrameWndEx::OnDrawMenuLogo", "AFXFRAMEWNDEX/CFrameWndEx::OnDWMCompositionChanged", "AFXFRAMEWNDEX/CFrameWndEx::OnExitSizeMove", "AFXFRAMEWNDEX/CFrameWndEx::OnGetMinMaxInfo", "AFXFRAMEWNDEX/CFrameWndEx::OnIdleUpdateCmdUI", "AFXFRAMEWNDEX/CFrameWndEx::OnLButtonDown", "AFXFRAMEWNDEX/CFrameWndEx::OnLButtonUp", "AFXFRAMEWNDEX/CFrameWndEx::OnMenuButtonToolHitTest", "AFXFRAMEWNDEX/CFrameWndEx::OnMenuChar", "AFXFRAMEWNDEX/CFrameWndEx::OnMouseMove", "AFXFRAMEWNDEX/CFrameWndEx::OnMoveMiniFrame", "AFXFRAMEWNDEX/CFrameWndEx::OnNcActivate", "AFXFRAMEWNDEX/CFrameWndEx::OnNcCalcSize", "AFXFRAMEWNDEX/CFrameWndEx::OnNcHitTest", "AFXFRAMEWNDEX/CFrameWndEx::OnNcMouseMove", "AFXFRAMEWNDEX/CFrameWndEx::OnNcPaint", "AFXFRAMEWNDEX/CFrameWndEx::OnPaneCheck", "AFXFRAMEWNDEX/CFrameWndEx::OnPostPreviewFrame", "AFXFRAMEWNDEX/CFrameWndEx::OnPowerBroadcast", "AFXFRAMEWNDEX/CFrameWndEx::OnSetMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnSetPreviewMode", "AFXFRAMEWNDEX/CFrameWndEx::OnSetText", "AFXFRAMEWNDEX/CFrameWndEx::OnShowCustomizePane", "AFXFRAMEWNDEX/CFrameWndEx::OnShowPanes", "AFXFRAMEWNDEX/CFrameWndEx::OnShowPopupMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnSize", "AFXFRAMEWNDEX/CFrameWndEx::OnSizing", "AFXFRAMEWNDEX/CFrameWndEx::OnSysColorChange", "AFXFRAMEWNDEX/CFrameWndEx::OnTearOffMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnToolbarContextMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnToolbarCreateNew", "AFXFRAMEWNDEX/CFrameWndEx::OnToolbarDelete", "AFXFRAMEWNDEX/CFrameWndEx::OnUpdateFrameMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnUpdateFrameTitle", "AFXFRAMEWNDEX/CFrameWndEx::OnUpdatePaneMenu", "AFXFRAMEWNDEX/CFrameWndEx::OnWindowPosChanged", "AFXFRAMEWNDEX/CFrameWndEx::PaneFromPoint", "AFXFRAMEWNDEX/CFrameWndEx::PreTranslateMessage", "AFXFRAMEWNDEX/CFrameWndEx::RecalcLayout", "AFXFRAMEWNDEX/CFrameWndEx::RemovePaneFromDockManager", "AFXFRAMEWNDEX/CFrameWndEx::SetDockState", "AFXFRAMEWNDEX/CFrameWndEx::SetPrintPreviewFrame", "AFXFRAMEWNDEX/CFrameWndEx::SetupToolbarMenu", "AFXFRAMEWNDEX/CFrameWndEx::ShowFullScreen", "AFXFRAMEWNDEX/CFrameWndEx::ShowPane", "AFXFRAMEWNDEX/CFrameWndEx::UpdateCaption", "AFXFRAMEWNDEX/CFrameWndEx::WinHelp"] helpviewer_keywords: ["CFrameWndEx [MFC], ActiveItemRecalcLayout", "CFrameWndEx [MFC], AddPane", "CFrameWndEx [MFC], AdjustDockingLayout", "CFrameWndEx [MFC], DelayUpdateFrameMenu", "CFrameWndEx [MFC], DockPane", "CFrameWndEx [MFC], DockPaneLeftOf", "CFrameWndEx [MFC], EnableAutoHidePanes", "CFrameWndEx [MFC], EnableDocking", "CFrameWndEx [MFC], EnableFullScreenMainMenu", "CFrameWndEx [MFC], EnableFullScreenMode", "CFrameWndEx [MFC], EnableLoadDockState", "CFrameWndEx [MFC], EnablePaneMenu", "CFrameWndEx [MFC], GetActivePopup", "CFrameWndEx [MFC], GetDefaultResId", "CFrameWndEx [MFC], GetDockingManager", "CFrameWndEx [MFC], GetMenuBar", "CFrameWndEx [MFC], GetPane", "CFrameWndEx [MFC], GetRibbonBar", "CFrameWndEx [MFC], GetTearOffBars", "CFrameWndEx [MFC], GetToolbarButtonToolTipText", "CFrameWndEx [MFC], InsertPane", "CFrameWndEx [MFC], IsFullScreen", "CFrameWndEx [MFC], IsMenuBarAvailable", "CFrameWndEx [MFC], IsPointNearDockSite", "CFrameWndEx [MFC], IsPrintPreview", "CFrameWndEx [MFC], LoadFrame", "CFrameWndEx [MFC], NegotiateBorderSpace", "CFrameWndEx [MFC], OnActivate", "CFrameWndEx [MFC], OnActivateApp", "CFrameWndEx [MFC], OnChangeVisualManager", "CFrameWndEx [MFC], OnClose", "CFrameWndEx [MFC], OnCloseDockingPane", "CFrameWndEx [MFC], OnCloseMiniFrame", "CFrameWndEx [MFC], OnClosePopupMenu", "CFrameWndEx [MFC], OnCmdMsg", "CFrameWndEx [MFC], OnContextHelp", "CFrameWndEx [MFC], OnCreate", "CFrameWndEx [MFC], OnDestroy", "CFrameWndEx [MFC], OnDrawMenuImage", "CFrameWndEx [MFC], OnDrawMenuLogo", "CFrameWndEx [MFC], OnDWMCompositionChanged", "CFrameWndEx [MFC], OnExitSizeMove", "CFrameWndEx [MFC], OnGetMinMaxInfo", "CFrameWndEx [MFC], OnIdleUpdateCmdUI", "CFrameWndEx [MFC], OnLButtonDown", "CFrameWndEx [MFC], OnLButtonUp", "CFrameWndEx [MFC], OnMenuButtonToolHitTest", "CFrameWndEx [MFC], OnMenuChar", "CFrameWndEx [MFC], OnMouseMove", "CFrameWndEx [MFC], OnMoveMiniFrame", "CFrameWndEx [MFC], OnNcActivate", "CFrameWndEx [MFC], OnNcCalcSize", "CFrameWndEx [MFC], OnNcHitTest", "CFrameWndEx [MFC], OnNcMouseMove", "CFrameWndEx [MFC], OnNcPaint", "CFrameWndEx [MFC], OnPaneCheck", "CFrameWndEx [MFC], OnPostPreviewFrame", "CFrameWndEx [MFC], OnPowerBroadcast", "CFrameWndEx [MFC], OnSetMenu", "CFrameWndEx [MFC], OnSetPreviewMode", "CFrameWndEx [MFC], OnSetText", "CFrameWndEx [MFC], OnShowCustomizePane", "CFrameWndEx [MFC], OnShowPanes", "CFrameWndEx [MFC], OnShowPopupMenu", "CFrameWndEx [MFC], OnSize", "CFrameWndEx [MFC], OnSizing", "CFrameWndEx [MFC], OnSysColorChange", "CFrameWndEx [MFC], OnTearOffMenu", "CFrameWndEx [MFC], OnToolbarContextMenu", "CFrameWndEx [MFC], OnToolbarCreateNew", "CFrameWndEx [MFC], OnToolbarDelete", "CFrameWndEx [MFC], OnUpdateFrameMenu", "CFrameWndEx [MFC], OnUpdateFrameTitle", "CFrameWndEx [MFC], OnUpdatePaneMenu", "CFrameWndEx [MFC], OnWindowPosChanged", "CFrameWndEx [MFC], PaneFromPoint", "CFrameWndEx [MFC], PreTranslateMessage", "CFrameWndEx [MFC], RecalcLayout", "CFrameWndEx [MFC], RemovePaneFromDockManager", "CFrameWndEx [MFC], SetDockState", "CFrameWndEx [MFC], SetPrintPreviewFrame", "CFrameWndEx [MFC], SetupToolbarMenu", "CFrameWndEx [MFC], ShowFullScreen", "CFrameWndEx [MFC], ShowPane", "CFrameWndEx [MFC], UpdateCaption", "CFrameWndEx [MFC], WinHelp"] @@ -107,7 +107,7 @@ class CFrameWndEx : public CFrameWnd |[`CFrameWndEx::ShowFullScreen`](#showfullscreen)|Switches the main frame between the full screen and the regular modes.| |[`CFrameWndEx::ShowPane`](#showpane)|Shows or hides the specified pane.| |[`CFrameWndEx::UpdateCaption`](#updatecaption)|Called by the framework to update the window frame caption.| -|[`CFrameWndEx::WinHelp``](#winhelp)|Invokes either the `WinHelp` application or context related help.| +|[`CFrameWndEx::WinHelp`](#winhelp)|Invokes either the `WinHelp` application or context related help.| ## Example diff --git a/docs/mfc/reference/cgopherconnection-class.md b/docs/mfc/reference/cgopherconnection-class.md index 585855bbfe..d05ead9a3a 100644 --- a/docs/mfc/reference/cgopherconnection-class.md +++ b/docs/mfc/reference/cgopherconnection-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CGopherConnection Class" title: "CGopherConnection Class" +description: "Learn more about: CGopherConnection Class" ms.date: "11/04/2016" f1_keywords: ["CGopherConnection", "AFXINET/CGopherConnection", "AFXINET/CGopherConnection::CGopherConnection", "AFXINET/CGopherConnection::CreateLocator", "AFXINET/CGopherConnection::GetAttribute", "AFXINET/CGopherConnection::OpenFile"] helpviewer_keywords: ["CGopherConnection [MFC], CGopherConnection", "CGopherConnection [MFC], CreateLocator", "CGopherConnection [MFC], GetAttribute", "CGopherConnection [MFC], OpenFile"] -ms.assetid: b5b96aea-ac99-430e-bd84-d1372b43f78f --- # CGopherConnection Class @@ -167,8 +166,9 @@ Call this member function to retrieve specific attribute information about an it ``` BOOL GetAttribute( - CGopherLocator& refLocator CString strRequestedAttributes, - CString& strResult,); + CGopherLocator& refLocator, + CString strRequestedAttributes, + CString& strResult); ``` ### Parameters @@ -222,11 +222,11 @@ Override the *dwContext* default to set the context identifier to a value of you ## See also -[CInternetConnection Class](../../mfc/reference/cinternetconnection-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[CFtpConnection Class](../../mfc/reference/cftpconnection-class.md)
-[CHttpConnection Class](../../mfc/reference/chttpconnection-class.md)
-[CInternetConnection Class](../../mfc/reference/cinternetconnection-class.md)
-[CGopherLocator Class](../../mfc/reference/cgopherlocator-class.md)
-[CGopherFile Class](../../mfc/reference/cgopherfile-class.md)
+[CInternetConnection Class](../../mfc/reference/cinternetconnection-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[CFtpConnection Class](../../mfc/reference/cftpconnection-class.md)\ +[CHttpConnection Class](../../mfc/reference/chttpconnection-class.md)\ +[CInternetConnection Class](../../mfc/reference/cinternetconnection-class.md)\ +[CGopherLocator Class](../../mfc/reference/cgopherlocator-class.md)\ +[CGopherFile Class](../../mfc/reference/cgopherfile-class.md)\ [CInternetSession Class](../../mfc/reference/cinternetsession-class.md) diff --git a/docs/mfc/reference/cimagelist-class.md b/docs/mfc/reference/cimagelist-class.md index 184a95db73..ca80bcc33e 100644 --- a/docs/mfc/reference/cimagelist-class.md +++ b/docs/mfc/reference/cimagelist-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CImageList Class" title: "CImageList Class" -ms.date: "11/04/2016" +description: "Learn more about: CImageList Class" +ms.date: 11/04/2016 f1_keywords: ["CImageList", "AFXCMN/CImageList", "AFXCMN/CImageList::CImageList", "AFXCMN/CImageList::Add", "AFXCMN/CImageList::Attach", "AFXCMN/CImageList::BeginDrag", "AFXCMN/CImageList::Copy", "AFXCMN/CImageList::Create", "AFXCMN/CImageList::DeleteImageList", "AFXCMN/CImageList::DeleteTempMap", "AFXCMN/CImageList::Detach", "AFXCMN/CImageList::DragEnter", "AFXCMN/CImageList::DragLeave", "AFXCMN/CImageList::DragMove", "AFXCMN/CImageList::DragShowNolock", "AFXCMN/CImageList::Draw", "AFXCMN/CImageList::DrawEx", "AFXCMN/CImageList::DrawIndirect", "AFXCMN/CImageList::EndDrag", "AFXCMN/CImageList::ExtractIcon", "AFXCMN/CImageList::FromHandle", "AFXCMN/CImageList::FromHandlePermanent", "AFXCMN/CImageList::GetBkColor", "AFXCMN/CImageList::GetDragImage", "AFXCMN/CImageList::GetImageCount", "AFXCMN/CImageList::GetImageInfo", "AFXCMN/CImageList::GetSafeHandle", "AFXCMN/CImageList::Read", "AFXCMN/CImageList::Remove", "AFXCMN/CImageList::Replace", "AFXCMN/CImageList::SetBkColor", "AFXCMN/CImageList::SetDragCursorImage", "AFXCMN/CImageList::SetImageCount", "AFXCMN/CImageList::SetOverlayImage", "AFXCMN/CImageList::Write", "AFXCMN/CImageList::m_hImageList"] helpviewer_keywords: ["CImageList [MFC], CImageList", "CImageList [MFC], Add", "CImageList [MFC], Attach", "CImageList [MFC], BeginDrag", "CImageList [MFC], Copy", "CImageList [MFC], Create", "CImageList [MFC], DeleteImageList", "CImageList [MFC], DeleteTempMap", "CImageList [MFC], Detach", "CImageList [MFC], DragEnter", "CImageList [MFC], DragLeave", "CImageList [MFC], DragMove", "CImageList [MFC], DragShowNolock", "CImageList [MFC], Draw", "CImageList [MFC], DrawEx", "CImageList [MFC], DrawIndirect", "CImageList [MFC], EndDrag", "CImageList [MFC], ExtractIcon", "CImageList [MFC], FromHandle", "CImageList [MFC], FromHandlePermanent", "CImageList [MFC], GetBkColor", "CImageList [MFC], GetDragImage", "CImageList [MFC], GetImageCount", "CImageList [MFC], GetImageInfo", "CImageList [MFC], GetSafeHandle", "CImageList [MFC], Read", "CImageList [MFC], Remove", "CImageList [MFC], Replace", "CImageList [MFC], SetBkColor", "CImageList [MFC], SetDragCursorImage", "CImageList [MFC], SetImageCount", "CImageList [MFC], SetOverlayImage", "CImageList [MFC], Write", "CImageList [MFC], m_hImageList"] -ms.assetid: b6d1a704-1c82-4548-8a8f-77972adc98a5 --- # `CImageList` Class @@ -359,7 +358,7 @@ Nonzero if successful; otherwise 0. ## `CImageList::DeleteTempMap` -Called automatically by the `CWinApp` idle-time handler, `DeleteTempMap` deletes any temporary `CImageList` objects created by [FromHandle](#fromhandle), but does not destroy any handles ( `hImageList`) temporarily associated with the `ImageList` objects. +Called automatically by the `CWinApp` idle-time handler, `DeleteTempMap` deletes any temporary `CImageList` objects created by [FromHandle](#fromhandle), but does not destroy any handles (`hImageList`) temporarily associated with the `ImageList` objects. ``` static void PASCAL DeleteTempMap(); diff --git a/docs/mfc/reference/cinternetexception-class.md b/docs/mfc/reference/cinternetexception-class.md index 9d9ccae462..0af84f7303 100644 --- a/docs/mfc/reference/cinternetexception-class.md +++ b/docs/mfc/reference/cinternetexception-class.md @@ -90,7 +90,7 @@ DWORD m_dwError; This error value may be a system error code, found in WINERROR.H, or an error value from WININET.H. -For a list of Win32 error codes, see [Error Codes](/windows/win32/Debug/system-error-codes). For a list of Internet-specific error messages, see . Both topics are in the Windows SDK. +For a list of Win32 error codes, see [Error Codes](/windows/win32/Debug/system-error-codes). ## See also diff --git a/docs/mfc/reference/clistctrl-class.md b/docs/mfc/reference/clistctrl-class.md index 8ddf377080..a9e92a75d1 100644 --- a/docs/mfc/reference/clistctrl-class.md +++ b/docs/mfc/reference/clistctrl-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CListCtrl Class" title: "CListCtrl Class" +description: "Learn more about: CListCtrl Class" ms.date: 06/29/2022 f1_keywords: ["CListCtrl", "AFXCMN/CListCtrl", "AFXCMN/CListCtrl::CListCtrl", "AFXCMN/CListCtrl::ApproximateViewRect", "AFXCMN/CListCtrl::Arrange", "AFXCMN/CListCtrl::CancelEditLabel", "AFXCMN/CListCtrl::Create", "AFXCMN/CListCtrl::CreateDragImage", "AFXCMN/CListCtrl::CreateEx", "AFXCMN/CListCtrl::DeleteAllItems", "AFXCMN/CListCtrl::DeleteColumn", "AFXCMN/CListCtrl::DeleteItem", "AFXCMN/CListCtrl::DrawItem", "AFXCMN/CListCtrl::EditLabel", "AFXCMN/CListCtrl::EnableGroupView", "AFXCMN/CListCtrl::EnsureVisible", "AFXCMN/CListCtrl::FindItem", "AFXCMN/CListCtrl::GetBkColor", "AFXCMN/CListCtrl::GetBkImage", "AFXCMN/CListCtrl::GetCallbackMask", "AFXCMN/CListCtrl::GetCheck", "AFXCMN/CListCtrl::GetColumn", "AFXCMN/CListCtrl::GetColumnOrderArray", "AFXCMN/CListCtrl::GetColumnWidth", "AFXCMN/CListCtrl::GetCountPerPage", "AFXCMN/CListCtrl::GetEditControl", "AFXCMN/CListCtrl::GetEmptyText", "AFXCMN/CListCtrl::GetExtendedStyle", "AFXCMN/CListCtrl::GetFirstSelectedItemPosition", "AFXCMN/CListCtrl::GetFocusedGroup", "AFXCMN/CListCtrl::GetGroupCount", "AFXCMN/CListCtrl::GetGroupInfo", "AFXCMN/CListCtrl::GetGroupInfoByIndex", "AFXCMN/CListCtrl::GetGroupMetrics", "AFXCMN/CListCtrl::GetGroupRect", "AFXCMN/CListCtrl::GetGroupState", "AFXCMN/CListCtrl::GetHeaderCtrl", "AFXCMN/CListCtrl::GetHotCursor", "AFXCMN/CListCtrl::GetHotItem", "AFXCMN/CListCtrl::GetHoverTime", "AFXCMN/CListCtrl::GetImageList", "AFXCMN/CListCtrl::GetInsertMark", "AFXCMN/CListCtrl::GetInsertMarkColor", "AFXCMN/CListCtrl::GetInsertMarkRect", "AFXCMN/CListCtrl::GetItem", "AFXCMN/CListCtrl::GetItemCount", "AFXCMN/CListCtrl::GetItemData", "AFXCMN/CListCtrl::GetItemIndexRect", "AFXCMN/CListCtrl::GetItemPosition", "AFXCMN/CListCtrl::GetItemRect", "AFXCMN/CListCtrl::GetItemSpacing", "AFXCMN/CListCtrl::GetItemState", "AFXCMN/CListCtrl::GetItemText", "AFXCMN/CListCtrl::GetNextItem", "AFXCMN/CListCtrl::GetNextItemIndex", "AFXCMN/CListCtrl::GetNextSelectedItem", "AFXCMN/CListCtrl::GetNumberOfWorkAreas", "AFXCMN/CListCtrl::GetOrigin", "AFXCMN/CListCtrl::GetOutlineColor", "AFXCMN/CListCtrl::GetSelectedColumn", "AFXCMN/CListCtrl::GetSelectedCount", "AFXCMN/CListCtrl::GetSelectionMark", "AFXCMN/CListCtrl::GetStringWidth", "AFXCMN/CListCtrl::GetSubItemRect", "AFXCMN/CListCtrl::GetTextBkColor", "AFXCMN/CListCtrl::GetTextColor", "AFXCMN/CListCtrl::GetTileInfo", "AFXCMN/CListCtrl::GetTileViewInfo", "AFXCMN/CListCtrl::GetToolTips", "AFXCMN/CListCtrl::GetTopIndex", "AFXCMN/CListCtrl::GetView", "AFXCMN/CListCtrl::GetViewRect", "AFXCMN/CListCtrl::GetWorkAreas", "AFXCMN/CListCtrl::HasGroup", "AFXCMN/CListCtrl::HitTest", "AFXCMN/CListCtrl::InsertColumn", "AFXCMN/CListCtrl::InsertGroup", "AFXCMN/CListCtrl::InsertGroupSorted", "AFXCMN/CListCtrl::InsertItem", "AFXCMN/CListCtrl::InsertMarkHitTest", "AFXCMN/CListCtrl::IsGroupViewEnabled", "AFXCMN/CListCtrl::IsItemVisible", "AFXCMN/CListCtrl::MapIDToIndex", "AFXCMN/CListCtrl::MapIndexToID", "AFXCMN/CListCtrl::MoveGroup", "AFXCMN/CListCtrl::MoveItemToGroup", "AFXCMN/CListCtrl::RedrawItems", "AFXCMN/CListCtrl::RemoveAllGroups", "AFXCMN/CListCtrl::RemoveGroup", "AFXCMN/CListCtrl::Scroll", "AFXCMN/CListCtrl::SetBkColor", "AFXCMN/CListCtrl::SetBkImage", "AFXCMN/CListCtrl::SetCallbackMask", "AFXCMN/CListCtrl::SetCheck", "AFXCMN/CListCtrl::SetColumn", "AFXCMN/CListCtrl::SetColumnOrderArray", "AFXCMN/CListCtrl::SetColumnWidth", "AFXCMN/CListCtrl::SetExtendedStyle", "AFXCMN/CListCtrl::SetGroupInfo", "AFXCMN/CListCtrl::SetGroupMetrics", "AFXCMN/CListCtrl::SetHotCursor", "AFXCMN/CListCtrl::SetHotItem", "AFXCMN/CListCtrl::SetHoverTime", "AFXCMN/CListCtrl::SetIconSpacing", "AFXCMN/CListCtrl::SetImageList", "AFXCMN/CListCtrl::SetInfoTip", "AFXCMN/CListCtrl::SetInsertMark", "AFXCMN/CListCtrl::SetInsertMarkColor", "AFXCMN/CListCtrl::SetItem", "AFXCMN/CListCtrl::SetItemCount", "AFXCMN/CListCtrl::SetItemCountEx", "AFXCMN/CListCtrl::SetItemData", "AFXCMN/CListCtrl::SetItemIndexState", "AFXCMN/CListCtrl::SetItemPosition", "AFXCMN/CListCtrl::SetItemState", "AFXCMN/CListCtrl::SetItemText", "AFXCMN/CListCtrl::SetOutlineColor", "AFXCMN/CListCtrl::SetSelectedColumn", "AFXCMN/CListCtrl::SetSelectionMark", "AFXCMN/CListCtrl::SetTextBkColor", "AFXCMN/CListCtrl::SetTextColor", "AFXCMN/CListCtrl::SetTileInfo", "AFXCMN/CListCtrl::SetTileViewInfo", "AFXCMN/CListCtrl::SetToolTips", "AFXCMN/CListCtrl::SetView", "AFXCMN/CListCtrl::SetWorkAreas", "AFXCMN/CListCtrl::SortGroups", "AFXCMN/CListCtrl::SortItems", "AFXCMN/CListCtrl::SortItemsEx", "AFXCMN/CListCtrl::SubItemHitTest", "AFXCMN/CListCtrl::Update"] helpviewer_keywords: ["CListCtrl [MFC], CListCtrl", "CListCtrl [MFC], ApproximateViewRect", "CListCtrl [MFC], Arrange", "CListCtrl [MFC], CancelEditLabel", "CListCtrl [MFC], Create", "CListCtrl [MFC], CreateDragImage", "CListCtrl [MFC], CreateEx", "CListCtrl [MFC], DeleteAllItems", "CListCtrl [MFC], DeleteColumn", "CListCtrl [MFC], DeleteItem", "CListCtrl [MFC], DrawItem", "CListCtrl [MFC], EditLabel", "CListCtrl [MFC], EnableGroupView", "CListCtrl [MFC], EnsureVisible", "CListCtrl [MFC], FindItem", "CListCtrl [MFC], GetBkColor", "CListCtrl [MFC], GetBkImage", "CListCtrl [MFC], GetCallbackMask", "CListCtrl [MFC], GetCheck", "CListCtrl [MFC], GetColumn", "CListCtrl [MFC], GetColumnOrderArray", "CListCtrl [MFC], GetColumnWidth", "CListCtrl [MFC], GetCountPerPage", "CListCtrl [MFC], GetEditControl", "CListCtrl [MFC], GetEmptyText", "CListCtrl [MFC], GetExtendedStyle", "CListCtrl [MFC], GetFirstSelectedItemPosition", "CListCtrl [MFC], GetFocusedGroup", "CListCtrl [MFC], GetGroupCount", "CListCtrl [MFC], GetGroupInfo", "CListCtrl [MFC], GetGroupInfoByIndex", "CListCtrl [MFC], GetGroupMetrics", "CListCtrl [MFC], GetGroupRect", "CListCtrl [MFC], GetGroupState", "CListCtrl [MFC], GetHeaderCtrl", "CListCtrl [MFC], GetHotCursor", "CListCtrl [MFC], GetHotItem", "CListCtrl [MFC], GetHoverTime", "CListCtrl [MFC], GetImageList", "CListCtrl [MFC], GetInsertMark", "CListCtrl [MFC], GetInsertMarkColor", "CListCtrl [MFC], GetInsertMarkRect", "CListCtrl [MFC], GetItem", "CListCtrl [MFC], GetItemCount", "CListCtrl [MFC], GetItemData", "CListCtrl [MFC], GetItemIndexRect", "CListCtrl [MFC], GetItemPosition", "CListCtrl [MFC], GetItemRect", "CListCtrl [MFC], GetItemSpacing", "CListCtrl [MFC], GetItemState", "CListCtrl [MFC], GetItemText", "CListCtrl [MFC], GetNextItem", "CListCtrl [MFC], GetNextItemIndex", "CListCtrl [MFC], GetNextSelectedItem", "CListCtrl [MFC], GetNumberOfWorkAreas", "CListCtrl [MFC], GetOrigin", "CListCtrl [MFC], GetOutlineColor", "CListCtrl [MFC], GetSelectedColumn", "CListCtrl [MFC], GetSelectedCount", "CListCtrl [MFC], GetSelectionMark", "CListCtrl [MFC], GetStringWidth", "CListCtrl [MFC], GetSubItemRect", "CListCtrl [MFC], GetTextBkColor", "CListCtrl [MFC], GetTextColor", "CListCtrl [MFC], GetTileInfo", "CListCtrl [MFC], GetTileViewInfo", "CListCtrl [MFC], GetToolTips", "CListCtrl [MFC], GetTopIndex", "CListCtrl [MFC], GetView", "CListCtrl [MFC], GetViewRect", "CListCtrl [MFC], GetWorkAreas", "CListCtrl [MFC], HasGroup", "CListCtrl [MFC], HitTest", "CListCtrl [MFC], InsertColumn", "CListCtrl [MFC], InsertGroup", "CListCtrl [MFC], InsertGroupSorted", "CListCtrl [MFC], InsertItem", "CListCtrl [MFC], InsertMarkHitTest", "CListCtrl [MFC], IsGroupViewEnabled", "CListCtrl [MFC], IsItemVisible", "CListCtrl [MFC], MapIDToIndex", "CListCtrl [MFC], MapIndexToID", "CListCtrl [MFC], MoveGroup", "CListCtrl [MFC], MoveItemToGroup", "CListCtrl [MFC], RedrawItems", "CListCtrl [MFC], RemoveAllGroups", "CListCtrl [MFC], RemoveGroup", "CListCtrl [MFC], Scroll", "CListCtrl [MFC], SetBkColor", "CListCtrl [MFC], SetBkImage", "CListCtrl [MFC], SetCallbackMask", "CListCtrl [MFC], SetCheck", "CListCtrl [MFC], SetColumn", "CListCtrl [MFC], SetColumnOrderArray", "CListCtrl [MFC], SetColumnWidth", "CListCtrl [MFC], SetExtendedStyle", "CListCtrl [MFC], SetGroupInfo", "CListCtrl [MFC], SetGroupMetrics", "CListCtrl [MFC], SetHotCursor", "CListCtrl [MFC], SetHotItem", "CListCtrl [MFC], SetHoverTime", "CListCtrl [MFC], SetIconSpacing", "CListCtrl [MFC], SetImageList", "CListCtrl [MFC], SetInfoTip", "CListCtrl [MFC], SetInsertMark", "CListCtrl [MFC], SetInsertMarkColor", "CListCtrl [MFC], SetItem", "CListCtrl [MFC], SetItemCount", "CListCtrl [MFC], SetItemCountEx", "CListCtrl [MFC], SetItemData", "CListCtrl [MFC], SetItemIndexState", "CListCtrl [MFC], SetItemPosition", "CListCtrl [MFC], SetItemState", "CListCtrl [MFC], SetItemText", "CListCtrl [MFC], SetOutlineColor", "CListCtrl [MFC], SetSelectedColumn", "CListCtrl [MFC], SetSelectionMark", "CListCtrl [MFC], SetTextBkColor", "CListCtrl [MFC], SetTextColor", "CListCtrl [MFC], SetTileInfo", "CListCtrl [MFC], SetTileViewInfo", "CListCtrl [MFC], SetToolTips", "CListCtrl [MFC], SetView", "CListCtrl [MFC], SetWorkAreas", "CListCtrl [MFC], SortGroups", "CListCtrl [MFC], SortItems", "CListCtrl [MFC], SortItemsEx", "CListCtrl [MFC], SubItemHitTest", "CListCtrl [MFC], Update"] @@ -427,7 +427,7 @@ CImageList* CreateDragImage( ### Parameters -*`nItem*`\ +*`nItem`*\ Index of the item whose drag image list is to be created. *`lpPoint`*\ diff --git a/docs/mfc/reference/cmapstringtoob-class.md b/docs/mfc/reference/cmapstringtoob-class.md index f48bf10173..7d7404e995 100644 --- a/docs/mfc/reference/cmapstringtoob-class.md +++ b/docs/mfc/reference/cmapstringtoob-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CMapStringToOb Class" title: "CMapStringToOb Class" -ms.date: "11/04/2016" +description: "Learn more about: CMapStringToOb Class" +ms.date: 11/04/2016 f1_keywords: ["CMapStringToOb", "AFXCOLL/CMapStringToOb", "AFXCOLL/CMapStringToOb::CMapStringToOb", "AFXCOLL/CMapStringToOb::GetCount", "AFXCOLL/CMapStringToOb::GetHashTableSize", "AFXCOLL/CMapStringToOb::GetNextAssoc", "AFXCOLL/CMapStringToOb::GetSize", "AFXCOLL/CMapStringToOb::GetStartPosition", "AFXCOLL/CMapStringToOb::HashKey", "AFXCOLL/CMapStringToOb::InitHashTable", "AFXCOLL/CMapStringToOb::IsEmpty", "AFXCOLL/CMapStringToOb::Lookup", "AFXCOLL/CMapStringToOb::LookupKey", "AFXCOLL/CMapStringToOb::RemoveAll", "AFXCOLL/CMapStringToOb::RemoveKey", "AFXCOLL/CMapStringToOb::SetAt"] helpviewer_keywords: ["CMapStringToOb [MFC], CMapStringToOb", "CMapStringToOb [MFC], GetCount", "CMapStringToOb [MFC], GetHashTableSize", "CMapStringToOb [MFC], GetNextAssoc", "CMapStringToOb [MFC], GetSize", "CMapStringToOb [MFC], GetStartPosition", "CMapStringToOb [MFC], HashKey", "CMapStringToOb [MFC], InitHashTable", "CMapStringToOb [MFC], IsEmpty", "CMapStringToOb [MFC], Lookup", "CMapStringToOb [MFC], LookupKey", "CMapStringToOb [MFC], RemoveAll", "CMapStringToOb [MFC], RemoveKey", "CMapStringToOb [MFC], SetAt"] --- @@ -399,7 +399,7 @@ Nonzero if the element was found; otherwise 0. ### Remarks -`Lookup` uses a hashing algorithm to quickly find the map element with a key that matches exactly ( `CString` value). +`Lookup` uses a hashing algorithm to quickly find the map element with a key that matches exactly (`CString` value). The following table shows other member functions that are similar to `CMapStringToOb::LookUp`. diff --git a/docs/mfc/reference/cmdichildwndex-class.md b/docs/mfc/reference/cmdichildwndex-class.md index 69dede7425..b1f2e320dd 100644 --- a/docs/mfc/reference/cmdichildwndex-class.md +++ b/docs/mfc/reference/cmdichildwndex-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMDIChildWndEx Class" title: "CMDIChildWndEx Class" +description: "Learn more about: CMDIChildWndEx Class" ms.date: "10/18/2018" f1_keywords: ["CMDIChildWndEx", "AFXMDICHILDWNDEX/CMDIChildWndEx", "AFXMDICHILDWNDEX/CMDIChildWndEx::ActivateTopLevelFrame", "AFXMDICHILDWNDEX/CMDIChildWndEx::AddPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::AddTabbedPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::AdjustDockingLayout", "AFXMDICHILDWNDEX/CMDIChildWndEx::CanShowOnMDITabs", "AFXMDICHILDWNDEX/CMDIChildWndEx::CanShowOnTaskBarTabs", "AFXMDICHILDWNDEX/CMDIChildWndEx::CanShowOnWindowsList", "AFXMDICHILDWNDEX/CMDIChildWndEx::DockPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::DockPaneLeftOf", "AFXMDICHILDWNDEX/CMDIChildWndEx::EnableAutoHidePanes", "AFXMDICHILDWNDEX/CMDIChildWndEx::EnableDocking", "AFXMDICHILDWNDEX/CMDIChildWndEx::EnableTaskbarThumbnailClipRect", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetDockingManager", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetDocumentName", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetFrameIcon", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetFrameText", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetRelatedTabGroup", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetTabbedPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetTabProxyWnd", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetTaskbarPreviewWnd", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetTaskbarThumbnailClipRect", "AFXMDICHILDWNDEX/CMDIChildWndEx::GetToolbarButtonToolTipText", "AFXMDICHILDWNDEX/CMDIChildWndEx::InsertPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::InvalidateIconicBitmaps", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsPointNearDockSite", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsReadOnly", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsRegisteredWithTaskbarTabs", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsTabbedPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsTaskbarTabsSupportEnabled", "AFXMDICHILDWNDEX/CMDIChildWndEx::IsTaskbarThumbnailClipRectEnabled", "AFXMDICHILDWNDEX/CMDIChildWndEx::m_dwDefaultTaskbarTabPropertyFlags", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnGetIconicLivePreviewBitmap", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnGetIconicThumbnail", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnMoveMiniFrame", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnPressTaskbarThmbnailCloseButton", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnSetPreviewMode", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnTaskbarTabThumbnailActivate", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnTaskbarTabThumbnailMouseActivate", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnTaskbarTabThumbnailStretch", "AFXMDICHILDWNDEX/CMDIChildWndEx::OnUpdateFrameTitle", "AFXMDICHILDWNDEX/CMDIChildWndEx::PaneFromPoint", "AFXMDICHILDWNDEX/CMDIChildWndEx::RecalcLayout", "AFXMDICHILDWNDEX/CMDIChildWndEx::RegisterTaskbarTab", "AFXMDICHILDWNDEX/CMDIChildWndEx::RemovePaneFromDockManager", "AFXMDICHILDWNDEX/CMDIChildWndEx::SetRelatedTabGroup", "AFXMDICHILDWNDEX/CMDIChildWndEx::SetTaskbarTabActive", "AFXMDICHILDWNDEX/CMDIChildWndEx::SetTaskbarTabOrder", "AFXMDICHILDWNDEX/CMDIChildWndEx::SetTaskbarTabProperties", "AFXMDICHILDWNDEX/CMDIChildWndEx::SetTaskbarThumbnailClipRect", "AFXMDICHILDWNDEX/CMDIChildWndEx::ShowPane", "AFXMDICHILDWNDEX/CMDIChildWndEx::UnregisterTaskbarTab", "AFXMDICHILDWNDEX/CMDIChildWndEx::UpdateTaskbarTabIcon"] helpviewer_keywords: ["CMDIChildWndEx [MFC], ActivateTopLevelFrame", "CMDIChildWndEx [MFC], AddPane", "CMDIChildWndEx [MFC], AddTabbedPane", "CMDIChildWndEx [MFC], AdjustDockingLayout", "CMDIChildWndEx [MFC], CanShowOnMDITabs", "CMDIChildWndEx [MFC], CanShowOnTaskBarTabs", "CMDIChildWndEx [MFC], CanShowOnWindowsList", "CMDIChildWndEx [MFC], DockPane", "CMDIChildWndEx [MFC], DockPaneLeftOf", "CMDIChildWndEx [MFC], EnableAutoHidePanes", "CMDIChildWndEx [MFC], EnableDocking", "CMDIChildWndEx [MFC], EnableTaskbarThumbnailClipRect", "CMDIChildWndEx [MFC], GetDockingManager", "CMDIChildWndEx [MFC], GetDocumentName", "CMDIChildWndEx [MFC], GetFrameIcon", "CMDIChildWndEx [MFC], GetFrameText", "CMDIChildWndEx [MFC], GetPane", "CMDIChildWndEx [MFC], GetRelatedTabGroup", "CMDIChildWndEx [MFC], GetTabbedPane", "CMDIChildWndEx [MFC], GetTabProxyWnd", "CMDIChildWndEx [MFC], GetTaskbarPreviewWnd", "CMDIChildWndEx [MFC], GetTaskbarThumbnailClipRect", "CMDIChildWndEx [MFC], GetToolbarButtonToolTipText", "CMDIChildWndEx [MFC], InsertPane", "CMDIChildWndEx [MFC], InvalidateIconicBitmaps", "CMDIChildWndEx [MFC], IsPointNearDockSite", "CMDIChildWndEx [MFC], IsReadOnly", "CMDIChildWndEx [MFC], IsRegisteredWithTaskbarTabs", "CMDIChildWndEx [MFC], IsTabbedPane", "CMDIChildWndEx [MFC], IsTaskbarTabsSupportEnabled", "CMDIChildWndEx [MFC], IsTaskbarThumbnailClipRectEnabled", "CMDIChildWndEx [MFC], m_dwDefaultTaskbarTabPropertyFlags", "CMDIChildWndEx [MFC], OnGetIconicLivePreviewBitmap", "CMDIChildWndEx [MFC], OnGetIconicThumbnail", "CMDIChildWndEx [MFC], OnMoveMiniFrame", "CMDIChildWndEx [MFC], OnPressTaskbarThmbnailCloseButton", "CMDIChildWndEx [MFC], OnSetPreviewMode", "CMDIChildWndEx [MFC], OnTaskbarTabThumbnailActivate", "CMDIChildWndEx [MFC], OnTaskbarTabThumbnailMouseActivate", "CMDIChildWndEx [MFC], OnTaskbarTabThumbnailStretch", "CMDIChildWndEx [MFC], OnUpdateFrameTitle", "CMDIChildWndEx [MFC], PaneFromPoint", "CMDIChildWndEx [MFC], RecalcLayout", "CMDIChildWndEx [MFC], RegisterTaskbarTab", "CMDIChildWndEx [MFC], RemovePaneFromDockManager", "CMDIChildWndEx [MFC], SetRelatedTabGroup", "CMDIChildWndEx [MFC], SetTaskbarTabActive", "CMDIChildWndEx [MFC], SetTaskbarTabOrder", "CMDIChildWndEx [MFC], SetTaskbarTabProperties", "CMDIChildWndEx [MFC], SetTaskbarThumbnailClipRect", "CMDIChildWndEx [MFC], ShowPane", "CMDIChildWndEx [MFC], UnregisterTaskbarTab", "CMDIChildWndEx [MFC], UpdateTaskbarTabIcon"] -ms.assetid: d39fec06-0bd6-4271-917d-35aae3b24d8e --- # CMDIChildWndEx Class @@ -62,7 +61,7 @@ class CMDIChildWndEx : public CMDIChildWnd |[CMDIChildWndEx::OnGetIconicLivePreviewBitmap](#ongeticoniclivepreviewbitmap)|Called by the framework when it needs to obtain a bitmap for live preview of MDI child.| |[CMDIChildWndEx::OnGetIconicThumbnail](#ongeticonicthumbnail)|Called by the framework when it needs to obtain a bitmap for iconic thumbnail of MDI child.| |[CMDIChildWndEx::OnMoveMiniFrame](#onmoveminiframe)|Called by the framework to move a mini-frame window.| -|[CMDIChildWndEx::OnPressTaskbarThmbnailCloseButton](#onpresstaskbarthmbnailclosebutton)|Called by the framework when the user presses close button on Taskbar tab thumbnail..| +|[CMDIChildWndEx::OnPressTaskbarThmbnailCloseButton](#onpresstaskbarthmbnailclosebutton)|Called by the framework when the user presses close button on Taskbar tab thumbnail.| |[CMDIChildWndEx::OnSetPreviewMode](#onsetpreviewmode)|Called by the framework to enter or exit print preview mode.| |[CMDIChildWndEx::OnTaskbarTabThumbnailActivate](#ontaskbartabthumbnailactivate)|Called by the framework when the Taskbar tab thumbnail should process WM_ACTIVATE message.| |[CMDIChildWndEx::OnTaskbarTabThumbnailMouseActivate](#ontaskbartabthumbnailmouseactivate)|Called by the framework when the Taskbar tab thumbnail should process WM_MOUSEACTIVATE message.| diff --git a/docs/mfc/reference/cmdiframewndex-class.md b/docs/mfc/reference/cmdiframewndex-class.md index cdf8a46ed9..bae8259df3 100644 --- a/docs/mfc/reference/cmdiframewndex-class.md +++ b/docs/mfc/reference/cmdiframewndex-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CMDIFrameWndEx class" title: "CMDIFrameWndEx Class" +description: "Learn more about: CMDIFrameWndEx class" ms.date: 08/16/2022 f1_keywords: ["CMDIFrameWndEx", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::ActiveItemRecalcLayout", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::AddPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::AdjustClientArea", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::AdjustDockingLayout", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::AreMDITabs", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::CanConvertControlBarToMDIChild", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::ControlBarToTabbedDocument", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::CreateDocumentWindow", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::CreateNewWindow", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::DockPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::DockPaneLeftOf", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableAutoHidePanes", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableDocking", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableFullScreenMainMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableFullScreenMode", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableLoadDockState", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableMDITabbedGroups", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableMDITabs", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableMDITabsLastActiveActivation", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnablePaneMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::EnableWindowsDialog", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetActivePopup", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetDefaultResId", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetMDITabGroups", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetMDITabs", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetMDITabsContextMenuAllowedItems", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetMenuBar", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetRibbonBar", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetTearOffBars", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::GetToolbarButtonToolTipText", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::InsertPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsFullScreen", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsMDITabbedGroup", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsMemberOfMDITabGroup", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsMenuBarAvailable", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsPointNearDockSite", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::IsPrintPreview", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::LoadFrame", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::LoadMDIState", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::MDITabMoveToNextGroup", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::MDITabNewGroup", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::NegotiateBorderSpace", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnCloseDockingPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnCloseMiniFrame", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnClosePopupMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnCmdMsg", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnDrawMenuImage", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnDrawMenuLogo", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnEraseMDIClientBackground", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnMenuButtonToolHitTest", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnMoveMiniFrame", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnSetPreviewMode", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnShowCustomizePane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnShowMDITabContextMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnShowPanes", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnShowPopupMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnSizeMDIClient", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnTearOffMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::OnUpdateFrameMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::PaneFromPoint", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::RecalcLayout", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::RemovePaneFromDockManager", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::SaveMDIState", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::SetPrintPreviewFrame", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::SetupToolbarMenu", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::ShowFullScreen", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::ShowPane", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::ShowWindowsDialog", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::TabbedDocumentToControlBar", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::UpdateCaption", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::UpdateMDITabbedBarsIcons", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::WinHelp", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::m_bCanConvertControlBarToMDIChild", "AFXMDIFRAMEWNDEX/CMDIFrameWndEx::m_bDisableSetRedraw"] helpviewer_keywords: ["CMDIFrameWndEx [MFC], ActiveItemRecalcLayout", "CMDIFrameWndEx [MFC], AddPane", "CMDIFrameWndEx [MFC], AdjustClientArea", "CMDIFrameWndEx [MFC], AdjustDockingLayout", "CMDIFrameWndEx [MFC], AreMDITabs", "CMDIFrameWndEx [MFC], CanConvertControlBarToMDIChild", "CMDIFrameWndEx [MFC], ControlBarToTabbedDocument", "CMDIFrameWndEx [MFC], CreateDocumentWindow", "CMDIFrameWndEx [MFC], CreateNewWindow", "CMDIFrameWndEx [MFC], DockPane", "CMDIFrameWndEx [MFC], DockPaneLeftOf", "CMDIFrameWndEx [MFC], EnableAutoHidePanes", "CMDIFrameWndEx [MFC], EnableDocking", "CMDIFrameWndEx [MFC], EnableFullScreenMainMenu", "CMDIFrameWndEx [MFC], EnableFullScreenMode", "CMDIFrameWndEx [MFC], EnableLoadDockState", "CMDIFrameWndEx [MFC], EnableMDITabbedGroups", "CMDIFrameWndEx [MFC], EnableMDITabs", "CMDIFrameWndEx [MFC], EnableMDITabsLastActiveActivation", "CMDIFrameWndEx [MFC], EnablePaneMenu", "CMDIFrameWndEx [MFC], EnableWindowsDialog", "CMDIFrameWndEx [MFC], GetActivePopup", "CMDIFrameWndEx [MFC], GetPane", "CMDIFrameWndEx [MFC], GetDefaultResId", "CMDIFrameWndEx [MFC], GetMDITabGroups", "CMDIFrameWndEx [MFC], GetMDITabs", "CMDIFrameWndEx [MFC], GetMDITabsContextMenuAllowedItems", "CMDIFrameWndEx [MFC], GetMenuBar", "CMDIFrameWndEx [MFC], GetRibbonBar", "CMDIFrameWndEx [MFC], GetTearOffBars", "CMDIFrameWndEx [MFC], GetToolbarButtonToolTipText", "CMDIFrameWndEx [MFC], InsertPane", "CMDIFrameWndEx [MFC], IsFullScreen", "CMDIFrameWndEx [MFC], IsMDITabbedGroup", "CMDIFrameWndEx [MFC], IsMemberOfMDITabGroup", "CMDIFrameWndEx [MFC], IsMenuBarAvailable", "CMDIFrameWndEx [MFC], IsPointNearDockSite", "CMDIFrameWndEx [MFC], IsPrintPreview", "CMDIFrameWndEx [MFC], LoadFrame", "CMDIFrameWndEx [MFC], LoadMDIState", "CMDIFrameWndEx [MFC], MDITabMoveToNextGroup", "CMDIFrameWndEx [MFC], MDITabNewGroup", "CMDIFrameWndEx [MFC], NegotiateBorderSpace", "CMDIFrameWndEx [MFC], OnCloseDockingPane", "CMDIFrameWndEx [MFC], OnCloseMiniFrame", "CMDIFrameWndEx [MFC], OnClosePopupMenu", "CMDIFrameWndEx [MFC], OnCmdMsg", "CMDIFrameWndEx [MFC], OnDrawMenuImage", "CMDIFrameWndEx [MFC], OnDrawMenuLogo", "CMDIFrameWndEx [MFC], OnEraseMDIClientBackground", "CMDIFrameWndEx [MFC], OnMenuButtonToolHitTest", "CMDIFrameWndEx [MFC], OnMoveMiniFrame", "CMDIFrameWndEx [MFC], OnSetPreviewMode", "CMDIFrameWndEx [MFC], OnShowCustomizePane", "CMDIFrameWndEx [MFC], OnShowMDITabContextMenu", "CMDIFrameWndEx [MFC], OnShowPanes", "CMDIFrameWndEx [MFC], OnShowPopupMenu", "CMDIFrameWndEx [MFC], OnSizeMDIClient", "CMDIFrameWndEx [MFC], OnTearOffMenu", "CMDIFrameWndEx [MFC], OnUpdateFrameMenu", "CMDIFrameWndEx [MFC], PaneFromPoint", "CMDIFrameWndEx [MFC], RecalcLayout", "CMDIFrameWndEx [MFC], RemovePaneFromDockManager", "CMDIFrameWndEx [MFC], SaveMDIState", "CMDIFrameWndEx [MFC], SetPrintPreviewFrame", "CMDIFrameWndEx [MFC], SetupToolbarMenu", "CMDIFrameWndEx [MFC], ShowFullScreen", "CMDIFrameWndEx [MFC], ShowPane", "CMDIFrameWndEx [MFC], ShowWindowsDialog", "CMDIFrameWndEx [MFC], TabbedDocumentToControlBar", "CMDIFrameWndEx [MFC], UpdateCaption", "CMDIFrameWndEx [MFC], UpdateMDITabbedBarsIcons", "CMDIFrameWndEx [MFC], WinHelp", "CMDIFrameWndEx [MFC], m_bCanConvertControlBarToMDIChild", "CMDIFrameWndEx [MFC], m_bDisableSetRedraw"] @@ -72,9 +72,9 @@ class CMDIFrameWndEx : public CMDIFrameWnd |[`CMDIFrameWndEx::OnClosePopupMenu`](#onclosepopupmenu)|Called by the framework when an active pop-up menu processes a `WM_DESTROY` message.| |[`CMDIFrameWndEx::OnCmdMsg`](#oncmdmsg)|Called by the framework to route and dispatch command messages and to update command user-interface objects.| |[`CMDIFrameWndEx::OnDrawMenuImage`](#ondrawmenuimage)|Called by the framework when the image associated with a menu item is drawn.| -|[`CMDIFrameWndEx::OnDrawMenuLogo`](#ondrawmenulogo)|Called by the framework when a [`CMFCPopupMenu`](../../mfc/reference/cmfcpopupmenu-class.md)processes a `WM_PAINT` message.| +|[`CMDIFrameWndEx::OnDrawMenuLogo`](#ondrawmenulogo)|Called by the framework when a [`CMFCPopupMenu`](../../mfc/reference/cmfcpopupmenu-class.md) processes a `WM_PAINT` message.| |[`CMDIFrameWndEx::OnEraseMDIClientBackground`](#onerasemdiclientbackground)|Called by the framework when the MDI frame window processes a `WM_ERASEBKGND` message.| -|[`CMDIFrameWndEx::OnMenuButtonToolHitTest`](#onmenubuttontoolhittest)|Called by the framework when a [`CMFCToolBarButton`](../../mfc/reference/cmfctoolbarbutton-class.md)object processes a `WM_NCHITTEST` message.| +|[`CMDIFrameWndEx::OnMenuButtonToolHitTest`](#onmenubuttontoolhittest)|Called by the framework when a [`CMFCToolBarButton`](../../mfc/reference/cmfctoolbarbutton-class.md) object processes a `WM_NCHITTEST` message.| |[`CMDIFrameWndEx::OnMoveMiniFrame`](#onmoveminiframe)|Called by the framework to move a mini-frame window.| |[`CMDIFrameWndEx::OnSetPreviewMode`](#onsetpreviewmode)|Sets the application's main frame window print-preview mode. (Overrides [`CFrameWnd::OnSetPreviewMode`](../../mfc/reference/cframewnd-class.md#onsetpreviewmode).)| |[`CMDIFrameWndEx::OnShowCustomizePane`](#onshowcustomizepane)|Called by the framework when a Quick Customize pane is activated.| @@ -1282,7 +1282,7 @@ Override this method if you want to customize image rendering for the menu item ## `CMDIFrameWndEx::OnDrawMenuLogo` -Called by the framework when a [`CMFCPopupMenu`](../../mfc/reference/cmfcpopupmenu-class.md)processes a `WM_PAINT` message. +Called by the framework when a [`CMFCPopupMenu`](../../mfc/reference/cmfcpopupmenu-class.md) processes a `WM_PAINT` message. ```cpp virtual void OnDrawMenuLogo( @@ -1313,7 +1313,7 @@ Override this member function if you want to process the `WM_ERASEBKGND` message ## `CMDIFrameWndEx::OnMenuButtonToolHitTest` -Called by the framework when a [`CMFCToolBarButton`](../../mfc/reference/cmfctoolbarbutton-class.md)object processes a `WM_NCHITTEST` message. +Called by the framework when a [`CMFCToolBarButton`](../../mfc/reference/cmfctoolbarbutton-class.md) object processes a `WM_NCHITTEST` message. ```cpp virtual BOOL OnMenuButtonToolHitTest( diff --git a/docs/mfc/reference/cmemfile-class.md b/docs/mfc/reference/cmemfile-class.md index cef271bf9c..27a0b75dbf 100644 --- a/docs/mfc/reference/cmemfile-class.md +++ b/docs/mfc/reference/cmemfile-class.md @@ -1,10 +1,9 @@ --- title: "CMemFile Class" description: "Describes the functions available in the CMemFile class which allows you to work with memory files." -ms.date: "07/23/2020" +ms.date: 07/23/2020 f1_keywords: ["CMemFile", "AFX/CMemFile", "AFX/CMemFile::CMemFile", "AFX/CMemFile::Attach", "AFX/CMemFile::Detach", "AFX/CMemFile::Alloc", "AFX/CMemFile::Free", "AFX/CmemFile::GetBufferPtr", AFX/CMemFile::GrowFile", "AFX/CMemFile::Memcpy", "AFX/CMemFile::Realloc"] helpviewer_keywords: ["CMemFile [MFC], CMemFile", "CMemFile [MFC], Attach", "CMemFile [MFC], Detach", "CMemFile [MFC], Alloc", "CMemFile [MFC], Free", "CMemFile [MFC], GetBufferPtr", "CMemFile [MFC], GrowFile", "CMemFile [MFC], Memcpy", "CMemFile [MFC], Realloc"] -ms.assetid: 20e86515-e465-4f73-b2ea-e49789d63165 --- # CMemFile Class @@ -86,7 +85,7 @@ virtual BYTE* Alloc(SIZE_T nBytes); ### Parameters -*nBytes*
+*nBytes*\ Number of bytes of memory to be allocated. ### Return Value @@ -112,13 +111,13 @@ void Attach( ### Parameters -*lpBuffer*
+*lpBuffer*\ Pointer to the buffer to be attached to `CMemFile`. -*nBufferSize*
+*nBufferSize*\ An integer that specifies the size of the buffer in bytes. -*nGrowBytes*
+*nGrowBytes*\ The memory allocation increment in bytes. ### Remarks @@ -127,7 +126,7 @@ This causes `CMemFile` to use the block of memory as the memory file. If *nGrowBytes* is 0, `CMemFile` will set the file length to *nBufferSize*. This means that the data in the memory block before it was attached to `CMemFile` will be used as the file. Memory files created in this manner can't be grown. -Since the file can't be grown, be careful not to cause `CMemFile` to attempt to grow the file. For example, don't call the `CMemFile` overrides of [CFile:Write](../../mfc/reference/cfile-class.md#write) to write past the end or don't call [CFile:SetLength](../../mfc/reference/cfile-class.md#setlength) with a length longer than *nBufferSize*. +Since the file can't be grown, be careful not to cause `CMemFile` to attempt to grow the file. For example, don't call the `CMemFile` overrides of [CFile::Write](../../mfc/reference/cfile-class.md#write) to write past the end or don't call [CFile::SetLength](../../mfc/reference/cfile-class.md#setlength) with a length longer than *nBufferSize*. If *nGrowBytes* is greater than 0, `CMemFile` will ignore the contents of the memory block you've attached. You'll have to write the contents of the memory file from scratch using the `CMemFile` override of `CFile::Write`. If you attempt to write past the end of the file or grow the file by calling the `CMemFile` override of `CFile::SetLength`, `CMemFile` will grow the memory allocation in increments of *nGrowBytes*. Growing the memory allocation will fail if the memory block you pass to `Attach` wasn't allocated with a method compatible with [Alloc](#alloc). To be compatible with the default implementation of `Alloc`, you must allocate the memory with the run-time library function [malloc](../../c-runtime-library/reference/malloc.md) or [calloc](../../c-runtime-library/reference/calloc.md). @@ -146,13 +145,13 @@ CMemFile( ### Parameters -*nGrowBytes*
+*nGrowBytes*\ The memory allocation increment in bytes. -*lpBuffer* +*lpBuffer*\ Pointer to a buffer that receives information of the size *nBufferSize*. -*nBufferSize*
+*nBufferSize*\ An integer that specifies the size of the file buffer, in bytes. ### Remarks @@ -179,7 +178,7 @@ A pointer to the memory block that contains the contents of the memory file. ### Remarks -Calling this function also closes the `CMemFile`. You can reattach the memory block to `CMemFile` by calling [Attach](#attach). If you want to reattach the file and use the data in it, you should call [CFile::GetLength](../../mfc/reference/cfile-class.md#getlength) to get the length of the file before calling `Detach`. If you attach a memory block to `CMemFile` so that you can use its data ( `nGrowBytes` == 0), then you can't grow the memory file. +Calling this function also closes the `CMemFile`. You can reattach the memory block to `CMemFile` by calling [Attach](#attach). If you want to reattach the file and use the data in it, you should call [CFile::GetLength](../../mfc/reference/cfile-class.md#getlength) to get the length of the file before calling `Detach`. If you attach a memory block to `CMemFile` so that you can use its data (`nGrowBytes` == 0), then you can't grow the memory file. ## CMemFile::Free @@ -191,7 +190,7 @@ virtual void Free(BYTE* lpMem); ### Parameters -*lpMem*
+*lpMem*\ Pointer to the memory to be deallocated. ### Remarks @@ -213,16 +212,16 @@ virtual UINT GetBufferPtr( ### Parameters -*nCommand*
-The [bufferCommand](buffercommand-enumeration.md) to carry out (`bufferCheck`, `bufferCommit`, `bufferRead`, or `bufferWrite` ). +*nCommand*\ +The [bufferCommand](buffercommand-enumeration.md) to carry out (`bufferCheck`, `bufferCommit`, `bufferRead`, or `bufferWrite`). -*nCount*
+*nCount*\ Depending on *nCommand*, the number of bytes in the buffer to read, write, or commit. When reading from the buffer, specify -1 to return a buffer from the current position to the end of the file. -*ppBufStart*
+*ppBufStart*\ [out] The start of the buffer. Must be `NULL` when *nCommand* is `bufferCommit`. -*ppBufMax*
+*ppBufMax*\ [out] The end of the buffer. Must be `NULL` when nCommand is `bufferCommit`. ### Return Value @@ -252,7 +251,7 @@ virtual void GrowFile(SIZE_T dwNewLen); ### Parameters -*dwNewLen*
+*dwNewLen*\ New size of the memory file. ### Remarks @@ -272,13 +271,13 @@ virtual BYTE* Memcpy( ### Parameters -*lpMemTarget*
+*lpMemTarget*\ Pointer to the memory block into which the source memory will be copied. -*lpMemSource*
+*lpMemSource*\ Pointer to the source memory block. -*nBytes*
+*nBytes*\ Number of bytes to be copied. ### Return Value @@ -301,10 +300,10 @@ virtual BYTE* Realloc( ### Parameters -*lpMem*
+*lpMem*\ A pointer to the memory block to be reallocated. -*nBytes*
+*nBytes*\ New size for the memory block. ### Return Value @@ -317,5 +316,5 @@ Override this function to implement custom memory reallocation. If you override ## See also -[CFile Class](../../mfc/reference/cfile-class.md)
+[CFile Class](../../mfc/reference/cfile-class.md)\ [Hierarchy Chart](../../mfc/hierarchy-chart.md) diff --git a/docs/mfc/reference/cmfcbasetabctrl-class.md b/docs/mfc/reference/cmfcbasetabctrl-class.md index cf6a14ee2c..d34822e52a 100644 --- a/docs/mfc/reference/cmfcbasetabctrl-class.md +++ b/docs/mfc/reference/cmfcbasetabctrl-class.md @@ -1,7 +1,7 @@ --- title: "CMFCBaseTabCtrl Class" description: "Learn more about: CMFCBaseTabCtrl Class" -ms.date: "11/04/2016" +ms.date: 11/04/2016 f1_keywords: ["CMFCBaseTabCtrl", "AFXBASETABCTRL/CMFCBaseTabCtrl", "AFXBASETABCTRL/CMFCBaseTabCtrl::AddIcon", "AFXBASETABCTRL/CMFCBaseTabCtrl::AddTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::ApplyRestoredTabInfo", "AFXBASETABCTRL/CMFCBaseTabCtrl::AutoDestroyWindow", "AFXBASETABCTRL/CMFCBaseTabCtrl::CalcRectEdit", "AFXBASETABCTRL/CMFCBaseTabCtrl::CleanUp", "AFXBASETABCTRL/CMFCBaseTabCtrl::ClearImageList", "AFXBASETABCTRL/CMFCBaseTabCtrl::DetachTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableActivateLastActive", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableAutoColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableCustomToolTips", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableInPlaceEdit", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableTabDetach", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnableTabSwap", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnsureVisible", "AFXBASETABCTRL/CMFCBaseTabCtrl::EnterDragMode", "AFXBASETABCTRL/CMFCBaseTabCtrl::FindTargetWnd", "AFXBASETABCTRL/CMFCBaseTabCtrl::FireChangeActiveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::FireChangingActiveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetActiveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetActiveTabColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetActiveTabTextColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetActiveWnd", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetAutoColors", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetFirstVisibleTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetFirstVisibleTabNum", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetHighlightedTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetImageList", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetImageSize", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetLastVisibleTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetLocation", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetMaxWindowSize", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabArea", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabBkColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabBorderSize", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabByID", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabCloseButton", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabFromHwnd", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabFromPoint", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabFullWidth", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabHicon", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabID", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabIcon", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabLabel", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabRect", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabsHeight", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabsRect", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabTextColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabWnd", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabWndNoWrapper", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetTabsNum", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetToolTipCtrl", "AFXBASETABCTRL/CMFCBaseTabCtrl::GetVisibleTabsNum", "AFXBASETABCTRL/CMFCBaseTabCtrl::HasImage", "AFXBASETABCTRL/CMFCBaseTabCtrl::HideSingleTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::InsertTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::InvalidateTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsActiveTabCloseButton", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsAutoColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsAutoDestroyWindow", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsColored", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsDialogControl", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsDrawNoPrefix", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsFlatFrame", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsFlatTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsHideSingleTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsIconAdded", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsInPlaceEdit", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsLeftRightRounded", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsMDITab", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsOneNoteStyle", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsPtInTabArea", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabCloseButtonHighlighted", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabCloseButtonPressed", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabDetachable", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabIconOnly", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabSwapEnabled", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsTabVisible", "AFXBASETABCTRL/CMFCBaseTabCtrl::IsVS2005Style", "AFXBASETABCTRL/CMFCBaseTabCtrl::MoveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnChangeTabs", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnDragEnter", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnDragLeave", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnDragOver", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnDrop", "AFXBASETABCTRL/CMFCBaseTabCtrl::OnRenameTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::PreTranslateMessage", "AFXBASETABCTRL/CMFCBaseTabCtrl::RecalcLayout", "AFXBASETABCTRL/CMFCBaseTabCtrl::RemoveAllTabs", "AFXBASETABCTRL/CMFCBaseTabCtrl::RemoveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::RenameTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::ResetImageList", "AFXBASETABCTRL/CMFCBaseTabCtrl::Serialize", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetActiveTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetActiveTabColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetActiveTabTextColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetAutoColors", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetDockingBarWrapperRTC", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetDrawNoPrefix", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetImageList", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetLocation", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabBkColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabBorderSize", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabHicon", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabIcon", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabIconOnly", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabLabel", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabsHeight", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabTextColor", "AFXBASETABCTRL/CMFCBaseTabCtrl::SetTabsOrder", "AFXBASETABCTRL/CMFCBaseTabCtrl::ShowTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::StartRenameTab", "AFXBASETABCTRL/CMFCBaseTabCtrl::SwapTabs", "AFXBASETABCTRL/CMFCBaseTabCtrl::CreateWrapper", "AFXBASETABCTRL/CMFCBaseTabCtrl::m_bActivateTabOnRightClick", "AFXBASETABCTRL/CMFCBaseTabCtrl::m_bAutoDestroyWindow"] helpviewer_keywords: ["CMFCBaseTabCtrl [MFC], AddIcon", "CMFCBaseTabCtrl [MFC], AddTab", "CMFCBaseTabCtrl [MFC], ApplyRestoredTabInfo", "CMFCBaseTabCtrl [MFC], AutoDestroyWindow", "CMFCBaseTabCtrl [MFC], CalcRectEdit", "CMFCBaseTabCtrl [MFC], CleanUp", "CMFCBaseTabCtrl [MFC], ClearImageList", "CMFCBaseTabCtrl [MFC], DetachTab", "CMFCBaseTabCtrl [MFC], EnableActivateLastActive", "CMFCBaseTabCtrl [MFC], EnableAutoColor", "CMFCBaseTabCtrl [MFC], EnableCustomToolTips", "CMFCBaseTabCtrl [MFC], EnableInPlaceEdit", "CMFCBaseTabCtrl [MFC], EnableTabDetach", "CMFCBaseTabCtrl [MFC], EnableTabSwap", "CMFCBaseTabCtrl [MFC], EnsureVisible", "CMFCBaseTabCtrl [MFC], EnterDragMode", "CMFCBaseTabCtrl [MFC], FindTargetWnd", "CMFCBaseTabCtrl [MFC], FireChangeActiveTab", "CMFCBaseTabCtrl [MFC], FireChangingActiveTab", "CMFCBaseTabCtrl [MFC], GetActiveTab", "CMFCBaseTabCtrl [MFC], GetActiveTabColor", "CMFCBaseTabCtrl [MFC], GetActiveTabTextColor", "CMFCBaseTabCtrl [MFC], GetActiveWnd", "CMFCBaseTabCtrl [MFC], GetAutoColors", "CMFCBaseTabCtrl [MFC], GetFirstVisibleTab", "CMFCBaseTabCtrl [MFC], GetFirstVisibleTabNum", "CMFCBaseTabCtrl [MFC], GetHighlightedTab", "CMFCBaseTabCtrl [MFC], GetImageList", "CMFCBaseTabCtrl [MFC], GetImageSize", "CMFCBaseTabCtrl [MFC], GetLastVisibleTab", "CMFCBaseTabCtrl [MFC], GetLocation", "CMFCBaseTabCtrl [MFC], GetMaxWindowSize", "CMFCBaseTabCtrl [MFC], GetTabArea", "CMFCBaseTabCtrl [MFC], GetTabBkColor", "CMFCBaseTabCtrl [MFC], GetTabBorderSize", "CMFCBaseTabCtrl [MFC], GetTabByID", "CMFCBaseTabCtrl [MFC], GetTabCloseButton", "CMFCBaseTabCtrl [MFC], GetTabFromHwnd", "CMFCBaseTabCtrl [MFC], GetTabFromPoint", "CMFCBaseTabCtrl [MFC], GetTabFullWidth", "CMFCBaseTabCtrl [MFC], GetTabHicon", "CMFCBaseTabCtrl [MFC], GetTabID", "CMFCBaseTabCtrl [MFC], GetTabIcon", "CMFCBaseTabCtrl [MFC], GetTabLabel", "CMFCBaseTabCtrl [MFC], GetTabRect", "CMFCBaseTabCtrl [MFC], GetTabsHeight", "CMFCBaseTabCtrl [MFC], GetTabsRect", "CMFCBaseTabCtrl [MFC], GetTabTextColor", "CMFCBaseTabCtrl [MFC], GetTabWnd", "CMFCBaseTabCtrl [MFC], GetTabWndNoWrapper", "CMFCBaseTabCtrl [MFC], GetTabsNum", "CMFCBaseTabCtrl [MFC], GetToolTipCtrl", "CMFCBaseTabCtrl [MFC], GetVisibleTabsNum", "CMFCBaseTabCtrl [MFC], HasImage", "CMFCBaseTabCtrl [MFC], HideSingleTab", "CMFCBaseTabCtrl [MFC], InsertTab", "CMFCBaseTabCtrl [MFC], InvalidateTab", "CMFCBaseTabCtrl [MFC], IsActiveTabCloseButton", "CMFCBaseTabCtrl [MFC], IsAutoColor", "CMFCBaseTabCtrl [MFC], IsAutoDestroyWindow", "CMFCBaseTabCtrl [MFC], IsColored", "CMFCBaseTabCtrl [MFC], IsDialogControl", "CMFCBaseTabCtrl [MFC], IsDrawNoPrefix", "CMFCBaseTabCtrl [MFC], IsFlatFrame", "CMFCBaseTabCtrl [MFC], IsFlatTab", "CMFCBaseTabCtrl [MFC], IsHideSingleTab", "CMFCBaseTabCtrl [MFC], IsIconAdded", "CMFCBaseTabCtrl [MFC], IsInPlaceEdit", "CMFCBaseTabCtrl [MFC], IsLeftRightRounded", "CMFCBaseTabCtrl [MFC], IsMDITab", "CMFCBaseTabCtrl [MFC], IsOneNoteStyle", "CMFCBaseTabCtrl [MFC], IsPtInTabArea", "CMFCBaseTabCtrl [MFC], IsTabCloseButtonHighlighted", "CMFCBaseTabCtrl [MFC], IsTabCloseButtonPressed", "CMFCBaseTabCtrl [MFC], IsTabDetachable", "CMFCBaseTabCtrl [MFC], IsTabIconOnly", "CMFCBaseTabCtrl [MFC], IsTabSwapEnabled", "CMFCBaseTabCtrl [MFC], IsTabVisible", "CMFCBaseTabCtrl [MFC], IsVS2005Style", "CMFCBaseTabCtrl [MFC], MoveTab", "CMFCBaseTabCtrl [MFC], OnChangeTabs", "CMFCBaseTabCtrl [MFC], OnDragEnter", "CMFCBaseTabCtrl [MFC], OnDragLeave", "CMFCBaseTabCtrl [MFC], OnDragOver", "CMFCBaseTabCtrl [MFC], OnDrop", "CMFCBaseTabCtrl [MFC], OnRenameTab", "CMFCBaseTabCtrl [MFC], PreTranslateMessage", "CMFCBaseTabCtrl [MFC], RecalcLayout", "CMFCBaseTabCtrl [MFC], RemoveAllTabs", "CMFCBaseTabCtrl [MFC], RemoveTab", "CMFCBaseTabCtrl [MFC], RenameTab", "CMFCBaseTabCtrl [MFC], ResetImageList", "CMFCBaseTabCtrl [MFC], Serialize", "CMFCBaseTabCtrl [MFC], SetActiveTab", "CMFCBaseTabCtrl [MFC], SetActiveTabColor", "CMFCBaseTabCtrl [MFC], SetActiveTabTextColor", "CMFCBaseTabCtrl [MFC], SetAutoColors", "CMFCBaseTabCtrl [MFC], SetDockingBarWrapperRTC", "CMFCBaseTabCtrl [MFC], SetDrawNoPrefix", "CMFCBaseTabCtrl [MFC], SetImageList", "CMFCBaseTabCtrl [MFC], SetLocation", "CMFCBaseTabCtrl [MFC], SetTabBkColor", "CMFCBaseTabCtrl [MFC], SetTabBorderSize", "CMFCBaseTabCtrl [MFC], SetTabHicon", "CMFCBaseTabCtrl [MFC], SetTabIcon", "CMFCBaseTabCtrl [MFC], SetTabIconOnly", "CMFCBaseTabCtrl [MFC], SetTabLabel", "CMFCBaseTabCtrl [MFC], SetTabsHeight", "CMFCBaseTabCtrl [MFC], SetTabTextColor", "CMFCBaseTabCtrl [MFC], SetTabsOrder", "CMFCBaseTabCtrl [MFC], ShowTab", "CMFCBaseTabCtrl [MFC], StartRenameTab", "CMFCBaseTabCtrl [MFC], SwapTabs", "CMFCBaseTabCtrl [MFC], CreateWrapper", "CMFCBaseTabCtrl [MFC], m_bActivateTabOnRightClick", "CMFCBaseTabCtrl [MFC], m_bAutoDestroyWindow"] --- @@ -1756,7 +1756,7 @@ virtual void SetActiveTabColor(COLORREF clr); ### Remarks -The framework obtains the default background color for active tabs from the [GetSysColor](/windows/win32/api/winuser/nf-winuser-getsyscolor)method. +The framework obtains the default background color for active tabs from the [GetSysColor](/windows/win32/api/winuser/nf-winuser-getsyscolor) method. ## CMFCBaseTabCtrl::SetActiveTabTextColor diff --git a/docs/mfc/reference/cmfcbutton-class.md b/docs/mfc/reference/cmfcbutton-class.md index 5cf031c6e9..a244e55d07 100644 --- a/docs/mfc/reference/cmfcbutton-class.md +++ b/docs/mfc/reference/cmfcbutton-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCButton Class" title: "CMFCButton Class" +description: "Learn more about: CMFCButton Class" ms.date: "08/28/2018" f1_keywords: ["CMFCButton", "AFXBUTTON/CMFCButton", "AFXBUTTON/CMFCButton::CleanUp", "AFXBUTTON/CMFCButton::EnableFullTextTooltip", "AFXBUTTON/CMFCButton::EnableMenuFont", "AFXBUTTON/CMFCButton::EnableWindowsTheming", "AFXBUTTON/CMFCButton::GetToolTipCtrl", "AFXBUTTON/CMFCButton::IsAutoCheck", "AFXBUTTON/CMFCButton::IsAutorepeatCommandMode", "AFXBUTTON/CMFCButton::IsCheckBox", "AFXBUTTON/CMFCButton::IsChecked", "AFXBUTTON/CMFCButton::IsHighlighted", "AFXBUTTON/CMFCButton::IsPressed", "AFXBUTTON/CMFCButton::IsPushed", "AFXBUTTON/CMFCButton::IsRadioButton", "AFXBUTTON/CMFCButton::IsWindowsThemingEnabled", "AFXBUTTON/CMFCButton::SetAutorepeatMode", "AFXBUTTON/CMFCButton::SetCheckedImage", "AFXBUTTON/CMFCButton::SetFaceColor", "AFXBUTTON/CMFCButton::SetImage", "AFXBUTTON/CMFCButton::SetMouseCursor", "AFXBUTTON/CMFCButton::SetMouseCursorHand", "AFXBUTTON/CMFCButton::SetStdImage", "AFXBUTTON/CMFCButton::SetTextColor", "AFXBUTTON/CMFCButton::SetTextHotColor", "AFXBUTTON/CMFCButton::SetTooltip", "AFXBUTTON/CMFCButton::SizeToContent", "AFXBUTTON/CMFCButton::OnDraw", "AFXBUTTON/CMFCButton::OnDrawBorder", "AFXBUTTON/CMFCButton::OnDrawFocusRect", "AFXBUTTON/CMFCButton::OnDrawText", "AFXBUTTON/CMFCButton::OnFillBackground", "AFXBUTTON/CMFCButton::SelectFont", "AFXBUTTON/CMFCButton::m_bDrawFocus", "AFXBUTTON/CMFCButton::m_bHighlightChecked", "AFXBUTTON/CMFCButton::m_bRightImage", "AFXBUTTON/CMFCButton::m_bTransparent", "AFXBUTTON/CMFCButton::m_nAlignStyle", "AFXBUTTON/CMFCButton::m_nFlatStyle"] helpviewer_keywords: ["CMFCButton [MFC], CleanUp", "CMFCButton [MFC], EnableFullTextTooltip", "CMFCButton [MFC], EnableMenuFont", "CMFCButton [MFC], EnableWindowsTheming", "CMFCButton [MFC], GetToolTipCtrl", "CMFCButton [MFC], IsAutoCheck", "CMFCButton [MFC], IsAutorepeatCommandMode", "CMFCButton [MFC], IsCheckBox", "CMFCButton [MFC], IsChecked", "CMFCButton [MFC], IsHighlighted", "CMFCButton [MFC], IsPressed", "CMFCButton [MFC], IsPushed", "CMFCButton [MFC], IsRadioButton", "CMFCButton [MFC], IsWindowsThemingEnabled", "CMFCButton [MFC], SetAutorepeatMode", "CMFCButton [MFC], SetCheckedImage", "CMFCButton [MFC], SetFaceColor", "CMFCButton [MFC], SetImage", "CMFCButton [MFC], SetMouseCursor", "CMFCButton [MFC], SetMouseCursorHand", "CMFCButton [MFC], SetStdImage", "CMFCButton [MFC], SetTextColor", "CMFCButton [MFC], SetTextHotColor", "CMFCButton [MFC], SetTooltip", "CMFCButton [MFC], SizeToContent", "CMFCButton [MFC], OnDraw", "CMFCButton [MFC], OnDrawBorder", "CMFCButton [MFC], OnDrawFocusRect", "CMFCButton [MFC], OnDrawText", "CMFCButton [MFC], OnFillBackground", "CMFCButton [MFC], SelectFont", "CMFCButton [MFC], m_bDrawFocus", "CMFCButton [MFC], m_bHighlightChecked", "CMFCButton [MFC], m_bRightImage", "CMFCButton [MFC], m_bTransparent", "CMFCButton [MFC], m_nAlignStyle", "CMFCButton [MFC], m_nFlatStyle"] -ms.assetid: 4b32f57c-7a53-4734-afb9-d47e3359f62e --- # `CMFCButton` Class @@ -12,7 +11,7 @@ The `CMFCButton` class adds functionality to the [`CButton`](../../mfc/reference ## Syntax -``` +```cpp class CMFCButton : public CButton ``` @@ -46,7 +45,7 @@ class CMFCButton : public CButton |[`CMFCButton::IsPushed`](#ispushed)|Indicates whether a button is pushed.| |[`CMFCButton::IsRadioButton`](#isradiobutton)|Indicates whether a button is a radio button.| |[`CMFCButton::IsWindowsThemingEnabled`](#iswindowsthemingenabled)|Indicates whether the style of the button border corresponds to the current Windows theme.| -|`CMFCButton::OnDrawParentBackground`|Draws the background of a button's parent in the specified area. (Overrides [`AFX_GLOBAL_DATA::DrawParentBackground`](../../mfc/reference/afx-global-data-structure.md)| +|`CMFCButton::OnDrawParentBackground`|Draws the background of a button's parent in the specified area. (Overrides [`AFX_GLOBAL_DATA::DrawParentBackground`](../../mfc/reference/afx-global-data-structure.md).)| |`CMFCButton::PreTranslateMessage`|Translates window messages before they are dispatched to the [`TranslateMessage`](/windows/win32/api/winuser/nf-winuser-translatemessage) and [`DispatchMessage`](/windows/win32/api/winuser/nf-winuser-dispatchmessage) Windows functions. (Overrides [`CWnd::PreTranslateMessage`](../../mfc/reference/cwnd-class.md#pretranslatemessage).)| |[`CMFCButton::SetAutorepeatMode`](#setautorepeatmode)|Sets a button to auto-repeat mode.| |[`CMFCButton::SetCheckedImage`](#setcheckedimage)|Sets the image for a checked button.| @@ -79,8 +78,8 @@ class CMFCButton : public CButton |[`CMFCButton::m_bDontUseWinXPTheme`](#m_bDontUseWinXPTheme)|Specifies whether to use Windows XP themes.| |[`CMFCButton::m_bDrawFocus`](#m_bdrawfocus)|Indicates whether to draw a focus rectangle around a button.| |[`CMFCButton::m_nFlatStyle`](#m_nflatstyle)|Specifies the style of the button, such as borderless, flat, semi-flat, or 3D.| -|[`CMFCButton::m_bGrayDisabled`](#m_bGrayDisabled)|When TRUE, enables a disabled button to be drawn as grayed-out.| -|[`CMFCButton::m_bHighlightChecked`](#m_bhighlightchecked)|Indicates whether to highlight a BS_CHECKBOX-style button when the cursor hovers over it.| +|[`CMFCButton::m_bGrayDisabled`](#m_bGrayDisabled)|When `TRUE`, enables a disabled button to be drawn as grayed-out.| +|[`CMFCButton::m_bHighlightChecked`](#m_bhighlightchecked)|Indicates whether to highlight a `BS_CHECKBOX`-style button when the cursor hovers over it.| |[`CMFCButton::m_bResponseOnButtonDown`](#m_bResponseOnButtonDown)|Indicates whether to respond to button down events.| |[`CMFCButton::m_bRightImage`](#m_brightimage)|Indicates whether to display an image on the right side of the button.| |[`CMFCButton::m_bTopImage`](#m_bTopImage)| Indicates whether the image is on top of the button.| @@ -126,7 +125,7 @@ The following example demonstrates how to configure the properties of the button Resets internal variables and frees allocated resources such as images, bitmaps, and icons. -``` +```cpp virtual void CleanUp(); ``` @@ -140,11 +139,9 @@ void EnableFullTextTooltip(BOOL bOn=TRUE); ### Parameters -*`bOn`*
+*`bOn`*\ [in] `TRUE` to display all of the text; `FALSE` to display truncated text. -### Remarks - ## `CMFCButton::EnableMenuFont` Specifies whether the button text font is the same as the application menu font. @@ -157,10 +154,10 @@ void EnableMenuFont( ### Parameters -*`bOn`*
+*`bOn`*\ [in] `TRUE` to use the application menu font as the button text font; `FALSE` to use the system font. The default is `TRUE`. -*`bRedraw`*
+*`bRedraw`*\ [in] `TRUE` to immediately redraw the screen; otherwise, `FALSE`. The default is `TRUE`. ### Remarks @@ -171,13 +168,13 @@ If you do not use this method to specify the button text font, you can specify t Specifies whether the style of the button border corresponds to the current Windows theme. -``` +```cpp static void EnableWindowsTheming(BOOL bEnable = TRUE); ``` ### Parameters -*`bEnable`*
+*`bEnable`*\ [in] `TRUE` to use the current Windows theme to draw button borders; `FALSE` to not use the Windows theme. The default is `TRUE`. ### Remarks @@ -188,7 +185,7 @@ This method affects all buttons in your application that are derived from the `C Returns a reference to the underlying tooltip control. -``` +```cpp CToolTipCtrl& GetToolTipCtrl(); ``` @@ -196,13 +193,11 @@ CToolTipCtrl& GetToolTipCtrl(); A reference to the underlying tooltip control. -### Remarks - ## `CMFCButton::IsAutoCheck` Indicates whether a check box or radio button is an automatic button. -``` +```cpp BOOL IsAutoCheck() const; ``` @@ -210,13 +205,11 @@ BOOL IsAutoCheck() const; `TRUE` if the button has style `BS_AUTOCHECKBOX` or `BS_AUTORADIOBUTTON`; otherwise, `FALSE`. -### Remarks - ## `CMFCButton::IsAutorepeatCommandMode` Indicates whether a button is set to auto-repeat mode. -``` +```cpp BOOL IsAutorepeatCommandMode() const; ``` @@ -232,7 +225,7 @@ Use the [`CMFCButton::SetAutorepeatMode`](#setautorepeatmode) method to set a bu Indicates whether a button is a check box button. -``` +```cpp BOOL IsCheckBox() const; ``` @@ -240,13 +233,11 @@ BOOL IsCheckBox() const; `TRUE` if the button has either `BS_CHECKBOX` or `BS_AUTOCHECKBOX` style; otherwise, `FALSE`. -### Remarks - ## `CMFCButton::IsChecked` Indicates whether the current button is checked. -``` +```cpp BOOL IsChecked() const; ``` @@ -262,7 +253,7 @@ The framework uses different ways to indicate that different kinds of buttons ar Indicates whether a button is highlighted. -``` +```cpp BOOL IsHighlighted() const; ``` @@ -278,7 +269,7 @@ A button becomes highlighted when the mouse hovers over the button. Indicates whether a button is pushed and highlighted. -``` +```cpp BOOL IsPressed() const; ``` @@ -286,13 +277,11 @@ BOOL IsPressed() const; `TRUE` if the button is pressed; otherwise, `FALSE`. -### Remarks - ## `CMFCButton::IsPushed` Indicates whether a button is pushed. -``` +```cpp BOOL IsPushed() const; ``` @@ -300,13 +289,11 @@ BOOL IsPushed() const; `TRUE` if the button is pushed; otherwise, `FALSE`. -### Remarks - ## `CMFCButton::IsRadioButton` Indicates whether a button is a radio button. -``` +```cpp BOOL IsRadioButton() const; ``` @@ -314,13 +301,11 @@ BOOL IsRadioButton() const; `TRUE` if the button style is `BS_RADIOBUTTON` or `BS_AUTORADIOBUTTON`; otherwise, `FALSE`. -### Remarks - ## `CMFCButton::IsWindowsThemingEnabled` Indicates whether the style of the button border corresponds to the current Windows theme. -``` +```cpp static BOOL IsWindowsThemingEnabled(); ``` @@ -328,11 +313,11 @@ static BOOL IsWindowsThemingEnabled(); `TRUE` if the style of the button border corresponds to the current Windows theme; otherwise, `FALSE`. -## `CMFCButton::m_bDontUseWinXPTheme` +## `CMFCButton::m_bDontUseWinXPTheme` Specifies whether to use Windows XP themes when drawing the button. -``` +```cpp BOOL m_bDontUseWinXPTheme; ``` @@ -340,7 +325,7 @@ BOOL m_bDontUseWinXPTheme; Indicates whether to draw a focus rectangle around a button. -``` +```cpp BOOL m_bDrawFocus; ``` @@ -354,7 +339,7 @@ The `CMFCButton` constructor initializes this member to `TRUE`. When `TRUE`, enables a disabled button to be drawn as grayed-out. -``` +```cpp BOOL m_bGrayDisabled; ``` @@ -362,7 +347,7 @@ BOOL m_bGrayDisabled; Indicates whether to highlight a `BS_CHECKBOX`-style button when the cursor hovers over it. -``` +```cpp BOOL m_bHighlightChecked; ``` @@ -374,7 +359,7 @@ Set the `m_bHighlightChecked` member to `TRUE` to specify that the framework wil Indicates whether to respond to button down events. -``` +```cpp BOOL m_bResponseOnButtonDown; ``` @@ -382,15 +367,15 @@ BOOL m_bResponseOnButtonDown; Indicates whether to display an image on the right side of the button. -``` +```cpp BOOL m_bRightImage; ``` -## `CMFCButton::m_bTopImage](#m_bTopImage)` +## `CMFCButton::m_bTopImage` Indicates whether the image is on top of the button. -``` +```cpp BOOL m_bTopImage; ``` @@ -402,7 +387,7 @@ Set the `m_bRightImage` member to `TRUE` to specify that the framework will disp Indicates whether the button is transparent. -``` +```cpp BOOL m_bTransparent; ``` @@ -414,7 +399,7 @@ Set the `m_bTransparent` member to `TRUE` to specify that the framework will mak Specifies the alignment of the button text. -``` +```cpp AlignStyle m_nAlignStyle; ``` @@ -430,11 +415,11 @@ Use one of the following `CMFCButton::AlignStyle` enumeration values to specify The `CMFCButton` constructor initializes this member to `ALIGN_CENTER`. -## `CMFCButton::m_bWasDblClk`](#m_bWasDblClk)| +## `CMFCButton::m_bWasDblClk` -Indicates whether the last click event was a double-click.| +Indicates whether the last click event was a double-click. -``` +```cpp BOOL m_bWasDblClk; ``` @@ -442,8 +427,8 @@ BOOL m_bWasDblClk; Specifies the style of the button, such as borderless, flat, semi-flat, or 3D. -``` -FlatStyle m_nFlatStyle; +```cpp +FlatStyle m_nFlatStyle; ``` ### Remarks @@ -470,7 +455,7 @@ The following example demonstrates how to set the values of the `m_nFlatStyle` m Called by the framework to draw a button. -``` +```cpp virtual void OnDraw( CDC* pDC, const CRect& rect, @@ -479,13 +464,13 @@ virtual void OnDraw( ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. -*`rect`*
+*`rect`*\ [in] A reference to a rectangle that bounds the button. -*`uiState`*
+*`uiState`*\ [in] The current button state. For more information, see the `itemState` member of the [`DRAWITEMSTRUCT` Structure](/windows/win32/api/winuser/ns-winuser-drawitemstruct) topic. ### Remarks @@ -496,7 +481,7 @@ Override this method to use your own code to draw a button. Called by the framework to draw the border of a button. -``` +```cpp virtual void OnDrawBorder( CDC* pDC, CRect& rectClient, @@ -505,13 +490,13 @@ virtual void OnDrawBorder( ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. -*`rectClient`*
+*`rectClient`*\ [in] A reference to a rectangle that bounds the button. -*`uiState`*
+*`uiState`*\ [in] The current button state. For more information, see the `itemState` member of the [`DRAWITEMSTRUCT` Structure](/windows/win32/api/winuser/ns-winuser-drawitemstruct) topic. ### Remarks @@ -522,7 +507,7 @@ Override this method to use your own code to draw the border. Called by the framework to draw the focus rectangle for a button. -``` +```cpp virtual void OnDrawFocusRect( CDC* pDC, const CRect& rectClient); @@ -530,10 +515,10 @@ virtual void OnDrawFocusRect( ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. -*`rectClient`*
+*`rectClient`*\ [in] A reference to a rectangle that bounds the button. ### Remarks @@ -544,7 +529,7 @@ Override this method to use your own code to draw the focus rectangle. Called by the framework to draw the button text. -``` +```cpp virtual void OnDrawText( CDC* pDC, const CRect& rect, @@ -555,19 +540,19 @@ virtual void OnDrawText( ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. -*`rect`*
+*`rect`*\ [in] A reference to a rectangle that bounds the button. -*`strText`*
+*`strText`*\ [in] The text to draw. -*`uiDTFlags`*
+*`uiDTFlags`*\ [in] Flags that specify how to format the text. For more information, see the *`nFormat`* parameter of the [`CDC::DrawText`](../../mfc/reference/cdc-class.md#drawtext) method. -*`uiState`*
+*`uiState`*\ [in] Reserved. ### Remarks @@ -578,7 +563,7 @@ Override this method to use your own code to draw the button text. Called by the framework to draw the background of the button text. -``` +```cpp virtual void OnFillBackground( CDC* pDC, const CRect& rectClient); @@ -586,10 +571,10 @@ virtual void OnFillBackground( ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. -*`rectClient`*
+*`rectClient`*\ [in] A reference to a rectangle that bounds the button. ### Remarks @@ -600,21 +585,19 @@ Override this method to use your own code to draw the background of a button. Retrieves the font that is associated with the specified device context. -``` +```cpp virtual CFont* SelectFont(CDC* pDC); ``` ### Parameters -*`pDC`*
+*`pDC`*\ [in] A pointer to a device context. ### Return Value Override this method to use your own code to retrieve the font. -### Remarks - ## `CMFCButton::SetAutorepeatMode` Sets a button to auto-repeat mode. @@ -625,7 +608,7 @@ void SetAutorepeatMode(int nTimeDelay=500); ### Parameters -*`nTimeDelay`*
+*`nTimeDelay`*\ [in] A nonnegative number that specifies the interval between messages that are sent to the parent window. The interval is measured in milliseconds and its default value is 500 milliseconds. Specify zero to disable auto-repeat message mode. ### Remarks @@ -659,44 +642,42 @@ void SetCheckedImage( ### Parameters -*`hIcon`*
+*`hIcon`*\ [in] Handle to the icon that contains the bitmap and mask for the new image. -*`bAutoDestroy`*
+*`bAutoDestroy`*\ [in] `TRUE` to specify that bitmap resources be destroyed automatically; otherwise, `FALSE`. The default is `TRUE`. -*`hIconHot`*
+*`hIconHot`*\ [in] Handle to the icon that contains the image for the selected state. -*`hBitmap`*
+*`hBitmap`*\ [in] Handle to the bitmap that contains the image for the non-selected state. -*`hBitmapHot`*
+*`hBitmapHot`*\ [in] Handle to the bitmap that contains the image for the selected state. -*`bMap3dColors`*
+*`bMap3dColors`*\ [in] Specifies a transparent color for the button background; that is, the face of the button. `TRUE` to use the color value RGB(192, 192, 192); `FALSE` to use the color value defined by `AFX_GLOBAL_DATA::clrBtnFace`. -*`uiBmpResId`*
+*`uiBmpResId`*\ [in] Resource ID for the non-selected image. -*`uiBmpHotResId`*
+*`uiBmpHotResId`*\ [in] Resource ID for the selected image. -*`hIconDisabled`*
+*`hIconDisabled`*\ [in] Handle to the icon for the disabled image. -*`hBitmapDisabled`*
+*`hBitmapDisabled`*\ [in] Handle to the bitmap that contains the disabled image. -*`uiBmpDsblResID`*
+*`uiBmpDsblResID`*\ [in] Resource ID of the disabled bitmap. -*`bAlphaBlend`*
+*`bAlphaBlend`*\ [in] `TRUE` to use only 32-bit images that use the alpha channel; `FALSE`, to not use only alpha channel images. The default is `FALSE`. -### Remarks - ## `CMFCButton::SetFaceColor` Sets the background color for the button text. @@ -709,17 +690,17 @@ void SetFaceColor( ### Parameters -*`crFace`*
+*`crFace`*\ [in] An RGB color value. -*`bRedraw`*
+*`bRedraw`*\ [in] `TRUE` to redraw the screen immediately; otherwise, `FALSE`. ### Remarks Use this method to define a new fill color for the button background (face). Note that the background is not filled when the [`CMFCButton::m_bTransparent`](#m_btransparent) member variable is `TRUE`. -## CMFCButton::SetImage +## `CMFCButton::SetImage` Sets the image for a button. @@ -746,44 +727,42 @@ void SetImage( ### Parameters -*`hIcon`*
+*`hIcon`*\ [in] Handle to the icon that contains the bitmap and mask for the new image. -*`bAutoDestroy`*
+*`bAutoDestroy`*\ [in] `TRUE` to specify that bitmap resources be destroyed automatically; otherwise, `FALSE`. The default is `TRUE`. -*`hIconHot`*
+*`hIconHot`*\ [in] Handle to the icon that contains the image for the selected state. -*`hBitmap`*
+*`hBitmap`*\ [in] Handle to the bitmap that contains the image for the non-selected state. -*`hBitmapHot`*
+*`hBitmapHot`*\ [in] Handle to the bitmap that contains the image for the selected state. -*`uiBmpResId`*
+*`uiBmpResId`*\ [in] Resource ID for the non-selected image. -*`uiBmpHotResId`*
+*`uiBmpHotResId`*\ [in] Resource ID for the selected image. -*`bMap3dColors`*
+*`bMap3dColors`*\ [in] Specifies a transparent color for the button background; that is, the face of the button. `TRUE` to use the color value RGB(192, 192, 192); `FALSE` to use the color value defined by `AFX_GLOBAL_DATA::clrBtnFace`. -*`hIconDisabled`*
+*`hIconDisabled`*\ [in] Handle to the icon for the disabled image. -*`hBitmapDisabled`*
+*`hBitmapDisabled`*\ [in] Handle to the bitmap that contains the disabled image. -*`uiBmpDsblResID`*
+*`uiBmpDsblResID`*\ [in] Resource ID of the disabled bitmap. -*`bAlphaBlend`*
+*`bAlphaBlend`*\ [in] `TRUE` to use only 32-bit images that use the alpha channel; `FALSE`, to not use only alpha channel images. The default is `FALSE`. -### Remarks - ### Example The following example demonstrates how to use various versions of the `SetImage` method in the `CMFCButton` class. The example is part of the [New Controls sample](../../overview/visual-cpp-samples.md). @@ -801,7 +780,7 @@ void SetMouseCursor(HCURSOR hcursor); ### Parameters -*`hcursor`*
+*`hcursor`*\ [in] The handle of a cursor. ### Remarks @@ -840,16 +819,14 @@ void SetStdImage( ### Parameters -*`id`*
+*`id`*\ [in] One of the button image identifiers that is defined in the `CMenuImage::IMAGES_IDS` enumeration. The image values specify images such as arrows, pins, and radio buttons. -*`state`*
+*`state`*\ [in] One of the button image state identifiers that is defined in the `CMenuImages::IMAGE_STATE` enumeration. The image states specify button colors such as black, gray, light gray, white, and dark gray. The default value is `CMenuImages::ImageBlack`. -*`idDisabled`*
-[in] One of the button image identifiers that is defined in the `CMenuImage::IMAGES_IDS` enumeration. The image indicates that the button is disabled. The default value is the first button image ( `CMenuImages::IdArrowDown`). - -### Remarks +*`idDisabled`*\ +[in] One of the button image identifiers that is defined in the `CMenuImage::IMAGES_IDS` enumeration. The image indicates that the button is disabled. The default value is the first button image (`CMenuImages::IdArrowDown`). ## `CMFCButton::SetTextColor` @@ -861,11 +838,9 @@ void SetTextColor(COLORREF clrText); ### Parameters -*`clrText`*
+*`clrText`*\ [in] An RGB color value. -### Remarks - ## `CMFCButton::SetTextHotColor` Sets the color of the button text for a button that is selected. @@ -876,11 +851,9 @@ void SetTextHotColor(COLORREF clrTextHot); ### Parameters -*`clrTextHot`*
+*`clrTextHot`*\ [in] An RGB color value. -### Remarks - ## `CMFCButton::SetTooltip` Associates a tooltip with a button. @@ -891,22 +864,20 @@ void SetTooltip(LPCTSTR lpszToolTipText); ### Parameters -*`lpszToolTipText`*
+*`lpszToolTipText`*\ [in] Pointer to the text for the tooltip. Specify `NULL` to disable the tooltip. -### Remarks - ## `CMFCButton::SizeToContent` Resizes a button to contain its button text and image. -``` +```cpp virtual CSize SizeToContent(BOOL bCalcOnly=FALSE); ``` ### Parameters -*`bCalcOnly`*
+*`bCalcOnly`*\ [in] `TRUE` to calculate, but not change, the new size of the button; `FALSE` to change the size of the button. The default is `FALSE`. ### Return Value @@ -919,8 +890,8 @@ By default, this method calculates a new size that includes a horizontal margin ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
-[`CMFCLinkCtrl` Class](../../mfc/reference/cmfclinkctrl-class.md)
-[`CMFCColorButton` Class](../../mfc/reference/cmfccolorbutton-class.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ +[`CMFCLinkCtrl` Class](../../mfc/reference/cmfclinkctrl-class.md)\ +[`CMFCColorButton` Class](../../mfc/reference/cmfccolorbutton-class.md)\ [`CMFCMenuButton` Class](../../mfc/reference/cmfcmenubutton-class.md) diff --git a/docs/mfc/reference/cmfccolorpickerctrl-class.md b/docs/mfc/reference/cmfccolorpickerctrl-class.md index a00150e5a1..dc47c78a25 100644 --- a/docs/mfc/reference/cmfccolorpickerctrl-class.md +++ b/docs/mfc/reference/cmfccolorpickerctrl-class.md @@ -4,7 +4,6 @@ title: "CMFCColorPickerCtrl Class" ms.date: "11/19/2018" f1_keywords: ["CMFCColorPickerCtrl", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::CMFCColorPickerCtrl", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::GetColor", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::GetHLS", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::GetHue", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::GetLuminance", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::GetSaturation", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SelectCellHexagon", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetColor", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetHLS", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetHue", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetLuminance", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetLuminanceBarWidth", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetOriginalColor", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetPalette", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetSaturation", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::SetType", "AFXCOLORPICKERCTRL/CMFCColorPickerCtrl::DrawCursor"] helpviewer_keywords: ["CMFCColorPickerCtrl [MFC], CMFCColorPickerCtrl", "CMFCColorPickerCtrl [MFC], GetColor", "CMFCColorPickerCtrl [MFC], GetHLS", "CMFCColorPickerCtrl [MFC], GetHue", "CMFCColorPickerCtrl [MFC], GetLuminance", "CMFCColorPickerCtrl [MFC], GetSaturation", "CMFCColorPickerCtrl [MFC], SelectCellHexagon", "CMFCColorPickerCtrl [MFC], SetColor", "CMFCColorPickerCtrl [MFC], SetHLS", "CMFCColorPickerCtrl [MFC], SetHue", "CMFCColorPickerCtrl [MFC], SetLuminance", "CMFCColorPickerCtrl [MFC], SetLuminanceBarWidth", "CMFCColorPickerCtrl [MFC], SetOriginalColor", "CMFCColorPickerCtrl [MFC], SetPalette", "CMFCColorPickerCtrl [MFC], SetSaturation", "CMFCColorPickerCtrl [MFC], SetType", "CMFCColorPickerCtrl [MFC], DrawCursor"] -ms.assetid: b9bbd03c-beb0-4b55-9765-9985fd05e5dc --- # CMFCColorPickerCtrl Class @@ -12,7 +11,7 @@ The `CMFCColorPickerCtrl` class provides functionality for a control that is use ## Syntax -``` +```cpp class CMFCColorPickerCtrl : public CButton ``` @@ -22,43 +21,43 @@ class CMFCColorPickerCtrl : public CButton |Name|Description| |----------|-----------------| -|[CMFCColorPickerCtrl::CMFCColorPickerCtrl](#cmfccolorpickerctrl)|Constructs a `CMFCColorPickerCtrl` object.| +|[`CMFCColorPickerCtrl::CMFCColorPickerCtrl`](#cmfccolorpickerctrl)|Constructs a `CMFCColorPickerCtrl` object.| ### Public Methods |Name|Description| |----------|-----------------| -|[CMFCColorPickerCtrl::GetColor](#getcolor)|Retrieves the color that the user selects.| -|[CMFCColorPickerCtrl::GetHLS](#gethls)|Retrieves the hue, luminance and saturation values of the color that the user selects.| -|[CMFCColorPickerCtrl::GetHue](#gethue)|Retrieves the hue component of the color that the user selects.| -|[CMFCColorPickerCtrl::GetLuminance](#getluminance)|Retrieves the luminance component of the color that the user selects.| -|[CMFCColorPickerCtrl::GetSaturation](#getsaturation)|Retrieves the saturation component of the color that the user selects.| -|[CMFCColorPickerCtrl::SelectCellHexagon](#selectcellhexagon)|Sets the current color to the color defined by the specified RGB color components or the specified cell hexagon.| -|[CMFCColorPickerCtrl::SetColor](#setcolor)|Sets the current color to the specified RGB color value.| -|[CMFCColorPickerCtrl::SetHLS](#sethls)|Sets the current color to the specified HLS color value.| -|[CMFCColorPickerCtrl::SetHue](#sethue)|Changes the hue component of the currently selected color.| -|[CMFCColorPickerCtrl::SetLuminance](#setluminance)|Changes the luminance component of the currently selected color.| -|[CMFCColorPickerCtrl::SetLuminanceBarWidth](#setluminancebarwidth)|Sets the width of the luminance bar in the color picker control.| -|[CMFCColorPickerCtrl::SetOriginalColor](#setoriginalcolor)|Sets the initial selected color.| -|[CMFCColorPickerCtrl::SetPalette](#setpalette)|Sets the current color palette.| -|[CMFCColorPickerCtrl::SetSaturation](#setsaturation)|Changes the saturation component of the currently selected color.| -|[CMFCColorPickerCtrl::SetType](#settype)|Sets the type of color picker control to display.| +|[`CMFCColorPickerCtrl::GetColor`](#getcolor)|Retrieves the color that the user selects.| +|[`CMFCColorPickerCtrl::GetHLS`](#gethls)|Retrieves the hue, luminance and saturation values of the color that the user selects.| +|[`CMFCColorPickerCtrl::GetHue`](#gethue)|Retrieves the hue component of the color that the user selects.| +|[`CMFCColorPickerCtrl::GetLuminance`](#getluminance)|Retrieves the luminance component of the color that the user selects.| +|[`CMFCColorPickerCtrl::GetSaturation`](#getsaturation)|Retrieves the saturation component of the color that the user selects.| +|[`CMFCColorPickerCtrl::SelectCellHexagon`](#selectcellhexagon)|Sets the current color to the color defined by the specified RGB color components or the specified cell hexagon.| +|[`CMFCColorPickerCtrl::SetColor`](#setcolor)|Sets the current color to the specified RGB color value.| +|[`CMFCColorPickerCtrl::SetHLS`](#sethls)|Sets the current color to the specified HLS color value.| +|[`CMFCColorPickerCtrl::SetHue`](#sethue)|Changes the hue component of the currently selected color.| +|[`CMFCColorPickerCtrl::SetLuminance`](#setluminance)|Changes the luminance component of the currently selected color.| +|[`CMFCColorPickerCtrl::SetLuminanceBarWidth`](#setluminancebarwidth)|Sets the width of the luminance bar in the color picker control.| +|[`CMFCColorPickerCtrl::SetOriginalColor`](#setoriginalcolor)|Sets the initial selected color.| +|[`CMFCColorPickerCtrl::SetPalette`](#setpalette)|Sets the current color palette.| +|[`CMFCColorPickerCtrl::SetSaturation`](#setsaturation)|Changes the saturation component of the currently selected color.| +|[`CMFCColorPickerCtrl::SetType`](#settype)|Sets the type of color picker control to display.| ### Protected Methods |Name|Description| |----------|-----------------| -|[CMFCColorPickerCtrl::DrawCursor](#drawcursor)|Called by the framework before a cursor that points to the selected color is displayed.| +|[`CMFCColorPickerCtrl::DrawCursor`](#drawcursor)|Called by the framework before a cursor that points to the selected color is displayed.| ## Remarks -Standard colors are selected from a hexagonal color palette, and custom colors are selected from a luminance bar where colors are specified using either red/green/blue notation or hue/satuaration/luminance notation. +Standard colors are selected from a hexagonal color palette, and custom colors are selected from a luminance bar where colors are specified using either red/green/blue notation or hue/saturation/luminance notation. The following illustration depicts several `CMFCColorPickerCtrl` objects. -![CMFCColorPickerCtrl dialog box.](../../mfc/reference/media/colorpicker.png "CMFCColorPickerCtrl dialog box") +![`CMFCColorPickerCtrl` dialog box.](../../mfc/reference/media/colorpicker.png "CMFCColorPickerCtrl dialog box") -The `CMFCColorPickerCtrl` supports two pairs of styles. The HEX and HEX_GREYSCALE styles are appropriate for standard color selection. The PICKER and LUMINANCE styles are appropriate for custom color selection. +The `CMFCColorPickerCtrl` supports two pairs of styles. The `HEX` and `HEX_GREYSCALE` styles are appropriate for standard color selection. The `PICKER` and `LUMINANCE` styles are appropriate for custom color selection. Perform the following steps to incorporate the `CMFCColorPickerCtrl` control into your dialog box: @@ -68,34 +67,23 @@ Perform the following steps to incorporate the `CMFCColorPickerCtrl` control int 1. Insert the `WM_INITDIALOG` message handler for the dialog box class. In the handler, set the type, palette, and initial selected color of the `CMFCColorPickerCtrl` control. -## Example - -The following example demonstrates how to configure a `CMFCColorPickerCtrl` object by using various methods in the `CMFCColorPickerCtrl` class. The example demonstrates how to set the type of the picker control, and how to set its color, hue, luminance, and saturation. The example is part of the [New Controls sample](../../overview/visual-cpp-samples.md). - -[!code-cpp[NVC_MFC_NewControls#4](../../mfc/reference/codesnippet/cpp/cmfccolorpickerctrl-class_1.h)] -[!code-cpp[NVC_MFC_NewControls#5](../../mfc/reference/codesnippet/cpp/cmfccolorpickerctrl-class_2.cpp)] - ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) - -[CCmdTarget](../../mfc/reference/ccmdtarget-class.md) - -[CWnd](../../mfc/reference/cwnd-class.md) - -[CButton](../../mfc/reference/cbutton-class.md) - -[CMFCColorPickerCtrl](../../mfc/reference/cmfccolorpickerctrl-class.md) +[`CObject`](../../mfc/reference/cobject-class.md)\ +[`CCmdTarget`](../../mfc/reference/ccmdtarget-class.md)\ +[`CWnd`](../../mfc/reference/cwnd-class.md)\ +[`CButton`](../../mfc/reference/cbutton-class.md)\ +[`CMFCColorPickerCtrl`](../../mfc/reference/cmfccolorpickerctrl-class.md) ## Requirements -**Header:** afxcolorpickerctrl.h +**Header:** `afxcolorpickerctrl.h` ## CMFCColorPickerCtrl::CMFCColorPickerCtrl Constructs a `CMFCColorPickerCtrl` object. -``` +```cpp CMFCColorPickerCtrl(); ``` @@ -103,11 +91,11 @@ CMFCColorPickerCtrl(); ### Remarks -## CMFCColorPickerCtrl::DrawCursor +## `CMFCColorPickerCtrl::DrawCursor` Called by the framework before a cursor that points to the selected color is displayed. -``` +```cpp virtual void DrawCursor( CDC* pDC, const CRect& rect); @@ -115,21 +103,21 @@ virtual void DrawCursor( ### Parameters -*pDC*
+`pDC`\ [in] Pointer to a device context. -*rect*
+`rect`\ [in] Specifies a rectangular area around the selected color. ### Remarks Override this method when you need to change the shape of the cursor that points to the selected color. -## CMFCColorPickerCtrl::GetColor +## `CMFCColorPickerCtrl::GetColor` Retrieves the color that the user selects. -``` +```cpp COLORREF GetColor() const; ``` @@ -139,7 +127,7 @@ The RGB value of the selected color. ### Remarks -## CMFCColorPickerCtrl::GetHLS +## `CMFCColorPickerCtrl::GetHLS` Retrieves the hue, luminance and saturation values of the color that the user selects. @@ -152,22 +140,22 @@ void GetHLS( ### Parameters -*hue*
+`hue`\ [out] Pointer to a variable of type double that receives hue information. -*luminance*
+`luminance`\ [out] Pointer to a variable of type double that receives luminance information. -*saturation*
+`saturation`\ [out] Pointer to a variable of type double that receives saturation information. ### Remarks -## CMFCColorPickerCtrl::GetHue +## `CMFCColorPickerCtrl::GetHue` Retrieves the hue component of the color that the user selects. -``` +```cpp double GetHue() const; ``` @@ -177,11 +165,11 @@ The hue component of the selected color. ### Remarks -## CMFCColorPickerCtrl::GetLuminance +## `CMFCColorPickerCtrl::GetLuminance` Retrieves the luminance component of the color that the user selects. -``` +```cpp double GetLuminance() const; ``` @@ -191,11 +179,11 @@ The luminance component of the selected color. ### Remarks -## CMFCColorPickerCtrl::GetSaturation +## `CMFCColorPickerCtrl::GetSaturation` Retrieves the saturation value of the color that the user selects. -``` +```cpp double GetSaturation() const; ``` @@ -205,7 +193,7 @@ The saturation component of the selected color. ### Remarks -## CMFCColorPickerCtrl::SelectCellHexagon +## `CMFCColorPickerCtrl::SelectCellHexagon` Sets the current color to the color defined by the specified RGB color components or the specified cell hexagon. @@ -222,19 +210,19 @@ BOOL SelectCellHexagon( ### Parameters -*R*
+`R`\ [in] The red color component. -*G*
+`G`\ [in] The green color component. -*B*
+`B`\ [in] The blue color component. -*x*
+`x`\ [in] The x-coordinate of the cursor, which points to a cell hexagon. -*y*
+`y`\ [in] The y-coordinate of the cursor, which points to a cell hexagon. ### Return Value @@ -247,7 +235,7 @@ The first overload of this method sets the current color to the color that corre The second overload of this method sets the current color to the color of the cell hexagon that is pointed to by the specified cursor location. -## CMFCColorPickerCtrl::SetColor +## `CMFCColorPickerCtrl::SetColor` Sets the current color to the specified RGB color value. @@ -257,12 +245,12 @@ void SetColor(COLORREF Color); ### Parameters -*Color*
+`Color`\ [in] An RGB color value. ### Remarks -## CMFCColorPickerCtrl::SetHLS +## `CMFCColorPickerCtrl::SetHLS` Sets the current color to the specified HLS color value. @@ -276,21 +264,21 @@ void SetHLS( ### Parameters -*hue*
+`hue`\ [in] A hue value. -*luminance*
+`luminance`\ [in] A luminance value. -*saturation*
+`saturation`\ [in] A saturation value. -*bInvalidate*
-[in] TRUE to force the window to immediately update to the new color; otherwise, FALSE. The default is TRUE. +`bInvalidate`\ +[in] `TRUE` to force the window to immediately update to the new color; otherwise, `FALSE`. The default is `TRUE`. ### Remarks -## CMFCColorPickerCtrl::SetHue +## `CMFCColorPickerCtrl::SetHue` Changes the hue of the currently selected color. @@ -300,12 +288,12 @@ void SetHue(double Hue); ### Parameters -*Hue*
+`Hue`\ [in] A hue value. ### Remarks -## CMFCColorPickerCtrl::SetLuminance +## `CMFCColorPickerCtrl::SetLuminance` Changes the luminance of the currently selected color. @@ -315,12 +303,12 @@ void SetLuminance(double Luminance); ### Parameters -*Luminance*
+`Luminance`\ [in] A luminance value. ### Remarks -## CMFCColorPickerCtrl::SetLuminanceBarWidth +## `CMFCColorPickerCtrl::SetLuminanceBarWidth` Sets the width of the luminance bar in the color picker control. @@ -330,14 +318,14 @@ void SetLuminanceBarWidth(int w); ### Parameters -*w*
+`w`\ [in] The width of the luminance bar measured in pixels. ### Remarks -Use this method to resize the luminance bar, which is on the **Custom** tab of the color picker control. The *w* parameter specifies the new width of the luminance bar. The width value is ignored if it exceeds three-fourths of the client area width. +Use this method to resize the luminance bar, which is on the **Custom** tab of the color picker control. The `w` parameter specifies the new width of the luminance bar. The width value is ignored if it exceeds three-fourths of the client area width. -## CMFCColorPickerCtrl::SetOriginalColor +## `CMFCColorPickerCtrl::SetOriginalColor` Sets the initial selected color. @@ -347,14 +335,14 @@ void SetOriginalColor(COLORREF ref); ### Parameters -*ref*
+`ref`\ [in] An RGB color value. ### Remarks Call this method when the color picker control is initialized. -## CMFCColorPickerCtrl::SetPalette +## `CMFCColorPickerCtrl::SetPalette` Sets the current color palette. @@ -364,14 +352,14 @@ void SetPalette(CPalette* pPalette); ### Parameters -*pPalette*
+`pPalette`\ [in] Pointer to a color palette. ### Remarks The color palette defines the array of colors that is presented in the color picker control. -## CMFCColorPickerCtrl::SetSaturation +## `CMFCColorPickerCtrl::SetSaturation` Changes the saturation of the currently selected color. @@ -381,12 +369,12 @@ void SetSaturation(double Saturation); ### Parameters -*Saturation*
-[in] A saturation value. +`Saturation`\ +[`in`] A saturation value. ### Remarks -## CMFCColorPickerCtrl::SetType +## `CMFCColorPickerCtrl::SetType` Sets the type of color picker control to display. @@ -396,10 +384,10 @@ void SetType(COLORTYPE colorType); ### Parameters -*colorType*
+`colorType`\ [in] A color picker control type. -The types are defined by the `CMFCColorPickerCtrl::COLORTYPE` enumeration. The possible types are LUMINANCE, PICKER, HEX and HEX_GREYSCALE. The default type is PICKER. +The types are defined by the `CMFCColorPickerCtrl::COLORTYPE` enumeration. The possible types are `LUMINANCE`, `PICKER`, `HEX` and `HEX_GREYSCALE`. The default type is `PICKER`. ### Remarks @@ -407,6 +395,6 @@ To specify a color picker control type, call this method before the Windows cont ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
-[CMFCColorDialog Class](../../mfc/reference/cmfccolordialog-class.md) +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ +[`CMFCColorDialog` Class](../../mfc/reference/cmfccolordialog-class.md) diff --git a/docs/mfc/reference/cmfcdynamiclayout-class.md b/docs/mfc/reference/cmfcdynamiclayout-class.md index 0c8f47f3f0..c41f1893c7 100644 --- a/docs/mfc/reference/cmfcdynamiclayout-class.md +++ b/docs/mfc/reference/cmfcdynamiclayout-class.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: CMFCDynamicLayout Class" title: "CMFCDynamicLayout Class" +description: "Learn more about: CMFCDynamicLayout Class" ms.date: "08/29/2019" f1_keywords: ["CMFCDynamicLayout", "AFXLAYOUT/CMFCDynamicLayout", "AFXLAYOUT/CMFCDynamicLayout::AddItem", "AFXLAYOUT/CMFCDynamicLayout::Adjust", "AFXLAYOUT/CMFCDynamicLayout::Create", "AFXLAYOUT/CMFCDynamicLayout::GetHostWnd", "AFXLAYOUT/CMFCDynamicLayout::GetMinSize", "AFXLAYOUT/CMFCDynamicLayout::GetWindowRect", "AFXLAYOUT/CMFCDynamicLayout::HasItem", "AFXLAYOUT/CMFCDynamicLayout::IsEmpty", "AFXLAYOUT/CMFCDynamicLayout::LoadResource", "AFXLAYOUT/CMFCDynamicLayout::SetMinSize"] -ms.assetid: c2df2976-f049-47fc-9cf0-abe3e01948bc --- # CMFCDynamicLayout Class @@ -170,7 +169,7 @@ The position and size of a child control is changed dynamically when a hosting w Retrieves the rectangle for the window's current client area. ```cpp -void GetHostWndRect(CRect& rect,); +void GetHostWndRect(CRect& rect); ``` ### Parameters @@ -503,5 +502,5 @@ A [SizeSettings](#sizesettings_structure) value that encapsulates the requested ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ [Classes](../../mfc/reference/mfc-classes.md) diff --git a/docs/mfc/reference/cmfceditbrowsectrl-class.md b/docs/mfc/reference/cmfceditbrowsectrl-class.md index 4674427de8..c24728b72e 100644 --- a/docs/mfc/reference/cmfceditbrowsectrl-class.md +++ b/docs/mfc/reference/cmfceditbrowsectrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCEditBrowseCtrl Class" title: "CMFCEditBrowseCtrl Class" -ms.date: "11/04/2016" +description: "Learn more about: CMFCEditBrowseCtrl Class" +ms.date: 11/04/2016 f1_keywords: ["CMFCEditBrowseCtrl", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::EnableBrowseButton", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::EnableFileBrowseButton", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::EnableFolderBrowseButton", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::GetMode", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::OnAfterUpdate", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::OnBrowse", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::OnChangeLayout", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::OnDrawBrowseButton", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::OnIllegalFileName", "AFXEDITBROWSECTRL/CMFCEditBrowseCtrl::SetBrowseButtonImage"] helpviewer_keywords: ["CMFCEditBrowseCtrl [MFC], EnableBrowseButton", "CMFCEditBrowseCtrl [MFC], EnableFileBrowseButton", "CMFCEditBrowseCtrl [MFC], EnableFolderBrowseButton", "CMFCEditBrowseCtrl [MFC], GetMode", "CMFCEditBrowseCtrl [MFC], OnAfterUpdate", "CMFCEditBrowseCtrl [MFC], OnBrowse", "CMFCEditBrowseCtrl [MFC], OnChangeLayout", "CMFCEditBrowseCtrl [MFC], OnDrawBrowseButton", "CMFCEditBrowseCtrl [MFC], OnIllegalFileName", "CMFCEditBrowseCtrl [MFC], SetBrowseButtonImage"] -ms.assetid: 69cfd886-3d35-4bee-8901-7c88fcf9520f --- # CMFCEditBrowseCtrl Class @@ -69,7 +68,7 @@ Perform the following steps to incorporate an edit browse control in your applic 1. Embed either the `CMFCEditBrowseCtrl` object or the derived edit browse control object into the parent window object. -1. If you use the **Class Wizard** to create a dialog box, add an edit control ( `CEdit`) to the dialog box form. Also, add a variable to access the control in your header file. In your header file, change the type of the variable from `CEdit` to `CMFCEditBrowseCtrl`. The edit browse control will be created automatically. If you do not use the **Class Wizard**, add a `CMFCEditBrowseCtrl` variable to your header file and then call its `Create` method. +1. If you use the **Class Wizard** to create a dialog box, add an edit control (`CEdit`) to the dialog box form. Also, add a variable to access the control in your header file. In your header file, change the type of the variable from `CEdit` to `CMFCEditBrowseCtrl`. The edit browse control will be created automatically. If you do not use the **Class Wizard**, add a `CMFCEditBrowseCtrl` variable to your header file and then call its `Create` method. 1. If you add an edit browse control to a dialog box, use the **ClassWizard** tool to set up data exchange. diff --git a/docs/mfc/reference/cmfcmenubar-class.md b/docs/mfc/reference/cmfcmenubar-class.md index b541ec3c64..8b8174252b 100644 --- a/docs/mfc/reference/cmfcmenubar-class.md +++ b/docs/mfc/reference/cmfcmenubar-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCMenuBar Class" title: "CMFCMenuBar Class" +description: "Learn more about: CMFCMenuBar Class" ms.date: "10/18/2018" f1_keywords: ["CMFCMenuBar", "AFXMENUBAR/CMFCMenuBar", "AFXMENUBAR/CMFCMenuBar::AdjustLocations", "AFXMENUBAR/CMFCMenuBar::AllowChangeTextLabels", "AFXMENUBAR/CMFCMenuBar::AllowShowOnPaneMenu", "AFXMENUBAR/CMFCMenuBar::CalcFixedLayout", "AFXMENUBAR/CMFCMenuBar::CalcLayout", "AFXMENUBAR/CMFCMenuBar::CalcMaxButtonHeight", "AFXMENUBAR/CMFCMenuBar::CanBeClosed", "AFXMENUBAR/CMFCMenuBar::CanBeRestored", "AFXMENUBAR/CMFCMenuBar::Create", "AFXMENUBAR/CMFCMenuBar::CreateEx", "AFXMENUBAR/CMFCMenuBar::CreateFromMenu", "AFXMENUBAR/CMFCMenuBar::EnableHelpCombobox", "AFXMENUBAR/CMFCMenuBar::EnableMenuShadows", "AFXMENUBAR/CMFCMenuBar::GetAvailableExpandSize", "AFXMENUBAR/CMFCMenuBar::GetColumnWidth", "AFXMENUBAR/CMFCMenuBar::GetDefaultMenu", "AFXMENUBAR/CMFCMenuBar::GetDefaultMenuResId", "AFXMENUBAR/CMFCMenuBar::GetFloatPopupDirection", "AFXMENUBAR/CMFCMenuBar::GetForceDownArrows", "AFXMENUBAR/CMFCMenuBar::GetHelpCombobox", "AFXMENUBAR/CMFCMenuBar::GetHMenu", "AFXMENUBAR/CMFCMenuBar::GetMenuFont", "AFXMENUBAR/CMFCMenuBar::GetMenuItem", "AFXMENUBAR/CMFCMenuBar::GetRowHeight", "AFXMENUBAR/CMFCMenuBar::GetSystemButton", "AFXMENUBAR/CMFCMenuBar::GetSystemButtonsCount", "AFXMENUBAR/CMFCMenuBar::GetSystemMenu", "AFXMENUBAR/CMFCMenuBar::HighlightDisabledItems", "AFXMENUBAR/CMFCMenuBar::IsButtonExtraSizeAvailable", "AFXMENUBAR/CMFCMenuBar::IsHighlightDisabledItems", "AFXMENUBAR/CMFCMenuBar::IsMenuShadows", "AFXMENUBAR/CMFCMenuBar::IsRecentlyUsedMenus", "AFXMENUBAR/CMFCMenuBar::IsShowAllCommands", "AFXMENUBAR/CMFCMenuBar::IsShowAllCommandsDelay", "AFXMENUBAR/CMFCMenuBar::LoadState", "AFXMENUBAR/CMFCMenuBar::OnChangeHot", "AFXMENUBAR/CMFCMenuBar::OnDefaultMenuLoaded", "AFXMENUBAR/CMFCMenuBar::OnSendCommand", "AFXMENUBAR/CMFCMenuBar::OnSetDefaultButtonText", "AFXMENUBAR/CMFCMenuBar::OnToolHitTest", "AFXMENUBAR/CMFCMenuBar::PreTranslateMessage", "AFXMENUBAR/CMFCMenuBar::RestoreOriginalstate", "AFXMENUBAR/CMFCMenuBar::SaveState", "AFXMENUBAR/CMFCMenuBar::SetDefaultMenuResId", "AFXMENUBAR/CMFCMenuBar::SetForceDownArrows", "AFXMENUBAR/CMFCMenuBar::SetMaximizeMode", "AFXMENUBAR/CMFCMenuBar::SetMenuButtonRTC", "AFXMENUBAR/CMFCMenuBar::SetMenuFont", "AFXMENUBAR/CMFCMenuBar::SetRecentlyUsedMenus", "AFXMENUBAR/CMFCMenuBar::SetShowAllCommands"] helpviewer_keywords: ["CMFCMenuBar [MFC], AdjustLocations", "CMFCMenuBar [MFC], AllowChangeTextLabels", "CMFCMenuBar [MFC], AllowShowOnPaneMenu", "CMFCMenuBar [MFC], CalcFixedLayout", "CMFCMenuBar [MFC], CalcLayout", "CMFCMenuBar [MFC], CalcMaxButtonHeight", "CMFCMenuBar [MFC], CanBeClosed", "CMFCMenuBar [MFC], CanBeRestored", "CMFCMenuBar [MFC], Create", "CMFCMenuBar [MFC], CreateEx", "CMFCMenuBar [MFC], CreateFromMenu", "CMFCMenuBar [MFC], EnableHelpCombobox", "CMFCMenuBar [MFC], EnableMenuShadows", "CMFCMenuBar [MFC], GetAvailableExpandSize", "CMFCMenuBar [MFC], GetColumnWidth", "CMFCMenuBar [MFC], GetDefaultMenu", "CMFCMenuBar [MFC], GetDefaultMenuResId", "CMFCMenuBar [MFC], GetFloatPopupDirection", "CMFCMenuBar [MFC], GetForceDownArrows", "CMFCMenuBar [MFC], GetHelpCombobox", "CMFCMenuBar [MFC], GetHMenu", "CMFCMenuBar [MFC], GetMenuFont", "CMFCMenuBar [MFC], GetMenuItem", "CMFCMenuBar [MFC], GetRowHeight", "CMFCMenuBar [MFC], GetSystemButton", "CMFCMenuBar [MFC], GetSystemButtonsCount", "CMFCMenuBar [MFC], GetSystemMenu", "CMFCMenuBar [MFC], HighlightDisabledItems", "CMFCMenuBar [MFC], IsButtonExtraSizeAvailable", "CMFCMenuBar [MFC], IsHighlightDisabledItems", "CMFCMenuBar [MFC], IsMenuShadows", "CMFCMenuBar [MFC], IsRecentlyUsedMenus", "CMFCMenuBar [MFC], IsShowAllCommands", "CMFCMenuBar [MFC], IsShowAllCommandsDelay", "CMFCMenuBar [MFC], LoadState", "CMFCMenuBar [MFC], OnChangeHot", "CMFCMenuBar [MFC], OnDefaultMenuLoaded", "CMFCMenuBar [MFC], OnSendCommand", "CMFCMenuBar [MFC], OnSetDefaultButtonText", "CMFCMenuBar [MFC], OnToolHitTest", "CMFCMenuBar [MFC], PreTranslateMessage", "CMFCMenuBar [MFC], RestoreOriginalstate", "CMFCMenuBar [MFC], SaveState", "CMFCMenuBar [MFC], SetDefaultMenuResId", "CMFCMenuBar [MFC], SetForceDownArrows", "CMFCMenuBar [MFC], SetMaximizeMode", "CMFCMenuBar [MFC], SetMenuButtonRTC", "CMFCMenuBar [MFC], SetMenuFont", "CMFCMenuBar [MFC], SetRecentlyUsedMenus", "CMFCMenuBar [MFC], SetShowAllCommands"] -ms.assetid: 8a3ce4c7-b012-4dc0-b4f8-53c10b4b86b8 --- # CMFCMenuBar Class @@ -663,7 +662,7 @@ When you configure a menu bar to display recently used items, the menu bar displ - Display the full menu after the user clicks the arrow at the bottom of the menu. -By default, all `CMFCMenuBar` objects use the option to display the full menu after a short delay. This option cannot be changed programmatically in the `CMFCMenuBar` class. However, a user can change the behavior during toolbar customization by using the **Customize** dialog box.. +By default, all `CMFCMenuBar` objects use the option to display the full menu after a short delay. This option cannot be changed programmatically in the `CMFCMenuBar` class. However, a user can change the behavior during toolbar customization by using the **Customize** dialog box. ## CMFCMenuBar::LoadState @@ -977,6 +976,6 @@ If a menu does not display all the menu commands, it hides the commands that are ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ [CMFCToolBar Class](../../mfc/reference/cmfctoolbar-class.md) diff --git a/docs/mfc/reference/cmfcpreviewctrlimpl-class.md b/docs/mfc/reference/cmfcpreviewctrlimpl-class.md index 22d3cb1583..0dc7d37952 100644 --- a/docs/mfc/reference/cmfcpreviewctrlimpl-class.md +++ b/docs/mfc/reference/cmfcpreviewctrlimpl-class.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: CMFCPreviewCtrlImpl Class" title: "CMFCPreviewCtrlImpl Class" +description: "Learn more about: CMFCPreviewCtrlImpl Class" ms.date: "11/04/2016" f1_keywords: ["CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl", "AFXWIN/CMFCPreviewCtrlImpl::Create", "AFXWIN/CMFCPreviewCtrlImpl::Destroy", "AFXWIN/CMFCPreviewCtrlImpl::Focus", "AFXWIN/CMFCPreviewCtrlImpl::GetDocument", "AFXWIN/CMFCPreviewCtrlImpl::Redraw", "AFXWIN/CMFCPreviewCtrlImpl::SetDocument", "AFXWIN/CMFCPreviewCtrlImpl::SetHost", "AFXWIN/CMFCPreviewCtrlImpl::SetPreviewVisuals", "AFXWIN/CMFCPreviewCtrlImpl::SetRect", "AFXWIN/CMFCPreviewCtrlImpl::DoPaint", "AFXWIN/CMFCPreviewCtrlImpl::m_clrBackColor", "AFXWIN/CMFCPreviewCtrlImpl::m_clrTextColor", "AFXWIN/CMFCPreviewCtrlImpl::m_font", "AFXWIN/CMFCPreviewCtrlImpl::m_pDocument"] helpviewer_keywords: ["CMFCPreviewCtrlImpl [MFC], CMFCPreviewCtrlImpl", "CMFCPreviewCtrlImpl [MFC], Create", "CMFCPreviewCtrlImpl [MFC], Destroy", "CMFCPreviewCtrlImpl [MFC], Focus", "CMFCPreviewCtrlImpl [MFC], GetDocument", "CMFCPreviewCtrlImpl [MFC], Redraw", "CMFCPreviewCtrlImpl [MFC], SetDocument", "CMFCPreviewCtrlImpl [MFC], SetHost", "CMFCPreviewCtrlImpl [MFC], SetPreviewVisuals", "CMFCPreviewCtrlImpl [MFC], SetRect", "CMFCPreviewCtrlImpl [MFC], DoPaint", "CMFCPreviewCtrlImpl [MFC], m_clrBackColor", "CMFCPreviewCtrlImpl [MFC], m_clrTextColor", "CMFCPreviewCtrlImpl [MFC], m_font", "CMFCPreviewCtrlImpl [MFC], m_pDocument"] -ms.assetid: 06257fa0-54c9-478d-9d68-c9698c3f93ed --- -# CMFCPreviewCtrlImpl Class +# `CMFCPreviewCtrlImpl` Class This class implements a window that is placed on a host window provided by the Shell for Rich Preview. ## Syntax -``` +```cpp class CMFCPreviewCtrlImpl : public CWnd; ``` @@ -22,37 +21,37 @@ class CMFCPreviewCtrlImpl : public CWnd; |Name|Description| |----------|-----------------| -|[CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl](#dtor)|Destructs a preview control object.| -|[CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl](#cmfcpreviewctrlimpl)|Constructs a preview control object.| +|[`CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl`](#dtor)|Destructs a preview control object.| +|[`CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl`](#cmfcpreviewctrlimpl)|Constructs a preview control object.| ### Public Methods |Name|Description| |----------|-----------------| -|[CMFCPreviewCtrlImpl::Create](#create)|Overloaded. Called by a Rich Preview handler to create the Windows window.| -|[CMFCPreviewCtrlImpl::Destroy](#destroy)|Called by a Rich Preview handler when it needs to destroy this control.| -|[CMFCPreviewCtrlImpl::Focus](#focus)|Sets input focus to this control.| -|[CMFCPreviewCtrlImpl::GetDocument](#getdocument)|Returns a document connected to this preview control.| -|[CMFCPreviewCtrlImpl::Redraw](#redraw)|Tells this control to redraw.| -|[CMFCPreviewCtrlImpl::SetDocument](#setdocument)|Called by the preview handler to create a relationship between the document implementation and the preview control.| -|[CMFCPreviewCtrlImpl::SetHost](#sethost)|Sets a new parent for this control.| -|[CMFCPreviewCtrlImpl::SetPreviewVisuals](#setpreviewvisuals)|Called by a Rich Preview handler when it needs to set visuals of rich preview content.| -|[CMFCPreviewCtrlImpl::SetRect](#setrect)|Sets a new bounding rectangle for this control.| +|[`CMFCPreviewCtrlImpl::Create`](#create)|Overloaded. Called by a Rich Preview handler to create the Windows window.| +|[`CMFCPreviewCtrlImpl::Destroy`](#destroy)|Called by a Rich Preview handler when it needs to destroy this control.| +|[`CMFCPreviewCtrlImpl::Focus`](#focus)|Sets input focus to this control.| +|[`CMFCPreviewCtrlImpl::GetDocument`](#getdocument)|Returns a document connected to this preview control.| +|[`CMFCPreviewCtrlImpl::Redraw`](#redraw)|Tells this control to redraw.| +|[`CMFCPreviewCtrlImpl::SetDocument`](#setdocument)|Called by the preview handler to create a relationship between the document implementation and the preview control.| +|[`CMFCPreviewCtrlImpl::SetHost`](#sethost)|Sets a new parent for this control.| +|[`CMFCPreviewCtrlImpl::SetPreviewVisuals`](#setpreviewvisuals)|Called by a Rich Preview handler when it needs to set visuals of rich preview content.| +|[`CMFCPreviewCtrlImpl::SetRect`](#setrect)|Sets a new bounding rectangle for this control.| ### Protected Methods |Name|Description| |----------|-----------------| -|[CMFCPreviewCtrlImpl::DoPaint](#dopaint)|Called by the framework to render the preview.| +|[`CMFCPreviewCtrlImpl::DoPaint`](#dopaint)|Called by the framework to render the preview.| ### Protected Data Members |Name|Description| |----------|-----------------| -|[CMFCPreviewCtrlImpl::m_clrBackColor](#m_clrbackcolor)|Background color of preview window.| -|[CMFCPreviewCtrlImpl::m_clrTextColor](#m_clrtextcolor)|Text color of preview window.| -|[CMFCPreviewCtrlImpl::m_font](#m_font)|Font used to display text in the preview window.| -|[CMFCPreviewCtrlImpl::m_pDocument](#m_pdocument)|A pointer to a document whose content is previewed in the control.| +|[`CMFCPreviewCtrlImpl::m_clrBackColor`](#m_clrbackcolor)|Background color of preview window.| +|[`CMFCPreviewCtrlImpl::m_clrTextColor`](#m_clrtextcolor)|Text color of preview window.| +|[`CMFCPreviewCtrlImpl::m_font`](#m_font)|Font used to display text in the preview window.| +|[`CMFCPreviewCtrlImpl::m_pDocument`](#m_pdocument)|A pointer to a document whose content is previewed in the control.| ## Requirements @@ -60,99 +59,101 @@ class CMFCPreviewCtrlImpl : public CWnd; ## Inheritance Hierarchy -[CObject](../../mfc/reference/cobject-class.md) +[CObject](cobject-class.md) -[CCmdTarget](../../mfc/reference/ccmdtarget-class.md) +[CCmdTarget](ccmdtarget-class.md) -[CWnd](../../mfc/reference/cwnd-class.md) +[CWnd](cwnd-class.md) -[CMFCPreviewCtrlImpl](../../mfc/reference/cmfcpreviewctrlimpl-class.md) +[CMFCPreviewCtrlImpl](cmfcpreviewctrlimpl-class.md) -## CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl +## `CMFCPreviewCtrlImpl::CMFCPreviewCtrlImpl` Constructs a preview control object. ### Syntax +```cpp CMFCPreviewCtrlImpl(); +``` -## CMFCPreviewCtrlImpl::Create +## `CMFCPreviewCtrlImpl::Create` Overloaded. Called by a Rich Preview handler to create the Windows window. ### Syntax -``` +```cpp virtual BOOL Create( - HWND hWndParent, - const RECT* prc + HWND hWndParent, + const RECT* prc ); virtual BOOL Create( - HWND hWndParent, - const RECT* prc, - CCreateContext* pContext + HWND hWndParent, + const RECT* prc, + CCreateContext* pContext ); ``` ### Parameters -*hWndParent*
+*`hWndParent`*\ A handle to the host window supplied by the Shell for Rich Preview. -*prc*
+*`prc`*\ Specifies the initial size and position of the window. -*pContext*
+*`pContext`*\ A pointer to a creation context. ### Return Value -TRUE if creation succeeded; otherwise FALSE. +`TRUE` if creation succeeded; otherwise `FALSE`. -## CMFCPreviewCtrlImpl::Destroy +## `CMFCPreviewCtrlImpl::Destroy` Called by a Rich Preview handler when it needs to destroy this control. ### Syntax -``` +```cpp virtual void Destroy(); ``` -## CMFCPreviewCtrlImpl::DoPaint +## `CMFCPreviewCtrlImpl::DoPaint` Called by the framework to render the preview. ### Syntax -``` +```cpp virtual void DoPaint( - CPaintDC* pDC + CPaintDC* pDC ); ``` ### Parameters -*pDC*
+*`pDC`*\ A pointer to a device context for painting. -## CMFCPreviewCtrlImpl::Focus +## `CMFCPreviewCtrlImpl::Focus` Sets input focus to this control. ### Syntax -``` +```cpp virtual void Focus(); ``` -## CMFCPreviewCtrlImpl::GetDocument +## `CMFCPreviewCtrlImpl::GetDocument` Returns a document connected to this preview control. ### Syntax -``` +```cpp ATL::IDocument* GetDocument(); ``` @@ -160,55 +161,57 @@ ATL::IDocument* GetDocument(); A pointer to a document, whose content is previewed in the control. -## CMFCPreviewCtrlImpl::m_clrBackColor +## `CMFCPreviewCtrlImpl::m_clrBackColor` Background color of the preview window. ### Syntax -``` +```cpp COLORREF m_clrBackColor; ``` -## CMFCPreviewCtrlImpl::m_clrTextColor +## `CMFCPreviewCtrlImpl::m_clrTextColor` Text color of the preview window. ### Syntax -``` +```cpp COLORREF m_clrTextColor; ``` -## CMFCPreviewCtrlImpl::m_font Font used to display text in the preview window. +## `CMFCPreviewCtrlImpl::m_font` + +Font used to display text in the preview window. ### Syntax -``` +```cpp CFont m_font; ``` -## CMFCPreviewCtrlImpl::m_pDocument +## `CMFCPreviewCtrlImpl::m_pDocument` A pointer to a document whose content is previewed in the control. ### Syntax -``` +```cpp ATL::IDocument* m_pDocument; ``` -## CMFCPreviewCtrlImpl::Redraw +## `CMFCPreviewCtrlImpl::Redraw` Tells this control to redraw. ### Syntax -``` +```cpp virtual void Redraw(); ``` -## CMFCPreviewCtrlImpl::SetDocument +## `CMFCPreviewCtrlImpl::SetDocument` Called by the preview handler to create a relationship between the document implementation and the preview control. @@ -216,88 +219,88 @@ Called by the preview handler to create a relationship between the document impl ```cpp void SetDocument( - IDocument* pDocument + IDocument* pDocument ); ``` ### Parameters -*pDocument*
+*`pDocument`*\ A pointer to the document implementation. -## CMFCPreviewCtrlImpl::SetHost +## `CMFCPreviewCtrlImpl::SetHost` Sets a new parent for this control. ### Syntax -``` +```cpp virtual void SetHost( - HWND hWndParent + HWND hWndParent ); ``` ### Parameters -*hWndParent*
+*`hWndParent`*\ A handle to the new parent window. -## CMFCPreviewCtrlImpl::SetPreviewVisuals +## `CMFCPreviewCtrlImpl::SetPreviewVisuals` Called by a Rich Preview handler when it needs to set visuals of rich preview content. ### Syntax -``` +```cpp virtual void SetPreviewVisuals( - COLORREF clrBack, - COLORREF clrText, - const LOGFONTW *plf + COLORREF clrBack, + COLORREF clrText, + const LOGFONTW *plf ); ``` ### Parameters -*clrBack*
+*`clrBack`*\ Background color of preview window. -*clrText*
+*`clrText`*\ Text color of preview window. -*plf*
+*`plf`*\ Font used to display text in the preview window. -## CMFCPreviewCtrlImpl::SetRect +## `CMFCPreviewCtrlImpl::SetRect` Sets a new bounding rectangle for this control. ### Syntax -``` +```cpp virtual void SetRect( - const RECT* prc, - BOOL bRedraw + const RECT* prc, + BOOL bRedraw ); ``` ### Parameters -*prc*
+*`prc`*\ Specifies the new size and position of the preview control. -*bRedraw*
+*`bRedraw`*\ Specifies whether the control should be redrawn. ### Remarks Usually a new bounding rectangle is set when the host control is resized. -## CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl +## `CMFCPreviewCtrlImpl::~CMFCPreviewCtrlImpl` Destructs a preview control object. ### Syntax -``` +```cpp virtual ~CMFCPreviewCtrlImpl(); ``` diff --git a/docs/mfc/reference/cmfcpropertygridctrl-class.md b/docs/mfc/reference/cmfcpropertygridctrl-class.md index 319ba89f9d..585e3e775f 100644 --- a/docs/mfc/reference/cmfcpropertygridctrl-class.md +++ b/docs/mfc/reference/cmfcpropertygridctrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCPropertyGridCtrl Class" title: "CMFCPropertyGridCtrl Class" +description: "Learn more about: CMFCPropertyGridCtrl Class" ms.date: "11/19/2018" f1_keywords: ["CMFCPropertyGridCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::CMFCPropertyGridCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::accSelect", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::AddProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::AlwaysShowUserToolTip", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::CloseColorPopup", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::Create", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::DeleteProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::DrawControlBarColors", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::EnableDescriptionArea", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::EnableHeaderCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::EnsureVisible", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::ExpandAll", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::FindItemByData", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accChildCount", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accFocus", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accHelp", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accHelpTopic", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accKeyboardShortcut", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::get_accSelection", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetBkColor", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetBoldFont", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetCurSel", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetCustomColors", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetDescriptionHeight", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetDescriptionRows", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetHeaderCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetHeaderHeight", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetLeftColumnWidth", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetListRect", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetPropertyColumnWidth", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetPropertyCount", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetRowHeight", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetScrollBarCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::GetTextColor", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::HitTest", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::InitHeader", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsAlphabeticMode", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsAlwaysShowUserToolTip", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsDescriptionArea", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsGroupNameFullWidth", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsHeaderCtrl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsMarkModifiedProperties", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsShowDragContext", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::IsVSDotNetLook", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::MarkModifiedProperties", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::RemoveAll", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::ResetOriginalValues", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetAlphabeticMode", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetBoolLabels", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetCurSel", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetCustomColors", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetDescriptionRows", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetGroupNameFullWidth", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetListDelimiter", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetShowDragContext", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::SetVSDotNetLook", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::UpdateColor", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::AdjustLayout", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::CompareProps", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::EditItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::EndEditItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::Init", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnChangeSelection", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnClickButton", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnDrawBorder", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnDrawDescription", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnDrawList", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnDrawProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnPropertyChanged", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::OnSelectCombo", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridCtrl::ValidateItemData"] helpviewer_keywords: ["CMFCPropertyGridCtrl [MFC], CMFCPropertyGridCtrl", "CMFCPropertyGridCtrl [MFC], accSelect", "CMFCPropertyGridCtrl [MFC], AddProperty", "CMFCPropertyGridCtrl [MFC], AlwaysShowUserToolTip", "CMFCPropertyGridCtrl [MFC], CloseColorPopup", "CMFCPropertyGridCtrl [MFC], Create", "CMFCPropertyGridCtrl [MFC], DeleteProperty", "CMFCPropertyGridCtrl [MFC], DrawControlBarColors", "CMFCPropertyGridCtrl [MFC], EnableDescriptionArea", "CMFCPropertyGridCtrl [MFC], EnableHeaderCtrl", "CMFCPropertyGridCtrl [MFC], EnsureVisible", "CMFCPropertyGridCtrl [MFC], ExpandAll", "CMFCPropertyGridCtrl [MFC], FindItemByData", "CMFCPropertyGridCtrl [MFC], get_accChildCount", "CMFCPropertyGridCtrl [MFC], get_accFocus", "CMFCPropertyGridCtrl [MFC], get_accHelp", "CMFCPropertyGridCtrl [MFC], get_accHelpTopic", "CMFCPropertyGridCtrl [MFC], get_accKeyboardShortcut", "CMFCPropertyGridCtrl [MFC], get_accSelection", "CMFCPropertyGridCtrl [MFC], GetBkColor", "CMFCPropertyGridCtrl [MFC], GetBoldFont", "CMFCPropertyGridCtrl [MFC], GetCurSel", "CMFCPropertyGridCtrl [MFC], GetCustomColors", "CMFCPropertyGridCtrl [MFC], GetDescriptionHeight", "CMFCPropertyGridCtrl [MFC], GetDescriptionRows", "CMFCPropertyGridCtrl [MFC], GetHeaderCtrl", "CMFCPropertyGridCtrl [MFC], GetHeaderHeight", "CMFCPropertyGridCtrl [MFC], GetLeftColumnWidth", "CMFCPropertyGridCtrl [MFC], GetListRect", "CMFCPropertyGridCtrl [MFC], GetProperty", "CMFCPropertyGridCtrl [MFC], GetPropertyColumnWidth", "CMFCPropertyGridCtrl [MFC], GetPropertyCount", "CMFCPropertyGridCtrl [MFC], GetRowHeight", "CMFCPropertyGridCtrl [MFC], GetScrollBarCtrl", "CMFCPropertyGridCtrl [MFC], GetTextColor", "CMFCPropertyGridCtrl [MFC], HitTest", "CMFCPropertyGridCtrl [MFC], InitHeader", "CMFCPropertyGridCtrl [MFC], IsAlphabeticMode", "CMFCPropertyGridCtrl [MFC], IsAlwaysShowUserToolTip", "CMFCPropertyGridCtrl [MFC], IsDescriptionArea", "CMFCPropertyGridCtrl [MFC], IsGroupNameFullWidth", "CMFCPropertyGridCtrl [MFC], IsHeaderCtrl", "CMFCPropertyGridCtrl [MFC], IsMarkModifiedProperties", "CMFCPropertyGridCtrl [MFC], IsShowDragContext", "CMFCPropertyGridCtrl [MFC], IsVSDotNetLook", "CMFCPropertyGridCtrl [MFC], MarkModifiedProperties", "CMFCPropertyGridCtrl [MFC], RemoveAll", "CMFCPropertyGridCtrl [MFC], ResetOriginalValues", "CMFCPropertyGridCtrl [MFC], SetAlphabeticMode", "CMFCPropertyGridCtrl [MFC], SetBoolLabels", "CMFCPropertyGridCtrl [MFC], SetCurSel", "CMFCPropertyGridCtrl [MFC], SetCustomColors", "CMFCPropertyGridCtrl [MFC], SetDescriptionRows", "CMFCPropertyGridCtrl [MFC], SetGroupNameFullWidth", "CMFCPropertyGridCtrl [MFC], SetListDelimiter", "CMFCPropertyGridCtrl [MFC], SetShowDragContext", "CMFCPropertyGridCtrl [MFC], SetVSDotNetLook", "CMFCPropertyGridCtrl [MFC], UpdateColor", "CMFCPropertyGridCtrl [MFC], AdjustLayout", "CMFCPropertyGridCtrl [MFC], CompareProps", "CMFCPropertyGridCtrl [MFC], EditItem", "CMFCPropertyGridCtrl [MFC], EndEditItem", "CMFCPropertyGridCtrl [MFC], Init", "CMFCPropertyGridCtrl [MFC], OnChangeSelection", "CMFCPropertyGridCtrl [MFC], OnClickButton", "CMFCPropertyGridCtrl [MFC], OnDrawBorder", "CMFCPropertyGridCtrl [MFC], OnDrawDescription", "CMFCPropertyGridCtrl [MFC], OnDrawList", "CMFCPropertyGridCtrl [MFC], OnDrawProperty", "CMFCPropertyGridCtrl [MFC], OnPropertyChanged", "CMFCPropertyGridCtrl [MFC], OnSelectCombo", "CMFCPropertyGridCtrl [MFC], ValidateItemData"] -ms.assetid: 95877cae-2311-4a2a-9031-0c8c3cf0a5f9 --- # CMFCPropertyGridCtrl Class @@ -179,7 +178,7 @@ virtual HRESULT accSelect( ### Parameters [in] *`flagsSelect`*\ -[in] *`varChild`*\ +[in] *`varChild`* ### Return Value @@ -235,7 +234,7 @@ void AlwaysShowUserToolTip(BOOL bShow = TRUE); ### Parameters -[in] *`bShow`*\ +[in] *`bShow`* ### Remarks @@ -524,7 +523,7 @@ virtual HRESULT get_accChildCount(long* pcountChildren); ### Parameters -[in] *`pcountChildren`*\ +[in] *`pcountChildren`* ### Return Value @@ -538,7 +537,7 @@ virtual HRESULT get_accFocus(VARIANT* pvarChild); ### Parameters -[in] *`pvarChild`*\ +[in] *`pvarChild`* ### Return Value @@ -555,7 +554,7 @@ virtual HRESULT get_accHelp( ### Parameters [in] *`varChild`*\ -[in] *`pszHelp`*\ +[in] *`pszHelp`* ### Return Value @@ -574,7 +573,7 @@ virtual HRESULT get_accHelpTopic( [in] *`pszHelpFile`*\ [in] *`varChild`*\ -[in] *`pidTopic`*\ +[in] *`pidTopic`* ### Return Value @@ -591,7 +590,7 @@ virtual HRESULT get_accKeyboardShortcut( ### Parameters [in] *`varChild`*\ -[in] *`pszKeyboardShortcut`*\ +[in] *`pszKeyboardShortcut`* ### Return Value @@ -605,7 +604,7 @@ virtual HRESULT get_accSelection(VARIANT* pvarChildren); ### Parameters -[in] *`pvarChildren`*\ +[in] *`pvarChildren`* ### Return Value diff --git a/docs/mfc/reference/cmfcpropertygridproperty-class.md b/docs/mfc/reference/cmfcpropertygridproperty-class.md index 31a00e36f8..8bf3752df3 100644 --- a/docs/mfc/reference/cmfcpropertygridproperty-class.md +++ b/docs/mfc/reference/cmfcpropertygridproperty-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CMFCPropertyGridProperty class" title: "CMFCPropertyGridProperty class" -ms.date: "10/12/2022" +description: "Learn more about: CMFCPropertyGridProperty class" +ms.date: 10/12/2022 f1_keywords: ["CMFCPropertyGridProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::CMFCPropertyGridProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::AddOption", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::AddSubItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::AdjustButtonRect", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::AdjustInPlaceEditRect", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::AllowEdit", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::CreateInPlaceEdit", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::CreateSpinControl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::Enable", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::EnableSpinControl", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::Expand", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::FormatProperty", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetData", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetDescription", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetExpandedSubItems", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetHierarchyLevel", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetName", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetNameTooltip", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetOption", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetOptionCount", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetOriginalValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetParent", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetRect", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetSubItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetSubItemsCount", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::GetValueTooltip", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::HitTest", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsAllowEdit", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsEnabled", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsExpanded", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsGroup", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsInPlaceEditing", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsModified", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsParentExpanded", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsSelected", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsVisible", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnClickButton", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnClickName", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnClickValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnCloseCombo", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDblClk", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDrawButton", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDrawDescription", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDrawExpandBox", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDrawName", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDrawValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnEdit", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnEndEdit", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnKillSelection", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnPosSizeChanged", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnRClickName", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnRClickValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnSelectCombo", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnSetCursor", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnSetSelection", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnUpdateValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::PushChar", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::Redraw", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::RemoveAllOptions", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::RemoveSubItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::ResetOriginalValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::SetData", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::SetDescription", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::SetName", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::SetOriginalValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::SetValue", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::Show", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::CreateCombo", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::HasButton", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::Init", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsSubItem", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::IsValueChanged", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnCtlColor", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnDestroyWindow", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::OnKillFocus", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::m_strFormatDouble", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::m_strFormatFloat", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::m_strFormatLong", "AFXPROPERTYGRIDCTRL/CMFCPropertyGridProperty::m_strFormatShort"] helpviewer_keywords: ["CMFCPropertyGridProperty [MFC], CMFCPropertyGridProperty", "CMFCPropertyGridProperty [MFC], AddOption", "CMFCPropertyGridProperty [MFC], AddSubItem", "CMFCPropertyGridProperty [MFC], AdjustButtonRect", "CMFCPropertyGridProperty [MFC], AdjustInPlaceEditRect", "CMFCPropertyGridProperty [MFC], AllowEdit", "CMFCPropertyGridProperty [MFC], CreateInPlaceEdit", "CMFCPropertyGridProperty [MFC], CreateSpinControl", "CMFCPropertyGridProperty [MFC], Enable", "CMFCPropertyGridProperty [MFC], EnableSpinControl", "CMFCPropertyGridProperty [MFC], Expand", "CMFCPropertyGridProperty [MFC], FormatProperty", "CMFCPropertyGridProperty [MFC], GetData", "CMFCPropertyGridProperty [MFC], GetDescription", "CMFCPropertyGridProperty [MFC], GetExpandedSubItems", "CMFCPropertyGridProperty [MFC], GetHierarchyLevel", "CMFCPropertyGridProperty [MFC], GetName", "CMFCPropertyGridProperty [MFC], GetNameTooltip", "CMFCPropertyGridProperty [MFC], GetOption", "CMFCPropertyGridProperty [MFC], GetOptionCount", "CMFCPropertyGridProperty [MFC], GetOriginalValue", "CMFCPropertyGridProperty [MFC], GetParent", "CMFCPropertyGridProperty [MFC], GetRect", "CMFCPropertyGridProperty [MFC], GetSubItem", "CMFCPropertyGridProperty [MFC], GetSubItemsCount", "CMFCPropertyGridProperty [MFC], GetValue", "CMFCPropertyGridProperty [MFC], GetValueTooltip", "CMFCPropertyGridProperty [MFC], HitTest", "CMFCPropertyGridProperty [MFC], IsAllowEdit", "CMFCPropertyGridProperty [MFC], IsEnabled", "CMFCPropertyGridProperty [MFC], IsExpanded", "CMFCPropertyGridProperty [MFC], IsGroup", "CMFCPropertyGridProperty [MFC], IsInPlaceEditing", "CMFCPropertyGridProperty [MFC], IsModified", "CMFCPropertyGridProperty [MFC], IsParentExpanded", "CMFCPropertyGridProperty [MFC], IsSelected", "CMFCPropertyGridProperty [MFC], IsVisible", "CMFCPropertyGridProperty [MFC], OnClickButton", "CMFCPropertyGridProperty [MFC], OnClickName", "CMFCPropertyGridProperty [MFC], OnClickValue", "CMFCPropertyGridProperty [MFC], OnCloseCombo", "CMFCPropertyGridProperty [MFC], OnDblClk", "CMFCPropertyGridProperty [MFC], OnDrawButton", "CMFCPropertyGridProperty [MFC], OnDrawDescription", "CMFCPropertyGridProperty [MFC], OnDrawExpandBox", "CMFCPropertyGridProperty [MFC], OnDrawName", "CMFCPropertyGridProperty [MFC], OnDrawValue", "CMFCPropertyGridProperty [MFC], OnEdit", "CMFCPropertyGridProperty [MFC], OnEndEdit", "CMFCPropertyGridProperty [MFC], OnKillSelection", "CMFCPropertyGridProperty [MFC], OnPosSizeChanged", "CMFCPropertyGridProperty [MFC], OnRClickName", "CMFCPropertyGridProperty [MFC], OnRClickValue", "CMFCPropertyGridProperty [MFC], OnSelectCombo", "CMFCPropertyGridProperty [MFC], OnSetCursor", "CMFCPropertyGridProperty [MFC], OnSetSelection", "CMFCPropertyGridProperty [MFC], OnUpdateValue", "CMFCPropertyGridProperty [MFC], PushChar", "CMFCPropertyGridProperty [MFC], Redraw", "CMFCPropertyGridProperty [MFC], RemoveAllOptions", "CMFCPropertyGridProperty [MFC], RemoveSubItem", "CMFCPropertyGridProperty [MFC], ResetOriginalValue", "CMFCPropertyGridProperty [MFC], SetData", "CMFCPropertyGridProperty [MFC], SetDescription", "CMFCPropertyGridProperty [MFC], SetName", "CMFCPropertyGridProperty [MFC], SetOriginalValue", "CMFCPropertyGridProperty [MFC], SetValue", "CMFCPropertyGridProperty [MFC], Show", "CMFCPropertyGridProperty [MFC], CreateCombo", "CMFCPropertyGridProperty [MFC], HasButton", "CMFCPropertyGridProperty [MFC], Init", "CMFCPropertyGridProperty [MFC], IsSubItem", "CMFCPropertyGridProperty [MFC], IsValueChanged", "CMFCPropertyGridProperty [MFC], OnCtlColor", "CMFCPropertyGridProperty [MFC], OnDestroyWindow", "CMFCPropertyGridProperty [MFC], OnKillFocus", "CMFCPropertyGridProperty [MFC], m_strFormatDouble", "CMFCPropertyGridProperty [MFC], m_strFormatFloat", "CMFCPropertyGridProperty [MFC], m_strFormatLong", "CMFCPropertyGridProperty [MFC], m_strFormatShort"] --- @@ -1169,7 +1169,7 @@ virtual void OnKillSelection(CMFCPropertyGridProperty*); ### Parameters -[in] *`CMFCPropertyGridProperty*`*\ +[in] *`CMFCPropertyGridProperty*`* ### Remarks @@ -1183,7 +1183,7 @@ virtual void OnPosSizeChanged(CRect); ### Parameters -[in] *`CRect`*\ +[in] *`CRect`* ### Remarks @@ -1259,12 +1259,12 @@ This method supports the following variant types: `VT_INT`, `VT_I2`, `VT_I4`, `V ## `CMFCPropertyGridProperty::OnSetSelection` ```cpp -virtual void OnSetSelection CMFCPropertyGridProperty*); +virtual void OnSetSelection(CMFCPropertyGridProperty*); ``` ### Parameters -[in] *`CMFCPropertyGridProperty*`*\ +[in] *`CMFCPropertyGridProperty*`* ### Remarks diff --git a/docs/mfc/reference/cmfcribbonbar-class.md b/docs/mfc/reference/cmfcribbonbar-class.md index a0eb85dd1a..b3ec1757ee 100644 --- a/docs/mfc/reference/cmfcribbonbar-class.md +++ b/docs/mfc/reference/cmfcribbonbar-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCRibbonBar Class" title: "CMFCRibbonBar Class" +description: "Learn more about: CMFCRibbonBar Class" ms.date: "11/04/2016" f1_keywords: ["CMFCRibbonBar", "AFXRIBBONBAR/CMFCRibbonBar", "AFXRIBBONBAR/CMFCRibbonBar::ActivateContextCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddContextCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddMainCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddPrintPreviewCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddQATOnlyCategory", "AFXRIBBONBAR/CMFCRibbonBar::AddToTabs", "AFXRIBBONBAR/CMFCRibbonBar::CreateEx", "AFXRIBBONBAR/CMFCRibbonBar::Create", "AFXRIBBONBAR/CMFCRibbonBar::DeactivateKeyboardFocus", "AFXRIBBONBAR/CMFCRibbonBar::DrawMenuImage", "AFXRIBBONBAR/CMFCRibbonBar::DWMCompositionChanged", "AFXRIBBONBAR/CMFCRibbonBar::EnableKeyTips", "AFXRIBBONBAR/CMFCRibbonBar::EnablePrintPreview", "AFXRIBBONBAR/CMFCRibbonBar::EnableToolTips", "AFXRIBBONBAR/CMFCRibbonBar::FindByData", "AFXRIBBONBAR/CMFCRibbonBar::FindByID", "AFXRIBBONBAR/CMFCRibbonBar::FindCategoryIndexByData", "AFXRIBBONBAR/CMFCRibbonBar::ForceRecalcLayout", "AFXRIBBONBAR/CMFCRibbonBar::GetActiveCategory", "AFXRIBBONBAR/CMFCRibbonBar::GetCaptionHeight", "AFXRIBBONBAR/CMFCRibbonBar::GetCategory", "AFXRIBBONBAR/CMFCRibbonBar::GetCategoryCount", "AFXRIBBONBAR/CMFCRibbonBar::GetCategoryHeight", "AFXRIBBONBAR/CMFCRibbonBar::GetCategoryIndex", "AFXRIBBONBAR/CMFCRibbonBar::GetContextName", "AFXRIBBONBAR/CMFCRibbonBar::GetDroppedDown", "AFXRIBBONBAR/CMFCRibbonBar::GetElementsByID", "AFXRIBBONBAR/CMFCRibbonBar::GetApplicationButton", "AFXRIBBONBAR/CMFCRibbonBar::GetFocused", "AFXRIBBONBAR/CMFCRibbonBar::GetHideFlags", "AFXRIBBONBAR/CMFCRibbonBar::GetItemIDsList", "AFXRIBBONBAR/CMFCRibbonBar::GetKeyboardNavigationLevel", "AFXRIBBONBAR/CMFCRibbonBar::GetKeyboardNavLevelCurrent", "AFXRIBBONBAR/CMFCRibbonBar::GetKeyboardNavLevelParent", "AFXRIBBONBAR/CMFCRibbonBar::GetMainCategory", "AFXRIBBONBAR/CMFCRibbonBar::GetQATCommandsLocation", "AFXRIBBONBAR/CMFCRibbonBar::GetQATDroppedDown", "AFXRIBBONBAR/CMFCRibbonBar::GetQuickAccessCommands", "AFXRIBBONBAR/CMFCRibbonBar::GetQuickAccessToolbarLocation", "AFXRIBBONBAR/CMFCRibbonBar::GetTabTrancateRatio", "AFXRIBBONBAR/CMFCRibbonBar::GetTooltipFixedWidthLargeImage", "AFXRIBBONBAR/CMFCRibbonBar::GetTooltipFixedWidthRegular", "AFXRIBBONBAR/CMFCRibbonBar::GetVisibleCategoryCount", "AFXRIBBONBAR/CMFCRibbonBar::HideAllContextCategories", "AFXRIBBONBAR/CMFCRibbonBar::HideKeyTips", "AFXRIBBONBAR/CMFCRibbonBar::HitTest", "AFXRIBBONBAR/CMFCRibbonBar::IsKeyTipEnabled", "AFXRIBBONBAR/CMFCRibbonBar::IsMainRibbonBar", "AFXRIBBONBAR/CMFCRibbonBar::IsPrintPreviewEnabled", "AFXRIBBONBAR/CMFCRibbonBar::IsQATEmpty", "AFXRIBBONBAR/CMFCRibbonBar::IsQuickAccessToolbarOnTop", "AFXRIBBONBAR/CMFCRibbonBar::IsReplaceFrameCaption", "AFXRIBBONBAR/CMFCRibbonBar::IsShowGroupBorder", "AFXRIBBONBAR/CMFCRibbonBar::IsToolTipDescrEnabled", "AFXRIBBONBAR/CMFCRibbonBar::IsToolTipEnabled", "AFXRIBBONBAR/CMFCRibbonBar::IsTransparentCaption", "AFXRIBBONBAR/CMFCRibbonBar::IsWindows7Look", "AFXRIBBONBAR/CMFCRibbonBar::LoadFromResource", "AFXRIBBONBAR/CMFCRibbonBar::OnClickButton", "AFXRIBBONBAR/CMFCRibbonBar::OnEditContextMenu", "AFXRIBBONBAR/CMFCRibbonBar::OnRTLChanged", "AFXRIBBONBAR/CMFCRibbonBar::OnSetAccData", "AFXRIBBONBAR/CMFCRibbonBar::OnShowRibbonContextMenu", "AFXRIBBONBAR/CMFCRibbonBar::OnShowRibbonQATMenu", "AFXRIBBONBAR/CMFCRibbonBar::OnSysKeyDown", "AFXRIBBONBAR/CMFCRibbonBar::OnSysKeyUp", "AFXRIBBONBAR/CMFCRibbonBar::PopTooltip", "AFXRIBBONBAR/CMFCRibbonBar::PreTranslateMessage", "AFXRIBBONBAR/CMFCRibbonBar::RecalcLayout", "AFXRIBBONBAR/CMFCRibbonBar::RemoveAllCategories", "AFXRIBBONBAR/CMFCRibbonBar::RemoveAllFromTabs", "AFXRIBBONBAR/CMFCRibbonBar::RemoveCategory", "AFXRIBBONBAR/CMFCRibbonBar::SaveToXMLBuffer", "AFXRIBBONBAR/CMFCRibbonBar::SaveToXMLFile", "AFXRIBBONBAR/CMFCRibbonBar::SetActiveCategory", "AFXRIBBONBAR/CMFCRibbonBar::SetActiveMDIChild", "AFXRIBBONBAR/CMFCRibbonBar::SetElementKeys", "AFXRIBBONBAR/CMFCRibbonBar::SetApplicationButton", "AFXRIBBONBAR/CMFCRibbonBar::SetKeyboardNavigationLevel", "AFXRIBBONBAR/CMFCRibbonBar::SetMaximizeMode", "AFXRIBBONBAR/CMFCRibbonBar::SetQuickAccessCommands", "AFXRIBBONBAR/CMFCRibbonBar::SetQuickAccessDefaultState", "AFXRIBBONBAR/CMFCRibbonBar::SetQuickAccessToolbarOnTop", "AFXRIBBONBAR/CMFCRibbonBar::SetTooltipFixedWidth", "AFXRIBBONBAR/CMFCRibbonBar::SetWindows7Look", "AFXRIBBONBAR/CMFCRibbonBar::ShowCategory", "AFXRIBBONBAR/CMFCRibbonBar::ShowContextCategories", "AFXRIBBONBAR/CMFCRibbonBar::ShowKeyTips", "AFXRIBBONBAR/CMFCRibbonBar::ToggleMimimizeState", "AFXRIBBONBAR/CMFCRibbonBar::TranslateChar"] helpviewer_keywords: ["CMFCRibbonBar [MFC], ActivateContextCategory", "CMFCRibbonBar [MFC], AddCategory", "CMFCRibbonBar [MFC], AddContextCategory", "CMFCRibbonBar [MFC], AddMainCategory", "CMFCRibbonBar [MFC], AddPrintPreviewCategory", "CMFCRibbonBar [MFC], AddQATOnlyCategory", "CMFCRibbonBar [MFC], AddToTabs", "CMFCRibbonBar [MFC], CreateEx", "CMFCRibbonBar [MFC], Create", "CMFCRibbonBar [MFC], DeactivateKeyboardFocus", "CMFCRibbonBar [MFC], DrawMenuImage", "CMFCRibbonBar [MFC], DWMCompositionChanged", "CMFCRibbonBar [MFC], EnableKeyTips", "CMFCRibbonBar [MFC], EnablePrintPreview", "CMFCRibbonBar [MFC], EnableToolTips", "CMFCRibbonBar [MFC], FindByData", "CMFCRibbonBar [MFC], FindByID", "CMFCRibbonBar [MFC], FindCategoryIndexByData", "CMFCRibbonBar [MFC], ForceRecalcLayout", "CMFCRibbonBar [MFC], GetActiveCategory", "CMFCRibbonBar [MFC], GetCaptionHeight", "CMFCRibbonBar [MFC], GetCategory", "CMFCRibbonBar [MFC], GetCategoryCount", "CMFCRibbonBar [MFC], GetCategoryHeight", "CMFCRibbonBar [MFC], GetCategoryIndex", "CMFCRibbonBar [MFC], GetContextName", "CMFCRibbonBar [MFC], GetDroppedDown", "CMFCRibbonBar [MFC], GetElementsByID", "CMFCRibbonBar [MFC], GetApplicationButton", "CMFCRibbonBar [MFC], GetFocused", "CMFCRibbonBar [MFC], GetHideFlags", "CMFCRibbonBar [MFC], GetItemIDsList", "CMFCRibbonBar [MFC], GetKeyboardNavigationLevel", "CMFCRibbonBar [MFC], GetKeyboardNavLevelCurrent", "CMFCRibbonBar [MFC], GetKeyboardNavLevelParent", "CMFCRibbonBar [MFC], GetMainCategory", "CMFCRibbonBar [MFC], GetQATCommandsLocation", "CMFCRibbonBar [MFC], GetQATDroppedDown", "CMFCRibbonBar [MFC], GetQuickAccessCommands", "CMFCRibbonBar [MFC], GetQuickAccessToolbarLocation", "CMFCRibbonBar [MFC], GetTabTrancateRatio", "CMFCRibbonBar [MFC], GetTooltipFixedWidthLargeImage", "CMFCRibbonBar [MFC], GetTooltipFixedWidthRegular", "CMFCRibbonBar [MFC], GetVisibleCategoryCount", "CMFCRibbonBar [MFC], HideAllContextCategories", "CMFCRibbonBar [MFC], HideKeyTips", "CMFCRibbonBar [MFC], HitTest", "CMFCRibbonBar [MFC], IsKeyTipEnabled", "CMFCRibbonBar [MFC], IsMainRibbonBar", "CMFCRibbonBar [MFC], IsPrintPreviewEnabled", "CMFCRibbonBar [MFC], IsQATEmpty", "CMFCRibbonBar [MFC], IsQuickAccessToolbarOnTop", "CMFCRibbonBar [MFC], IsReplaceFrameCaption", "CMFCRibbonBar [MFC], IsShowGroupBorder", "CMFCRibbonBar [MFC], IsToolTipDescrEnabled", "CMFCRibbonBar [MFC], IsToolTipEnabled", "CMFCRibbonBar [MFC], IsTransparentCaption", "CMFCRibbonBar [MFC], IsWindows7Look", "CMFCRibbonBar [MFC], LoadFromResource", "CMFCRibbonBar [MFC], OnClickButton", "CMFCRibbonBar [MFC], OnEditContextMenu", "CMFCRibbonBar [MFC], OnRTLChanged", "CMFCRibbonBar [MFC], OnSetAccData", "CMFCRibbonBar [MFC], OnShowRibbonContextMenu", "CMFCRibbonBar [MFC], OnShowRibbonQATMenu", "CMFCRibbonBar [MFC], OnSysKeyDown", "CMFCRibbonBar [MFC], OnSysKeyUp", "CMFCRibbonBar [MFC], PopTooltip", "CMFCRibbonBar [MFC], PreTranslateMessage", "CMFCRibbonBar [MFC], RecalcLayout", "CMFCRibbonBar [MFC], RemoveAllCategories", "CMFCRibbonBar [MFC], RemoveAllFromTabs", "CMFCRibbonBar [MFC], RemoveCategory", "CMFCRibbonBar [MFC], SaveToXMLBuffer", "CMFCRibbonBar [MFC], SaveToXMLFile", "CMFCRibbonBar [MFC], SetActiveCategory", "CMFCRibbonBar [MFC], SetActiveMDIChild", "CMFCRibbonBar [MFC], SetElementKeys", "CMFCRibbonBar [MFC], SetApplicationButton", "CMFCRibbonBar [MFC], SetKeyboardNavigationLevel", "CMFCRibbonBar [MFC], SetMaximizeMode", "CMFCRibbonBar [MFC], SetQuickAccessCommands", "CMFCRibbonBar [MFC], SetQuickAccessDefaultState", "CMFCRibbonBar [MFC], SetQuickAccessToolbarOnTop", "CMFCRibbonBar [MFC], SetTooltipFixedWidth", "CMFCRibbonBar [MFC], SetWindows7Look", "CMFCRibbonBar [MFC], ShowCategory", "CMFCRibbonBar [MFC], ShowContextCategories", "CMFCRibbonBar [MFC], ShowKeyTips", "CMFCRibbonBar [MFC], ToggleMimimizeState", "CMFCRibbonBar [MFC], TranslateChar"] -ms.assetid: a65d06fa-1a28-4cc0-8971-bc9d7c9198fe --- # `CMFCRibbonBar` Class @@ -119,7 +118,7 @@ class CMFCRibbonBar : public CPane |[`CMFCRibbonBar::ShowCategory`](#showcategory)|Shows or hides the specified ribbon category.| |[`CMFCRibbonBar::ShowContextCategories`](#showcontextcategories)|Shows or hides the context categories that have the specified ID.| |[`CMFCRibbonBar::ShowKeyTips`](#showkeytips)|| -|[`CMFCRibbonBar::ToggleMimimizeState`](#togglemimimizestate)|Toggles the ribbon bar between the minimized and maximized states..| +|[`CMFCRibbonBar::ToggleMimimizeState`](#togglemimimizestate)|Toggles the ribbon bar between the minimized and maximized states.| |[`CMFCRibbonBar::TranslateChar`](#translatechar)|| ## Remarks @@ -1305,7 +1304,7 @@ virtual void OnEditContextMenu( ### Parameters [in] *`pEdit`*\ -[in] *`point`*\ +[in] *`point`* ### Remarks @@ -1360,7 +1359,7 @@ virtual BOOL OnShowRibbonContextMenu( [in] *`pWnd`*\ [in] *`x`*\ [in] *`y`*\ -[in] *`pHit`*\ +[in] *`pHit`* ### Return Value @@ -1381,7 +1380,7 @@ virtual BOOL OnShowRibbonQATMenu( [in] *`pWnd`*\ [in] *`x`*\ [in] *`y`*\ -[in] *`pHit`*\ +[in] *`pHit`* ### Return Value diff --git a/docs/mfc/reference/cmfcribbonbaseelement-class.md b/docs/mfc/reference/cmfcribbonbaseelement-class.md index 27c7ee698a..7f320909b9 100644 --- a/docs/mfc/reference/cmfcribbonbaseelement-class.md +++ b/docs/mfc/reference/cmfcribbonbaseelement-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCRibbonBaseElement Class" title: "CMFCRibbonBaseElement Class" +description: "Learn more about: CMFCRibbonBaseElement Class" ms.date: "11/04/2016" f1_keywords: ["CMFCRibbonBaseElement", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::AddToKeyList", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::AddToListBox", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CanBeAddedToQuickAccessToolBar", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CanBeCompacted", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CanBeStretched", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CanBeStretchedHorizontally", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CleanUpSizes", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::ClosePopupMenu", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::CopyFrom", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::DestroyCtrl", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::DrawImage", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::Find", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::FindByData", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::FindByID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::FindByOriginal", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetCompactSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetData", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetDescription", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetDroppedDown", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetElements", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetElementsByID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetHighlighted", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetImageSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetIntermediateSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetKeys", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetKeyTipRect", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetKeyTipSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetLocationInGroup", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetMenuKeys", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetNotifyID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetOriginal", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetParentCategory", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetParentPanel", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetParentRibbonBar", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetParentWnd", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetPressed", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetQuickAccessToolBarID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetRect", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetRegularSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetText", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetToolTipText", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::GetTopLevelRibbonBar", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HasCompactMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HasFocus", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HasIntermediateMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HasLargeMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HasMenu", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::HitTest", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsAlignByColumn", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsAlwaysLargeImage", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsAutoRepeatMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsChecked", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsCompactMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsDefaultMenuLook", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsDisabled", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsDroppedDown", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsFocused", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsGalleryIcon", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsHighlighted", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsIntermediateMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsLargeMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsMenuMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsPressed", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsQATMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsSeparator", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsShowGroupBorder", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsShowTooltipOnBottom", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsTabStop", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsTextAlwaysOnRight", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsVisible", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::IsWholeRowHeight", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::NotifyCommand", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::NotifyHighlightListItem", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnAddToQAToolbar", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnAfterChangeRect", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnAutoRepeat", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnCalcTextSize", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnChangeMenuHighlight", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnDraw", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnDrawKeyTip", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnDrawMenuImage", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnDrawOnList", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnKey", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnMenuKey", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnRTLChanged", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnShow", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnShowPopupMenu", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::PostMenuCommand", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::Redraw", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetACCData", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetCompactMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetData", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetDefaultMenuLook", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetDescription", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetID", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetInitialMode", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetKeys", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetOriginal", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetParentCategory", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetParentMenu", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetParentRibbonBar", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetRect", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetText", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetTextAlwaysOnRight", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetToolTipText", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::SetVisible", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::StretchHorizontally", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::StretchToWholeRow", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::UpdateTooltipInfo", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnProcessKey", "AFXBASERIBBONELEMENT/CMFCRibbonBaseElement::OnSetFocus"] helpviewer_keywords: ["CMFCRibbonBaseElement [MFC], AddToKeyList", "CMFCRibbonBaseElement [MFC], AddToListBox", "CMFCRibbonBaseElement [MFC], CanBeAddedToQuickAccessToolBar", "CMFCRibbonBaseElement [MFC], CanBeCompacted", "CMFCRibbonBaseElement [MFC], CanBeStretched", "CMFCRibbonBaseElement [MFC], CanBeStretchedHorizontally", "CMFCRibbonBaseElement [MFC], CleanUpSizes", "CMFCRibbonBaseElement [MFC], ClosePopupMenu", "CMFCRibbonBaseElement [MFC], CopyFrom", "CMFCRibbonBaseElement [MFC], DestroyCtrl", "CMFCRibbonBaseElement [MFC], DrawImage", "CMFCRibbonBaseElement [MFC], Find", "CMFCRibbonBaseElement [MFC], FindByData", "CMFCRibbonBaseElement [MFC], FindByID", "CMFCRibbonBaseElement [MFC], FindByOriginal", "CMFCRibbonBaseElement [MFC], GetCompactSize", "CMFCRibbonBaseElement [MFC], GetData", "CMFCRibbonBaseElement [MFC], GetDescription", "CMFCRibbonBaseElement [MFC], GetDroppedDown", "CMFCRibbonBaseElement [MFC], GetElements", "CMFCRibbonBaseElement [MFC], GetElementsByID", "CMFCRibbonBaseElement [MFC], GetHighlighted", "CMFCRibbonBaseElement [MFC], GetID", "CMFCRibbonBaseElement [MFC], GetImageSize", "CMFCRibbonBaseElement [MFC], GetIntermediateSize", "CMFCRibbonBaseElement [MFC], GetKeys", "CMFCRibbonBaseElement [MFC], GetKeyTipRect", "CMFCRibbonBaseElement [MFC], GetKeyTipSize", "CMFCRibbonBaseElement [MFC], GetLocationInGroup", "CMFCRibbonBaseElement [MFC], GetMenuKeys", "CMFCRibbonBaseElement [MFC], GetNotifyID", "CMFCRibbonBaseElement [MFC], GetOriginal", "CMFCRibbonBaseElement [MFC], GetParentCategory", "CMFCRibbonBaseElement [MFC], GetParentPanel", "CMFCRibbonBaseElement [MFC], GetParentRibbonBar", "CMFCRibbonBaseElement [MFC], GetParentWnd", "CMFCRibbonBaseElement [MFC], GetPressed", "CMFCRibbonBaseElement [MFC], GetQuickAccessToolBarID", "CMFCRibbonBaseElement [MFC], GetRect", "CMFCRibbonBaseElement [MFC], GetRegularSize", "CMFCRibbonBaseElement [MFC], GetSize", "CMFCRibbonBaseElement [MFC], GetText", "CMFCRibbonBaseElement [MFC], GetToolTipText", "CMFCRibbonBaseElement [MFC], GetTopLevelRibbonBar", "CMFCRibbonBaseElement [MFC], HasCompactMode", "CMFCRibbonBaseElement [MFC], HasFocus", "CMFCRibbonBaseElement [MFC], HasIntermediateMode", "CMFCRibbonBaseElement [MFC], HasLargeMode", "CMFCRibbonBaseElement [MFC], HasMenu", "CMFCRibbonBaseElement [MFC], HitTest", "CMFCRibbonBaseElement [MFC], IsAlignByColumn", "CMFCRibbonBaseElement [MFC], IsAlwaysLargeImage", "CMFCRibbonBaseElement [MFC], IsAutoRepeatMode", "CMFCRibbonBaseElement [MFC], IsChecked", "CMFCRibbonBaseElement [MFC], IsCompactMode", "CMFCRibbonBaseElement [MFC], IsDefaultMenuLook", "CMFCRibbonBaseElement [MFC], IsDisabled", "CMFCRibbonBaseElement [MFC], IsDroppedDown", "CMFCRibbonBaseElement [MFC], IsFocused", "CMFCRibbonBaseElement [MFC], IsGalleryIcon", "CMFCRibbonBaseElement [MFC], IsHighlighted", "CMFCRibbonBaseElement [MFC], IsIntermediateMode", "CMFCRibbonBaseElement [MFC], IsLargeMode", "CMFCRibbonBaseElement [MFC], IsMenuMode", "CMFCRibbonBaseElement [MFC], IsPressed", "CMFCRibbonBaseElement [MFC], IsQATMode", "CMFCRibbonBaseElement [MFC], IsSeparator", "CMFCRibbonBaseElement [MFC], IsShowGroupBorder", "CMFCRibbonBaseElement [MFC], IsShowTooltipOnBottom", "CMFCRibbonBaseElement [MFC], IsTabStop", "CMFCRibbonBaseElement [MFC], IsTextAlwaysOnRight", "CMFCRibbonBaseElement [MFC], IsVisible", "CMFCRibbonBaseElement [MFC], IsWholeRowHeight", "CMFCRibbonBaseElement [MFC], NotifyCommand", "CMFCRibbonBaseElement [MFC], NotifyHighlightListItem", "CMFCRibbonBaseElement [MFC], OnAddToQAToolbar", "CMFCRibbonBaseElement [MFC], OnAfterChangeRect", "CMFCRibbonBaseElement [MFC], OnAutoRepeat", "CMFCRibbonBaseElement [MFC], OnCalcTextSize", "CMFCRibbonBaseElement [MFC], OnChangeMenuHighlight", "CMFCRibbonBaseElement [MFC], OnDraw", "CMFCRibbonBaseElement [MFC], OnDrawKeyTip", "CMFCRibbonBaseElement [MFC], OnDrawMenuImage", "CMFCRibbonBaseElement [MFC], OnDrawOnList", "CMFCRibbonBaseElement [MFC], OnKey", "CMFCRibbonBaseElement [MFC], OnMenuKey", "CMFCRibbonBaseElement [MFC], OnRTLChanged", "CMFCRibbonBaseElement [MFC], OnShow", "CMFCRibbonBaseElement [MFC], OnShowPopupMenu", "CMFCRibbonBaseElement [MFC], PostMenuCommand", "CMFCRibbonBaseElement [MFC], Redraw", "CMFCRibbonBaseElement [MFC], SetACCData", "CMFCRibbonBaseElement [MFC], SetCompactMode", "CMFCRibbonBaseElement [MFC], SetData", "CMFCRibbonBaseElement [MFC], SetDefaultMenuLook", "CMFCRibbonBaseElement [MFC], SetDescription", "CMFCRibbonBaseElement [MFC], SetID", "CMFCRibbonBaseElement [MFC], SetInitialMode", "CMFCRibbonBaseElement [MFC], SetKeys", "CMFCRibbonBaseElement [MFC], SetOriginal", "CMFCRibbonBaseElement [MFC], SetParentCategory", "CMFCRibbonBaseElement [MFC], SetParentMenu", "CMFCRibbonBaseElement [MFC], SetParentRibbonBar", "CMFCRibbonBaseElement [MFC], SetRect", "CMFCRibbonBaseElement [MFC], SetText", "CMFCRibbonBaseElement [MFC], SetTextAlwaysOnRight", "CMFCRibbonBaseElement [MFC], SetToolTipText", "CMFCRibbonBaseElement [MFC], SetVisible", "CMFCRibbonBaseElement [MFC], StretchHorizontally", "CMFCRibbonBaseElement [MFC], StretchToWholeRow", "CMFCRibbonBaseElement [MFC], UpdateTooltipInfo", "CMFCRibbonBaseElement [MFC], OnProcessKey", "CMFCRibbonBaseElement [MFC], OnSetFocus"] -ms.assetid: 419ea91b-5062-44cc-b0a3-f87d29566f62 --- # CMFCRibbonBaseElement Class @@ -131,7 +130,7 @@ class CMFCRibbonBaseElement : public CObject |[CMFCRibbonBaseElement::SetParentCategory](#setparentcategory)|Sets the parent category for the ribbon element.| |[CMFCRibbonBaseElement::SetParentMenu](#setparentmenu)|Sets the parent menu container for the ribbon element.| |[CMFCRibbonBaseElement::SetParentRibbonBar](#setparentribbonbar)|Sets the parent ribbon bar for the ribbon element.| -|[CMFCRibbonBaseElement::SetRect](#setrect)|Sets the dimensions fot he display rectangle for the ribbon element.| +|[CMFCRibbonBaseElement::SetRect](#setrect)|Sets the dimensions of the display rectangle for the ribbon element.| |[CMFCRibbonBaseElement::SetText](#settext)|Sets the text for the ribbon element.| |[CMFCRibbonBaseElement::SetTextAlwaysOnRight](#settextalwaysonright)|Sets the text for the ribbon element to display on the right.| |[CMFCRibbonBaseElement::SetToolTipText](#settooltiptext)|Sets the tooltip text for the ribbon element.| @@ -2042,5 +2041,5 @@ TRUE if the ribbon element is focused; otherwise FALSE. ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ [Classes](../../mfc/reference/mfc-classes.md) diff --git a/docs/mfc/reference/cmfcribboncheckbox-class.md b/docs/mfc/reference/cmfcribboncheckbox-class.md index 57ce564c55..dd35d63440 100644 --- a/docs/mfc/reference/cmfcribboncheckbox-class.md +++ b/docs/mfc/reference/cmfcribboncheckbox-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCRibbonCheckBox Class" title: "CMFCRibbonCheckBox Class" -ms.date: "11/04/2016" +description: "Learn more about: CMFCRibbonCheckBox Class" +ms.date: 11/04/2016 f1_keywords: ["CMFCRibbonCheckBox", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::CMFCRibbonCheckBox", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::GetCompactSize", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::GetIntermediateSize", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::GetRegularSize", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::IsDrawTooltipImage", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::OnDraw", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::OnDrawMenuImage", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::OnDrawOnList", "AFXRIBBONCHECKBOX/CMFCRibbonCheckBox::SetACCData"] helpviewer_keywords: ["CMFCRibbonCheckBox [MFC], CMFCRibbonCheckBox", "CMFCRibbonCheckBox [MFC], GetCompactSize", "CMFCRibbonCheckBox [MFC], GetIntermediateSize", "CMFCRibbonCheckBox [MFC], GetRegularSize", "CMFCRibbonCheckBox [MFC], IsDrawTooltipImage", "CMFCRibbonCheckBox [MFC], OnDraw", "CMFCRibbonCheckBox [MFC], OnDrawMenuImage", "CMFCRibbonCheckBox [MFC], OnDrawOnList", "CMFCRibbonCheckBox [MFC], SetACCData"] -ms.assetid: 3a6c3891-c8d1-4af0-b954-7b9ab048782a --- # CMFCRibbonCheckBox Class @@ -131,7 +130,7 @@ A `CSize` object containing the intermediate size of the check box. ### Remarks -If not overridden, calculates the intermediate size as the default check box size ( `AFX_CHECK_BOX_DEFAULT_SIZE`) plus the text size, plus margins. +If not overridden, calculates the intermediate size as the default check box size (`AFX_CHECK_BOX_DEFAULT_SIZE`) plus the text size, plus margins. ## CMFCRibbonCheckBox::GetRegularSize diff --git a/docs/mfc/reference/cmfcribbonfontcombobox-class.md b/docs/mfc/reference/cmfcribbonfontcombobox-class.md index 3582dbb7f9..e37df6dfc0 100644 --- a/docs/mfc/reference/cmfcribbonfontcombobox-class.md +++ b/docs/mfc/reference/cmfcribbonfontcombobox-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCRibbonFontComboBox Class" title: "CMFCRibbonFontComboBox Class" +description: "Learn more about: CMFCRibbonFontComboBox Class" ms.date: "11/04/2016" f1_keywords: ["CMFCRibbonFontComboBox", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::CMFCRibbonFontComboBox", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::BuildFonts", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::GetCharSet", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::GetFontDesc", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::GetFontType", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::GetPitchAndFamily", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::RebuildFonts", "AFXRIBBONCOMBOBOX/CMFCRibbonFontComboBox::SetFont"] helpviewer_keywords: ["CMFCRibbonFontComboBox [MFC], CMFCRibbonFontComboBox", "CMFCRibbonFontComboBox [MFC], BuildFonts", "CMFCRibbonFontComboBox [MFC], GetCharSet", "CMFCRibbonFontComboBox [MFC], GetFontDesc", "CMFCRibbonFontComboBox [MFC], GetFontType", "CMFCRibbonFontComboBox [MFC], GetPitchAndFamily", "CMFCRibbonFontComboBox [MFC], RebuildFonts", "CMFCRibbonFontComboBox [MFC], SetFont"] -ms.assetid: 33b4db50-df4f-45fa-8f05-2e6e73c31435 --- # CMFCRibbonFontComboBox Class @@ -110,7 +109,7 @@ CMFCRibbonFontComboBox( [in] Specifies which font types to display in the combo box. Valid options are DEVICE_FONTTYPE, RASTER_FONTTYPE, and TRUETYPE_FONTTYPE, or any bitwise combination thereof. *nCharSet*
-[in] Filters the fonts in the combo box to those that belong to the specified character set.. +[in] Filters the fonts in the combo box to those that belong to the specified character set. *nPitchAndFamily*
[in] Specifies the pitch and the family of the fonts that are displayed in the combo box. @@ -224,6 +223,6 @@ Pitch and the family (see LOGFONT in the Windows SDK documentation). ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ [CMFCRibbonComboBox Class](../../mfc/reference/cmfcribboncombobox-class.md) diff --git a/docs/mfc/reference/cmfctaskspane-class.md b/docs/mfc/reference/cmfctaskspane-class.md index 82935354ac..3f76674307 100644 --- a/docs/mfc/reference/cmfctaskspane-class.md +++ b/docs/mfc/reference/cmfctaskspane-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCTasksPane Class" title: "CMFCTasksPane Class" -ms.date: "07/02/2019" +description: "Learn more about: CMFCTasksPane Class" +ms.date: 07/02/2019 f1_keywords: ["CMFCTasksPane", "AFXTASKSPANE/CMFCTasksPane", "AFXTASKSPANE/CMFCTasksPane::CMFCTasksPane", "AFXTASKSPANE/CMFCTasksPane::AddGroup", "AFXTASKSPANE/CMFCTasksPane::AddLabel", "AFXTASKSPANE/CMFCTasksPane::AddMRUFilesList", "AFXTASKSPANE/CMFCTasksPane::AddPage", "AFXTASKSPANE/CMFCTasksPane::AddSeparator", "AFXTASKSPANE/CMFCTasksPane::AddTask", "AFXTASKSPANE/CMFCTasksPane::AddWindow", "AFXTASKSPANE/CMFCTasksPane::CollapseAllGroups", "AFXTASKSPANE/CMFCTasksPane::CollapseGroup", "AFXTASKSPANE/CMFCTasksPane::CreateDefaultMiniframe", "AFXTASKSPANE/CMFCTasksPane::CreateMenu", "AFXTASKSPANE/CMFCTasksPane::EnableAnimation", "AFXTASKSPANE/CMFCTasksPane::EnableGroupCollapse", "AFXTASKSPANE/CMFCTasksPane::EnableHistoryMenuButtons", "AFXTASKSPANE/CMFCTasksPane::EnableNavigationToolbar", "AFXTASKSPANE/CMFCTasksPane::EnableOffsetCustomControls", "AFXTASKSPANE/CMFCTasksPane::EnableScrollButtons", "AFXTASKSPANE/CMFCTasksPane::EnableWrapLabels", "AFXTASKSPANE/CMFCTasksPane::EnableWrapTasks", "AFXTASKSPANE/CMFCTasksPane::GetActivePage", "AFXTASKSPANE/CMFCTasksPane::GetGroupCaptionHeight", "AFXTASKSPANE/CMFCTasksPane::GetGroupCaptionHorzOffset", "AFXTASKSPANE/CMFCTasksPane::GetGroupCaptionVertOffset", "AFXTASKSPANE/CMFCTasksPane::GetGroupCount", "AFXTASKSPANE/CMFCTasksPane::GetGroupLocation", "AFXTASKSPANE/CMFCTasksPane::GetGroupVertOffset", "AFXTASKSPANE/CMFCTasksPane::GetHorzMargin", "AFXTASKSPANE/CMFCTasksPane::GetNextPages", "AFXTASKSPANE/CMFCTasksPane::GetPageByGroup", "AFXTASKSPANE/CMFCTasksPane::GetPagesCount", "AFXTASKSPANE/CMFCTasksPane::GetPreviousPages", "AFXTASKSPANE/CMFCTasksPane::GetScrollBarCtrl", "AFXTASKSPANE/CMFCTasksPane::GetTask", "AFXTASKSPANE/CMFCTasksPane::GetTaskCount", "AFXTASKSPANE/CMFCTasksPane::GetTaskGroup", "AFXTASKSPANE/CMFCTasksPane::GetTaskLocation", "AFXTASKSPANE/CMFCTasksPane::GetTasksHorzOffset", "AFXTASKSPANE/CMFCTasksPane::GetTasksIconHorzOffset", "AFXTASKSPANE/CMFCTasksPane::GetTasksIconVertOffset", "AFXTASKSPANE/CMFCTasksPane::GetVertMargin", "AFXTASKSPANE/CMFCTasksPane::IsAccessibilityCompatible", "AFXTASKSPANE/CMFCTasksPane::IsAnimationEnabled", "AFXTASKSPANE/CMFCTasksPane::IsBackButtonEnabled", "AFXTASKSPANE/CMFCTasksPane::IsForwardButtonEnabled", "AFXTASKSPANE/CMFCTasksPane::IsGroupCollapseEnabled", "AFXTASKSPANE/CMFCTasksPane::IsHistoryMenuButtonsEnabled", "AFXTASKSPANE/CMFCTasksPane::IsNavigationToolbarEnabled", "AFXTASKSPANE/CMFCTasksPane::IsToolBox", "AFXTASKSPANE/CMFCTasksPane::IsWrapLabelsEnabled", "AFXTASKSPANE/CMFCTasksPane::IsWrapTasksEnabled", "AFXTASKSPANE/CMFCTasksPane::LoadState", "AFXTASKSPANE/CMFCTasksPane::OnCancel", "AFXTASKSPANE/CMFCTasksPane::OnClickTask", "AFXTASKSPANE/CMFCTasksPane::OnOK", "AFXTASKSPANE/CMFCTasksPane::OnPressBackButton", "AFXTASKSPANE/CMFCTasksPane::OnPressForwardButton", "AFXTASKSPANE/CMFCTasksPane::OnPressHomeButton", "AFXTASKSPANE/CMFCTasksPane::OnPressOtherButton", "AFXTASKSPANE/CMFCTasksPane::OnSetAccData", "AFXTASKSPANE/CMFCTasksPane::OnUpdateCmdUI", "AFXTASKSPANE/CMFCTasksPane::PreTranslateMessage", "AFXTASKSPANE/CMFCTasksPane::RecalcLayout", "AFXTASKSPANE/CMFCTasksPane::RemoveAllGroups", "AFXTASKSPANE/CMFCTasksPane::RemoveAllPages", "AFXTASKSPANE/CMFCTasksPane::RemoveAllTasks", "AFXTASKSPANE/CMFCTasksPane::RemoveGroup", "AFXTASKSPANE/CMFCTasksPane::RemovePage", "AFXTASKSPANE/CMFCTasksPane::RemoveTask", "AFXTASKSPANE/CMFCTasksPane::SaveState", "AFXTASKSPANE/CMFCTasksPane::Serialize", "AFXTASKSPANE/CMFCTasksPane::SetActivePage", "AFXTASKSPANE/CMFCTasksPane::SetCaption", "AFXTASKSPANE/CMFCTasksPane::SetGroupCaptionHeight", "AFXTASKSPANE/CMFCTasksPane::SetGroupCaptionHorzOffset", "AFXTASKSPANE/CMFCTasksPane::SetGroupCaptionVertOffset", "AFXTASKSPANE/CMFCTasksPane::SetGroupName", "AFXTASKSPANE/CMFCTasksPane::SetGroupTextColor", "AFXTASKSPANE/CMFCTasksPane::SetGroupVertOffset", "AFXTASKSPANE/CMFCTasksPane::SetHorzMargin", "AFXTASKSPANE/CMFCTasksPane::SetIconsList", "AFXTASKSPANE/CMFCTasksPane::SetPageCaption", "AFXTASKSPANE/CMFCTasksPane::SetTaskName", "AFXTASKSPANE/CMFCTasksPane::SetTasksIconHorzOffset", "AFXTASKSPANE/CMFCTasksPane::SetTasksIconVertOffset", "AFXTASKSPANE/CMFCTasksPane::SetTaskTextColor", "AFXTASKSPANE/CMFCTasksPane::SetTasksHorzOffset", "AFXTASKSPANE/CMFCTasksPane::SetVertMargin", "AFXTASKSPANE/CMFCTasksPane::SetWindowHeight", "AFXTASKSPANE/CMFCTasksPane::ShowCommandMessageString", "AFXTASKSPANE/CMFCTasksPane::ShowTask", "AFXTASKSPANE/CMFCTasksPane::ShowTaskByCmdId", "AFXTASKSPANE/CMFCTasksPane::Update", "AFXTASKSPANE/CMFCTasksPane::OnActivateTasksPanePage"] helpviewer_keywords: ["CMFCTasksPane [MFC], CMFCTasksPane", "CMFCTasksPane [MFC], AddGroup", "CMFCTasksPane [MFC], AddLabel", "CMFCTasksPane [MFC], AddMRUFilesList", "CMFCTasksPane [MFC], AddPage", "CMFCTasksPane [MFC], AddSeparator", "CMFCTasksPane [MFC], AddTask", "CMFCTasksPane [MFC], AddWindow", "CMFCTasksPane [MFC], CollapseAllGroups", "CMFCTasksPane [MFC], CollapseGroup", "CMFCTasksPane [MFC], CreateDefaultMiniframe", "CMFCTasksPane [MFC], CreateMenu", "CMFCTasksPane [MFC], EnableAnimation", "CMFCTasksPane [MFC], EnableGroupCollapse", "CMFCTasksPane [MFC], EnableHistoryMenuButtons", "CMFCTasksPane [MFC], EnableNavigationToolbar", "CMFCTasksPane [MFC], EnableOffsetCustomControls", "CMFCTasksPane [MFC], EnableScrollButtons", "CMFCTasksPane [MFC], EnableWrapLabels", "CMFCTasksPane [MFC], EnableWrapTasks", "CMFCTasksPane [MFC], GetActivePage", "CMFCTasksPane [MFC], GetGroupCaptionHeight", "CMFCTasksPane [MFC], GetGroupCaptionHorzOffset", "CMFCTasksPane [MFC], GetGroupCaptionVertOffset", "CMFCTasksPane [MFC], GetGroupCount", "CMFCTasksPane [MFC], GetGroupLocation", "CMFCTasksPane [MFC], GetGroupVertOffset", "CMFCTasksPane [MFC], GetHorzMargin", "CMFCTasksPane [MFC], GetNextPages", "CMFCTasksPane [MFC], GetPageByGroup", "CMFCTasksPane [MFC], GetPagesCount", "CMFCTasksPane [MFC], GetPreviousPages", "CMFCTasksPane [MFC], GetScrollBarCtrl", "CMFCTasksPane [MFC], GetTask", "CMFCTasksPane [MFC], GetTaskCount", "CMFCTasksPane [MFC], GetTaskGroup", "CMFCTasksPane [MFC], GetTaskLocation", "CMFCTasksPane [MFC], GetTasksHorzOffset", "CMFCTasksPane [MFC], GetTasksIconHorzOffset", "CMFCTasksPane [MFC], GetTasksIconVertOffset", "CMFCTasksPane [MFC], GetVertMargin", "CMFCTasksPane [MFC], IsAccessibilityCompatible", "CMFCTasksPane [MFC], IsAnimationEnabled", "CMFCTasksPane [MFC], IsBackButtonEnabled", "CMFCTasksPane [MFC], IsForwardButtonEnabled", "CMFCTasksPane [MFC], IsGroupCollapseEnabled", "CMFCTasksPane [MFC], IsHistoryMenuButtonsEnabled", "CMFCTasksPane [MFC], IsNavigationToolbarEnabled", "CMFCTasksPane [MFC], IsToolBox", "CMFCTasksPane [MFC], IsWrapLabelsEnabled", "CMFCTasksPane [MFC], IsWrapTasksEnabled", "CMFCTasksPane [MFC], LoadState", "CMFCTasksPane [MFC], OnCancel", "CMFCTasksPane [MFC], OnClickTask", "CMFCTasksPane [MFC], OnOK", "CMFCTasksPane [MFC], OnPressBackButton", "CMFCTasksPane [MFC], OnPressForwardButton", "CMFCTasksPane [MFC], OnPressHomeButton", "CMFCTasksPane [MFC], OnPressOtherButton", "CMFCTasksPane [MFC], OnSetAccData", "CMFCTasksPane [MFC], OnUpdateCmdUI", "CMFCTasksPane [MFC], PreTranslateMessage", "CMFCTasksPane [MFC], RecalcLayout", "CMFCTasksPane [MFC], RemoveAllGroups", "CMFCTasksPane [MFC], RemoveAllPages", "CMFCTasksPane [MFC], RemoveAllTasks", "CMFCTasksPane [MFC], RemoveGroup", "CMFCTasksPane [MFC], RemovePage", "CMFCTasksPane [MFC], RemoveTask", "CMFCTasksPane [MFC], SaveState", "CMFCTasksPane [MFC], Serialize", "CMFCTasksPane [MFC], SetActivePage", "CMFCTasksPane [MFC], SetCaption", "CMFCTasksPane [MFC], SetGroupCaptionHeight", "CMFCTasksPane [MFC], SetGroupCaptionHorzOffset", "CMFCTasksPane [MFC], SetGroupCaptionVertOffset", "CMFCTasksPane [MFC], SetGroupName", "CMFCTasksPane [MFC], SetGroupTextColor", "CMFCTasksPane [MFC], SetGroupVertOffset", "CMFCTasksPane [MFC], SetHorzMargin", "CMFCTasksPane [MFC], SetIconsList", "CMFCTasksPane [MFC], SetPageCaption", "CMFCTasksPane [MFC], SetTaskName", "CMFCTasksPane [MFC], SetTasksIconHorzOffset", "CMFCTasksPane [MFC], SetTasksIconVertOffset", "CMFCTasksPane [MFC], SetTaskTextColor", "CMFCTasksPane [MFC], SetTasksHorzOffset", "CMFCTasksPane [MFC], SetVertMargin", "CMFCTasksPane [MFC], SetWindowHeight", "CMFCTasksPane [MFC], ShowCommandMessageString", "CMFCTasksPane [MFC], ShowTask", "CMFCTasksPane [MFC], ShowTaskByCmdId", "CMFCTasksPane [MFC], Update", "CMFCTasksPane [MFC], OnActivateTasksPanePage"] -ms.assetid: b456328e-2525-4642-b78b-9edd1a1a7d3f --- # CMFCTasksPane Class @@ -1461,7 +1460,7 @@ void SetGroupCaptionHeight(int n = -1); Call this method to customize the margins of the task pane elements. -If *n* is -1, the framework determines the margin value by using the visual manager ( `CMFCVisualManager::GetTasksPaneGroupCaptionHeight`). The default caption height is 25 pixels. +If *n* is -1, the framework determines the margin value by using the visual manager (`CMFCVisualManager::GetTasksPaneGroupCaptionHeight`). The default caption height is 25 pixels. ## CMFCTasksPane::SetGroupCaptionHorzOffset diff --git a/docs/mfc/reference/cmfctoolbar-class.md b/docs/mfc/reference/cmfctoolbar-class.md index 236254137a..e71eb71307 100644 --- a/docs/mfc/reference/cmfctoolbar-class.md +++ b/docs/mfc/reference/cmfctoolbar-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: CMFCToolBar Class" title: "CMFCToolBar Class" -ms.date: "11/04/2016" +description: "Learn more about: CMFCToolBar Class" +ms.date: 11/04/2016 f1_keywords: ["CMFCToolBar", "AFXTOOLBAR/CMFCToolBar", "AFXTOOLBAR/CMFCToolBar::AddBasicCommand", "AFXTOOLBAR/CMFCToolBar::AddCommandUsage", "AFXTOOLBAR/CMFCToolBar::AddToolBarForImageCollection", "AFXTOOLBAR/CMFCToolBar::AdjustLayout", "AFXTOOLBAR/CMFCToolBar::AdjustSize", "AFXTOOLBAR/CMFCToolBar::AllowChangeTextLabels", "AFXTOOLBAR/CMFCToolBar::AreTextLabels", "AFXTOOLBAR/CMFCToolBar::AutoGrayInactiveImages", "AFXTOOLBAR/CMFCToolBar::ButtonToIndex", "AFXTOOLBAR/CMFCToolBar::CalcFixedLayout", "AFXTOOLBAR/CMFCToolBar::CalcSize", "AFXTOOLBAR/CMFCToolBar::CanHandleSiblings", "AFXTOOLBAR/CMFCToolBar::CleanUpImages", "AFXTOOLBAR/CMFCToolBar::CleanUpLockedImages", "AFXTOOLBAR/CMFCToolBar::CanBeClosed", "AFXTOOLBAR/CMFCToolBar::CanBeRestored", "AFXTOOLBAR/CMFCToolBar::CanFocus", "AFXTOOLBAR/CMFCToolBar::CommandToIndex", "AFXTOOLBAR/CMFCToolBar::Create", "AFXTOOLBAR/CMFCToolBar::CreateEx", "AFXTOOLBAR/CMFCToolBar::Deactivate", "AFXTOOLBAR/CMFCToolBar::EnableCustomizeButton", "AFXTOOLBAR/CMFCToolBar::EnableDocking", "AFXTOOLBAR/CMFCToolBar::EnableLargeIcons", "AFXTOOLBAR/CMFCToolBar::EnableQuickCustomization", "AFXTOOLBAR/CMFCToolBar::EnableReflections", "AFXTOOLBAR/CMFCToolBar::EnableTextLabels", "AFXTOOLBAR/CMFCToolBar::FromHandlePermanent", "AFXTOOLBAR/CMFCToolBar::GetAllButtons", "AFXTOOLBAR/CMFCToolBar::GetAllToolbars", "AFXTOOLBAR/CMFCToolBar::GetBasicCommands", "AFXTOOLBAR/CMFCToolBar::GetButton", "AFXTOOLBAR/CMFCToolBar::GetButtonInfo", "AFXTOOLBAR/CMFCToolBar::GetButtonSize", "AFXTOOLBAR/CMFCToolBar::GetButtonStyle", "AFXTOOLBAR/CMFCToolBar::GetButtonText", "AFXTOOLBAR/CMFCToolBar::GetColdImages", "AFXTOOLBAR/CMFCToolBar::GetColumnWidth", "AFXTOOLBAR/CMFCToolBar::GetCommandButtons", "AFXTOOLBAR/CMFCToolBar::GetCount", "AFXTOOLBAR/CMFCToolBar::GetCustomizeButton", "AFXTOOLBAR/CMFCToolBar::GetDefaultImage", "AFXTOOLBAR/CMFCToolBar::GetDisabledImages", "AFXTOOLBAR/CMFCToolBar::GetDisabledMenuImages", "AFXTOOLBAR/CMFCToolBar::GetDroppedDownMenu", "AFXTOOLBAR/CMFCToolBar::GetGrayDisabledButtons", "AFXTOOLBAR/CMFCToolBar::GetHighlightedButton", "AFXTOOLBAR/CMFCToolBar::GetHotBorder", "AFXTOOLBAR/CMFCToolBar::GetHotTextColor", "AFXTOOLBAR/CMFCToolBar::GetHwndLastFocus", "AFXTOOLBAR/CMFCToolBar::GetOVERWRITESetText", "AFXTOOLBAR/CMFCToolBar::GetImageSize", "AFXTOOLBAR/CMFCToolBar::GetImages", "AFXTOOLBAR/CMFCToolBar::GetImagesOffset", "AFXTOOLBAR/CMFCToolBar::GetInvalidateItemRect", "AFXTOOLBAR/CMFCToolBar::GetItemID", "AFXTOOLBAR/CMFCToolBar::GetItemRect", "AFXTOOLBAR/CMFCToolBar::GetLargeColdImages", "AFXTOOLBAR/CMFCToolBar::GetLargeDisabledImages", "AFXTOOLBAR/CMFCToolBar::GetLargeImages", "AFXTOOLBAR/CMFCToolBar::GetLockedColdImages", "AFXTOOLBAR/CMFCToolBar::GetLockedDisabledImages", "AFXTOOLBAR/CMFCToolBar::GetLockedImages", "AFXTOOLBAR/CMFCToolBar::GetLockedImageSize", "AFXTOOLBAR/CMFCToolBar::GetLockedMenuImages", "AFXTOOLBAR/CMFCToolBar::GetMenuButtonSize", "AFXTOOLBAR/CMFCToolBar::GetMenuImageSize", "AFXTOOLBAR/CMFCToolBar::GetMenuImages", "AFXTOOLBAR/CMFCToolBar::GetOrigButtons", "AFXTOOLBAR/CMFCToolBar::GetOrigResetButtons", "AFXTOOLBAR/CMFCToolBar::GetResourceID", "AFXTOOLBAR/CMFCToolBar::GetRouteCommandsViaFrame", "AFXTOOLBAR/CMFCToolBar::GetRowHeight", "AFXTOOLBAR/CMFCToolBar::GetShowTooltips", "AFXTOOLBAR/CMFCToolBar::GetSiblingToolBar", "AFXTOOLBAR/CMFCToolBar::GetUserImages", "AFXTOOLBAR/CMFCToolBar::HitTest", "AFXTOOLBAR/CMFCToolBar::InsertButton", "AFXTOOLBAR/CMFCToolBar::InsertSeparator", "AFXTOOLBAR/CMFCToolBar::InvalidateButton", "AFXTOOLBAR/CMFCToolBar::IsAddRemoveQuickCustomize", "AFXTOOLBAR/CMFCToolBar::IsAltCustomizeMode", "AFXTOOLBAR/CMFCToolBar::IsAutoGrayInactiveImages", "AFXTOOLBAR/CMFCToolBar::IsBasicCommand", "AFXTOOLBAR/CMFCToolBar::IsButtonExtraSizeAvailable", "AFXTOOLBAR/CMFCToolBar::IsButtonHighlighted", "AFXTOOLBAR/CMFCToolBar::IsCommandPermitted", "AFXTOOLBAR/CMFCToolBar::IsCommandRarelyUsed", "AFXTOOLBAR/CMFCToolBar::IsCustomizeMode", "AFXTOOLBAR/CMFCToolBar::IsDragButton", "AFXTOOLBAR/CMFCToolBar::IsExistCustomizeButton", "AFXTOOLBAR/CMFCToolBar::IsFloating", "AFXTOOLBAR/CMFCToolBar::IsLargeIcons", "AFXTOOLBAR/CMFCToolBar::IsLastCommandFromButton", "AFXTOOLBAR/CMFCToolBar::IsLocked", "AFXTOOLBAR/CMFCToolBar::IsOneRowWithSibling", "AFXTOOLBAR/CMFCToolBar::IsUserDefined", "AFXTOOLBAR/CMFCToolBar::LoadBitmap", "AFXTOOLBAR/CMFCToolBar::LoadBitmapEx", "AFXTOOLBAR/CMFCToolBar::LoadParameters", "AFXTOOLBAR/CMFCToolBar::LoadState", "AFXTOOLBAR/CMFCToolBar::LoadToolBar", "AFXTOOLBAR/CMFCToolBar::LoadToolBarEx", "AFXTOOLBAR/CMFCToolBar::OnChangeHot", "AFXTOOLBAR/CMFCToolBar::OnFillBackground", "AFXTOOLBAR/CMFCToolBar::OnReset", "AFXTOOLBAR/CMFCToolBar::OnSetAccData", "AFXTOOLBAR/CMFCToolBar::OnSetDefaultButtonText", "AFXTOOLBAR/CMFCToolBar::RemoveAllButtons", "AFXTOOLBAR/CMFCToolBar::RemoveButton", "AFXTOOLBAR/CMFCToolBar::RemoveStateFromRegistry", "AFXTOOLBAR/CMFCToolBar::ReplaceButton", "AFXTOOLBAR/CMFCToolBar::ResetAll", "AFXTOOLBAR/CMFCToolBar::ResetAllImages", "AFXTOOLBAR/CMFCToolBar::RestoreOriginalState", "AFXTOOLBAR/CMFCToolBar::SaveState", "AFXTOOLBAR/CMFCToolBar::SetBasicCommands", "AFXTOOLBAR/CMFCToolBar::SetButtonInfo", "AFXTOOLBAR/CMFCToolBar::SetButtonStyle", "AFXTOOLBAR/CMFCToolBar::SetButtonText", "AFXTOOLBAR/CMFCToolBar::SetButtons", "AFXTOOLBAR/CMFCToolBar::SetCommandUsageOptions", "AFXTOOLBAR/CMFCToolBar::SetCustomizeMode", "AFXTOOLBAR/CMFCToolBar::SetGrayDisabledButtons", "AFXTOOLBAR/CMFCToolBar::SetHeight", "AFXTOOLBAR/CMFCToolBar::SetHotBorder", "AFXTOOLBAR/CMFCToolBar::SetHotTextColor", "AFXTOOLBAR/CMFCToolBar::SetLargeIcons", "AFXTOOLBAR/CMFCToolBar::SetLockedSizes", "AFXTOOLBAR/CMFCToolBar::SetMenuSizes", "AFXTOOLBAR/CMFCToolBar::SetNonPermittedCommands", "AFXTOOLBAR/CMFCToolBar::SetOneRowWithSibling", "AFXTOOLBAR/CMFCToolBar::SetPermament", "AFXTOOLBAR/CMFCToolBar::SetRouteCommandsViaFrame", "AFXTOOLBAR/CMFCToolBar::SetShowTooltips", "AFXTOOLBAR/CMFCToolBar::SetSiblingToolBar", "AFXTOOLBAR/CMFCToolBar::SetSizes", "AFXTOOLBAR/CMFCToolBar::SetToolBarBtnText", "AFXTOOLBAR/CMFCToolBar::SetTwoRowsWithSibling", "AFXTOOLBAR/CMFCToolBar::SetUserImages", "AFXTOOLBAR/CMFCToolBar::StretchPane", "AFXTOOLBAR/CMFCToolBar::TranslateChar", "AFXTOOLBAR/CMFCToolBar::UpdateButton", "AFXTOOLBAR/CMFCToolBar::WrapToolBar", "AFXTOOLBAR/CMFCToolBar::AllowShowOnList", "AFXTOOLBAR/CMFCToolBar::CalcMaxButtonHeight", "AFXTOOLBAR/CMFCToolBar::DoPaint", "AFXTOOLBAR/CMFCToolBar::DrawButton", "AFXTOOLBAR/CMFCToolBar::DrawSeparator", "AFXTOOLBAR/CMFCToolBar::OnUserToolTip", "AFXTOOLBAR/CMFCToolBar::m_bDontScaleImages", "AFXTOOLBAR/CMFCToolBar::m_dblLargeImageRatio"] helpviewer_keywords: ["CMFCToolBar [MFC], AddBasicCommand", "CMFCToolBar [MFC], AddCommandUsage", "CMFCToolBar [MFC], AddToolBarForImageCollection", "CMFCToolBar [MFC], AdjustLayout", "CMFCToolBar [MFC], AdjustSize", "CMFCToolBar [MFC], AllowChangeTextLabels", "CMFCToolBar [MFC], AreTextLabels", "CMFCToolBar [MFC], AutoGrayInactiveImages", "CMFCToolBar [MFC], ButtonToIndex", "CMFCToolBar [MFC], CalcFixedLayout", "CMFCToolBar [MFC], CalcSize", "CMFCToolBar [MFC], CanHandleSiblings", "CMFCToolBar [MFC], CleanUpImages", "CMFCToolBar [MFC], CleanUpLockedImages", "CMFCToolBar [MFC], CanBeClosed", "CMFCToolBar [MFC], CanBeRestored", "CMFCToolBar [MFC], CanFocus", "CMFCToolBar [MFC], CanHandleSiblings", "CMFCToolBar [MFC], CommandToIndex", "CMFCToolBar [MFC], Create", "CMFCToolBar [MFC], CreateEx", "CMFCToolBar [MFC], Deactivate", "CMFCToolBar [MFC], EnableCustomizeButton", "CMFCToolBar [MFC], EnableDocking", "CMFCToolBar [MFC], EnableLargeIcons", "CMFCToolBar [MFC], EnableQuickCustomization", "CMFCToolBar [MFC], EnableReflections", "CMFCToolBar [MFC], EnableTextLabels", "CMFCToolBar [MFC], FromHandlePermanent", "CMFCToolBar [MFC], GetAllButtons", "CMFCToolBar [MFC], GetAllToolbars", "CMFCToolBar [MFC], GetBasicCommands", "CMFCToolBar [MFC], GetButton", "CMFCToolBar [MFC], GetButtonInfo", "CMFCToolBar [MFC], GetButtonSize", "CMFCToolBar [MFC], GetButtonStyle", "CMFCToolBar [MFC], GetButtonText", "CMFCToolBar [MFC], GetColdImages", "CMFCToolBar [MFC], GetColumnWidth", "CMFCToolBar [MFC], GetCommandButtons", "CMFCToolBar [MFC], GetCount", "CMFCToolBar [MFC], GetCustomizeButton", "CMFCToolBar [MFC], GetDefaultImage", "CMFCToolBar [MFC], GetDisabledImages", "CMFCToolBar [MFC], GetDisabledMenuImages", "CMFCToolBar [MFC], GetDroppedDownMenu", "CMFCToolBar [MFC], GetGrayDisabledButtons", "CMFCToolBar [MFC], GetHighlightedButton", "CMFCToolBar [MFC], GetHotBorder", "CMFCToolBar [MFC], GetHotTextColor", "CMFCToolBar [MFC], GetHwndLastFocus", "CMFCToolBar [MFC], GetIgnoreSetText", "CMFCToolBar [MFC], GetImageSize", "CMFCToolBar [MFC], GetImages", "CMFCToolBar [MFC], GetImagesOffset", "CMFCToolBar [MFC], GetInvalidateItemRect", "CMFCToolBar [MFC], GetItemID", "CMFCToolBar [MFC], GetItemRect", "CMFCToolBar [MFC], GetLargeColdImages", "CMFCToolBar [MFC], GetLargeDisabledImages", "CMFCToolBar [MFC], GetLargeImages", "CMFCToolBar [MFC], GetLockedColdImages", "CMFCToolBar [MFC], GetLockedDisabledImages", "CMFCToolBar [MFC], GetLockedImages", "CMFCToolBar [MFC], GetLockedImageSize", "CMFCToolBar [MFC], GetLockedMenuImages", "CMFCToolBar [MFC], GetMenuButtonSize", "CMFCToolBar [MFC], GetMenuImageSize", "CMFCToolBar [MFC], GetMenuImages", "CMFCToolBar [MFC], GetOrigButtons", "CMFCToolBar [MFC], GetOrigResetButtons", "CMFCToolBar [MFC], GetResourceID", "CMFCToolBar [MFC], GetRouteCommandsViaFrame", "CMFCToolBar [MFC], GetRowHeight", "CMFCToolBar [MFC], GetShowTooltips", "CMFCToolBar [MFC], GetSiblingToolBar", "CMFCToolBar [MFC], GetUserImages", "CMFCToolBar [MFC], HitTest", "CMFCToolBar [MFC], InsertButton", "CMFCToolBar [MFC], InsertSeparator", "CMFCToolBar [MFC], InvalidateButton", "CMFCToolBar [MFC], IsAddRemoveQuickCustomize", "CMFCToolBar [MFC], IsAltCustomizeMode", "CMFCToolBar [MFC], IsAutoGrayInactiveImages", "CMFCToolBar [MFC], IsBasicCommand", "CMFCToolBar [MFC], IsButtonExtraSizeAvailable", "CMFCToolBar [MFC], IsButtonHighlighted", "CMFCToolBar [MFC], IsCommandPermitted", "CMFCToolBar [MFC], IsCommandRarelyUsed", "CMFCToolBar [MFC], IsCustomizeMode", "CMFCToolBar [MFC], IsDragButton", "CMFCToolBar [MFC], IsExistCustomizeButton", "CMFCToolBar [MFC], IsFloating", "CMFCToolBar [MFC], IsLargeIcons", "CMFCToolBar [MFC], IsLastCommandFromButton", "CMFCToolBar [MFC], IsLocked", "CMFCToolBar [MFC], IsOneRowWithSibling", "CMFCToolBar [MFC], IsUserDefined", "CMFCToolBar [MFC], LoadBitmap", "CMFCToolBar [MFC], LoadBitmapEx", "CMFCToolBar [MFC], LoadParameters", "CMFCToolBar [MFC], LoadState", "CMFCToolBar [MFC], LoadToolBar", "CMFCToolBar [MFC], LoadToolBarEx", "CMFCToolBar [MFC], OnChangeHot", "CMFCToolBar [MFC], OnFillBackground", "CMFCToolBar [MFC], OnReset", "CMFCToolBar [MFC], OnSetAccData", "CMFCToolBar [MFC], OnSetDefaultButtonText", "CMFCToolBar [MFC], RemoveAllButtons", "CMFCToolBar [MFC], RemoveButton", "CMFCToolBar [MFC], RemoveStateFromRegistry", "CMFCToolBar [MFC], ReplaceButton", "CMFCToolBar [MFC], ResetAll", "CMFCToolBar [MFC], ResetAllImages", "CMFCToolBar [MFC], RestoreOriginalState", "CMFCToolBar [MFC], SaveState", "CMFCToolBar [MFC], SetBasicCommands", "CMFCToolBar [MFC], SetButtonInfo", "CMFCToolBar [MFC], SetButtonStyle", "CMFCToolBar [MFC], SetButtonText", "CMFCToolBar [MFC], SetButtons", "CMFCToolBar [MFC], SetCommandUsageOptions", "CMFCToolBar [MFC], SetCustomizeMode", "CMFCToolBar [MFC], SetGrayDisabledButtons", "CMFCToolBar [MFC], SetHeight", "CMFCToolBar [MFC], SetHotBorder", "CMFCToolBar [MFC], SetHotTextColor", "CMFCToolBar [MFC], SetLargeIcons", "CMFCToolBar [MFC], SetLockedSizes", "CMFCToolBar [MFC], SetMenuSizes", "CMFCToolBar [MFC], SetNonPermittedCommands", "CMFCToolBar [MFC], SetOneRowWithSibling", "CMFCToolBar [MFC], SetPermament", "CMFCToolBar [MFC], SetRouteCommandsViaFrame", "CMFCToolBar [MFC], SetShowTooltips", "CMFCToolBar [MFC], SetSiblingToolBar", "CMFCToolBar [MFC], SetSizes", "CMFCToolBar [MFC], SetToolBarBtnText", "CMFCToolBar [MFC], SetTwoRowsWithSibling", "CMFCToolBar [MFC], SetUserImages", "CMFCToolBar [MFC], StretchPane", "CMFCToolBar [MFC], TranslateChar", "CMFCToolBar [MFC], UpdateButton", "CMFCToolBar [MFC], WrapToolBar", "CMFCToolBar [MFC], AllowShowOnList", "CMFCToolBar [MFC], CalcMaxButtonHeight", "CMFCToolBar [MFC], DoPaint", "CMFCToolBar [MFC], DrawButton", "CMFCToolBar [MFC], DrawSeparator", "CMFCToolBar [MFC], OnUserToolTip", "CMFCToolBar [MFC], m_bDontScaleImages", "CMFCToolBar [MFC], m_dblLargeImageRatio"] --- @@ -2303,7 +2303,7 @@ virtual BOOL LoadBitmapEx( ### Parameters [in] *`params`*\ -[in] *`bLocked`*\ +[in] *`bLocked`* ### Return Value @@ -2317,7 +2317,7 @@ static BOOL __stdcall LoadLargeIconsState(LPCTSTR lpszProfileName = NULL); ### Parameters -[in] *`lpszProfileName`*\ +[in] *`lpszProfileName`* ### Return Value @@ -2577,7 +2577,7 @@ virtual BOOL OnSetAccData(long lVal); ### Parameters -[in] *`lVal`*\ +[in] *`lVal`* ### Return Value @@ -2837,7 +2837,7 @@ static BOOL __stdcall SaveParameters(LPCTSTR lpszProfileName = NULL); ### Parameters -[in] *`lpszProfileName`*\ +[in] *`lpszProfileName`* ### Return Value @@ -3099,7 +3099,7 @@ static void __stdcall SetHelpMode(BOOL bOn = TRUE); ### Parameters -[in] *`bOn`*\ +[in] *`bOn`* ### Remarks @@ -3111,7 +3111,7 @@ BOOL SetHot(CMFCToolBarButton* pMenuButton); ### Parameters -[in] *`pMenuButton`*\ +[in] *`pMenuButton`* ### Return Value @@ -3161,7 +3161,7 @@ void SetIgnoreSetText(BOOL bValue); ### Parameters -[in] *`bValue`*\ +[in] *`bValue`* ### Remarks @@ -3222,7 +3222,7 @@ void SetMaskMode(BOOL bMasked); ### Parameters -[in] *`bMasked`*\ +[in] *`bMasked`* ### Remarks @@ -3295,7 +3295,7 @@ void SetOrigButtons(const CObList& lstOrigButtons); ### Parameters -[in] *`lstOrigButtons`*\ +[in] *`lstOrigButtons`* ### Remarks @@ -3472,7 +3472,7 @@ This method generates an assertion failure in Debug builds if the specified `CMF The OutlookDemo, ToolTipDemo, and VisualStudioDemo samples use this method to set the global collection of user-defined images. They load the file that is named UserImages.bmp, which is located in the working directory of the application. -Call the [`CMFCToolBar::GetUserImages](#getuserimages) method to retrieve the collection of user-defined images in the application. +Call the [`CMFCToolBar::GetUserImages`](#getuserimages) method to retrieve the collection of user-defined images in the application. ## `CMFCToolBar::StretchPane` diff --git a/docs/mfc/reference/cmfctooltipctrl-class.md b/docs/mfc/reference/cmfctooltipctrl-class.md index 5c4d7f2204..9f75f1de91 100644 --- a/docs/mfc/reference/cmfctooltipctrl-class.md +++ b/docs/mfc/reference/cmfctooltipctrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCToolTipCtrl Class" title: "CMFCToolTipCtrl Class" +description: "Learn more about: CMFCToolTipCtrl Class" ms.date: "11/04/2016" f1_keywords: ["CMFCToolTipCtrl", "AFXTOOLTIPCTRL/CMFCToolTipCtrl", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::GetIconSize", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::GetParams", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnDrawBorder", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnDrawDescription", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnDrawIcon", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnDrawLabel", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnDrawSeparator", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::OnFillBackground", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::SetDescription", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::SetFixedWidth", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::SetHotRibbonButton", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::SetLocation", "AFXTOOLTIPCTRL/CMFCToolTipCtrl::SetParams"] helpviewer_keywords: ["CMFCToolTipCtrl [MFC], GetIconSize", "CMFCToolTipCtrl [MFC], GetParams", "CMFCToolTipCtrl [MFC], OnDrawBorder", "CMFCToolTipCtrl [MFC], OnDrawDescription", "CMFCToolTipCtrl [MFC], OnDrawIcon", "CMFCToolTipCtrl [MFC], OnDrawLabel", "CMFCToolTipCtrl [MFC], OnDrawSeparator", "CMFCToolTipCtrl [MFC], OnFillBackground", "CMFCToolTipCtrl [MFC], SetDescription", "CMFCToolTipCtrl [MFC], SetFixedWidth", "CMFCToolTipCtrl [MFC], SetHotRibbonButton", "CMFCToolTipCtrl [MFC], SetLocation", "CMFCToolTipCtrl [MFC], SetParams"] -ms.assetid: 9fbfcfb1-a8ab-417f-ae29-9a9ca85ee58f --- # CMFCToolTipCtrl Class @@ -149,7 +148,7 @@ const CMFCToolTipInfo& GetParams() const; ### Return Value -The current tooltip display settings , which are stored in a [CMFCToolTipInfo Class](../../mfc/reference/cmfctooltipinfo-class.md) object. +The current tooltip display settings, which are stored in a [CMFCToolTipInfo Class](../../mfc/reference/cmfctooltipinfo-class.md) object. ## CMFCToolTipCtrl::OnDrawBorder @@ -391,9 +390,9 @@ Whenever the tooltip is displayed, it is drawn by using the colors and visual st ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
-[CToolTipCtrl Class](../../mfc/reference/ctooltipctrl-class.md)
-[CTooltipManager Class](../../mfc/reference/ctooltipmanager-class.md)
-[CMFCToolTipInfo Class](../../mfc/reference/cmfctooltipinfo-class.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ +[CToolTipCtrl Class](../../mfc/reference/ctooltipctrl-class.md)\ +[CTooltipManager Class](../../mfc/reference/ctooltipmanager-class.md)\ +[CMFCToolTipInfo Class](../../mfc/reference/cmfctooltipinfo-class.md)\ [CWinAppEx Class](../../mfc/reference/cwinappex-class.md) diff --git a/docs/mfc/reference/cmfcvisualmanageroffice2003-class.md b/docs/mfc/reference/cmfcvisualmanageroffice2003-class.md index a2ca2ffc89..b7e77059dc 100644 --- a/docs/mfc/reference/cmfcvisualmanageroffice2003-class.md +++ b/docs/mfc/reference/cmfcvisualmanageroffice2003-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMFCVisualManagerOffice2003 Class" title: "CMFCVisualManagerOffice2003 Class" -ms.date: "11/04/2016" +description: "Learn more about: CMFCVisualManagerOffice2003 Class" +ms.date: 11/04/2016 f1_keywords: ["CMFCVisualManagerOffice2003", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::DrawComboBorderWinXP", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::DrawComboDropButtonWinXP", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::DrawCustomizeButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::DrawPushButtonWinXP", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetBaseThemeColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetHighlightMenuItemColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetPropertyGridGroupColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetPropertyGridGroupTextColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetShowAllMenuItemsHeight", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetSmartDockingBaseGuideColors", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetSmartDockingHighlightToneColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetTabFrameColors", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetToolBarCustomizeButtonMargin", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetToolbarDisabledColor", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::GetToolTipInfo", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsDefaultWinXPColorsEnabled", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsDockingTabHasBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsHighlightOneNoteTabs", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsOffsetPressedButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsStatusBarOfficeXPLook", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsToolbarRoundShape", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsUseGlobalTheme", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::IsWindowsThemingSupported", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawAutoHideButtonBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawBarGripper", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawBrowseButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawButtonBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawCaptionBarBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawCheckBoxEx", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawComboBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawComboDropButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawControlBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawExpandingBox", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawHeaderCtrlBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawMenuBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawOutlookBarSplitter", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawOutlookPageButtonBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawPaneBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawPaneCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawPopupWindowBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawPopupWindowButtonBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawPopupWindowCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonButtonsGroup", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonCategoryCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonCategoryTab", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonProgressBar", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonQuickAccessToolBarSeparator", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonSliderChannel", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonSliderThumb", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonSliderZoomButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawRibbonStatusBarPane", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawScrollButtons", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawSeparator", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawShowAllMenuItems", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawStatusBarPaneBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawStatusBarProgress", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawStatusBarSizeBox", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTab", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTabsButtonBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTask", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTasksGroupAreaBorder", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTasksGroupCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnDrawTearOffCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnErasePopupWindowButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnEraseTabsArea", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnEraseTabsButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnEraseTabsFrame", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillAutoHideButtonBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillBarBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillButtonInterior", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillCommandsListBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillHeaderCtrlBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillHighlightedArea", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillOutlookBarCaption", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillOutlookPageButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillPopupWindowBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillTab", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillTasksGroupInterior", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnFillTasksPaneBackground", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnHighlightQuickCustomizeMenuButton", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnHighlightRarelyUsedMenuItems", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::OnUpdateSystemColors", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::SetDefaultWinXPColors", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::SetStatusBarOfficeXPLook", "AFXVISUALMANAGEROFFICE2003/CMFCVisualManagerOffice2003::SetUseGlobalTheme"] helpviewer_keywords: ["CMFCVisualManagerOffice2003 Class [MFC]"] -ms.assetid: 115482cd-e349-450a-8dc4-c6023d092aab --- # CMFCVisualManagerOffice2003 Class @@ -1265,7 +1264,7 @@ Override this method in a derived visual manager to customize the appearance of ## CMFCVisualManagerOffice2003::OnDrawRibbonProgressBar -The framework calls this method when it draws a [CMFCRibbonProgressBar Class](../../mfc/reference/cmfcribbonprogressbar-class.md)object. +The framework calls this method when it draws a [CMFCRibbonProgressBar Class](../../mfc/reference/cmfcribbonprogressbar-class.md) object. ``` virtual void OnDrawRibbonProgressBar( diff --git a/docs/mfc/reference/cmonthcalctrl-class.md b/docs/mfc/reference/cmonthcalctrl-class.md index 75cfdbbb96..8b9469c32a 100644 --- a/docs/mfc/reference/cmonthcalctrl-class.md +++ b/docs/mfc/reference/cmonthcalctrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMonthCalCtrl Class" title: "CMonthCalCtrl Class" -ms.date: "11/04/2016" +description: "Learn more about: CMonthCalCtrl Class" +ms.date: 11/04/2016 f1_keywords: ["CMonthCalCtrl", "AFXDTCTL/CMonthCalCtrl", "AFXDTCTL/CMonthCalCtrl::CMonthCalCtrl", "AFXDTCTL/CMonthCalCtrl::Create", "AFXDTCTL/CMonthCalCtrl::GetCalendarBorder", "AFXDTCTL/CMonthCalCtrl::GetCalendarCount", "AFXDTCTL/CMonthCalCtrl::GetCalendarGridInfo", "AFXDTCTL/CMonthCalCtrl::GetCalID", "AFXDTCTL/CMonthCalCtrl::GetColor", "AFXDTCTL/CMonthCalCtrl::GetCurrentView", "AFXDTCTL/CMonthCalCtrl::GetCurSel", "AFXDTCTL/CMonthCalCtrl::GetFirstDayOfWeek", "AFXDTCTL/CMonthCalCtrl::GetMaxSelCount", "AFXDTCTL/CMonthCalCtrl::GetMaxTodayWidth", "AFXDTCTL/CMonthCalCtrl::GetMinReqRect", "AFXDTCTL/CMonthCalCtrl::GetMonthDelta", "AFXDTCTL/CMonthCalCtrl::GetMonthRange", "AFXDTCTL/CMonthCalCtrl::GetRange", "AFXDTCTL/CMonthCalCtrl::GetSelRange", "AFXDTCTL/CMonthCalCtrl::GetToday", "AFXDTCTL/CMonthCalCtrl::HitTest", "AFXDTCTL/CMonthCalCtrl::IsCenturyView", "AFXDTCTL/CMonthCalCtrl::IsDecadeView", "AFXDTCTL/CMonthCalCtrl::IsMonthView", "AFXDTCTL/CMonthCalCtrl::IsYearView", "AFXDTCTL/CMonthCalCtrl::SetCalendarBorder", "AFXDTCTL/CMonthCalCtrl::SetCalendarBorderDefault", "AFXDTCTL/CMonthCalCtrl::SetCalID", "AFXDTCTL/CMonthCalCtrl::SetCenturyView", "AFXDTCTL/CMonthCalCtrl::SetColor", "AFXDTCTL/CMonthCalCtrl::SetCurrentView", "AFXDTCTL/CMonthCalCtrl::SetCurSel", "AFXDTCTL/CMonthCalCtrl::SetDayState", "AFXDTCTL/CMonthCalCtrl::SetDecadeView", "AFXDTCTL/CMonthCalCtrl::SetFirstDayOfWeek", "AFXDTCTL/CMonthCalCtrl::SetMaxSelCount", "AFXDTCTL/CMonthCalCtrl::SetMonthDelta", "AFXDTCTL/CMonthCalCtrl::SetMonthView", "AFXDTCTL/CMonthCalCtrl::SetRange", "AFXDTCTL/CMonthCalCtrl::SetSelRange", "AFXDTCTL/CMonthCalCtrl::SetToday", "AFXDTCTL/CMonthCalCtrl::SetYearView", "AFXDTCTL/CMonthCalCtrl::SizeMinReq", "AFXDTCTL/CMonthCalCtrl::SizeRectToMin"] helpviewer_keywords: ["CMonthCalCtrl [MFC], CMonthCalCtrl", "CMonthCalCtrl [MFC], Create", "CMonthCalCtrl [MFC], GetCalendarBorder", "CMonthCalCtrl [MFC], GetCalendarCount", "CMonthCalCtrl [MFC], GetCalendarGridInfo", "CMonthCalCtrl [MFC], GetCalID", "CMonthCalCtrl [MFC], GetColor", "CMonthCalCtrl [MFC], GetCurrentView", "CMonthCalCtrl [MFC], GetCurSel", "CMonthCalCtrl [MFC], GetFirstDayOfWeek", "CMonthCalCtrl [MFC], GetMaxSelCount", "CMonthCalCtrl [MFC], GetMaxTodayWidth", "CMonthCalCtrl [MFC], GetMinReqRect", "CMonthCalCtrl [MFC], GetMonthDelta", "CMonthCalCtrl [MFC], GetMonthRange", "CMonthCalCtrl [MFC], GetRange", "CMonthCalCtrl [MFC], GetSelRange", "CMonthCalCtrl [MFC], GetToday", "CMonthCalCtrl [MFC], HitTest", "CMonthCalCtrl [MFC], IsCenturyView", "CMonthCalCtrl [MFC], IsDecadeView", "CMonthCalCtrl [MFC], IsMonthView", "CMonthCalCtrl [MFC], IsYearView", "CMonthCalCtrl [MFC], SetCalendarBorder", "CMonthCalCtrl [MFC], SetCalendarBorderDefault", "CMonthCalCtrl [MFC], SetCalID", "CMonthCalCtrl [MFC], SetCenturyView", "CMonthCalCtrl [MFC], SetColor", "CMonthCalCtrl [MFC], SetCurrentView", "CMonthCalCtrl [MFC], SetCurSel", "CMonthCalCtrl [MFC], SetDayState", "CMonthCalCtrl [MFC], SetDecadeView", "CMonthCalCtrl [MFC], SetFirstDayOfWeek", "CMonthCalCtrl [MFC], SetMaxSelCount", "CMonthCalCtrl [MFC], SetMonthDelta", "CMonthCalCtrl [MFC], SetMonthView", "CMonthCalCtrl [MFC], SetRange", "CMonthCalCtrl [MFC], SetSelRange", "CMonthCalCtrl [MFC], SetToday", "CMonthCalCtrl [MFC], SetYearView", "CMonthCalCtrl [MFC], SizeMinReq", "CMonthCalCtrl [MFC], SizeRectToMin"] -ms.assetid: a42f6bd6-ab5c-4335-82f8-839982fc64a2 --- # CMonthCalCtrl Class @@ -320,7 +319,7 @@ A pointer to a [SYSTEMTIME](/windows/win32/api/minwinbase/ns-minwinbase-systemti ### Return Value -Nonzero if successful; otherwize 0. +Nonzero if successful; otherwise 0. ### Remarks diff --git a/docs/mfc/reference/cmousemanager-class.md b/docs/mfc/reference/cmousemanager-class.md index 10ca342ab2..92e14a9af3 100644 --- a/docs/mfc/reference/cmousemanager-class.md +++ b/docs/mfc/reference/cmousemanager-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CMouseManager Class" title: "CMouseManager Class" +description: "Learn more about: CMouseManager Class" ms.date: "11/04/2016" f1_keywords: ["CMouseManager", "AFXMOUSEMANAGER/CMouseManager", "AFXMOUSEMANAGER/CMouseManager::AddView", "AFXMOUSEMANAGER/CMouseManager::GetViewDblClickCommand", "AFXMOUSEMANAGER/CMouseManager::GetViewIconId", "AFXMOUSEMANAGER/CMouseManager::GetViewIdByName", "AFXMOUSEMANAGER/CMouseManager::GetViewNames", "AFXMOUSEMANAGER/CMouseManager::LoadState", "AFXMOUSEMANAGER/CMouseManager::SaveState", "AFXMOUSEMANAGER/CMouseManager::SetCommandForDblClk"] helpviewer_keywords: ["CMouseManager [MFC], AddView", "CMouseManager [MFC], GetViewDblClickCommand", "CMouseManager [MFC], GetViewIconId", "CMouseManager [MFC], GetViewIdByName", "CMouseManager [MFC], GetViewNames", "CMouseManager [MFC], LoadState", "CMouseManager [MFC], SaveState", "CMouseManager [MFC], SetCommandForDblClk"] -ms.assetid: a4d05017-4e44-4a40-8b57-4ece0de20481 --- # CMouseManager Class @@ -33,7 +32,7 @@ class CMouseManager : public CObject ## Remarks -The `CMouseManager` class maintains a collection of `CView` objects. Each view is identified by a name and by an ID. These views are shown in the **Customization** dialog box. The user can change the command that is associated with any view through the **Customization** dialog box. The associated command is executed when the user double-clicks in that view. To support this from a coding perspective, you must process the WM_LBUTTONDBLCLK message and call the [CWinAppEx::OnViewDoubleClick](../../mfc/reference/cwinappex-class.md#onviewdoubleclick) function in the code for that `CView` object.. +The `CMouseManager` class maintains a collection of `CView` objects. Each view is identified by a name and by an ID. These views are shown in the **Customization** dialog box. The user can change the command that is associated with any view through the **Customization** dialog box. The associated command is executed when the user double-clicks in that view. To support this from a coding perspective, you must process the WM_LBUTTONDBLCLK message and call the [CWinAppEx::OnViewDoubleClick](../../mfc/reference/cwinappex-class.md#onviewdoubleclick) function in the code for that `CView` object. You should not create a `CMouseManager` object manually. It will be created by the framework of your application. It will also be destroyed automatically when the user exits the application. To get a pointer to the mouse manager for your application, call [CWinAppEx::GetMouseManager](../../mfc/reference/cwinappex-class.md#getmousemanager). @@ -246,7 +245,7 @@ If *uiCmd* is set to 0, the specified view is no longer associated with a comman ## See also -[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[Classes](../../mfc/reference/mfc-classes.md)
-[CWinAppEx Class](../../mfc/reference/cwinappex-class.md)
+[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[Classes](../../mfc/reference/mfc-classes.md)\ +[CWinAppEx Class](../../mfc/reference/cwinappex-class.md)\ [Keyboard and Mouse Customization](../../mfc/keyboard-and-mouse-customization.md) diff --git a/docs/mfc/reference/codesnippet/CPP/cbutton-class_10.h b/docs/mfc/reference/codesnippet/CPP/cbutton-class_10.h index e34c0f5e23..c428acdc93 100644 --- a/docs/mfc/reference/codesnippet/CPP/cbutton-class_10.h +++ b/docs/mfc/reference/codesnippet/CPP/cbutton-class_10.h @@ -1,5 +1,5 @@ public: -// Variable to access programatically defined command link control. +// Variable to access programmatically defined command link control. CButton m_cmdLink; -// Variable to access programatically defined split button control. +// Variable to access programmatically defined split button control. CButton m_splitButton; \ No newline at end of file diff --git a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_2.cpp b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_2.cpp index b6138fdf94..170c9fff5e 100644 --- a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_2.cpp +++ b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_2.cpp @@ -1,5 +1,5 @@ CMFCToolBarsCustomizeDialog *pDlgCust = new CMFCToolBarsCustomizeDialog(this, - TRUE /* Automatic menus scaning */); + TRUE /* Automatic menus scanning */); CSliderButton btnSlider(ID_SLIDER); btnSlider.SetRange(0, 100); diff --git a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_3.cpp b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_3.cpp index bed3f47541..88446128e8 100644 --- a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_3.cpp +++ b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_3.cpp @@ -1,5 +1,5 @@ CMFCToolBarsCustomizeDialog *pDlgCust = new CMFCToolBarsCustomizeDialog(this, - TRUE /* Automatic menus scaning */, + TRUE /* Automatic menus scanning */, AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS | AFX_CUSTOMIZE_MENU_ANIMATIONS); diff --git a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_4.cpp b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_4.cpp index 78fa084d09..e01076e8ae 100644 --- a/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_4.cpp +++ b/docs/mfc/reference/codesnippet/CPP/cmfctoolbarscustomizedialog-class_4.cpp @@ -1,5 +1,5 @@ CMFCToolBarsCustomizeDialog *pDlgCust = new CMFCToolBarsCustomizeDialog(this, - TRUE /* Automatic menus scaning */, + TRUE /* Automatic menus scanning */, AFX_CUSTOMIZE_MENU_SHADOWS | AFX_CUSTOMIZE_TEXT_LABELS | AFX_CUSTOMIZE_MENU_ANIMATIONS, // default parameters &lstCustomPages); // pointer to the list of runtime classes of the custom property pages \ No newline at end of file diff --git a/docs/mfc/reference/codesnippet/CPP/cpagerctrl-class_5.cpp b/docs/mfc/reference/codesnippet/CPP/cpagerctrl-class_5.cpp index 8d26f62201..faf40bf858 100644 --- a/docs/mfc/reference/codesnippet/CPP/cpagerctrl-class_5.cpp +++ b/docs/mfc/reference/codesnippet/CPP/cpagerctrl-class_5.cpp @@ -1,4 +1,3 @@ - void CCSplitButton_s2Dlg::OnXIsbuttoninvisible() { BOOL bLeft = m_pager.IsButtonInvisible(PGB_TOPORLEFT); diff --git a/docs/mfc/reference/coleclientitem-class.md b/docs/mfc/reference/coleclientitem-class.md index 6bbc2c72fc..356cf6cdba 100644 --- a/docs/mfc/reference/coleclientitem-class.md +++ b/docs/mfc/reference/coleclientitem-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleClientItem Class" title: "COleClientItem Class" -ms.date: "07/02/2019" +description: "Learn more about: COleClientItem Class" +ms.date: 07/02/2019 f1_keywords: ["COleClientItem", "AFXOLE/COleClientItem", "AFXOLE/COleClientItem::COleClientItem", "AFXOLE/COleClientItem::Activate", "AFXOLE/COleClientItem::ActivateAs", "AFXOLE/COleClientItem::AttachDataObject", "AFXOLE/COleClientItem::CanCreateFromData", "AFXOLE/COleClientItem::CanCreateLinkFromData", "AFXOLE/COleClientItem::CanPaste", "AFXOLE/COleClientItem::CanPasteLink", "AFXOLE/COleClientItem::Close", "AFXOLE/COleClientItem::ConvertTo", "AFXOLE/COleClientItem::CopyToClipboard", "AFXOLE/COleClientItem::CreateCloneFrom", "AFXOLE/COleClientItem::CreateFromClipboard", "AFXOLE/COleClientItem::CreateFromData", "AFXOLE/COleClientItem::CreateFromFile", "AFXOLE/COleClientItem::CreateLinkFromClipboard", "AFXOLE/COleClientItem::CreateLinkFromData", "AFXOLE/COleClientItem::CreateLinkFromFile", "AFXOLE/COleClientItem::CreateNewItem", "AFXOLE/COleClientItem::CreateStaticFromClipboard", "AFXOLE/COleClientItem::CreateStaticFromData", "AFXOLE/COleClientItem::Deactivate", "AFXOLE/COleClientItem::DeactivateUI", "AFXOLE/COleClientItem::Delete", "AFXOLE/COleClientItem::DoDragDrop", "AFXOLE/COleClientItem::DoVerb", "AFXOLE/COleClientItem::Draw", "AFXOLE/COleClientItem::GetActiveView", "AFXOLE/COleClientItem::GetCachedExtent", "AFXOLE/COleClientItem::GetClassID", "AFXOLE/COleClientItem::GetClipboardData", "AFXOLE/COleClientItem::GetDocument", "AFXOLE/COleClientItem::GetDrawAspect", "AFXOLE/COleClientItem::GetExtent", "AFXOLE/COleClientItem::GetIconFromRegistry", "AFXOLE/COleClientItem::GetIconicMetafile", "AFXOLE/COleClientItem::GetInPlaceWindow", "AFXOLE/COleClientItem::GetItemState", "AFXOLE/COleClientItem::GetLastStatus", "AFXOLE/COleClientItem::GetLinkUpdateOptions", "AFXOLE/COleClientItem::GetType", "AFXOLE/COleClientItem::GetUserType", "AFXOLE/COleClientItem::IsInPlaceActive", "AFXOLE/COleClientItem::IsLinkUpToDate", "AFXOLE/COleClientItem::IsModified", "AFXOLE/COleClientItem::IsOpen", "AFXOLE/COleClientItem::IsRunning", "AFXOLE/COleClientItem::OnActivate", "AFXOLE/COleClientItem::OnActivateUI", "AFXOLE/COleClientItem::OnChange", "AFXOLE/COleClientItem::OnDeactivate", "AFXOLE/COleClientItem::OnDeactivateUI", "AFXOLE/COleClientItem::OnGetClipboardData", "AFXOLE/COleClientItem::OnInsertMenus", "AFXOLE/COleClientItem::OnRemoveMenus", "AFXOLE/COleClientItem::OnSetMenu", "AFXOLE/COleClientItem::OnShowControlBars", "AFXOLE/COleClientItem::OnUpdateFrameTitle", "AFXOLE/COleClientItem::ReactivateAndUndo", "AFXOLE/COleClientItem::Release", "AFXOLE/COleClientItem::Reload", "AFXOLE/COleClientItem::Run", "AFXOLE/COleClientItem::SetDrawAspect", "AFXOLE/COleClientItem::SetExtent", "AFXOLE/COleClientItem::SetHostNames", "AFXOLE/COleClientItem::SetIconicMetafile", "AFXOLE/COleClientItem::SetItemRects", "AFXOLE/COleClientItem::SetLinkUpdateOptions", "AFXOLE/COleClientItem::SetPrintDevice", "AFXOLE/COleClientItem::UpdateLink", "AFXOLE/COleClientItem::CanActivate", "AFXOLE/COleClientItem::OnChangeItemPosition", "AFXOLE/COleClientItem::OnDeactivateAndUndo", "AFXOLE/COleClientItem::OnDiscardUndoState", "AFXOLE/COleClientItem::OnGetClipRect", "AFXOLE/COleClientItem::OnGetItemPosition", "AFXOLE/COleClientItem::OnGetWindowContext", "AFXOLE/COleClientItem::OnScrollBy", "AFXOLE/COleClientItem::OnShowItem"] helpviewer_keywords: ["COleClientItem [MFC], COleClientItem", "COleClientItem [MFC], Activate", "COleClientItem [MFC], ActivateAs", "COleClientItem [MFC], AttachDataObject", "COleClientItem [MFC], CanCreateFromData", "COleClientItem [MFC], CanCreateLinkFromData", "COleClientItem [MFC], CanPaste", "COleClientItem [MFC], CanPasteLink", "COleClientItem [MFC], Close", "COleClientItem [MFC], ConvertTo", "COleClientItem [MFC], CopyToClipboard", "COleClientItem [MFC], CreateCloneFrom", "COleClientItem [MFC], CreateFromClipboard", "COleClientItem [MFC], CreateFromData", "COleClientItem [MFC], CreateFromFile", "COleClientItem [MFC], CreateLinkFromClipboard", "COleClientItem [MFC], CreateLinkFromData", "COleClientItem [MFC], CreateLinkFromFile", "COleClientItem [MFC], CreateNewItem", "COleClientItem [MFC], CreateStaticFromClipboard", "COleClientItem [MFC], CreateStaticFromData", "COleClientItem [MFC], Deactivate", "COleClientItem [MFC], DeactivateUI", "COleClientItem [MFC], Delete", "COleClientItem [MFC], DoDragDrop", "COleClientItem [MFC], DoVerb", "COleClientItem [MFC], Draw", "COleClientItem [MFC], GetActiveView", "COleClientItem [MFC], GetCachedExtent", "COleClientItem [MFC], GetClassID", "COleClientItem [MFC], GetClipboardData", "COleClientItem [MFC], GetDocument", "COleClientItem [MFC], GetDrawAspect", "COleClientItem [MFC], GetExtent", "COleClientItem [MFC], GetIconFromRegistry", "COleClientItem [MFC], GetIconicMetafile", "COleClientItem [MFC], GetInPlaceWindow", "COleClientItem [MFC], GetItemState", "COleClientItem [MFC], GetLastStatus", "COleClientItem [MFC], GetLinkUpdateOptions", "COleClientItem [MFC], GetType", "COleClientItem [MFC], GetUserType", "COleClientItem [MFC], IsInPlaceActive", "COleClientItem [MFC], IsLinkUpToDate", "COleClientItem [MFC], IsModified", "COleClientItem [MFC], IsOpen", "COleClientItem [MFC], IsRunning", "COleClientItem [MFC], OnActivate", "COleClientItem [MFC], OnActivateUI", "COleClientItem [MFC], OnChange", "COleClientItem [MFC], OnDeactivate", "COleClientItem [MFC], OnDeactivateUI", "COleClientItem [MFC], OnGetClipboardData", "COleClientItem [MFC], OnInsertMenus", "COleClientItem [MFC], OnRemoveMenus", "COleClientItem [MFC], OnSetMenu", "COleClientItem [MFC], OnShowControlBars", "COleClientItem [MFC], OnUpdateFrameTitle", "COleClientItem [MFC], ReactivateAndUndo", "COleClientItem [MFC], Release", "COleClientItem [MFC], Reload", "COleClientItem [MFC], Run", "COleClientItem [MFC], SetDrawAspect", "COleClientItem [MFC], SetExtent", "COleClientItem [MFC], SetHostNames", "COleClientItem [MFC], SetIconicMetafile", "COleClientItem [MFC], SetItemRects", "COleClientItem [MFC], SetLinkUpdateOptions", "COleClientItem [MFC], SetPrintDevice", "COleClientItem [MFC], UpdateLink", "COleClientItem [MFC], CanActivate", "COleClientItem [MFC], OnChangeItemPosition", "COleClientItem [MFC], OnDeactivateAndUndo", "COleClientItem [MFC], OnDiscardUndoState", "COleClientItem [MFC], OnGetClipRect", "COleClientItem [MFC], OnGetItemPosition", "COleClientItem [MFC], OnGetWindowContext", "COleClientItem [MFC], OnScrollBy", "COleClientItem [MFC], OnShowItem"] -ms.assetid: 7f571b7c-2758-4839-847a-0cf1ef643128 --- # COleClientItem Class @@ -1434,7 +1433,7 @@ Override this function to apply special rules to the resize/move operation. If t ## COleClientItem::OnDeactivate -Called by the framework when the OLE item transitions from the in-place active state ( `activeState`) to the loaded state, meaning that it is deactivated after an in-place activation. +Called by the framework when the OLE item transitions from the in-place active state (`activeState`) to the loaded state, meaning that it is deactivated after an in-place activation. ``` virtual void OnDeactivate(); diff --git a/docs/mfc/reference/colecontrolsite-class.md b/docs/mfc/reference/colecontrolsite-class.md index 8b58ebd584..1e7c3602a6 100644 --- a/docs/mfc/reference/colecontrolsite-class.md +++ b/docs/mfc/reference/colecontrolsite-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleControlSite Class" title: "COleControlSite Class" -ms.date: "11/04/2016" +description: "Learn more about: COleControlSite Class" +ms.date: 11/04/2016 f1_keywords: ["COleControlSite", "AFXOCC/COleControlSite", "AFXOCC/COleControlSite::COleControlSite", "AFXOCC/COleControlSite::BindDefaultProperty", "AFXOCC/COleControlSite::BindProperty", "AFXOCC/COleControlSite::CreateControl", "AFXOCC/COleControlSite::DestroyControl", "AFXOCC/COleControlSite::DoVerb", "AFXOCC/COleControlSite::EnableDSC", "AFXOCC/COleControlSite::EnableWindow", "AFXOCC/COleControlSite::FreezeEvents", "AFXOCC/COleControlSite::GetDefBtnCode", "AFXOCC/COleControlSite::GetDlgCtrlID", "AFXOCC/COleControlSite::GetEventIID", "AFXOCC/COleControlSite::GetExStyle", "AFXOCC/COleControlSite::GetProperty", "AFXOCC/COleControlSite::GetStyle", "AFXOCC/COleControlSite::GetWindowText", "AFXOCC/COleControlSite::InvokeHelper", "AFXOCC/COleControlSite::InvokeHelperV", "AFXOCC/COleControlSite::IsDefaultButton", "AFXOCC/COleControlSite::IsWindowEnabled", "AFXOCC/COleControlSite::ModifyStyle", "AFXOCC/COleControlSite::ModifyStyleEx", "AFXOCC/COleControlSite::MoveWindow", "AFXOCC/COleControlSite::QuickActivate", "AFXOCC/COleControlSite::SafeSetProperty", "AFXOCC/COleControlSite::SetDefaultButton", "AFXOCC/COleControlSite::SetDlgCtrlID", "AFXOCC/COleControlSite::SetFocus", "AFXOCC/COleControlSite::SetProperty", "AFXOCC/COleControlSite::SetPropertyV", "AFXOCC/COleControlSite::SetWindowPos", "AFXOCC/COleControlSite::SetWindowText", "AFXOCC/COleControlSite::ShowWindow", "AFXOCC/COleControlSite::GetControlInfo", "AFXOCC/COleControlSite::m_bIsWindowless", "AFXOCC/COleControlSite::m_ctlInfo", "AFXOCC/COleControlSite::m_dwEventSink", "AFXOCC/COleControlSite::m_dwMiscStatus", "AFXOCC/COleControlSite::m_dwPropNotifySink", "AFXOCC/COleControlSite::m_dwStyle", "AFXOCC/COleControlSite::m_hWnd", "AFXOCC/COleControlSite::m_iidEvents", "AFXOCC/COleControlSite::m_nID", "AFXOCC/COleControlSite::m_pActiveObject", "AFXOCC/COleControlSite::m_pCtrlCont", "AFXOCC/COleControlSite::m_pInPlaceObject", "AFXOCC/COleControlSite::m_pObject", "AFXOCC/COleControlSite::m_pWindowlessObject", "AFXOCC/COleControlSite::m_pWndCtrl", "AFXOCC/COleControlSite::m_rect"] helpviewer_keywords: ["COleControlSite [MFC], COleControlSite", "COleControlSite [MFC], BindDefaultProperty", "COleControlSite [MFC], BindProperty", "COleControlSite [MFC], CreateControl", "COleControlSite [MFC], DestroyControl", "COleControlSite [MFC], DoVerb", "COleControlSite [MFC], EnableDSC", "COleControlSite [MFC], EnableWindow", "COleControlSite [MFC], FreezeEvents", "COleControlSite [MFC], GetDefBtnCode", "COleControlSite [MFC], GetDlgCtrlID", "COleControlSite [MFC], GetEventIID", "COleControlSite [MFC], GetExStyle", "COleControlSite [MFC], GetProperty", "COleControlSite [MFC], GetStyle", "COleControlSite [MFC], GetWindowText", "COleControlSite [MFC], InvokeHelper", "COleControlSite [MFC], InvokeHelperV", "COleControlSite [MFC], IsDefaultButton", "COleControlSite [MFC], IsWindowEnabled", "COleControlSite [MFC], ModifyStyle", "COleControlSite [MFC], ModifyStyleEx", "COleControlSite [MFC], MoveWindow", "COleControlSite [MFC], QuickActivate", "COleControlSite [MFC], SafeSetProperty", "COleControlSite [MFC], SetDefaultButton", "COleControlSite [MFC], SetDlgCtrlID", "COleControlSite [MFC], SetFocus", "COleControlSite [MFC], SetProperty", "COleControlSite [MFC], SetPropertyV", "COleControlSite [MFC], SetWindowPos", "COleControlSite [MFC], SetWindowText", "COleControlSite [MFC], ShowWindow", "COleControlSite [MFC], GetControlInfo", "COleControlSite [MFC], m_bIsWindowless", "COleControlSite [MFC], m_ctlInfo", "COleControlSite [MFC], m_dwEventSink", "COleControlSite [MFC], m_dwMiscStatus", "COleControlSite [MFC], m_dwPropNotifySink", "COleControlSite [MFC], m_dwStyle", "COleControlSite [MFC], m_hWnd", "COleControlSite [MFC], m_iidEvents", "COleControlSite [MFC], m_nID", "COleControlSite [MFC], m_pActiveObject", "COleControlSite [MFC], m_pCtrlCont", "COleControlSite [MFC], m_pInPlaceObject", "COleControlSite [MFC], m_pObject", "COleControlSite [MFC], m_pWindowlessObject", "COleControlSite [MFC], m_pWndCtrl", "COleControlSite [MFC], m_rect"] -ms.assetid: 43970644-5eab-434a-8ba6-56d144ff1e3f --- # COleControlSite Class @@ -646,7 +645,7 @@ DWORD m_dwMiscStatus; ### Remarks -For more information, see [OLEMISC](/windows/win32/api/oleidl/ne-oleidl-olemisc)in the Windows SDK. +For more information, see [OLEMISC](/windows/win32/api/oleidl/ne-oleidl-olemisc) in the Windows SDK. ## COleControlSite::m_dwPropNotifySink @@ -722,7 +721,7 @@ LPOLEOBJECT m_pObject; ## COleControlSite::m_pWindowlessObject -Contains the `IOleInPlaceObjectWindowless`[IOleInPlaceObjectWindowless](/windows/win32/api/ocidl/nn-ocidl-ioleinplaceobjectwindowless) interface of the control. +Contains the [`IOleInPlaceObjectWindowless`](/windows/win32/api/ocidl/nn-ocidl-ioleinplaceobjectwindowless) interface of the control. ``` IOleInPlaceObjectWindowless* m_pWindowlessObject; diff --git a/docs/mfc/reference/colecurrency-class.md b/docs/mfc/reference/colecurrency-class.md index d208b9739d..76b2741245 100644 --- a/docs/mfc/reference/colecurrency-class.md +++ b/docs/mfc/reference/colecurrency-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleCurrency Class" title: "COleCurrency Class" -ms.date: "08/29/2019" +description: "Learn more about: COleCurrency Class" +ms.date: 08/29/2019 f1_keywords: ["COleCurrency", "AFXDISP/COleCurrency", "AFXDISP/COleCurrency::COleCurrency", "AFXDISP/COleCurrency::Format", "AFXDISP/COleCurrency::GetStatus", "AFXDISP/COleCurrency::ParseCurrency", "AFXDISP/COleCurrency::SetCurrency", "AFXDISP/COleCurrency::SetStatus", "AFXDISP/COleCurrency::m_cur", "AFXDISP/COleCurrency::m_status"] helpviewer_keywords: ["COleCurrency [MFC], COleCurrency", "COleCurrency [MFC], Format", "COleCurrency [MFC], GetStatus", "COleCurrency [MFC], ParseCurrency", "COleCurrency [MFC], SetCurrency", "COleCurrency [MFC], SetStatus", "COleCurrency [MFC], m_cur", "COleCurrency [MFC], m_status"] -ms.assetid: 3a36e345-303f-46fb-a57c-858274378a8d --- # COleCurrency Class @@ -290,7 +289,7 @@ A brief description of each operator follows: - **operator =(** `curSrc` **)** The value and status of the operand, an existing `COleCurrency` object are copied into this `COleCurrency` object. -- **operator =(** *varSrc* **)** If the conversion of the `VARIANT` value (or [COleVariant](../../mfc/reference/colevariant-class.md) object) to a currency ( `VT_CY`) is successful, the converted value is copied into this `COleCurrency` object and its status is set to valid. If the conversion is not successful, the value of the `COleCurrency` object is set to 0 and its status to invalid. +- **operator =(** *varSrc* **)** If the conversion of the `VARIANT` value (or [COleVariant](../../mfc/reference/colevariant-class.md) object) to a currency (`VT_CY`) is successful, the converted value is copied into this `COleCurrency` object and its status is set to valid. If the conversion is not successful, the value of the `COleCurrency` object is set to 0 and its status to invalid. For more information, see the [CURRENCY](/windows/win32/api/wtypes/ns-wtypes-cy-r1) and [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) entries in the Windows SDK. @@ -486,7 +485,7 @@ BOOL operator>=(const COleCurrency& cur) const; ### Remarks > [!NOTE] -> The return value of the ordering operations ( **<**, **\<=**, **>**, **>=**) is undefined if the status of either operand is null or invalid. The equality operators ( `==`, `!=`) consider the status of the operands. +> The return value of the ordering operations ( **<**, **\<=**, **>**, **>=**) is undefined if the status of either operand is null or invalid. The equality operators (`==`, `!=`) consider the status of the operands. ### Example diff --git a/docs/mfc/reference/coledocument-class.md b/docs/mfc/reference/coledocument-class.md index c8ad83bdfb..fe1959bf1a 100644 --- a/docs/mfc/reference/coledocument-class.md +++ b/docs/mfc/reference/coledocument-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleDocument Class" title: "COleDocument Class" +description: "Learn more about: COleDocument Class" ms.date: "11/04/2016" f1_keywords: ["COleDocument", "AFXOLE/COleDocument", "AFXOLE/COleDocument::COleDocument", "AFXOLE/COleDocument::AddItem", "AFXOLE/COleDocument::ApplyPrintDevice", "AFXOLE/COleDocument::EnableCompoundFile", "AFXOLE/COleDocument::GetInPlaceActiveItem", "AFXOLE/COleDocument::GetNextClientItem", "AFXOLE/COleDocument::GetNextItem", "AFXOLE/COleDocument::GetNextServerItem", "AFXOLE/COleDocument::GetPrimarySelectedItem", "AFXOLE/COleDocument::GetStartPosition", "AFXOLE/COleDocument::HasBlankItems", "AFXOLE/COleDocument::OnShowViews", "AFXOLE/COleDocument::RemoveItem", "AFXOLE/COleDocument::UpdateModifiedFlag", "AFXOLE/COleDocument::OnEditChangeIcon", "AFXOLE/COleDocument::OnEditConvert", "AFXOLE/COleDocument::OnEditLinks", "AFXOLE/COleDocument::OnFileSendMail", "AFXOLE/COleDocument::OnUpdateEditChangeIcon", "AFXOLE/COleDocument::OnUpdateEditLinksMenu", "AFXOLE/COleDocument::OnUpdateObjectVerbMenu", "AFXOLE/COleDocument::OnUpdatePasteLinkMenu", "AFXOLE/COleDocument::OnUpdatePasteMenu"] helpviewer_keywords: ["COleDocument [MFC], COleDocument", "COleDocument [MFC], AddItem", "COleDocument [MFC], ApplyPrintDevice", "COleDocument [MFC], EnableCompoundFile", "COleDocument [MFC], GetInPlaceActiveItem", "COleDocument [MFC], GetNextClientItem", "COleDocument [MFC], GetNextItem", "COleDocument [MFC], GetNextServerItem", "COleDocument [MFC], GetPrimarySelectedItem", "COleDocument [MFC], GetStartPosition", "COleDocument [MFC], HasBlankItems", "COleDocument [MFC], OnShowViews", "COleDocument [MFC], RemoveItem", "COleDocument [MFC], UpdateModifiedFlag", "COleDocument [MFC], OnEditChangeIcon", "COleDocument [MFC], OnEditConvert", "COleDocument [MFC], OnEditLinks", "COleDocument [MFC], OnFileSendMail", "COleDocument [MFC], OnUpdateEditChangeIcon", "COleDocument [MFC], OnUpdateEditLinksMenu", "COleDocument [MFC], OnUpdateObjectVerbMenu", "COleDocument [MFC], OnUpdatePasteLinkMenu", "COleDocument [MFC], OnUpdatePasteMenu"] -ms.assetid: dc2ecb99-03e1-44c7-bb69-48056dd1b672 --- # COleDocument Class @@ -64,9 +63,9 @@ class COleDocument : public CDocument If you are writing a simple container application, derive your document class from `COleDocument`. If you are writing a container application that supports linking to the embedded items contained by its documents, derive your document class from [COleLinkingDoc](../../mfc/reference/colelinkingdoc-class.md). If you are writing a server application or combination container/server, derive your document class from [COleServerDoc](../../mfc/reference/coleserverdoc-class.md). `COleLinkingDoc` and `COleServerDoc` are derived from `COleDocument`, so these classes inherit all the services available in `COleDocument` and `CDocument`. -To use `COleDocument`, derive a class from it and add functionality to manage the application's non-OLE data as well as embedded or linked items. If you define `CDocItem`-derived classes to store the application's native data, you can use the default implementation defined by `COleDocument` to store both your OLE and non-OLE data. You can also design your own data structures for storing your non-OLE data separately from the OLE items. For more information, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md).. +To use `COleDocument`, derive a class from it and add functionality to manage the application's non-OLE data as well as embedded or linked items. If you define `CDocItem`-derived classes to store the application's native data, you can use the default implementation defined by `COleDocument` to store both your OLE and non-OLE data. You can also design your own data structures for storing your non-OLE data separately from the OLE items. For more information, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md). -`CDocument` supports sending your document via mail if mail support (MAPI) is present. `COleDocument` has updated [OnFileSendMail](#onfilesendmail) to handle compound documents correctly. For more information, see the articles [MAPI](../../mfc/mapi.md) and [MAPI Support in MFC](../../mfc/mapi-support-in-mfc.md).. +`CDocument` supports sending your document via mail if mail support (MAPI) is present. `COleDocument` has updated [OnFileSendMail](#onfilesendmail) to handle compound documents correctly. For more information, see the articles [MAPI](../../mfc/mapi.md) and [MAPI Support in MFC](../../mfc/mapi-support-in-mfc.md). ## Inheritance Hierarchy @@ -153,7 +152,7 @@ Specifies whether compound file support is enabled or disabled. ### Remarks -This is also called structured storage. You typically call this function from the constructor of your `COleDocument`-derived class. For more information about compound documents, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md).. +This is also called structured storage. You typically call this function from the constructor of your `COleDocument`-derived class. For more information about compound documents, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md). If you do not call this member function, documents will be stored in a nonstructured ("flat") file format. @@ -356,7 +355,7 @@ afx_msg void OnFileSendMail(); Unlike the implementation of `OnFileSendMail` for `CDocument`, this function handles compound files correctly. -For more information, see the [MAPI Topics](../../mfc/mapi.md) and [MAPI Support in MFC](../../mfc/mapi-support-in-mfc.md) articles.. +For more information, see the [MAPI Topics](../../mfc/mapi.md) and [MAPI Support in MFC](../../mfc/mapi-support-in-mfc.md) articles. ## COleDocument::OnShowViews @@ -491,7 +490,7 @@ This allows the framework to prompt the user to save the document before closing ## See also -[MFC Sample CONTAINER](../../overview/visual-cpp-samples.md)
-[MFC Sample MFCBIND](../../overview/visual-cpp-samples.md)
-[CDocument Class](../../mfc/reference/cdocument-class.md)
+[MFC Sample CONTAINER](../../overview/visual-cpp-samples.md)\ +[MFC Sample MFCBIND](../../overview/visual-cpp-samples.md)\ +[CDocument Class](../../mfc/reference/cdocument-class.md)\ [Hierarchy Chart](../../mfc/hierarchy-chart.md) diff --git a/docs/mfc/reference/coleipframewndex-class.md b/docs/mfc/reference/coleipframewndex-class.md index 69d2da9c47..51faf2f152 100644 --- a/docs/mfc/reference/coleipframewndex-class.md +++ b/docs/mfc/reference/coleipframewndex-class.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: COleIPFrameWndEx Class" title: "COleIPFrameWndEx Class" -ms.date: "11/04/2016" +description: "Learn more about: COleIPFrameWndEx Class" +ms.date: 11/04/2016 f1_keywords: ["COleIPFrameWndEx", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::AddDockSite", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::AddPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::AdjustDockingLayout", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::DockPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::DockPaneLeftOf", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::EnableAutoHidePanes", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::EnableDocking", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::EnablePaneMenu", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetActivePopup", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetContainerFrameWindow", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetDefaultResId", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetDockFrame", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetDockingManager", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetMainFrame", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetMenuBar", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetTearOffBars", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::GetToolbarButtonToolTipText", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::InsertPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::IsMenuBarAvailable", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::IsPointNearDockSite", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::LoadFrame", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnCloseDockingPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnCloseMiniFrame", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnClosePopupMenu", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnCmdMsg", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnDrawMenuImage", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnDrawMenuLogo", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnMenuButtonToolHitTest", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnMoveMiniFrame", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnSetPreviewMode", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnShowCustomizePane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnShowPanes", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnShowPopupMenu", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::OnTearOffMenu", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::PaneFromPoint", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::PreTranslateMessage", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::RecalcLayout", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::RemovePaneFromDockManager", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::SetDockState", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::SetupToolbarMenu", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::ShowPane", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::WinHelpA", "AFXOLEIPFRAMEWNDEX/COleIPFrameWndEx::InitUserToobars"] helpviewer_keywords: ["COleIPFrameWndEx [MFC], AddDockSite", "COleIPFrameWndEx [MFC], AddPane", "COleIPFrameWndEx [MFC], AdjustDockingLayout", "COleIPFrameWndEx [MFC], DockPane", "COleIPFrameWndEx [MFC], DockPaneLeftOf", "COleIPFrameWndEx [MFC], EnableAutoHidePanes", "COleIPFrameWndEx [MFC], EnableDocking", "COleIPFrameWndEx [MFC], EnablePaneMenu", "COleIPFrameWndEx [MFC], GetActivePopup", "COleIPFrameWndEx [MFC], GetContainerFrameWindow", "COleIPFrameWndEx [MFC], GetDefaultResId", "COleIPFrameWndEx [MFC], GetDockFrame", "COleIPFrameWndEx [MFC], GetDockingManager", "COleIPFrameWndEx [MFC], GetMainFrame", "COleIPFrameWndEx [MFC], GetMenuBar", "COleIPFrameWndEx [MFC], GetPane", "COleIPFrameWndEx [MFC], GetTearOffBars", "COleIPFrameWndEx [MFC], GetToolbarButtonToolTipText", "COleIPFrameWndEx [MFC], InsertPane", "COleIPFrameWndEx [MFC], IsMenuBarAvailable", "COleIPFrameWndEx [MFC], IsPointNearDockSite", "COleIPFrameWndEx [MFC], LoadFrame", "COleIPFrameWndEx [MFC], OnCloseDockingPane", "COleIPFrameWndEx [MFC], OnCloseMiniFrame", "COleIPFrameWndEx [MFC], OnClosePopupMenu", "COleIPFrameWndEx [MFC], OnCmdMsg", "COleIPFrameWndEx [MFC], OnDrawMenuImage", "COleIPFrameWndEx [MFC], OnDrawMenuLogo", "COleIPFrameWndEx [MFC], OnMenuButtonToolHitTest", "COleIPFrameWndEx [MFC], OnMoveMiniFrame", "COleIPFrameWndEx [MFC], OnSetPreviewMode", "COleIPFrameWndEx [MFC], OnShowCustomizePane", "COleIPFrameWndEx [MFC], OnShowPanes", "COleIPFrameWndEx [MFC], OnShowPopupMenu", "COleIPFrameWndEx [MFC], OnTearOffMenu", "COleIPFrameWndEx [MFC], PaneFromPoint", "COleIPFrameWndEx [MFC], PreTranslateMessage", "COleIPFrameWndEx [MFC], RecalcLayout", "COleIPFrameWndEx [MFC], RemovePaneFromDockManager", "COleIPFrameWndEx [MFC], SetDockState", "COleIPFrameWndEx [MFC], SetupToolbarMenu", "COleIPFrameWndEx [MFC], ShowPane", "COleIPFrameWndEx [MFC], WinHelpA", "COleIPFrameWndEx [MFC], InitUserToobars"] -ms.assetid: ebff1560-a1eb-4854-af00-95d4a192bd55 --- # COleIPFrameWndEx Class -The `COleIPFrameWndEx` class implements an OLE container that supports MFC. You must derive the in-place frame window class for your application from the `COleIPFrameWndEx` class, instead of deriving it from the [COleIPFrameWnd](../../mfc/reference/coleipframewnd-class.md)class. +The `COleIPFrameWndEx` class implements an OLE container that supports MFC. You must derive the in-place frame window class for your application from the `COleIPFrameWndEx` class, instead of deriving it from the [COleIPFrameWnd](../../mfc/reference/coleipframewnd-class.md) class. For more detail see the source code located in the **VC\\atlmfc\\src\\mfc** folder of your Visual Studio installation. ## Syntax @@ -50,8 +49,8 @@ class COleIPFrameWndEx : public COleIPFrameWnd |[COleIPFrameWndEx::OnClosePopupMenu](#onclosepopupmenu)|Called by the framework when an active pop-up menu processes a WM_DESTROY message.| |[COleIPFrameWndEx::OnCmdMsg](#oncmdmsg)|(Overrides `CFrameWnd::OnCmdMsg`.)| |[COleIPFrameWndEx::OnDrawMenuImage](#ondrawmenuimage)|Called by the framework when the image associated with a menu item is drawn.| -|[COleIPFrameWndEx::OnDrawMenuLogo](#ondrawmenulogo)|Called by the framework when a [CMFCPopupMenu](../../mfc/reference/cmfcpopupmenu-class.md)object processes a WM_PAINT message.| -|[COleIPFrameWndEx::OnMenuButtonToolHitTest](#onmenubuttontoolhittest)|Called by the framework when a [CMFCToolBarButton](../../mfc/reference/cmfctoolbarbutton-class.md)object processes WM_NCHITTEST message.| +|[COleIPFrameWndEx::OnDrawMenuLogo](#ondrawmenulogo)|Called by the framework when a [CMFCPopupMenu](../../mfc/reference/cmfcpopupmenu-class.md) object processes a WM_PAINT message.| +|[COleIPFrameWndEx::OnMenuButtonToolHitTest](#onmenubuttontoolhittest)|Called by the framework when a [CMFCToolBarButton](../../mfc/reference/cmfctoolbarbutton-class.md) object processes WM_NCHITTEST message.| |[COleIPFrameWndEx::OnMoveMiniFrame](#onmoveminiframe)|| |[COleIPFrameWndEx::OnSetPreviewMode](#onsetpreviewmode)|Call this member function to set the application's main frame window into and out of print-preview mode. (Overrides [CFrameWnd::OnSetPreviewMode](../../mfc/reference/cframewnd-class.md#onsetpreviewmode).)| |[COleIPFrameWndEx::OnShowCustomizePane](#onshowcustomizepane)|| @@ -571,7 +570,7 @@ Override this method if you want to customize image drawing for the menu items t ## COleIPFrameWndEx::OnDrawMenuLogo -Called by the framework when a [CMFCPopupMenu](../../mfc/reference/cmfcpopupmenu-class.md)object processes a WM_PAINT message. +Called by the framework when a [CMFCPopupMenu](../../mfc/reference/cmfcpopupmenu-class.md) object processes a WM_PAINT message. ``` virtual void OnDrawMenuLogo( @@ -597,7 +596,7 @@ Override this method to display a logo on the pop-up menu associated with the me ## COleIPFrameWndEx::OnMenuButtonToolHitTest -Called by the framework when a [CMFCToolBarButton](../../mfc/reference/cmfctoolbarbutton-class.md)object processes a WM_NCHITTEST message. +Called by the framework when a [CMFCToolBarButton](../../mfc/reference/cmfctoolbarbutton-class.md) object processes a WM_NCHITTEST message. ``` virtual BOOL OnMenuButtonToolHitTest( diff --git a/docs/mfc/reference/coleserverdoc-class.md b/docs/mfc/reference/coleserverdoc-class.md index 59f7a9c34b..b81a4ff6fd 100644 --- a/docs/mfc/reference/coleserverdoc-class.md +++ b/docs/mfc/reference/coleserverdoc-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleServerDoc Class" title: "COleServerDoc Class" +description: "Learn more about: COleServerDoc Class" ms.date: "11/04/2016" f1_keywords: ["COleServerDoc", "AFXOLE/COleServerDoc", "AFXOLE/COleServerDoc::COleServerDoc", "AFXOLE/COleServerDoc::ActivateDocObject", "AFXOLE/COleServerDoc::ActivateInPlace", "AFXOLE/COleServerDoc::DeactivateAndUndo", "AFXOLE/COleServerDoc::DiscardUndoState", "AFXOLE/COleServerDoc::GetClientSite", "AFXOLE/COleServerDoc::GetEmbeddedItem", "AFXOLE/COleServerDoc::GetItemClipRect", "AFXOLE/COleServerDoc::GetItemPosition", "AFXOLE/COleServerDoc::GetZoomFactor", "AFXOLE/COleServerDoc::IsDocObject", "AFXOLE/COleServerDoc::IsEmbedded", "AFXOLE/COleServerDoc::IsInPlaceActive", "AFXOLE/COleServerDoc::NotifyChanged", "AFXOLE/COleServerDoc::NotifyClosed", "AFXOLE/COleServerDoc::NotifyRename", "AFXOLE/COleServerDoc::NotifySaved", "AFXOLE/COleServerDoc::OnDeactivate", "AFXOLE/COleServerDoc::OnDeactivateUI", "AFXOLE/COleServerDoc::OnDocWindowActivate", "AFXOLE/COleServerDoc::OnResizeBorder", "AFXOLE/COleServerDoc::OnShowControlBars", "AFXOLE/COleServerDoc::OnUpdateDocument", "AFXOLE/COleServerDoc::RequestPositionChange", "AFXOLE/COleServerDoc::SaveEmbedding", "AFXOLE/COleServerDoc::ScrollContainerBy", "AFXOLE/COleServerDoc::UpdateAllItems", "AFXOLE/COleServerDoc::CreateInPlaceFrame", "AFXOLE/COleServerDoc::DestroyInPlaceFrame", "AFXOLE/COleServerDoc::GetDocObjectServer", "AFXOLE/COleServerDoc::OnClose", "AFXOLE/COleServerDoc::OnExecOleCmd", "AFXOLE/COleServerDoc::OnFrameWindowActivate", "AFXOLE/COleServerDoc::OnGetEmbeddedItem", "AFXOLE/COleServerDoc::OnReactivateAndUndo", "AFXOLE/COleServerDoc::OnSetHostNames", "AFXOLE/COleServerDoc::OnSetItemRects", "AFXOLE/COleServerDoc::OnShowDocument"] helpviewer_keywords: ["COleServerDoc [MFC], COleServerDoc", "COleServerDoc [MFC], ActivateDocObject", "COleServerDoc [MFC], ActivateInPlace", "COleServerDoc [MFC], DeactivateAndUndo", "COleServerDoc [MFC], DiscardUndoState", "COleServerDoc [MFC], GetClientSite", "COleServerDoc [MFC], GetEmbeddedItem", "COleServerDoc [MFC], GetItemClipRect", "COleServerDoc [MFC], GetItemPosition", "COleServerDoc [MFC], GetZoomFactor", "COleServerDoc [MFC], IsDocObject", "COleServerDoc [MFC], IsEmbedded", "COleServerDoc [MFC], IsInPlaceActive", "COleServerDoc [MFC], NotifyChanged", "COleServerDoc [MFC], NotifyClosed", "COleServerDoc [MFC], NotifyRename", "COleServerDoc [MFC], NotifySaved", "COleServerDoc [MFC], OnDeactivate", "COleServerDoc [MFC], OnDeactivateUI", "COleServerDoc [MFC], OnDocWindowActivate", "COleServerDoc [MFC], OnResizeBorder", "COleServerDoc [MFC], OnShowControlBars", "COleServerDoc [MFC], OnUpdateDocument", "COleServerDoc [MFC], RequestPositionChange", "COleServerDoc [MFC], SaveEmbedding", "COleServerDoc [MFC], ScrollContainerBy", "COleServerDoc [MFC], UpdateAllItems", "COleServerDoc [MFC], CreateInPlaceFrame", "COleServerDoc [MFC], DestroyInPlaceFrame", "COleServerDoc [MFC], GetDocObjectServer", "COleServerDoc [MFC], OnClose", "COleServerDoc [MFC], OnExecOleCmd", "COleServerDoc [MFC], OnFrameWindowActivate", "COleServerDoc [MFC], OnGetEmbeddedItem", "COleServerDoc [MFC], OnReactivateAndUndo", "COleServerDoc [MFC], OnSetHostNames", "COleServerDoc [MFC], OnSetItemRects", "COleServerDoc [MFC], OnShowDocument"] -ms.assetid: a9cdd96a-e0ac-43bb-9203-2c29237e965c --- # COleServerDoc Class @@ -477,7 +476,7 @@ This function restores the container application's user interface to its origina The undo state information should be unconditionally released at this point. -For more information, see the article [Activation](../../mfc/activation-cpp.md).. +For more information, see the article [Activation](../../mfc/activation-cpp.md). ## COleServerDoc::OnDeactivateUI @@ -515,7 +514,7 @@ Specifies whether the document window is to be activated or deactivated. The default implementation removes or adds the frame-level user interface elements as appropriate. Override this function if you want to perform additional actions when the document containing your item is activated or deactivated. -For more information, see the article [Activation](../../mfc/activation-cpp.md).. +For more information, see the article [Activation](../../mfc/activation-cpp.md). ## COleServerDoc::OnExecOleCmd @@ -599,7 +598,7 @@ Specifies whether the frame window is to be activated or deactivated. The default implementation cancels any help modes the frame window might be in. Override this function if you want to perform special processing when the frame window is activated or deactivated. -For more information, see the article [Activation](../../mfc/activation-cpp.md).. +For more information, see the article [Activation](../../mfc/activation-cpp.md). ## COleServerDoc::OnGetEmbeddedItem @@ -860,9 +859,9 @@ This function calls the `OnUpdate` member function for each of the document's it ## See also -[MFC Sample HIERSVR](../../overview/visual-cpp-samples.md)
-[COleLinkingDoc Class](../../mfc/reference/colelinkingdoc-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[COleDocument Class](../../mfc/reference/coledocument-class.md)
-[COleLinkingDoc Class](../../mfc/reference/colelinkingdoc-class.md)
+[MFC Sample HIERSVR](../../overview/visual-cpp-samples.md)\ +[COleLinkingDoc Class](../../mfc/reference/colelinkingdoc-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[COleDocument Class](../../mfc/reference/coledocument-class.md)\ +[COleLinkingDoc Class](../../mfc/reference/colelinkingdoc-class.md)\ [COleTemplateServer Class](../../mfc/reference/coletemplateserver-class.md) diff --git a/docs/mfc/reference/colestreamfile-class.md b/docs/mfc/reference/colestreamfile-class.md index 053820436c..964fe4e4dd 100644 --- a/docs/mfc/reference/colestreamfile-class.md +++ b/docs/mfc/reference/colestreamfile-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleStreamFile Class" title: "COleStreamFile Class" +description: "Learn more about: COleStreamFile Class" ms.date: "11/04/2016" f1_keywords: ["COleStreamFile", "AFXOLE/COleStreamFile", "AFXOLE/COleStreamFile::COleStreamFile", "AFXOLE/COleStreamFile::Attach", "AFXOLE/COleStreamFile::CreateMemoryStream", "AFXOLE/COleStreamFile::CreateStream", "AFXOLE/COleStreamFile::Detach", "AFXOLE/COleStreamFile::GetStream", "AFXOLE/COleStreamFile::OpenStream"] helpviewer_keywords: ["COleStreamFile [MFC], COleStreamFile", "COleStreamFile [MFC], Attach", "COleStreamFile [MFC], CreateMemoryStream", "COleStreamFile [MFC], CreateStream", "COleStreamFile [MFC], Detach", "COleStreamFile [MFC], GetStream", "COleStreamFile [MFC], OpenStream"] -ms.assetid: e4f93698-e17c-4a18-a7c0-4b4df8eb4d93 --- # COleStreamFile Class @@ -41,7 +40,7 @@ An `IStorage` object must exist before the stream can be opened or created unles `COleStreamFile` objects are manipulated exactly like [CFile](../../mfc/reference/cfile-class.md) objects. -For more information about manipulating streams and storages, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md).. +For more information about manipulating streams and storages, see the article [Containers: Compound Files](../../mfc/containers-compound-files.md). For more information, see [IStream](/windows/win32/api/objidl/nn-objidl-istream) and [IStorage](/windows/win32/api/objidl/nn-objidl-istorage) in the Windows SDK. @@ -222,5 +221,5 @@ For more information, see [IStorage::OpenStream](/windows/win32/api/objidl/nf-ob ## See also -[CFile Class](../../mfc/reference/cfile-class.md)
+[CFile Class](../../mfc/reference/cfile-class.md)\ [Hierarchy Chart](../../mfc/hierarchy-chart.md) diff --git a/docs/mfc/reference/colevariant-class.md b/docs/mfc/reference/colevariant-class.md index d3ac1cbba0..f3bc198514 100644 --- a/docs/mfc/reference/colevariant-class.md +++ b/docs/mfc/reference/colevariant-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: COleVariant Class" title: "COleVariant Class" -ms.date: "11/04/2016" +description: "Learn more about: COleVariant Class" +ms.date: 11/04/2016 f1_keywords: ["COleVariant", "AFXDISP/COleVariant", "AFXDISP/COleVariant::COleVariant", "AFXDISP/COleVariant::Attach", "AFXDISP/COleVariant::ChangeType", "AFXDISP/COleVariant::Clear", "AFXDISP/COleVariant::Detach", "AFXDISP/COleVariant::GetByteArrayFromVariantArray", "AFXDISP/COleVariant::SetString"] helpviewer_keywords: ["COleVariant [MFC], COleVariant", "COleVariant [MFC], Attach", "COleVariant [MFC], ChangeType", "COleVariant [MFC], Clear", "COleVariant [MFC], Detach", "COleVariant [MFC], GetByteArrayFromVariantArray", "COleVariant [MFC], SetString"] -ms.assetid: e1b5cd4a-b066-4b9b-b48b-6215ed52d998 --- # COleVariant Class @@ -52,7 +51,7 @@ This data type is used in OLE automation. Specifically, the [DISPPARAMS](/window > [!NOTE] > This class is derived from the `VARIANT` structure. This means you can pass a `COleVariant` in a parameter that calls for a `VARIANT` and that the data members of the `VARIANT` structure are accessible data members of `COleVariant`. -The two related MFC classes [COleCurrency](../../mfc/reference/colecurrency-class.md) and [COleDateTime](../../atl-mfc-shared/reference/coledatetime-class.md) encapsulate the variant data types CURRENCY ( `VT_CY`) and DATE ( `VT_DATE`). The `COleVariant` class is used extensively in the DAO classes; see these classes for typical usage of this class, for example [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) and [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md). +The two related MFC classes [COleCurrency](../../mfc/reference/colecurrency-class.md) and [COleDateTime](../../atl-mfc-shared/reference/coledatetime-class.md) encapsulate the variant data types CURRENCY (`VT_CY`) and DATE (`VT_DATE`). The `COleVariant` class is used extensively in the DAO classes; see these classes for typical usage of this class, for example [CDaoQueryDef](../../mfc/reference/cdaoquerydef-class.md) and [CDaoRecordset](../../mfc/reference/cdaorecordset-class.md). For more information, see the [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant), [CURRENCY](/windows/win32/api/wtypes/ns-wtypes-cy-r1), [DISPPARAMS](/windows/win32/api/oaidl/ns-oaidl-dispparams), and [IDispatch::Invoke](/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke) entries in the Windows SDK. diff --git a/docs/mfc/reference/collection-class-helpers.md b/docs/mfc/reference/collection-class-helpers.md index 4db4679689..ca02e0d281 100644 --- a/docs/mfc/reference/collection-class-helpers.md +++ b/docs/mfc/reference/collection-class-helpers.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Collection Class Helpers" title: "Collection Class Helpers" -ms.date: "11/04/2016" +description: "Learn more about: Collection Class Helpers" +ms.date: 11/04/2016 helpviewer_keywords: ["DestructElements function", "ConstructElements function", "SerializeElements function", "collection classes [MFC], helper functions", "helper functions collection class [MFC]"] -ms.assetid: bc3a2368-9edd-4748-9e6a-13cba79517ca --- # Collection Class Helpers @@ -57,7 +56,7 @@ The `CMap` calls use the `CMap` template parameters *KEY* and *ARG_KEY*. The default implementation returns the result of the comparison of *\*pElement1* and *\*pElement2*. Override this function so that it compares the elements in a way that is appropriate for your application. -The C++ language defines the comparison operator ( `==`) for simple types (**`char`**, **`int`**, **`float`**, and so on) but does not define a comparison operator for classes and structures. If you want to use `CompareElements` or to instantiate one of the collection classes that uses it, you must either define the comparison operator or overload `CompareElements` with a version that returns appropriate values. +The C++ language defines the comparison operator (`==`) for simple types (**`char`**, **`int`**, **`float`**, and so on) but does not define a comparison operator for classes and structures. If you want to use `CompareElements` or to instantiate one of the collection classes that uses it, you must either define the comparison operator or overload `CompareElements` with a version that returns appropriate values. ### Requirements diff --git a/docs/mfc/reference/connection-maps.md b/docs/mfc/reference/connection-maps.md index cab71e3299..021a53eead 100644 --- a/docs/mfc/reference/connection-maps.md +++ b/docs/mfc/reference/connection-maps.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Connection Maps" title: "Connection Maps" -ms.date: "8/1/2023" +description: "Learn more about: Connection Maps" +ms.date: 8/1/2023 helpviewer_keywords: ["connection maps"] --- @@ -261,7 +261,7 @@ For in-process connections, `TRUE` indicates that creating the connection should **Warning**: In general, it can't be predicted which connections are in-process and which connections are out-of-process, so it is recommended to always set this parameter to `TRUE`. *`dwCookie`*\ -The connection identifier returned by ``AfxConnectionAdvise``. +The connection identifier returned by `AfxConnectionAdvise`. ### Return value diff --git a/docs/mfc/reference/crebarctrl-class.md b/docs/mfc/reference/crebarctrl-class.md index 5dc690832f..7d66ed8b7f 100644 --- a/docs/mfc/reference/crebarctrl-class.md +++ b/docs/mfc/reference/crebarctrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CReBarCtrl Class" title: "CReBarCtrl Class" -ms.date: "11/19/2018" +description: "Learn more about: CReBarCtrl Class" +ms.date: 11/19/2018 f1_keywords: ["CReBarCtrl", "AFXCMN/CReBarCtrl", "AFXCMN/CReBarCtrl::CReBarCtrl", "AFXCMN/CReBarCtrl::BeginDrag", "AFXCMN/CReBarCtrl::Create", "AFXCMN/CReBarCtrl::CreateEx", "AFXCMN/CReBarCtrl::DeleteBand", "AFXCMN/CReBarCtrl::DragMove", "AFXCMN/CReBarCtrl::EndDrag", "AFXCMN/CReBarCtrl::GetBandBorders", "AFXCMN/CReBarCtrl::GetBandCount", "AFXCMN/CReBarCtrl::GetBandInfo", "AFXCMN/CReBarCtrl::GetBandMargins", "AFXCMN/CReBarCtrl::GetBarHeight", "AFXCMN/CReBarCtrl::GetBarInfo", "AFXCMN/CReBarCtrl::GetBkColor", "AFXCMN/CReBarCtrl::GetColorScheme", "AFXCMN/CReBarCtrl::GetDropTarget", "AFXCMN/CReBarCtrl::GetExtendedStyle", "AFXCMN/CReBarCtrl::GetImageList", "AFXCMN/CReBarCtrl::GetPalette", "AFXCMN/CReBarCtrl::GetRect", "AFXCMN/CReBarCtrl::GetRowCount", "AFXCMN/CReBarCtrl::GetRowHeight", "AFXCMN/CReBarCtrl::GetTextColor", "AFXCMN/CReBarCtrl::GetToolTips", "AFXCMN/CReBarCtrl::HitTest", "AFXCMN/CReBarCtrl::IDToIndex", "AFXCMN/CReBarCtrl::InsertBand", "AFXCMN/CReBarCtrl::MaximizeBand", "AFXCMN/CReBarCtrl::MinimizeBand", "AFXCMN/CReBarCtrl::MoveBand", "AFXCMN/CReBarCtrl::PushChevron", "AFXCMN/CReBarCtrl::RestoreBand", "AFXCMN/CReBarCtrl::SetBandInfo", "AFXCMN/CReBarCtrl::SetBandWidth", "AFXCMN/CReBarCtrl::SetBarInfo", "AFXCMN/CReBarCtrl::SetBkColor", "AFXCMN/CReBarCtrl::SetColorScheme", "AFXCMN/CReBarCtrl::SetExtendedStyle", "AFXCMN/CReBarCtrl::SetImageList", "AFXCMN/CReBarCtrl::SetOwner", "AFXCMN/CReBarCtrl::SetPalette", "AFXCMN/CReBarCtrl::SetTextColor", "AFXCMN/CReBarCtrl::SetToolTips", "AFXCMN/CReBarCtrl::SetWindowTheme", "AFXCMN/CReBarCtrl::ShowBand", "AFXCMN/CReBarCtrl::SizeToRect"] helpviewer_keywords: ["CReBarCtrl [MFC], CReBarCtrl", "CReBarCtrl [MFC], BeginDrag", "CReBarCtrl [MFC], Create", "CReBarCtrl [MFC], CreateEx", "CReBarCtrl [MFC], DeleteBand", "CReBarCtrl [MFC], DragMove", "CReBarCtrl [MFC], EndDrag", "CReBarCtrl [MFC], GetBandBorders", "CReBarCtrl [MFC], GetBandCount", "CReBarCtrl [MFC], GetBandInfo", "CReBarCtrl [MFC], GetBandMargins", "CReBarCtrl [MFC], GetBarHeight", "CReBarCtrl [MFC], GetBarInfo", "CReBarCtrl [MFC], GetBkColor", "CReBarCtrl [MFC], GetColorScheme", "CReBarCtrl [MFC], GetDropTarget", "CReBarCtrl [MFC], GetExtendedStyle", "CReBarCtrl [MFC], GetImageList", "CReBarCtrl [MFC], GetPalette", "CReBarCtrl [MFC], GetRect", "CReBarCtrl [MFC], GetRowCount", "CReBarCtrl [MFC], GetRowHeight", "CReBarCtrl [MFC], GetTextColor", "CReBarCtrl [MFC], GetToolTips", "CReBarCtrl [MFC], HitTest", "CReBarCtrl [MFC], IDToIndex", "CReBarCtrl [MFC], InsertBand", "CReBarCtrl [MFC], MaximizeBand", "CReBarCtrl [MFC], MinimizeBand", "CReBarCtrl [MFC], MoveBand", "CReBarCtrl [MFC], PushChevron", "CReBarCtrl [MFC], RestoreBand", "CReBarCtrl [MFC], SetBandInfo", "CReBarCtrl [MFC], SetBandWidth", "CReBarCtrl [MFC], SetBarInfo", "CReBarCtrl [MFC], SetBkColor", "CReBarCtrl [MFC], SetColorScheme", "CReBarCtrl [MFC], SetExtendedStyle", "CReBarCtrl [MFC], SetImageList", "CReBarCtrl [MFC], SetOwner", "CReBarCtrl [MFC], SetPalette", "CReBarCtrl [MFC], SetTextColor", "CReBarCtrl [MFC], SetToolTips", "CReBarCtrl [MFC], SetWindowTheme", "CReBarCtrl [MFC], ShowBand", "CReBarCtrl [MFC], SizeToRect"] -ms.assetid: 154570d7-e48c-425d-8c7e-c64542bcb4cc --- # CReBarCtrl Class @@ -337,7 +336,7 @@ void GetBandMargins(PMARGINS pMargins); ### Parameters *pMargins*
-A pointer to a [MARGINS](/windows/win32/api/uxtheme/ns-uxtheme-margins)structure that will receive the information. +A pointer to a [MARGINS](/windows/win32/api/uxtheme/ns-uxtheme-margins) structure that will receive the information. ### Remarks diff --git a/docs/mfc/reference/crecordset-class.md b/docs/mfc/reference/crecordset-class.md index 04e0851f0d..4029567072 100644 --- a/docs/mfc/reference/crecordset-class.md +++ b/docs/mfc/reference/crecordset-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: CRecordset Class" title: "CRecordset Class" +description: "Learn more about: CRecordset Class" ms.date: "05/11/2022" f1_keywords: ["CRecordset", "AFXDB/CRecordset", "AFXDB/CRecordset::CRecordset", "AFXDB/CRecordset::AddNew", "AFXDB/CRecordset::CanAppend", "AFXDB/CRecordset::CanBookmark", "AFXDB/CRecordset::Cancel", "AFXDB/CRecordset::CancelUpdate", "AFXDB/CRecordset::CanRestart", "AFXDB/CRecordset::CanScroll", "AFXDB/CRecordset::CanTransact", "AFXDB/CRecordset::CanUpdate", "AFXDB/CRecordset::CheckRowsetError", "AFXDB/CRecordset::Close", "AFXDB/CRecordset::Delete", "AFXDB/CRecordset::DoBulkFieldExchange", "AFXDB/CRecordset::DoFieldExchange", "AFXDB/CRecordset::Edit", "AFXDB/CRecordset::FlushResultSet", "AFXDB/CRecordset::GetBookmark", "AFXDB/CRecordset::GetDefaultConnect", "AFXDB/CRecordset::GetDefaultSQL", "AFXDB/CRecordset::GetFieldValue", "AFXDB/CRecordset::GetODBCFieldCount", "AFXDB/CRecordset::GetODBCFieldInfo", "AFXDB/CRecordset::GetRecordCount", "AFXDB/CRecordset::GetRowsetSize", "AFXDB/CRecordset::GetRowsFetched", "AFXDB/CRecordset::GetRowStatus", "AFXDB/CRecordset::GetSQL", "AFXDB/CRecordset::GetStatus", "AFXDB/CRecordset::GetTableName", "AFXDB/CRecordset::IsBOF", "AFXDB/CRecordset::IsDeleted", "AFXDB/CRecordset::IsEOF", "AFXDB/CRecordset::IsFieldDirty", "AFXDB/CRecordset::IsFieldNull", "AFXDB/CRecordset::IsFieldNullable", "AFXDB/CRecordset::IsOpen", "AFXDB/CRecordset::Move", "AFXDB/CRecordset::MoveFirst", "AFXDB/CRecordset::MoveLast", "AFXDB/CRecordset::MoveNext", "AFXDB/CRecordset::MovePrev", "AFXDB/CRecordset::OnSetOptions", "AFXDB/CRecordset::OnSetUpdateOptions", "AFXDB/CRecordset::Open", "AFXDB/CRecordset::RefreshRowset", "AFXDB/CRecordset::Requery", "AFXDB/CRecordset::SetAbsolutePosition", "AFXDB/CRecordset::SetBookmark", "AFXDB/CRecordset::SetFieldDirty", "AFXDB/CRecordset::SetFieldNull", "AFXDB/CRecordset::SetLockingMode", "AFXDB/CRecordset::SetParamNull", "AFXDB/CRecordset::SetRowsetCursorPosition", "AFXDB/CRecordset::SetRowsetSize", "AFXDB/CRecordset::Update", "AFXDB/CRecordset::m_hstmt", "AFXDB/CRecordset::m_nFields", "AFXDB/CRecordset::m_nParams", "AFXDB/CRecordset::m_pDatabase", "AFXDB/CRecordset::m_strFilter", "AFXDB/CRecordset::m_strSort"] helpviewer_keywords: ["CRecordset [MFC], CRecordset", "CRecordset [MFC], AddNew", "CRecordset [MFC], CanAppend", "CRecordset [MFC], CanBookmark", "CRecordset [MFC], Cancel", "CRecordset [MFC], CancelUpdate", "CRecordset [MFC], CanRestart", "CRecordset [MFC], CanScroll", "CRecordset [MFC], CanTransact", "CRecordset [MFC], CanUpdate", "CRecordset [MFC], CheckRowsetError", "CRecordset [MFC], Close", "CRecordset [MFC], Delete", "CRecordset [MFC], DoBulkFieldExchange", "CRecordset [MFC], DoFieldExchange", "CRecordset [MFC], Edit", "CRecordset [MFC], FlushResultSet", "CRecordset [MFC], GetBookmark", "CRecordset [MFC], GetDefaultConnect", "CRecordset [MFC], GetDefaultSQL", "CRecordset [MFC], GetFieldValue", "CRecordset [MFC], GetODBCFieldCount", "CRecordset [MFC], GetODBCFieldInfo", "CRecordset [MFC], GetRecordCount", "CRecordset [MFC], GetRowsetSize", "CRecordset [MFC], GetRowsFetched", "CRecordset [MFC], GetRowStatus", "CRecordset [MFC], GetSQL", "CRecordset [MFC], GetStatus", "CRecordset [MFC], GetTableName", "CRecordset [MFC], IsBOF", "CRecordset [MFC], IsDeleted", "CRecordset [MFC], IsEOF", "CRecordset [MFC], IsFieldDirty", "CRecordset [MFC], IsFieldNull", "CRecordset [MFC], IsFieldNullable", "CRecordset [MFC], IsOpen", "CRecordset [MFC], Move", "CRecordset [MFC], MoveFirst", "CRecordset [MFC], MoveLast", "CRecordset [MFC], MoveNext", "CRecordset [MFC], MovePrev", "CRecordset [MFC], OnSetOptions", "CRecordset [MFC], OnSetUpdateOptions", "CRecordset [MFC], Open", "CRecordset [MFC], RefreshRowset", "CRecordset [MFC], Requery", "CRecordset [MFC], SetAbsolutePosition", "CRecordset [MFC], SetBookmark", "CRecordset [MFC], SetFieldDirty", "CRecordset [MFC], SetFieldNull", "CRecordset [MFC], SetLockingMode", "CRecordset [MFC], SetParamNull", "CRecordset [MFC], SetRowsetCursorPosition", "CRecordset [MFC], SetRowsetSize", "CRecordset [MFC], Update", "CRecordset [MFC], m_hstmt", "CRecordset [MFC], m_nFields", "CRecordset [MFC], m_nParams", "CRecordset [MFC], m_pDatabase", "CRecordset [MFC], m_strFilter", "CRecordset [MFC], m_strSort"] @@ -728,7 +728,7 @@ The number of records in the recordset; 0 if the recordset contains no records; ### Remarks > [!CAUTION] -> The record count is maintained as a "high water mark," the highest-numbered record yet seen as the user moves through the records. The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count isn't updated when you call `MoveLast`. To count the records yourself, call `MoveNext` repeatedly until `IsEOF` returns nonzero. Adding a record via `CRecordset:AddNew` and `Update` increases the count; deleting a record via `CRecordset::Delete` decreases the count. +> The record count is maintained as a "high water mark," the highest-numbered record yet seen as the user moves through the records. The total number of records is only known after the user has moved beyond the last record. For performance reasons, the count isn't updated when you call `MoveLast`. To count the records yourself, call `MoveNext` repeatedly until `IsEOF` returns nonzero. Adding a record via `CRecordset::AddNew` and `Update` increases the count; deleting a record via `CRecordset::Delete` decreases the count. ## `CRecordset::GetRowsetSize` @@ -1624,7 +1624,7 @@ void SetFieldDirty(void* pv, BOOL bDirty = TRUE); ### Parameters *`pv`*\ -Contains the address of a field data member in the recordset or `NUL`L. If `NULL`, all field data members in the recordset are flagged. (C++ `NULL` isn't the same as Null in database terminology, which means "having no value.") +Contains the address of a field data member in the recordset or `NULL`. If `NULL`, all field data members in the recordset are flagged. (C++ `NULL` isn't the same as Null in database terminology, which means "having no value.") *`bDirty`*\ `TRUE` if the field data member is to be flagged as "dirty" (changed). Otherwise `FALSE` if the field data member is to be flagged as "clean" (unchanged). diff --git a/docs/mfc/reference/crgn-class.md b/docs/mfc/reference/crgn-class.md index 3e1cf67d0b..d0cadf2e71 100644 --- a/docs/mfc/reference/crgn-class.md +++ b/docs/mfc/reference/crgn-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CRgn Class" title: "CRgn Class" -ms.date: "11/04/2016" +description: "Learn more about: CRgn Class" +ms.date: 11/04/2016 f1_keywords: ["CRgn", "AFXWIN/CRgn", "AFXWIN/CRgn::CRgn", "AFXWIN/CRgn::CombineRgn", "AFXWIN/CRgn::CopyRgn", "AFXWIN/CRgn::CreateEllipticRgn", "AFXWIN/CRgn::CreateEllipticRgnIndirect", "AFXWIN/CRgn::CreateFromData", "AFXWIN/CRgn::CreateFromPath", "AFXWIN/CRgn::CreatePolygonRgn", "AFXWIN/CRgn::CreatePolyPolygonRgn", "AFXWIN/CRgn::CreateRectRgn", "AFXWIN/CRgn::CreateRectRgnIndirect", "AFXWIN/CRgn::CreateRoundRectRgn", "AFXWIN/CRgn::EqualRgn", "AFXWIN/CRgn::FromHandle", "AFXWIN/CRgn::GetRegionData", "AFXWIN/CRgn::GetRgnBox", "AFXWIN/CRgn::OffsetRgn", "AFXWIN/CRgn::PtInRegion", "AFXWIN/CRgn::RectInRegion", "AFXWIN/CRgn::SetRectRgn"] helpviewer_keywords: ["CRgn [MFC], CRgn", "CRgn [MFC], CombineRgn", "CRgn [MFC], CopyRgn", "CRgn [MFC], CreateEllipticRgn", "CRgn [MFC], CreateEllipticRgnIndirect", "CRgn [MFC], CreateFromData", "CRgn [MFC], CreateFromPath", "CRgn [MFC], CreatePolygonRgn", "CRgn [MFC], CreatePolyPolygonRgn", "CRgn [MFC], CreateRectRgn", "CRgn [MFC], CreateRectRgnIndirect", "CRgn [MFC], CreateRoundRectRgn", "CRgn [MFC], EqualRgn", "CRgn [MFC], FromHandle", "CRgn [MFC], GetRegionData", "CRgn [MFC], GetRgnBox", "CRgn [MFC], OffsetRgn", "CRgn [MFC], PtInRegion", "CRgn [MFC], RectInRegion", "CRgn [MFC], SetRectRgn"] -ms.assetid: d904da84-76aa-481e-8780-b09485f49e64 --- # CRgn Class @@ -37,7 +36,7 @@ class CRgn : public CGdiObject |[CRgn::CreatePolygonRgn](#createpolygonrgn)|Initializes a `CRgn` object with a polygonal region. The system closes the polygon automatically, if necessary, by drawing a line from the last vertex to the first.| |[CRgn::CreatePolyPolygonRgn](#createpolypolygonrgn)|Initializes a `CRgn` object with a region consisting of a series of closed polygons. The polygons may be disjoint, or they may overlap.| |[CRgn::CreateRectRgn](#createrectrgn)|Initializes a `CRgn` object with a rectangular region.| -|[CRgn::CreateRectRgnIndirect](#createrectrgnindirect)|Initializes a `CRgn` object with a rectangular region defined by a [RECT](/windows/win32/api/windef/ns-windef-rect)tructure.| +|[CRgn::CreateRectRgnIndirect](#createrectrgnindirect)|Initializes a `CRgn` object with a rectangular region defined by a [RECT](/windows/win32/api/windef/ns-windef-rect) structure.| |[CRgn::CreateRoundRectRgn](#createroundrectrgn)|Initializes a `CRgn` object with a rectangular region with rounded corners.| |[CRgn::EqualRgn](#equalrgn)|Checks two `CRgn` objects to determine whether they are equivalent.| |[CRgn::FromHandle](#fromhandle)|Returns a pointer to a `CRgn` object when given a handle to a Windows region.| @@ -250,7 +249,7 @@ BOOL CreateFromData( ### Parameters *lpXForm*
-Points to an [XFORM](/windows/win32/api/wingdi/ns-wingdi-xform)ata structure that defines the transformation to be performed on the region. If this pointer is NULL, the identity transformation is used. +Points to an [XFORM](/windows/win32/api/wingdi/ns-wingdi-xform) data structure that defines the transformation to be performed on the region. If this pointer is NULL, the identity transformation is used. *nCount*
Specifies the number of bytes pointed to by *pRgnData*. diff --git a/docs/mfc/reference/csemaphore-class.md b/docs/mfc/reference/csemaphore-class.md index fce78fae48..a31a4590ab 100644 --- a/docs/mfc/reference/csemaphore-class.md +++ b/docs/mfc/reference/csemaphore-class.md @@ -4,15 +4,14 @@ title: "CSemaphore Class" ms.date: "11/04/2016" f1_keywords: ["CSemaphore", "AFXMT/CSemaphore", "AFXMT/CSemaphore::CSemaphore"] helpviewer_keywords: ["CSemaphore [MFC], CSemaphore"] -ms.assetid: 385fc7e4-8f86-4be2-85e1-d23b38c12f7f --- # CSemaphore Class -An object of class `CSemaphore` represents a "semaphore" — a synchronization object that allows a limited number of threads in one or more processes to access a Maintains a count of the number of threads currently accessing a specified resource. +An object of class `CSemaphore` represents a "semaphore". A semaphore is a synchronization object that controls access to shared resources and prevents race conditions. ## Syntax -``` +```cpp class CSemaphore : public CSyncObject ``` @@ -22,17 +21,17 @@ class CSemaphore : public CSyncObject |Name|Description| |----------|-----------------| -|[CSemaphore::CSemaphore](#csemaphore)|Constructs a `CSemaphore` object.| +|[`CSemaphore::CSemaphore`](#csemaphore)|Constructs a `CSemaphore` object.| ## Remarks -Semaphores are useful in controlling access to a shared resource that can only support a limited number of users. The current count of the `CSemaphore` object is the number of additional users allowed. When the count reaches zero, all attempts to use the resource controlled by the `CSemaphore` object will be inserted into a system queue and wait until they either time out or the count rises above 0. The maximum number of users who can access the controlled resource at one time is specified during construction of the `CSemaphore` object. +Semaphores are useful in controlling access to a shared resource that can only support a limited number of users. The current count of the `CSemaphore` object is the number of other users allowed. When the count reaches zero, all attempts to use the resource controlled by the `CSemaphore` object are inserted into a system queue and wait until they either time out, or the count rises above 0. The maximum number of users who can access the controlled resource at one time is specified during construction of the `CSemaphore` object. -To use a `CSemaphore` object, construct the `CSemaphore` object when it is needed. Specify the name of the semaphore you wish to wait on, and that your application should initially own it. You can then access the semaphore when the constructor returns. Call [CSyncObject::Unlock](../../mfc/reference/csyncobject-class.md#unlock) when you are done accessing the controlled resource. +To use a `CSemaphore` object, construct the `CSemaphore` object when it is needed. Specify the name of the semaphore you wish to wait on, and that your application should initially own it. You can then access the semaphore when the constructor returns. Call [`CSyncObject::Unlock`](../../mfc/reference/csyncobject-class.md#unlock) when you're done accessing the controlled resource. -An alternative method for using `CSemaphore` objects is to add a variable of type `CSemaphore` as a data member to the class you wish to control. During construction of the controlled object, call the constructor of the `CSemaphore` data member specifying the initial access count, maximum access count, name of the semaphore (if it will be used across process boundaries), and desired security attributes. +An alternative method for using `CSemaphore` objects is to add a variable of type `CSemaphore` as a data member to the class you wish to control. During construction of the controlled object, call the constructor of the `CSemaphore` data member specifying the initial access count, maximum access count, name of the semaphore (if it is used across process boundaries), and desired security attributes. -To access resources controlled by `CSemaphore` objects in this manner, first create a variable of either type [CSingleLock](../../mfc/reference/csinglelock-class.md) or type [CMultiLock](../../mfc/reference/cmultilock-class.md) in your resource's access member function. Then call the lock object's `Lock` member function (for example, [CSingleLock::Lock](../../mfc/reference/csinglelock-class.md#lock)). At this point, your thread will either gain access to the resource, wait for the resource to be released and gain access, or wait for the resource to be released and time out, failing to gain access to the resource. In any case, your resource has been accessed in a thread-safe manner. To release the resource, use the lock object's `Unlock` member function (for example, [CSingleLock::Unlock](../../mfc/reference/csinglelock-class.md#unlock)), or allow the lock object to fall out of scope. +To access resources controlled by `CSemaphore` objects in this manner, first create a variable of either type [CSingleLock](../../mfc/reference/csinglelock-class.md) or type [CMultiLock](../../mfc/reference/cmultilock-class.md) in your resource's access member function. Then call the lock object's `Lock` member function (for example, [CSingleLock::Lock](../../mfc/reference/csinglelock-class.md#lock)). At this point, your thread will either gain access to the resource, wait for the resource to be released and gain access, or wait for the resource to be released and time out, failing to gain access to the resource. In any case, your resource is accessed in a thread-safe manner. To release the resource, use the lock object's `Unlock` member function (for example, [CSingleLock::Unlock](../../mfc/reference/csinglelock-class.md#unlock)), or allow the lock object to fall out of scope. Alternatively, you can create a `CSemaphore` object stand-alone, and access it explicitly before attempting to access the controlled resource. This method, while clearer to someone reading your source code, is more prone to error. @@ -54,7 +53,7 @@ For more information on how to use `CSemaphore` objects, see the article [Multit Constructs a named or unnamed `CSemaphore` object. -``` +```cpp CSemaphore( LONG lInitialCount = 1, LONG lMaxCount = 1, @@ -64,26 +63,26 @@ CSemaphore( ### Parameters -*lInitialCount*
+*`lInitialCount`*\ The initial usage count for the semaphore. Must be greater than or equal to 0, and less than or equal to *lMaxCount*. -*lMaxCount*
+*`lMaxCount`*\ The maximum usage count for the semaphore. Must be greater than 0. -*pstrName*
-The name of the semaphore. Must be supplied if the semaphore will be accessed across process boundaries. If `NULL`, the object will be unnamed. If the name matches an existing semaphore, the constructor builds a new `CSemaphore` object which references the semaphore of that name. If the name matches an existing synchronization object that is not a semaphore, the construction will fail. +*`pstrName`*\ +The name of the semaphore. Must be supplied if the semaphore is accessed across process boundaries. If `NULL`, the object will be unnamed. If the name matches an existing semaphore, the constructor builds a new `CSemaphore` object which references the semaphore of that name. If the name matches an existing synchronization object that isn't a semaphore, the construction fails. -*lpsaAttributes*
+*`lpsaAttributes`*\ Security attributes for the semaphore object. For a full description of this structure, see [SECURITY_ATTRIBUTES](/previous-versions/windows/desktop/legacy/aa379560\(v=vs.85\)) in the Windows SDK. ### Remarks -To access or release a `CSemaphore` object, create a [CMultiLock](../../mfc/reference/cmultilock-class.md) or [CSingleLock](../../mfc/reference/csinglelock-class.md) object and call its [Lock](../../mfc/reference/csinglelock-class.md#lock) and [Unlock](../../mfc/reference/csinglelock-class.md#unlock) member functions. +To access or release a `CSemaphore` object, create a [`CMultiLock`](../../mfc/reference/cmultilock-class.md) or [`CSingleLock`](../../mfc/reference/csinglelock-class.md) object and call its [`Lock`](../../mfc/reference/csinglelock-class.md#lock) and [Unlock](../../mfc/reference/csinglelock-class.md#unlock) member functions. > [!IMPORTANT] -> After creating the `CSemaphore` object, use [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) to ensure that the mutex did not already exist. If the mutex did exist unexpectedly, it may indicate a rogue process is squatting and may be intending to use the mutex maliciously. In this case, the recommended security-conscious procedure is to close the handle and continue as if there was a failure in creating the object. +> After creating the `CSemaphore` object, use [`GetLastError`](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) to ensure that the mutex didn't already exist. If the mutex did exist unexpectedly, it may indicate a rogue process is squatting and may be intending to use the mutex maliciously. In this case, the recommended security-conscious procedure is to close the handle and continue as if there was a failure in creating the object. ## See also -[CSyncObject Class](../../mfc/reference/csyncobject-class.md)
+[`CSyncObject` Class](../../mfc/reference/csyncobject-class.md)\ [Hierarchy Chart](../../mfc/hierarchy-chart.md) diff --git a/docs/mfc/reference/cspinbuttonctrl-class.md b/docs/mfc/reference/cspinbuttonctrl-class.md index b9e1628b64..ccd132b239 100644 --- a/docs/mfc/reference/cspinbuttonctrl-class.md +++ b/docs/mfc/reference/cspinbuttonctrl-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CSpinButtonCtrl Class" title: "CSpinButtonCtrl Class" +description: "Learn more about: CSpinButtonCtrl Class" ms.date: "11/04/2016" f1_keywords: ["CSpinButtonCtrl", "AFXCMN/CSpinButtonCtrl", "AFXCMN/CSpinButtonCtrl::CSpinButtonCtrl", "AFXCMN/CSpinButtonCtrl::Create", "AFXCMN/CSpinButtonCtrl::CreateEx", "AFXCMN/CSpinButtonCtrl::GetAccel", "AFXCMN/CSpinButtonCtrl::GetBase", "AFXCMN/CSpinButtonCtrl::GetBuddy", "AFXCMN/CSpinButtonCtrl::GetPos", "AFXCMN/CSpinButtonCtrl::GetRange", "AFXCMN/CSpinButtonCtrl::SetAccel", "AFXCMN/CSpinButtonCtrl::SetBase", "AFXCMN/CSpinButtonCtrl::SetBuddy", "AFXCMN/CSpinButtonCtrl::SetPos", "AFXCMN/CSpinButtonCtrl::SetRange"] helpviewer_keywords: ["CSpinButtonCtrl [MFC], CSpinButtonCtrl", "CSpinButtonCtrl [MFC], Create", "CSpinButtonCtrl [MFC], CreateEx", "CSpinButtonCtrl [MFC], GetAccel", "CSpinButtonCtrl [MFC], GetBase", "CSpinButtonCtrl [MFC], GetBuddy", "CSpinButtonCtrl [MFC], GetPos", "CSpinButtonCtrl [MFC], GetRange", "CSpinButtonCtrl [MFC], SetAccel", "CSpinButtonCtrl [MFC], SetBase", "CSpinButtonCtrl [MFC], SetBuddy", "CSpinButtonCtrl [MFC], SetPos", "CSpinButtonCtrl [MFC], SetRange"] -ms.assetid: 509bfd76-1c5a-4af6-973f-e133c0b87734 --- # CSpinButtonCtrl Class @@ -71,7 +70,7 @@ For more information on using `CSpinButtonCtrl`, see [Controls](../../mfc/contro ## CSpinButtonCtrl::Create -Creates a spin button control and attaches it to a `CSpinButtonCtrl` object.. +Creates a spin button control and attaches it to a `CSpinButtonCtrl` object. ``` virtual BOOL Create( @@ -366,7 +365,7 @@ The member function `SetRange32` sets the 32-bit range for the spin button contr ## See also -[MFC Sample CMNCTRL2](../../overview/visual-cpp-samples.md)
-[CWnd Class](../../mfc/reference/cwnd-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
+[MFC Sample CMNCTRL2](../../overview/visual-cpp-samples.md)\ +[CWnd Class](../../mfc/reference/cwnd-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ [CSliderCtrl Class](../../mfc/reference/csliderctrl-class.md) diff --git a/docs/mfc/reference/cstdiofile-class.md b/docs/mfc/reference/cstdiofile-class.md index 3692c706a0..fd2ff46ab5 100644 --- a/docs/mfc/reference/cstdiofile-class.md +++ b/docs/mfc/reference/cstdiofile-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CStdioFile Class" title: "CStdioFile Class" -ms.date: "08/29/2019" +description: "Learn more about: CStdioFile Class" +ms.date: 08/29/2019 f1_keywords: ["CStdioFile", "AFX/CStdioFile", "AFX/CStdioFile::CStdioFile", "AFX/CStdioFile::Open", "AFX/CStdioFile::ReadString", "AFX/CStdioFile::Seek", "AFX/CStdioFile::WriteString", "AFX/CStdioFile::m_pStream"] helpviewer_keywords: ["CStdioFile [MFC], CStdioFile", "CStdioFile [MFC], Open", "CStdioFile [MFC], ReadString", "CStdioFile [MFC], Seek", "CStdioFile [MFC], WriteString", "CStdioFile [MFC], m_pStream"] -ms.assetid: 88c2274c-4f0e-4327-882a-557ba4b3ae15 --- # `CStdioFile` Class @@ -260,7 +259,7 @@ Specifies a pointer to a buffer that contains a null-terminated string. ### Remarks -The terminating null character ( `\0`) is not written to the file. This method writes newline characters in *`lpsz`* to the file as a carriage return-line feed pair. +The terminating null character (`\0`) is not written to the file. This method writes newline characters in *`lpsz`* to the file as a carriage return-line feed pair. If you want to write data that is not null-terminated to a file, use `CStdioFile::Write` or [`CFile::Write`](../../mfc/reference/cfile-class.md#write). diff --git a/docs/mfc/reference/ctabctrl-class.md b/docs/mfc/reference/ctabctrl-class.md index 8416886a1d..dc43226fbd 100644 --- a/docs/mfc/reference/ctabctrl-class.md +++ b/docs/mfc/reference/ctabctrl-class.md @@ -1,7 +1,7 @@ --- title: "CTabCtrl Class" description: "Learn more about: CTabCtrl Class" -ms.date: "1/29/2021" +ms.date: 1/29/2021 f1_keywords: ["CTabCtrl", "AFXCMN/CTabCtrl", "AFXCMN/CTabCtrl::CTabCtrl", "AFXCMN/CTabCtrl::AdjustRect", "AFXCMN/CTabCtrl::Create", "AFXCMN/CTabCtrl::CreateEx", "AFXCMN/CTabCtrl::DeleteAllItems", "AFXCMN/CTabCtrl::DeleteItem", "AFXCMN/CTabCtrl::DeselectAll", "AFXCMN/CTabCtrl::DrawItem", "AFXCMN/CTabCtrl::GetCurFocus", "AFXCMN/CTabCtrl::GetCurSel", "AFXCMN/CTabCtrl::GetExtendedStyle", "AFXCMN/CTabCtrl::GetImageList", "AFXCMN/CTabCtrl::GetItem", "AFXCMN/CTabCtrl::GetItemCount", "AFXCMN/CTabCtrl::GetItemRect", "AFXCMN/CTabCtrl::GetItemState", "AFXCMN/CTabCtrl::GetRowCount", "AFXCMN/CTabCtrl::GetToolTips", "AFXCMN/CTabCtrl::HighlightItem", "AFXCMN/CTabCtrl::HitTest", "AFXCMN/CTabCtrl::InsertItem", "AFXCMN/CTabCtrl::RemoveImage", "AFXCMN/CTabCtrl::SetCurFocus", "AFXCMN/CTabCtrl::SetCurSel", "AFXCMN/CTabCtrl::SetExtendedStyle", "AFXCMN/CTabCtrl::SetImageList", "AFXCMN/CTabCtrl::SetItem", "AFXCMN/CTabCtrl::SetItemExtra", "AFXCMN/CTabCtrl::SetItemSize", "AFXCMN/CTabCtrl::SetItemState", "AFXCMN/CTabCtrl::SetMinTabWidth", "AFXCMN/CTabCtrl::SetPadding", "AFXCMN/CTabCtrl::SetToolTips"] helpviewer_keywords: ["CTabCtrl [MFC], CTabCtrl", "CTabCtrl [MFC], AdjustRect", "CTabCtrl [MFC], Create", "CTabCtrl [MFC], CreateEx", "CTabCtrl [MFC], DeleteAllItems", "CTabCtrl [MFC], DeleteItem", "CTabCtrl [MFC], DeselectAll", "CTabCtrl [MFC], DrawItem", "CTabCtrl [MFC], GetCurFocus", "CTabCtrl [MFC], GetCurSel", "CTabCtrl [MFC], GetExtendedStyle", "CTabCtrl [MFC], GetImageList", "CTabCtrl [MFC], GetItem", "CTabCtrl [MFC], GetItemCount", "CTabCtrl [MFC], GetItemRect", "CTabCtrl [MFC], GetItemState", "CTabCtrl [MFC], GetRowCount", "CTabCtrl [MFC], GetToolTips", "CTabCtrl [MFC], HighlightItem", "CTabCtrl [MFC], HitTest", "CTabCtrl [MFC], InsertItem", "CTabCtrl [MFC], RemoveImage", "CTabCtrl [MFC], SetCurFocus", "CTabCtrl [MFC], SetCurSel", "CTabCtrl [MFC], SetExtendedStyle", "CTabCtrl [MFC], SetImageList", "CTabCtrl [MFC], SetItem", "CTabCtrl [MFC], SetItemExtra", "CTabCtrl [MFC], SetItemSize", "CTabCtrl [MFC], SetItemState", "CTabCtrl [MFC], SetMinTabWidth", "CTabCtrl [MFC], SetPadding", "CTabCtrl [MFC], SetToolTips"] --- @@ -366,7 +366,7 @@ Index into the tab control's image list, or -1 if there is no image for the tab. - `lParam` - Application-defined data associated with the tab. If there are more than 4 bytes of application-defined data per tab, an application must define a structure and use it instead of the `TCITEM` structure. The first member of the application-defined structure must be a [`TCITEMHEADER`](/windows/win32/api/commctrl/ns-commctrl-tcitemheaderw)structure. The `TCITEMHEADER` structure is identical to the `TCITEM` structure, but without the `lParam` member. The difference between the size of your structure and the size of the `TCITEMHEADER` structure should equal the number of extra bytes per tab. + Application-defined data associated with the tab. If there are more than 4 bytes of application-defined data per tab, an application must define a structure and use it instead of the `TCITEM` structure. The first member of the application-defined structure must be a [`TCITEMHEADER`](/windows/win32/api/commctrl/ns-commctrl-tcitemheaderw) structure. The `TCITEMHEADER` structure is identical to the `TCITEM` structure, but without the `lParam` member. The difference between the size of your structure and the size of the `TCITEMHEADER` structure should equal the number of extra bytes per tab. ### Example diff --git a/docs/mfc/reference/ctaskdialog-class.md b/docs/mfc/reference/ctaskdialog-class.md index 9c685c3560..2f1d87a819 100644 --- a/docs/mfc/reference/ctaskdialog-class.md +++ b/docs/mfc/reference/ctaskdialog-class.md @@ -685,7 +685,7 @@ virtual HRESULT OnHelp(); ### Return Value -The default implementation returns S_OK. +The default implementation returns S_FALSE. ### Remarks diff --git a/docs/mfc/reference/ctypedptrarray-class.md b/docs/mfc/reference/ctypedptrarray-class.md index 5bdf3ccd14..db37f7ca4a 100644 --- a/docs/mfc/reference/ctypedptrarray-class.md +++ b/docs/mfc/reference/ctypedptrarray-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CTypedPtrArray Class" title: "CTypedPtrArray Class" -ms.date: "11/04/2016" +description: "Learn more about: CTypedPtrArray Class" +ms.date: 11/04/2016 f1_keywords: ["CTypedPtrArray", "AFXTEMPL/CTypedPtrArray", "AFXTEMPL/CTypedPtrArray::Add", "AFXTEMPL/CTypedPtrArray::Append", "AFXTEMPL/CTypedPtrArray::Copy", "AFXTEMPL/CTypedPtrArray::ElementAt", "AFXTEMPL/CTypedPtrArray::GetAt", "AFXTEMPL/CTypedPtrArray::InsertAt", "AFXTEMPL/CTypedPtrArray::SetAt", "AFXTEMPL/CTypedPtrArray::SetAtGrow"] helpviewer_keywords: ["CTypedPtrArray [MFC], Add", "CTypedPtrArray [MFC], Append", "CTypedPtrArray [MFC], Copy", "CTypedPtrArray [MFC], ElementAt", "CTypedPtrArray [MFC], GetAt", "CTypedPtrArray [MFC], InsertAt", "CTypedPtrArray [MFC], SetAt", "CTypedPtrArray [MFC], SetAtGrow"] -ms.assetid: e3ecdf1a-a889-4156-92dd-ddbd36ccd919 --- # CTypedPtrArray Class @@ -20,7 +19,7 @@ class CTypedPtrArray : public BASE_CLASS #### Parameters *BASE_CLASS*
-Base class of the typed pointer array class; must be an array class ( `CObArray` or `CPtrArray`). +Base class of the typed pointer array class; must be an array class (`CObArray` or `CPtrArray`). *TYPE*
Type of the elements stored in the base-class array. diff --git a/docs/mfc/reference/ctypedptrlist-class.md b/docs/mfc/reference/ctypedptrlist-class.md index dd4e551d00..d06daa00f4 100644 --- a/docs/mfc/reference/ctypedptrlist-class.md +++ b/docs/mfc/reference/ctypedptrlist-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CTypedPtrList Class" title: "CTypedPtrList Class" -ms.date: "11/04/2016" +description: "Learn more about: CTypedPtrList Class" +ms.date: 11/04/2016 f1_keywords: ["CTypedPtrList", "AFXTEMPL/CTypedPtrList", "AFXTEMPL/CTypedPtrList::AddHead", "AFXTEMPL/CTypedPtrList::AddTail", "AFXTEMPL/CTypedPtrList::GetAt", "AFXTEMPL/CTypedPtrList::GetHead", "AFXTEMPL/CTypedPtrList::GetNext", "AFXTEMPL/CTypedPtrList::GetPrev", "AFXTEMPL/CTypedPtrList::GetTail", "AFXTEMPL/CTypedPtrList::RemoveHead", "AFXTEMPL/CTypedPtrList::RemoveTail", "AFXTEMPL/CTypedPtrList::SetAt"] helpviewer_keywords: ["CTypedPtrList [MFC], AddHead", "CTypedPtrList [MFC], AddTail", "CTypedPtrList [MFC], GetAt", "CTypedPtrList [MFC], GetHead", "CTypedPtrList [MFC], GetNext", "CTypedPtrList [MFC], GetPrev", "CTypedPtrList [MFC], GetTail", "CTypedPtrList [MFC], RemoveHead", "CTypedPtrList [MFC], RemoveTail", "CTypedPtrList [MFC], SetAt"] -ms.assetid: c273096e-1756-4340-864b-4a08b674a65e --- # CTypedPtrList Class @@ -20,7 +19,7 @@ class CTypedPtrList : public BASE_CLASS #### Parameters *BASE_CLASS*
-Base class of the typed pointer list class; must be a pointer list class ( `CObList` or `CPtrList`). +Base class of the typed pointer list class; must be a pointer list class (`CObList` or `CPtrList`). *TYPE*
Type of the elements stored in the base-class list. diff --git a/docs/mfc/reference/ctypedptrmap-class.md b/docs/mfc/reference/ctypedptrmap-class.md index 03721557f8..1e8ac54c64 100644 --- a/docs/mfc/reference/ctypedptrmap-class.md +++ b/docs/mfc/reference/ctypedptrmap-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CTypedPtrMap Class" title: "CTypedPtrMap Class" -ms.date: "11/04/2016" +description: "Learn more about: CTypedPtrMap Class" +ms.date: 11/04/2016 f1_keywords: ["CTypedPtrMap", "AFXTEMPL/CTypedPtrMap", "AFXTEMPL/CTypedPtrMap::GetNextAssoc", "AFXTEMPL/CTypedPtrMap::Lookup", "AFXTEMPL/CTypedPtrMap::RemoveKey", "AFXTEMPL/CTypedPtrMap::SetAt"] helpviewer_keywords: ["CTypedPtrMap [MFC], GetNextAssoc", "CTypedPtrMap [MFC], Lookup", "CTypedPtrMap [MFC], RemoveKey", "CTypedPtrMap [MFC], SetAt"] -ms.assetid: 9f377385-c6e9-4471-8b40-8fe220c50164 --- # CTypedPtrMap Class @@ -20,7 +19,7 @@ class CTypedPtrMap : public BASE_CLASS #### Parameters *BASE_CLASS*
-Base class of the typed pointer map class; must be a pointer map class ( `CMapPtrToPtr`, `CMapPtrToWord`, `CMapWordToPtr`, or `CMapStringToPtr`). +Base class of the typed pointer map class; must be a pointer map class (`CMapPtrToPtr`, `CMapPtrToWord`, `CMapWordToPtr`, or `CMapStringToPtr`). *KEY*
Class of the object used as the key to the map. diff --git a/docs/mfc/reference/cwinapp-class.md b/docs/mfc/reference/cwinapp-class.md index db9e83c08f..ac07d50b58 100644 --- a/docs/mfc/reference/cwinapp-class.md +++ b/docs/mfc/reference/cwinapp-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CWinApp Class" title: "CWinApp Class" -ms.date: "07/15/2019" +description: "Learn more about: CWinApp Class" +ms.date: 07/15/2019 f1_keywords: ["CWinApp", "AFXWIN/CWinApp", "AFXWIN/CWinApp::CWinApp", "AFXWIN/CWinApp::AddDocTemplate", "AFXWIN/CWinApp::AddToRecentFileList", "AFXWIN/CWinApp::ApplicationRecoveryCallback", "AFXWIN/CWinApp::CloseAllDocuments", "AFXWIN/CWinApp::CreatePrinterDC", "AFXWIN/CWinApp::DelRegTree", "AFXWIN/CWinApp::DoMessageBox", "AFXWIN/CWinApp::DoWaitCursor", "AFXWIN/CWinApp::EnableD2DSupport", "AFXWIN/CWinApp::EnableHtmlHelp", "AFXWIN/CWinApp::EnableTaskbarInteraction", "AFXWIN/CWinApp::ExitInstance", "AFXWIN/CWinApp::GetApplicationRecoveryParameter", "AFXWIN/CWinApp::GetApplicationRecoveryPingInterval", "AFXWIN/CWinApp::GetApplicationRestartFlags", "AFXWIN/CWinApp::GetAppRegistryKey", "AFXWIN/CWinApp::GetDataRecoveryHandler", "AFXWIN/CWinApp::GetFirstDocTemplatePosition", "AFXWIN/CWinApp::GetHelpMode", "AFXWIN/CWinApp::GetNextDocTemplate", "AFXWIN/CWinApp::GetPrinterDeviceDefaults", "AFXWIN/CWinApp::GetProfileBinary", "AFXWIN/CWinApp::GetProfileInt", "AFXWIN/CWinApp::GetProfileString", "AFXWIN/CWinApp::GetSectionKey", "AFXWIN/CWinApp::HideApplication", "AFXWIN/CWinApp::HtmlHelp", "AFXWIN/CWinApp::InitInstance", "AFXWIN/CWinApp::IsTaskbarInteractionEnabled", "AFXWIN/CWinApp::LoadCursor", "AFXWIN/CWinApp::LoadIcon", "AFXWIN/CWinApp::LoadOEMCursor", "AFXWIN/CWinApp::LoadOEMIcon", "AFXWIN/CWinApp::LoadStandardCursor", "AFXWIN/CWinApp::LoadStandardIcon", "AFXWIN/CWinApp::OnDDECommand", "AFXWIN/CWinApp::OnIdle", "AFXWIN/CWinApp::OpenDocumentFile", "AFXWIN/CWinApp::ParseCommandLine", "AFXWIN/CWinApp::PreTranslateMessage", "AFXWIN/CWinApp::ProcessMessageFilter", "AFXWIN/CWinApp::ProcessShellCommand", "AFXWIN/CWinApp::ProcessWndProcException", "AFXWIN/CWinApp::Register", "AFXWIN/CWinApp::RegisterWithRestartManager", "AFXWIN/CWinApp::ReopenPreviousFilesAtRestart", "AFXWIN/CWinApp::RestartInstance", "AFXWIN/CWinApp::RestoreAutosavedFilesAtRestart", "AFXWIN/CWinApp::Run", "AFXWIN/CWinApp::RunAutomated", "AFXWIN/CWinApp::RunEmbedded", "AFXWIN/CWinApp::SaveAllModified", "AFXWIN/CWinApp::SelectPrinter", "AFXWIN/CWinApp::SetHelpMode", "AFXWIN/CWinApp::SupportsApplicationRecovery", "AFXWIN/CWinApp::SupportsAutosaveAtInterval", "AFXWIN/CWinApp::SupportsAutosaveAtRestart", "AFXWIN/CWinApp::SupportsRestartManager", "AFXWIN/CWinApp::Unregister", "AFXWIN/CWinApp::WinHelp", "AFXWIN/CWinApp::WriteProfileBinary", "AFXWIN/CWinApp::WriteProfileInt", "AFXWIN/CWinApp::WriteProfileString", "AFXWIN/CWinApp::EnableShellOpen", "AFXWIN/CWinApp::LoadStdProfileSettings", "AFXWIN/CWinApp::OnContextHelp", "AFXWIN/CWinApp::OnFileNew", "AFXWIN/CWinApp::OnFileOpen", "AFXWIN/CWinApp::OnFilePrintSetup", "AFXWIN/CWinApp::OnHelp", "AFXWIN/CWinApp::OnHelpFinder", "AFXWIN/CWinApp::OnHelpIndex", "AFXWIN/CWinApp::OnHelpUsing", "AFXWIN/CWinApp::RegisterShellFileTypes", "AFXWIN/CWinApp::SetAppID", "AFXWIN/CWinApp::SetRegistryKey", "AFXWIN/CWinApp::UnregisterShellFileTypes", "AFXWIN/CWinApp::m_bHelpMode", "AFXWIN/CWinApp::m_eHelpType", "AFXWIN/CWinApp::m_hInstance", "AFXWIN/CWinApp::m_lpCmdLine", "AFXWIN/CWinApp::m_nCmdShow", "AFXWIN/CWinApp::m_pActiveWnd", "AFXWIN/CWinApp::m_pszAppID", "AFXWIN/CWinApp::m_pszAppName", "AFXWIN/CWinApp::m_pszExeName", "AFXWIN/CWinApp::m_pszHelpFilePath", "AFXWIN/CWinApp::m_pszProfileName", "AFXWIN/CWinApp::m_pszRegistryKey", "AFXWIN/CWinApp::m_dwRestartManagerSupportFlags", "AFXWIN/CWinApp::m_nAutosaveInterval", "AFXWIN/CWinApp::m_pDataRecoveryHandler"] helpviewer_keywords: ["CWinApp [MFC], CWinApp", "CWinApp [MFC], AddDocTemplate", "CWinApp [MFC], AddToRecentFileList", "CWinApp [MFC], ApplicationRecoveryCallback", "CWinApp [MFC], CloseAllDocuments", "CWinApp [MFC], CreatePrinterDC", "CWinApp [MFC], DelRegTree", "CWinApp [MFC], DoMessageBox", "CWinApp [MFC], DoWaitCursor", "CWinApp [MFC], EnableD2DSupport", "CWinApp [MFC], EnableHtmlHelp", "CWinApp [MFC], EnableTaskbarInteraction", "CWinApp [MFC], ExitInstance", "CWinApp [MFC], GetApplicationRecoveryParameter", "CWinApp [MFC], GetApplicationRecoveryPingInterval", "CWinApp [MFC], GetApplicationRestartFlags", "CWinApp [MFC], GetAppRegistryKey", "CWinApp [MFC], GetDataRecoveryHandler", "CWinApp [MFC], GetFirstDocTemplatePosition", "CWinApp [MFC], GetHelpMode", "CWinApp [MFC], GetNextDocTemplate", "CWinApp [MFC], GetPrinterDeviceDefaults", "CWinApp [MFC], GetProfileBinary", "CWinApp [MFC], GetProfileInt", "CWinApp [MFC], GetProfileString", "CWinApp [MFC], GetSectionKey", "CWinApp [MFC], HideApplication", "CWinApp [MFC], HtmlHelp", "CWinApp [MFC], InitInstance", "CWinApp [MFC], IsTaskbarInteractionEnabled", "CWinApp [MFC], LoadCursor", "CWinApp [MFC], LoadIcon", "CWinApp [MFC], LoadOEMCursor", "CWinApp [MFC], LoadOEMIcon", "CWinApp [MFC], LoadStandardCursor", "CWinApp [MFC], LoadStandardIcon", "CWinApp [MFC], OnDDECommand", "CWinApp [MFC], OnIdle", "CWinApp [MFC], OpenDocumentFile", "CWinApp [MFC], ParseCommandLine", "CWinApp [MFC], PreTranslateMessage", "CWinApp [MFC], ProcessMessageFilter", "CWinApp [MFC], ProcessShellCommand", "CWinApp [MFC], ProcessWndProcException", "CWinApp [MFC], Register", "CWinApp [MFC], RegisterWithRestartManager", "CWinApp [MFC], ReopenPreviousFilesAtRestart", "CWinApp [MFC], RestartInstance", "CWinApp [MFC], RestoreAutosavedFilesAtRestart", "CWinApp [MFC], Run", "CWinApp [MFC], RunAutomated", "CWinApp [MFC], RunEmbedded", "CWinApp [MFC], SaveAllModified", "CWinApp [MFC], SelectPrinter", "CWinApp [MFC], SetHelpMode", "CWinApp [MFC], SupportsApplicationRecovery", "CWinApp [MFC], SupportsAutosaveAtInterval", "CWinApp [MFC], SupportsAutosaveAtRestart", "CWinApp [MFC], SupportsRestartManager", "CWinApp [MFC], Unregister", "CWinApp [MFC], WinHelp", "CWinApp [MFC], WriteProfileBinary", "CWinApp [MFC], WriteProfileInt", "CWinApp [MFC], WriteProfileString", "CWinApp [MFC], EnableShellOpen", "CWinApp [MFC], LoadStdProfileSettings", "CWinApp [MFC], OnContextHelp", "CWinApp [MFC], OnFileNew", "CWinApp [MFC], OnFileOpen", "CWinApp [MFC], OnFilePrintSetup", "CWinApp [MFC], OnHelp", "CWinApp [MFC], OnHelpFinder", "CWinApp [MFC], OnHelpIndex", "CWinApp [MFC], OnHelpUsing", "CWinApp [MFC], RegisterShellFileTypes", "CWinApp [MFC], SetAppID", "CWinApp [MFC], SetRegistryKey", "CWinApp [MFC], UnregisterShellFileTypes", "CWinApp [MFC], m_bHelpMode", "CWinApp [MFC], m_eHelpType", "CWinApp [MFC], m_hInstance", "CWinApp [MFC], m_lpCmdLine", "CWinApp [MFC], m_nCmdShow", "CWinApp [MFC], m_pActiveWnd", "CWinApp [MFC], m_pszAppID", "CWinApp [MFC], m_pszAppName", "CWinApp [MFC], m_pszExeName", "CWinApp [MFC], m_pszHelpFilePath", "CWinApp [MFC], m_pszProfileName", "CWinApp [MFC], m_pszRegistryKey", "CWinApp [MFC], m_dwRestartManagerSupportFlags", "CWinApp [MFC], m_nAutosaveInterval", "CWinApp [MFC], m_pDataRecoveryHandler"] -ms.assetid: e426a3cd-0d15-40d6-bd55-beaa5feb2343 --- # CWinApp Class @@ -962,7 +961,7 @@ HCURSOR LoadOEMCursor(UINT nIDCursor) const; ### Parameters *nIDCursor*
-An **OCR_** manifest constant identifier that specifies a predefined Windows cursor. You must have `#define OEMRESOURCE` before `#include \` to gain access to the **OCR_** constants in WINDOWS.H. +An **OCR_** manifest constant identifier that specifies a predefined Windows cursor. You must have `#define OEMRESOURCE` before `#include ` to gain access to the **OCR_** constants in WINDOWS.H. ### Return Value @@ -989,7 +988,7 @@ HICON LoadOEMIcon(UINT nIDIcon) const; ### Parameters *nIDIcon*
-An **OIC_** manifest constant identifier that specifies a predefined Windows icon. You must have `#define OEMRESOURCE` before `#include \` to access the **OIC_** constants in WINDOWS.H. +An **OIC_** manifest constant identifier that specifies a predefined Windows icon. You must have `#define OEMRESOURCE` before `#include ` to access the **OIC_** constants in WINDOWS.H. ### Return Value @@ -1535,7 +1534,7 @@ The framework calls this method to open the named [CDocument](../../mfc/referenc ``` virtual CDocument* OpenDocumentFile( - LPCTSTR lpszFileName + LPCTSTR lpszFileName, BOOL bAddToMRU = TRUE); ``` @@ -1621,7 +1620,7 @@ virtual BOOL ProcessMessageFilter( Specifies a hook code. This member function uses the code to determine how to process *lpMsg.* *lpMsg*
-A pointer to a Windows [MSG](/windows/win32/api/winuser/ns-winuser-msg)tructure. +A pointer to a Windows [MSG](/windows/win32/api/winuser/ns-winuser-msg) structure. ### Return Value @@ -1692,7 +1691,7 @@ virtual LRESULT ProcessWndProcException( A pointer to an uncaught exception. *pMsg*
-A [MSG](/windows/win32/api/winuser/ns-winuser-msg)tructure that contains information about the windows message that caused the framework to throw an exception. +A [MSG](/windows/win32/api/winuser/ns-winuser-msg) structure that contains information about the windows message that caused the framework to throw an exception. ### Return Value @@ -1936,7 +1935,7 @@ void SelectPrinter( ### Parameters *hDevNames*
-A handle to a [DEVNAMES](/windows/win32/api/commdlg/ns-commdlg-devnames)tructure that identifies the driver, device, and output port names of a specific printer. +A handle to a [DEVNAMES](/windows/win32/api/commdlg/ns-commdlg-devnames) structure that identifies the driver, device, and output port names of a specific printer. *hDevMode*
A handle to a [DEVMODE](/windows/win32/api/wingdi/ns-wingdi-devmodea) structure that specifies information about the device initialization and environment of a printer. diff --git a/docs/mfc/reference/cwinappex-class.md b/docs/mfc/reference/cwinappex-class.md index d9c7ac4fad..85b0987718 100644 --- a/docs/mfc/reference/cwinappex-class.md +++ b/docs/mfc/reference/cwinappex-class.md @@ -970,7 +970,7 @@ virtual BOOL OnWorkspaceIdle(CWnd*); ### Parameters -[in] *`CWnd*`*\ +[in] *`CWnd*`* ### Return Value diff --git a/docs/mfc/reference/cwindowdc-class.md b/docs/mfc/reference/cwindowdc-class.md index 19f890b5ce..e27c7be752 100644 --- a/docs/mfc/reference/cwindowdc-class.md +++ b/docs/mfc/reference/cwindowdc-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: CWindowDC Class" title: "CWindowDC Class" -ms.date: "11/04/2016" +description: "Learn more about: CWindowDC Class" +ms.date: 11/04/2016 f1_keywords: ["CWindowDC", "AFXWIN/CWindowDC", "AFXWIN/CWindowDC::CWindowDC", "AFXWIN/CWindowDC::m_hWnd"] helpviewer_keywords: ["CWindowDC [MFC], CWindowDC", "CWindowDC [MFC], m_hWnd"] -ms.assetid: 876a3641-4cde-471c-b0d1-fe58b32af79c --- # CWindowDC Class @@ -32,7 +31,7 @@ class CWindowDC : public CDC ## Remarks -Calls the Windows function [GetWindowDC](/windows/win32/api/winuser/nf-winuser-getwindowdc)at construction time and [ReleaseDC](/windows/win32/api/winuser/nf-winuser-releasedc) at destruction time. This means that a `CWindowDC` object accesses the entire screen area of a [CWnd](../../mfc/reference/cwnd-class.md) (both client and nonclient areas). +Calls the Windows function [GetWindowDC](/windows/win32/api/winuser/nf-winuser-getwindowdc) at construction time and [ReleaseDC](/windows/win32/api/winuser/nf-winuser-releasedc) at destruction time. This means that a `CWindowDC` object accesses the entire screen area of a [CWnd](../../mfc/reference/cwnd-class.md) (both client and nonclient areas). For more information on using `CWindowDC`, see [Device Contexts](../../mfc/device-contexts.md). diff --git a/docs/mfc/reference/diagnostic-services.md b/docs/mfc/reference/diagnostic-services.md index 7bd4aab539..18c273ec9e 100644 --- a/docs/mfc/reference/diagnostic-services.md +++ b/docs/mfc/reference/diagnostic-services.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Diagnostic Services" title: "Diagnostic Services" +description: "Learn more about: Diagnostic Services" ms.date: 06/29/2022 helpviewer_keywords: ["diagnosi [MFC]s, diagnostic services", "diagnostic macros [MFC], list of general MFC", "services [MFC], diagnostic", "MFC, diagnostic services", "general diagnostic functions and variables [MFC]", "diagnostics [MFC], diagnostic functions and variables", "diagnostics [MFC], list of general MFC", "diagnosis [MFC], diagnostic functions and variables", "diagnosis [MFC], list of general MFC", "general diagnostic macros in MFC", "diagnostic macros [MFC]", "diagnostic services [MFC]", "object diagnostic functions in MFC", "diagnostics [MFC], diagnostic services", "diagnostic functions and variables [MFC]"] -ms.assetid: 8d78454f-9fae-49c2-88c9-d3fabd5393e8 --- # Diagnostic Services @@ -77,7 +76,7 @@ Suppresses compiler warnings for the use of deprecated MFC functions. ### Syntax -``` +```cpp _AFX_SECURE_NO_WARNINGS ``` @@ -105,7 +104,7 @@ Call this function to cause a break (at the location of the call to `AfxDebugBre ### Syntax ```cpp -void AfxDebugBreak( ); +void AfxDebugBreak(); ``` ### Remarks @@ -120,13 +119,13 @@ void AfxDebugBreak( ); Evaluates its argument. -``` +```cpp ASSERT(booleanExpression) ``` ### Parameters -*booleanExpression*
+*booleanExpression*\ Specifies an expression (including pointer values) that evaluates to nonzero or 0. ### Remarks @@ -156,16 +155,16 @@ In the Release version of MFC, ASSERT does not evaluate the expression and thus This macro asserts that the object pointed to is an object of the specified class, or is an object of a class derived from the specified class. -``` +```cpp ASSERT_KINDOF(classname, pobject) ``` ### Parameters -*classname*
+*classname*\ The name of a `CObject`-derived class. -*pobject*
+*pobject*\ A pointer to a class object. ### Remarks @@ -178,7 +177,7 @@ Using the `ASSERT_KINDOF` macro is exactly the same as coding: [!code-cpp[NVC_MFCDocView#195](../../mfc/codesnippet/cpp/diagnostic-services_4.cpp)] -This function works only for classes declared with the [DECLARE_DYNAMIC](run-time-object-model-services.md#declare_dynamic or [DECLARE_SERIAL](run-time-object-model-services.md#declare_serial) macro. +This function works only for classes declared with the [DECLARE_DYNAMIC](run-time-object-model-services.md#declare_dynamic) or [DECLARE_SERIAL](run-time-object-model-services.md#declare_serial) macro. > [!NOTE] > This function is available only in the Debug version of MFC. @@ -191,13 +190,13 @@ This function works only for classes declared with the [DECLARE_DYNAMIC](run-tim Use to test your assumptions about the validity of an object's internal state. -``` +```cpp ASSERT_VALID(pObject) ``` ### Parameters -*pObject*
+*pObject*\ Specifies an object of a class derived from `CObject` that has an overriding version of the `AssertValid` member function. ### Remarks @@ -223,8 +222,8 @@ For more information and examples, see [Debugging MFC Applications](/visualstudi Assists in finding memory leaks. -``` -#define new DEBUG_NEW +```cpp +#define new DEBUG_NEW ``` ### Remarks @@ -250,7 +249,7 @@ Once you insert this directive, the preprocessor will insert DEBUG_NEW wherever In debug mode (when the **_DEBUG** symbol is defined), DEBUG_ONLY evaluates its argument. -``` +```cpp DEBUG_ONLY(expression) ``` @@ -274,14 +273,14 @@ Use to validate data correctness. ### Syntax -``` -ENSURE( booleanExpression ) -ENSURE_VALID( booleanExpression ) +```cpp +ENSURE(booleanExpression) +ENSURE_VALID(booleanExpression) ``` ### Parameters -*booleanExpression*
+*booleanExpression*\ Specifies a boolean expression to be tested. ### Remarks @@ -306,7 +305,7 @@ Expands to the name of the file that is being compiled. ### Syntax -``` +```cpp THIS_FILE ``` @@ -334,9 +333,9 @@ static char THIS_FILE[] = __FILE__; Sends the specified string to the debugger of the current application. -``` +```cpp TRACE(exp) -TRACE(DWORD category, UINT level, LPCSTR lpszFormat, ...) +TRACE(DWORD category, UINT level, LPCSTR lpszFormat, ...) ``` ### Remarks @@ -355,13 +354,13 @@ For more information, see [Debugging MFC Applications](/visualstudio/debugger/mf In the Debug version of MFC, evaluates its argument. -``` +```cpp VERIFY(booleanExpression) ``` ### Parameters -*booleanExpression*
+*booleanExpression*\ Specifies an expression (including pointer values) that evaluates to nonzero or 0. ### Remarks @@ -388,8 +387,8 @@ In the Release version of MFC, VERIFY evaluates the expression but does not prin Provides basic object-dumping capability in your application. -``` -CDumpContext afxDump; +```cpp +CDumpContext afxDump; ``` ### Remarks @@ -420,7 +419,7 @@ void AfxDump(const CObject* pOb); ### Parameters -*pOb*
+*pOb*\ A pointer to an object of a class derived from `CObject`. ### Remarks @@ -437,8 +436,8 @@ Your program code should not call `AfxDump`, but should instead call the `Dump` This variable is accessible from a debugger or your program and allows you to tune allocation diagnostics. -``` -int afxMemDF; +```cpp +int afxMemDF; ``` ### Remarks @@ -490,8 +489,8 @@ This function can be used to check the return values of calls to OLE functions i This function validates the free memory pool and prints error messages as required. -``` -BOOL AfxCheckMemory(); +```cpp +BOOL AfxCheckMemory(); ``` ### Return Value @@ -533,7 +532,7 @@ void AfxDump(const CObject* pOb); ### Parameters -*pOb*
+*pOb*\ A pointer to an object of a class derived from `CObject`. ### Remarks @@ -556,7 +555,7 @@ void AFXAPI AfxDumpStack(DWORD dwTarget = AFX_STACK_DUMP_TARGET_DEFAULT); ### Parameters -*dwTarget*
+*dwTarget*\ Indicates the target of the dump output. Possible values, which can be combined using the bitwise-OR (**`|`**) operator, are as follows: - AFX_STACK_DUMP_TARGET_TRACE Sends output by means of the [TRACE](#trace) macro. The TRACE macro generates output in debug builds only; it generates no output in release builds. Also, TRACE can be redirected to other targets besides the debugger. @@ -626,13 +625,13 @@ To use this function successfully: Enables and disables the memory leak dump in the AFX_DEBUG_STATE destructor. -``` +```cpp BOOL AFXAPI AfxEnableMemoryLeakDump(BOOL bDump); ``` ### Parameters -*bDump*
+*bDump*\ [in] TRUE indicates the memory leak dump is enabled; FALSE indicates the memory leak dump is disabled. ### Return Value @@ -656,13 +655,13 @@ If your application loads another library before the MFC library, some memory al Diagnostic memory tracking is normally enabled in the Debug version of MFC. -``` +```cpp BOOL AfxEnableMemoryTracking(BOOL bTrack); ``` ### Parameters -*bTrack*
+*bTrack*\ Setting this value to TRUE turns on memory tracking; FALSE turns it off. ### Return Value @@ -690,7 +689,7 @@ For more information on `AfxEnableMemoryTracking`, see [Debugging MFC Applicatio Tests a memory address to make sure it represents a currently active memory block that was allocated by the diagnostic version of **`new`**. -``` +```cpp BOOL AfxIsMemoryBlock( const void* p, UINT nBytes, @@ -699,13 +698,13 @@ BOOL AfxIsMemoryBlock( ### Parameters -*p*
+*p*\ Points to the block of memory to be tested. -*nBytes*
+*nBytes*\ Contains the length of the memory block in bytes. -*plRequestNumber*
+*plRequestNumber*\ Points to a **`long`** integer that will be filled in with the memory block's allocation sequence number, or zero if it does not represent a currently active memory block. ### Return Value @@ -728,7 +727,7 @@ It also checks the specified size against the original allocated size. If the fu Tests any memory address to ensure that it is contained entirely within the program's memory space. -``` +```cpp BOOL AfxIsValidAddress( const void* lp, UINT nBytes, @@ -737,13 +736,13 @@ BOOL AfxIsValidAddress( ### Parameters -*lp*
+*lp*\ Points to the memory address to be tested. -*nBytes*
+*nBytes*\ Contains the number of bytes of memory to be tested. -*bReadWrite*
+*bReadWrite*\ Specifies whether the memory is both for reading and writing (TRUE) or just reading (FALSE). ### Return Value @@ -768,18 +767,18 @@ The address is not restricted to blocks allocated by **`new`**. Use this function to determine whether a pointer to a string is valid. -``` -BOOL AfxIsValidString( +```cpp +BOOL AfxIsValidString( LPCSTR lpsz, int nLength = -1); ``` ### Parameters -*lpsz*
+*lpsz*\ The pointer to test. -*nLength*
+*nLength*\ Specifies the length of the string to be tested, in bytes. A value of -1 indicates that the string will be null-terminated. ### Return Value @@ -800,13 +799,13 @@ In non-debug builds, nonzero if *lpsz* is not NULL; otherwise 0. Sets a hook that enables calling of the specified function before each memory block is allocated. -``` +```cpp AFX_ALLOC_HOOK AfxSetAllocHook(AFX_ALLOC_HOOK pfnAllocHook); ``` ### Parameters -*pfnAllocHook*
+*pfnAllocHook*\ Specifies the name of the function to call. See the Remarks for the prototype of an allocation function. ### Return Value @@ -819,13 +818,13 @@ The Microsoft Foundation Class Library debug-memory allocator can call a user-de **BOOL AFXAPI AllocHook( size_t** `nSize`**, BOOL** `bObject`**, LONG** `lRequestNumber` **);** -*nSize*
+*nSize*\ The size of the proposed memory allocation. -*bObject*
+*bObject*\ TRUE if the allocation is for a `CObject`-derived object; otherwise FALSE. -*lRequestNumber*
+*lRequestNumber*\ The memory allocation's sequence number. Note that the AFXAPI calling convention implies that the callee must remove the parameters from the stack. @@ -847,10 +846,10 @@ AFXAPI AfxDoForAllClasses( ### Parameters -*pfn*
+*pfn*\ Points to an iteration function to be called for each class. The function arguments are a pointer to a `CRuntimeClass` object and a void pointer to extra data that the caller supplies to the function. -*pContext*
+*pContext*\ Points to optional data that the caller can supply to the iteration function. This pointer can be NULL. ### Remarks @@ -882,10 +881,10 @@ void AfxDoForAllObjects( ### Parameters -*pfn*
+*pfn*\ Points to an iteration function to execute for each object. The function arguments are a pointer to a `CObject` and a void pointer to extra data that the caller supplies to the function. -*pContext*
+*pContext*\ Points to optional data that the caller can supply to the iteration function. This pointer can be NULL. ### Remarks @@ -903,5 +902,5 @@ Stack, global, or embedded objects are not enumerated. The pointer passed to `Af ## See also -[Macros and Globals](mfc-macros-and-globals.md)
+[Macros and Globals](mfc-macros-and-globals.md)\ [CObject::Dump](cobject-class.md#dump) diff --git a/docs/mfc/reference/event-sink-maps.md b/docs/mfc/reference/event-sink-maps.md index bfaaba81ce..e1475a88c7 100644 --- a/docs/mfc/reference/event-sink-maps.md +++ b/docs/mfc/reference/event-sink-maps.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Event Sink Maps" title: "Event Sink Maps" -ms.date: "11/04/2016" +description: "Learn more about: Event Sink Maps" +ms.date: 11/04/2016 helpviewer_keywords: ["event sink maps [MFC]"] -ms.assetid: a9757eb2-5f4a-45ec-a2cd-ce5eec85b16f --- # Event Sink Maps @@ -158,7 +157,7 @@ For a list of the **VTS_** constants, see [EVENT_CUSTOM](event-maps.md#event_cus ### Example -The following example demonstrates an event handler, for the MouseDown event, implemented for three controls ( IDC_MYCTRL1 through IDC_MYCTRL3). The event handler function, `OnRangeMouseDown`, is declared in the header file of the dialog class ( `CMyDlg`) as: +The following example demonstrates an event handler, for the MouseDown event, implemented for three controls ( IDC_MYCTRL1 through IDC_MYCTRL3). The event handler function, `OnRangeMouseDown`, is declared in the header file of the dialog class (`CMyDlg`) as: [!code-cpp[NVC_MFCAutomation#12](../../mfc/codesnippet/cpp/event-sink-maps_2.h)] diff --git a/docs/mfc/reference/extension-dll-macros.md b/docs/mfc/reference/extension-dll-macros.md index f7dc3c4d10..a3682634f7 100644 --- a/docs/mfc/reference/extension-dll-macros.md +++ b/docs/mfc/reference/extension-dll-macros.md @@ -79,7 +79,7 @@ For more information on module states and MFC, see [Managing the state data of M **Header:** \ -## `AfxOleInitModule` +## `AfxOleInitModule` For OLE support from a regular MFC DLL that is dynamically linked to MFC, call this function in your regular MFC DLL's `CWinApp::InitInstance` function to initialize the MFC OLE DLL. @@ -329,6 +329,6 @@ MFC extension DLLs need to call [`AfxInitExtensionModule`](#afxinitextensionmodu ## See also -[Macros and globals](mfc-macros-and-globals.md)
-[`AfxMessageBox`](cstring-formatting-and-message-box-display.md#afxmessagebox)
-[Managing the state data of MFC modules](../managing-the-state-data-of-mfc-modules.md)
+[Macros and globals](mfc-macros-and-globals.md)\ +[`AfxMessageBox`](cstring-formatting-and-message-box-display.md#afxmessagebox)\ +[Managing the state data of MFC modules](../managing-the-state-data-of-mfc-modules.md) diff --git a/docs/mfc/reference/mfc-classes.md b/docs/mfc/reference/mfc-classes.md index 4989897e48..83c30958f5 100644 --- a/docs/mfc/reference/mfc-classes.md +++ b/docs/mfc/reference/mfc-classes.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: MFC` Classes" -title: "MFC` Classes" -ms.date: "11/04/2016" +title: "MFC Classes" +description: "Learn more about: MFC Classes" +ms.date: 11/04/2016 helpviewer_keywords: ["MFC, classes", "classes [MFC], MFC"] -ms.assetid: 7b6db805-a572-43fd-9046-0fa6e3663e63 --- # MFC Classes @@ -17,1285 +16,1285 @@ The classes in the following list are included in the Microsoft Foundation Class ## In This Section -[`CAccelerateDecelerateTransition` Class](../../mfc/reference/cacceleratedeceleratetransition-class.md)
+[`CAccelerateDecelerateTransition` Class](cacceleratedeceleratetransition-class.md)\ Implements an accelerate-decelerate transition. -[`CAnimateCtrl` Class](../../mfc/reference/canimatectrl-class.md)
+[`CAnimateCtrl` Class](canimatectrl-class.md)\ Provides the functionality of the Windows common animation control. -[`CAnimationBaseObject` Class](../../mfc/reference/canimationbaseobject-class.md)
+[`CAnimationBaseObject` Class](canimationbaseobject-class.md)\ The base class for all animation objects. -[`CAnimationColor` Class](../../mfc/reference/canimationcolor-class.md)
+[`CAnimationColor` Class](canimationcolor-class.md)\ Implements the functionality of a color whose red, green, and blue components can be animated. -[`CAnimationController` Class](../../mfc/reference/canimationcontroller-class.md)
+[`CAnimationController` Class](canimationcontroller-class.md)\ Implements the animation controller, which provides a central interface for creating and managing animations. -[`CAnimationGroup` Class](../../mfc/reference/canimationgroup-class.md)
+[`CAnimationGroup` Class](canimationgroup-class.md)\ Implements the animation controller, which provides a central interface for creating and managing animations. -[`CAnimationManagerEventHandler` Class](../../mfc/reference/canimationmanagereventhandler-class.md)
+[`CAnimationManagerEventHandler` Class](canimationmanagereventhandler-class.md)\ Implements a callback, which is called by the Animation API when a status of an animation manager is changed. -[`CAnimationPoint` Class](../../mfc/reference/canimationpoint-class.md)
+[`CAnimationPoint` Class](canimationpoint-class.md)\ Implements the functionality of a point whose coordinates can be animated. -[`CAnimationRect` Class](../../mfc/reference/canimationrect-class.md)
+[`CAnimationRect` Class](canimationrect-class.md)\ Implements the functionality of a rectangle whose sides can be animated. -[`CAnimationSize` Class](../../mfc/reference/canimationsize-class.md)
+[`CAnimationSize` Class](canimationsize-class.md)\ Implements the functionality of a size object whose dimensions can be animated. -[`CAnimationStoryboardEventHandler` Class](../../mfc/reference/canimationstoryboardeventhandler-class.md)
+[`CAnimationStoryboardEventHandler` Class](canimationstoryboardeventhandler-class.md)\ Implements a callback, which is called by the Animation API when the status of a storyboard is changed or a storyboard is updated. -[`CAnimationTimerEventHandler` Class](../../mfc/reference/canimationtimereventhandler-class.md)
+[`CAnimationTimerEventHandler` Class](canimationtimereventhandler-class.md)\ Implements a callback, which is called by the Animation API when timing events occur. -[`CAnimationValue` Class](../../mfc/reference/canimationvalue-class.md)
+[`CAnimationValue` Class](canimationvalue-class.md)\ Implements the functionality of animation object that has one value. -[`CAnimationVariable` Class](../../mfc/reference/canimationvariable-class.md)
+[`CAnimationVariable` Class](canimationvariable-class.md)\ Represents an animation variable. -[`CAnimationVariableChangeHandler` Class](../../mfc/reference/canimationvariablechangehandler-class.md)
+[`CAnimationVariableChangeHandler` Class](canimationvariablechangehandler-class.md)\ Implements a callback, which is called by the Animation API when the value of an animation variable changes. -[`CAnimationVariableIntegerChangeHandler` Class](../../mfc/reference/canimationvariableintegerchangehandler-class.md)
+[`CAnimationVariableIntegerChangeHandler` Class](canimationvariableintegerchangehandler-class.md)\ Implements a callback, which is called by the Animation API when the value of an animation variable changes. -[`CArchive` Class](../../mfc/reference/carchive-class.md)
+[`CArchive` Class](carchive-class.md)\ Lets you save a complex network of objects in a permanent binary form (usually disk storage) that persists after those objects are deleted. -[`CArchiveException` Class](../../mfc/reference/carchiveexception-class.md)
+[`CArchiveException` Class](carchiveexception-class.md)\ Represents a serialization exception condition. -[`CArray` Class](../../mfc/reference/carray-class.md)
+[`CArray` Class](carray-class.md)\ Supports arrays that resemble` C arrays, but can dynamically reduce and grow as necessary. -[`CAsyncMonikerFile` Class](../../mfc/reference/casyncmonikerfile-class.md)
+[`CAsyncMonikerFile` Class](casyncmonikerfile-class.md)\ Provides functionality for the use of asynchronous monikers in ActiveX controls (formerly OLE controls). -[`CAsyncSocket` Class](../../mfc/reference/casyncsocket-class.md)
+[`CAsyncSocket` Class](casyncsocket-class.md)\ Represents a Windows Socket, which is an endpoint of network communication. -[`CAutoHideDockSite` Class](../../mfc/reference/cautohidedocksite-class.md)
-Extends the [`CDockSite` Class](../../mfc/reference/cdocksite-class.md) to implement auto-hide dock panes. +[`CAutoHideDockSite` Class](cautohidedocksite-class.md)\ +Extends the [`CDockSite` Class](cdocksite-class.md) to implement auto-hide dock panes. -[`CBaseKeyFrame` Class](../../mfc/reference/cbasekeyframe-class.md)
+[`CBaseKeyFrame` Class](cbasekeyframe-class.md)\ Implements the basic functionality of a keyframe. -[`CBasePane` Class](../../mfc/reference/cbasepane-class.md)
+[`CBasePane` Class](cbasepane-class.md)\ Base class for all panes. -[`CBaseTabbedPane` Class](../../mfc/reference/cbasetabbedpane-class.md)
-Extends the functionality of the [`CDockablePane` Class](../../mfc/reference/cdockablepane-class.md) to support the creation of tabbed windows. +[`CBaseTabbedPane` Class](cbasetabbedpane-class.md)\ +Extends the functionality of the [`CDockablePane` Class](cdockablepane-class.md) to support the creation of tabbed windows. -[`CBaseTransition` Class](../../mfc/reference/cbasetransition-class.md)
+[`CBaseTransition` Class](cbasetransition-class.md)\ Represents a basic transition. -[`CBitmap` Class](../../mfc/reference/cbitmap-class.md)
+[`CBitmap` Class](cbitmap-class.md)\ Encapsulates a Windows graphics device interface (GDI) bitmap and provides member functions to manipulate the bitmap. -[`CBitmapButton` Class](../../mfc/reference/cbitmapbutton-class.md)
+[`CBitmapButton` Class](cbitmapbutton-class.md)\ Creates pushbutton controls labeled with bitmapped images instead of text. -[`CBitmapRenderTarget` Class](../../mfc/reference/cbitmaprendertarget-class.md)
+[`CBitmapRenderTarget` Class](cbitmaprendertarget-class.md)\ A wrapper for `ID2D1BitmapRenderTarget`. -[`CBrush` Class](../../mfc/reference/cbrush-class.md)
+[`CBrush` Class](cbrush-class.md)\ Encapsulates a Windows graphics device interface (GDI) brush. -[`CButton` Class](../../mfc/reference/cbutton-class.md)
+[`CButton` Class](cbutton-class.md)\ Provides the functionality of Windows button controls. -[`CByteArray` Class](../../mfc/reference/cbytearray-class.md)
+[`CByteArray` Class](cbytearray-class.md)\ Supports dynamic arrays of bytes. -[`CCachedDataPathProperty` Class](../../mfc/reference/ccacheddatapathproperty-class.md)
+[`CCachedDataPathProperty` Class](ccacheddatapathproperty-class.md)\ Implements an OLE control property transferred asynchronously and cached in a memory file. -[`CCheckListBox` Class](../../mfc/reference/cchecklistbox-class.md)
+[`CCheckListBox` Class](cchecklistbox-class.md)\ Provides the functionality of a Windows checklist box. -[`CClientDC` Class](../../mfc/reference/cclientdc-class.md)
+[`CClientDC` Class](cclientdc-class.md)\ Handles the calling of the Windows functions [`GetDC`](/windows/win32/api/winuser/nf-winuser-getdc) at construction time and [`ReleaseDC`](/windows/win32/api/winuser/nf-winuser-releasedc) at destruction time. -[`CCmdTarget` Class](../../mfc/reference/ccmdtarget-class.md)
+[`CCmdTarget` Class](ccmdtarget-class.md)\ Base class for the Microsoft Foundation Class Library message-map architecture. -[`CCmdUI` Class](../../mfc/reference/ccmdui-class.md)
+[`CCmdUI` Class](ccmdui-class.md)\ Used only within an `ON_UPDATE_COMMAND_UI` handler in a `CCmdTarget`-derived class. -[`CColorDialog` Class](../../mfc/reference/ccolordialog-class.md)
+[`CColorDialog` Class](ccolordialog-class.md)\ Lets you incorporate a color-selection dialog box into your application. -[`CComboBox` Class](../../mfc/reference/ccombobox-class.md)
+[`CComboBox` Class](ccombobox-class.md)\ Provides the functionality of a Windows combo box. -[`CComboBoxEx` Class](../../mfc/reference/ccomboboxex-class.md)
+[`CComboBoxEx` Class](ccomboboxex-class.md)\ Extends the combo box control by providing support for image lists. -[`CCommandLineInfo` Class](../../mfc/reference/ccommandlineinfo-class.md)
+[`CCommandLineInfo` Class](ccommandlineinfo-class.md)\ Aids in parsing the command line at application startup. -[`CCommonDialog` Class](../../mfc/reference/ccommondialog-class.md)
+[`CCommonDialog` Class](ccommondialog-class.md)\ The base class for classes that encapsulate functionality of the Windows common dialogs. -[`CConnectionPoint` Class](../../mfc/reference/cconnectionpoint-class.md)
+[`CConnectionPoint` Class](cconnectionpoint-class.md)\ Defines a special type of interface used to communicate with other OLE objects, called a "connection point." -[`CConstantTransition` Class](../../mfc/reference/cconstanttransition-class.md)
+[`CConstantTransition` Class](cconstanttransition-class.md)\ Encapsulates a constant transition. -[`CContextMenuManager` Class](../../mfc/reference/ccontextmenumanager-class.md)
+[`CContextMenuManager` Class](ccontextmenumanager-class.md)\ Manages shortcut menus, also known as context menus. -[`CControlBar` Class](../../mfc/reference/ccontrolbar-class.md)
-Base class for the control-bar classes [`CStatusBar` Class](../../mfc/reference/cstatusbar-class.md), [`CToolBar` Class](../../mfc/reference/ctoolbar-class.md), [`CDialogBar` Class](../../mfc/reference/cdialogbar-class.md), [`CReBar` Class](../../mfc/reference/crebar-class.md), and [`COleResizeBar` Class](../../mfc/reference/coleresizebar-class.md). +[`CControlBar` Class](ccontrolbar-class.md)\ +Base class for the control-bar classes [`CStatusBar` Class](cstatusbar-class.md), [`CToolBar` Class](ctoolbar-class.md), [`CDialogBar` Class](cdialogbar-class.md), [`CReBar` Class](crebar-class.md), and [`COleResizeBar` Class](coleresizebar-class.md). -[`CCriticalSection` Class](../../mfc/reference/ccriticalsection-class.md)
+[`CCriticalSection` Class](ccriticalsection-class.md)\ Represents a "critical section", which is a synchronization object that enables one thread at a time to access a resource or section of code. -[`CCtrlView` Class](../../mfc/reference/cctrlview-class.md)
+[`CCtrlView` Class](cctrlview-class.md)\ Adapts the document-view architecture to the common controls supported by Windows 98 and Windows NT versions 3.51 and later. -[`CCubicTransition` Class](../../mfc/reference/ccubictransition-class.md)
+[`CCubicTransition` Class](ccubictransition-class.md)\ Encapsulates a cubic transition. -[`CCustomInterpolator` Class](../../mfc/reference/ccustominterpolator-class.md)
+[`CCustomInterpolator` Class](ccustominterpolator-class.md)\ Implements a basic interpolator. -[`CCustomTransition` Class](../../mfc/reference/ccustomtransition-class.md)
+[`CCustomTransition` Class](ccustomtransition-class.md)\ Implements a custom transition. -[`CD2DBitmap` Class](../../mfc/reference/cd2dbitmap-class.md)
+[`CD2DBitmap` Class](cd2dbitmap-class.md)\ A wrapper for `ID2D1Bitmap`. -[`CD2DBitmapBrush` Class](../../mfc/reference/cd2dbitmapbrush-class.md)
+[`CD2DBitmapBrush` Class](cd2dbitmapbrush-class.md)\ A wrapper for `ID2D1BitmapBrush`. -[`CD2DBrush` Class](../../mfc/reference/cd2dbrush-class.md)
+[`CD2DBrush` Class](cd2dbrush-class.md)\ A wrapper for `ID2D1Brush`. -[`CD2DBrushProperties` Class](../../mfc/reference/cd2dbrushproperties-class.md)
+[`CD2DBrushProperties` Class](cd2dbrushproperties-class.md)\ A wrapper for `D2D1_BRUSH_PROPERTIES`. -[`CD2DEllipse` Class](../../mfc/reference/cd2dellipse-class.md)
+[`CD2DEllipse` Class](cd2dellipse-class.md)\ A wrapper for `D2D1_BRUSH_PROPERTIES`. -[`CD2DGeometry` Class](../../mfc/reference/cd2dgeometry-class.md)
+[`CD2DGeometry` Class](cd2dgeometry-class.md)\ A wrapper for `ID2D1Geometry`. -[`CD2DGeometrySink` Class](../../mfc/reference/cd2dgeometrysink-class.md)
+[`CD2DGeometrySink` Class](cd2dgeometrysink-class.md)\ A wrapper for `ID2D1GeometrySink`. -[`CD2DGradientBrush` Class](../../mfc/reference/cd2dgradientbrush-class.md)
+[`CD2DGradientBrush` Class](cd2dgradientbrush-class.md)\ The base class of the `CD2DLinearGradientBrush` and the `CD2DRadialGradientBrush` classes. -[`CD2DLayer` Class](../../mfc/reference/cd2dlayer-class.md)
+[`CD2DLayer` Class](cd2dlayer-class.md)\ A wrapper for `ID2D1Layer`. -[`CD2DLinearGradientBrush` Class](../../mfc/reference/cd2dlineargradientbrush-class.md)
+[`CD2DLinearGradientBrush` Class](cd2dlineargradientbrush-class.md)\ A wrapper for `ID2D1LinearGradientBrush`. -[`CD2DMesh` Class](../../mfc/reference/cd2dmesh-class.md)
+[`CD2DMesh` Class](cd2dmesh-class.md)\ A wrapper for `ID2D1Mesh`. -[`CD2DPathGeometry` Class](../../mfc/reference/cd2dpathgeometry-class.md)
+[`CD2DPathGeometry` Class](cd2dpathgeometry-class.md)\ A wrapper for `ID2D1PathGeometry`. -[`CD2DPointF` Class](../../mfc/reference/cd2dpointf-class.md)
+[`CD2DPointF` Class](cd2dpointf-class.md)\ A wrapper for `D2D1_POINT_2F`. -[`CD2DPointU` Class](../../mfc/reference/cd2dpointu-class.md)
+[`CD2DPointU` Class](cd2dpointu-class.md)\ A wrapper for `D2D1_POINT_2U`. -[`CD2DRadialGradientBrush` Class](../../mfc/reference/cd2dradialgradientbrush-class.md)
+[`CD2DRadialGradientBrush` Class](cd2dradialgradientbrush-class.md)\ A wrapper for `ID2D1RadialGradientBrush`. -[`CD2DRectF` Class](../../mfc/reference/cd2drectf-class.md)
+[`CD2DRectF` Class](cd2drectf-class.md)\ A wrapper for `D2D1_RECT_F`. -[`CD2DRectU` Class](../../mfc/reference/cd2drectu-class.md)
+[`CD2DRectU` Class](cd2drectu-class.md)\ A wrapper for `D2D1_RECT_U`. -[`CD2DResource` Class](../../mfc/reference/cd2dresource-class.md)
+[`CD2DResource` Class](cd2dresource-class.md)\ An abstract class that provides an interface for creating and managing `D2D` resources such as brushes, layers, and texts. -[`CD2DRoundedRect` Class](../../mfc/reference/cd2droundedrect-class.md)
+[`CD2DRoundedRect` Class](cd2droundedrect-class.md)\ A wrapper for `D2D1_ROUNDED_RECT`. -[`CD2DSizeF` Class](../../mfc/reference/cd2dsizef-class.md)
+[`CD2DSizeF` Class](cd2dsizef-class.md)\ A wrapper for `D2D1_SIZE_F`. -[`CD2DSizeU` Class](../../mfc/reference/cd2dsizeu-class.md)
+[`CD2DSizeU` Class](cd2dsizeu-class.md)\ A wrapper for `D2D1_SIZE_U`. -[`CD2DSolidColorBrush` Class](../../mfc/reference/cd2dsolidcolorbrush-class.md)
+[`CD2DSolidColorBrush` Class](cd2dsolidcolorbrush-class.md)\ A wrapper for `ID2D1SolidColorBrush`. -[`CD2DTextFormat` Class](../../mfc/reference/cd2dtextformat-class.md)
+[`CD2DTextFormat` Class](cd2dtextformat-class.md)\ A wrapper for `IDWriteTextFormat`. -[`CD2DTextLayout` Class](../../mfc/reference/cd2dtextlayout-class.md)
+[`CD2DTextLayout` Class](cd2dtextlayout-class.md)\ A wrapper for `IDWriteTextLayout`. -[`CDaoDatabase` Class](../../mfc/reference/cdaodatabase-class.md)
+[`CDaoDatabase` Class](cdaodatabase-class.md)\ Represents a connection to a database through which you can operate on the data. -[`CDaoException` Class](../../mfc/reference/cdaoexception-class.md)
+[`CDaoException` Class](cdaoexception-class.md)\ Represents an exception condition arising from the MFC database classes based on data access objects (DAO). -[`CDaoFieldExchange` Class](../../mfc/reference/cdaofieldexchange-class.md)
+[`CDaoFieldExchange` Class](cdaofieldexchange-class.md)\ Supports the DAO record field exchange (DFX) routines used by the DAO database classes. -[`CDaoQueryDef` Class](../../mfc/reference/cdaoquerydef-class.md)
+[`CDaoQueryDef` Class](cdaoquerydef-class.md)\ Represents a query definition, or "querydef," usually one saved in a database. -[`CDaoRecordset` Class](../../mfc/reference/cdaorecordset-class.md)
+[`CDaoRecordset` Class](cdaorecordset-class.md)\ Represents a set of records selected from a data source. -[`CDaoRecordView` Class](../../mfc/reference/cdaorecordview-class.md)
+[`CDaoRecordView` Class](cdaorecordview-class.md)\ A view that displays database records in controls. -[`CDaoTableDef` Class](../../mfc/reference/cdaotabledef-class.md)
+[`CDaoTableDef` Class](cdaotabledef-class.md)\ Represents the stored definition of a base table or an attached table. -[`CDaoWorkspace` Class](../../mfc/reference/cdaoworkspace-class.md)
+[`CDaoWorkspace` Class](cdaoworkspace-class.md)\ Manages a named, password-protected database session from login to logoff, by a single user. -[`CDatabase` Class](../../mfc/reference/cdatabase-class.md)
+[`CDatabase` Class](cdatabase-class.md)\ Represents a connection to a data source, through which you can operate on the data source. -[`CDataExchange` Class](../../mfc/reference/cdataexchange-class.md)
+[`CDataExchange` Class](cdataexchange-class.md)\ Supports the dialog data exchange (DDX) and dialog data validation (DDV) routines used by the Microsoft Foundation classes. -[`CDataPathProperty` Class](../../mfc/reference/cdatapathproperty-class.md)
+[`CDataPathProperty` Class](cdatapathproperty-class.md)\ Implements an OLE control property that can be loaded asynchronously. -[`CDataRecoveryHandler` Class](../../mfc/reference/cdatarecoveryhandler-class.md)
+[`CDataRecoveryHandler` Class](cdatarecoveryhandler-class.md)\ Autosaves documents and restores them if an application unexpectedly exits. -[`CDateTimeCtrl` Class](../../mfc/reference/cdatetimectrl-class.md)
+[`CDateTimeCtrl` Class](cdatetimectrl-class.md)\ Encapsulates the functionality of a date and time picker control. -[`CDBException` Class](../../mfc/reference/cdbexception-class.md)
+[`CDBException` Class](cdbexception-class.md)\ Represents an exception condition arising from the database classes. -[`CDBVariant` Class](../../mfc/reference/cdbvariant-class.md)
+[`CDBVariant` Class](cdbvariant-class.md)\ Represents a variant data type for the MFC ODBC classes. -[`CDC` Class](../../mfc/reference/cdc-class.md)
+[`CDC` Class](cdc-class.md)\ Defines a class of device-context objects. -[`CDCRenderTarget` Class](../../mfc/reference/cdcrendertarget-class.md)
+[`CDCRenderTarget` Class](cdcrendertarget-class.md)\ A wrapper for `ID2D1DCRenderTarget`. -[`CDHtmlDialog` Class](../../mfc/reference/cdhtmldialog-class.md)
+[`CDHtmlDialog` Class](cdhtmldialog-class.md)\ Used to create dialog boxes that use HTML rather than dialog resources to implement their user interface. -[`CDialog` Class](../../mfc/reference/cdialog-class.md)
+[`CDialog` Class](cdialog-class.md)\ Base class used for displaying dialog boxes on the screen. -[`CDialogBar` Class](../../mfc/reference/cdialogbar-class.md)
+[`CDialogBar` Class](cdialogbar-class.md)\ Provides the functionality of a Windows modeless dialog box in a control bar. -[`CDialogEx` Class](../../mfc/reference/cdialogex-class.md)
+[`CDialogEx` Class](cdialogex-class.md)\ Specifies the background color and background image of a dialog box. -[`CDiscreteTransition` Class](../../mfc/reference/cdiscretetransition-class.md)
+[`CDiscreteTransition` Class](cdiscretetransition-class.md)\ Encapsulates a discrete transition. -[`CDocItem` Class](../../mfc/reference/cdocitem-class.md)
+[`CDocItem` Class](cdocitem-class.md)\ The base class for document items, which are components of a document's data. -[`CDockablePane` Class](../../mfc/reference/cdockablepane-class.md)
+[`CDockablePane` Class](cdockablepane-class.md)\ Implements a pane that can either be docked in a dock site or included in a tabbed pane. -[`CDockablePaneAdapter` Class](../../mfc/reference/cdockablepaneadapter-class.md)
+[`CDockablePaneAdapter` Class](cdockablepaneadapter-class.md)\ Provides docking support for `CWnd`-derived panes. -[`CDockingManager` Class](../../mfc/reference/cdockingmanager-class.md)
+[`CDockingManager` Class](cdockingmanager-class.md)\ Implements the core functionality that controls docking layout in a main frame window. -[`CDockingPanesRow` Class](../../mfc/reference/cdockingpanesrow-class.md)
+[`CDockingPanesRow` Class](cdockingpanesrow-class.md)\ Manages a list of panes that are located in the same horizontal or vertical row (column) of a dock site. -[`CDockSite` Class](../../mfc/reference/cdocksite-class.md)
-Provides functionality for arranging panes that are derived from the [`CPane` Class](../../mfc/reference/cpane-class.md) into sets of rows. +[`CDockSite` Class](cdocksite-class.md)\ +Provides functionality for arranging panes that are derived from the [`CPane` Class](cpane-class.md) into sets of rows. -[`CDockState` Class](../../mfc/reference/cdockstate-class.md)
+[`CDockState` Class](cdockstate-class.md)\ A serialized `CObject` class that loads, unloads, or clears the state of one or more docking control bars in persistent memory (a file). -[`CDocObjectServer` Class](../../mfc/reference/cdocobjectserver-class.md)
+[`CDocObjectServer` Class](cdocobjectserver-class.md)\ Implements the additional OLE interfaces needed to make a normal `COleDocument` server into a full DocObject server: `IOleDocument`, `IOleDocumentView`, `IOleCommandTarget`, and `IPrint`. -[`CDocObjectServerItem` Class](../../mfc/reference/cdocobjectserveritem-class.md)
+[`CDocObjectServerItem` Class](cdocobjectserveritem-class.md)\ Implements OLE server verbs specifically for DocObject servers. -[`CDocTemplate` Class](../../mfc/reference/cdoctemplate-class.md)
+[`CDocTemplate` Class](cdoctemplate-class.md)\ An abstract base class that defines the basic functionality for document templates. -[`CDocument` Class](../../mfc/reference/cdocument-class.md)
+[`CDocument` Class](cdocument-class.md)\ Provides the basic functionality for user-defined document classes. -[`CDragListBox` Class](../../mfc/reference/cdraglistbox-class.md)
+[`CDragListBox` Class](cdraglistbox-class.md)\ In addition to providing the functionality of a Windows list box, the `CDragListBox` class lets the user move list box items, such as filenames, within the list box. -[`CDrawingManager` Class](../../mfc/reference/cdrawingmanager-class.md)
+[`CDrawingManager` Class](cdrawingmanager-class.md)\ Implements complex drawing algorithms. -[`CDumpContext` Class](../../mfc/reference/cdumpcontext-class.md)
+[`CDumpContext` Class](cdumpcontext-class.md)\ Supports stream-oriented diagnostic output in the form of human-readable text. -[`CDWordArray` Class](../../mfc/reference/cdwordarray-class.md)
+[`CDWordArray` Class](cdwordarray-class.md)\ Supports arrays of 32-bit doublewords. -[`CEdit` Class](../../mfc/reference/cedit-class.md)
+[`CEdit` Class](cedit-class.md)\ Provides the functionality of a Windows edit control. -[`CEditView` Class](../../mfc/reference/ceditview-class.md)
+[`CEditView` Class](ceditview-class.md)\ A type of view class that provides the functionality of a Windows edit control and can be used to implement simple text-editor functionality. -[`CEvent` Class](../../mfc/reference/cevent-class.md)
+[`CEvent` Class](cevent-class.md)\ Represents an "event", which is a synchronization object that enables one thread to notify another that an event has occurred. -[`CException` Class](../../mfc/reference/cexception-class.md)
+[`CException` Class](cexception-class.md)\ The base class for all exceptions in the Microsoft Foundation Class Library. -[`CFieldExchange` Class](../../mfc/reference/cfieldexchange-class.md)
+[`CFieldExchange` Class](cfieldexchange-class.md)\ Supports the record field exchange (RFX) and bulk record field exchange (Bulk RFX) routines used by the database classes. -[`CFile` Class](../../mfc/reference/cfile-class.md)
+[`CFile` Class](cfile-class.md)\ The base class for Microsoft Foundation Class file classes. -[`CFileDialog` Class](../../mfc/reference/cfiledialog-class.md)
+[`CFileDialog` Class](cfiledialog-class.md)\ Encapsulates the common file dialog box for Windows. -[`CFileException` Class](../../mfc/reference/cfileexception-class.md)
+[`CFileException` Class](cfileexception-class.md)\ Represents a file-related exception condition. -[`CFileFind` Class](../../mfc/reference/cfilefind-class.md)
-Performs local file searches and is the base class for [`CGopherFileFind` Class](../../mfc/reference/cgopherfilefind-class.md) and [`CFtpFileFind` Class](../../mfc/reference/cftpfilefind-class.md), which perform Internet file searches. +[`CFileFind` Class](cfilefind-class.md)\ +Performs local file searches and is the base class for [`CGopherFileFind` Class](cgopherfilefind-class.md) and [`CFtpFileFind` Class](cftpfilefind-class.md), which perform Internet file searches. -[`CFindReplaceDialog` Class](../../mfc/reference/cfindreplacedialog-class.md)
+[`CFindReplaceDialog` Class](cfindreplacedialog-class.md)\ Lets you implement standard string Find/Replace dialog boxes in your application. -[`CFolderPickerDialog` Class](../../mfc/reference/cfolderpickerdialog-class.md)
+[`CFolderPickerDialog` Class](cfolderpickerdialog-class.md)\ Implements `CFileDialog` in the folder picker mode. -[`CFont` Class](../../mfc/reference/cfont-class.md)
+[`CFont` Class](cfont-class.md)\ Encapsulates a Windows graphics device interface (GDI) font and provides member functions for manipulating the font. -[`CFontDialog` Class](../../mfc/reference/cfontdialog-class.md)
+[`CFontDialog` Class](cfontdialog-class.md)\ Lets you incorporate a font-selection dialog box into your application. -[`CFontHolder` Class](../../mfc/reference/cfontholder-class.md)
+[`CFontHolder` Class](cfontholder-class.md)\ Implements the stock Font property and encapsulates the functionality of a Windows font object and the `IFont` interface. -[`CFormView` Class](../../mfc/reference/cformview-class.md)
+[`CFormView` Class](cformview-class.md)\ The base class used for form views. -[`CFrameWnd` Class](../../mfc/reference/cframewnd-class.md)
+[`CFrameWnd` Class](cframewnd-class.md)\ Provides the functionality of a Windows single document interface (SDI) overlapped or pop-up frame window, along with members for managing the window. -[`CFrameWndEx` Class](../../mfc/reference/cframewndex-class.md)
-Implements the functionality of a Windows single document interface (SDI) overlapped or popup frame window, and provides members for managing the window. It extends the [`CFrameWnd` Class](../../mfc/reference/cframewnd-class.md) class. +[`CFrameWndEx` Class](cframewndex-class.md)\ +Implements the functionality of a Windows single document interface (SDI) overlapped or popup frame window, and provides members for managing the window. It extends the [`CFrameWnd` Class](cframewnd-class.md) class. -[`CFtpConnection` Class](../../mfc/reference/cftpconnection-class.md)
+[`CFtpConnection` Class](cftpconnection-class.md)\ Manages your FTP connection to an Internet server and enables direct manipulation of directories and files on that server. -[`CFtpFileFind` Class](../../mfc/reference/cftpfilefind-class.md)
+[`CFtpFileFind` Class](cftpfilefind-class.md)\ Aids in Internet file searches of FTP servers. -[`CGdiObject` Class](../../mfc/reference/cgdiobject-class.md)
+[`CGdiObject` Class](cgdiobject-class.md)\ Provides a base class for various kinds of Windows graphics device interface (GDI) objects such as bitmaps, regions, brushes, pens, palettes, and fonts. -[`CGopherConnection` Class](../../mfc/reference/cgopherconnection-class.md)
+[`CGopherConnection` Class](cgopherconnection-class.md)\ Manages your connection to a gopher Internet server. -[`CGopherFile` Class](../../mfc/reference/cgopherfile-class.md)
+[`CGopherFile` Class](cgopherfile-class.md)\ Provides the functionality to find and read files on a gopher server. -[`CGopherFileFind` Class](../../mfc/reference/cgopherfilefind-class.md)
+[`CGopherFileFind` Class](cgopherfilefind-class.md)\ Aids in Internet file searches of gopher servers. -[`CGopherLocator` Class](../../mfc/reference/cgopherlocator-class.md)
-Gets a gopher "locator" from a gopher server, determines the locator's type, and makes the locator available to [`CGopherFileFind` Class](../../mfc/reference/cgopherfilefind-class.md). +[`CGopherLocator` Class](cgopherlocator-class.md)\ +Gets a gopher "locator" from a gopher server, determines the locator's type, and makes the locator available to [`CGopherFileFind` Class](cgopherfilefind-class.md). -[`CHeaderCtrl` Class](../../mfc/reference/cheaderctrl-class.md)
+[`CHeaderCtrl` Class](cheaderctrl-class.md)\ Provides the functionality of the Windows common header control. -[`CHotKeyCtrl` Class](../../mfc/reference/chotkeyctrl-class.md)
+[`CHotKeyCtrl` Class](chotkeyctrl-class.md)\ Provides the functionality of the Windows common hot key control. -[`CHtmlEditCtrl` Class](../../mfc/reference/chtmleditctrl-class.md)
+[`CHtmlEditCtrl` Class](chtmleditctrl-class.md)\ Provides the functionality of the `WebBrowser` ActiveX control in an MFC window. -[`CHtmlEditCtrlBase` Class](../../mfc/reference/chtmleditctrlbase-class.md)
+[`CHtmlEditCtrlBase` Class](chtmleditctrlbase-class.md)\ Represents an HTML editing component. -[`CHtmlEditDoc` Class](../../mfc/reference/chtmleditdoc-class.md)
-With [`CHtmlEditView` Class](../../mfc/reference/chtmleditview-class.md), provides the functionality of the WebBrowser editing platform within the context of the MFC document-view architecture. +[`CHtmlEditDoc` Class](chtmleditdoc-class.md)\ +With [`CHtmlEditView` Class](chtmleditview-class.md), provides the functionality of the WebBrowser editing platform within the context of the MFC document-view architecture. -[`CHtmlEditView` Class](../../mfc/reference/chtmleditview-class.md)
+[`CHtmlEditView` Class](chtmleditview-class.md)\ Provides the functionality of the WebBrowser editing platform within the context of MFC's document/view architecture. -[`CHtmlView` Class](../../mfc/reference/chtmlview-class.md)
+[`CHtmlView` Class](chtmlview-class.md)\ Provides the functionality of the WebBrowser control within the context of MFC's document/view architecture. -[`CHttpConnection` Class](../../mfc/reference/chttpconnection-class.md)
+[`CHttpConnection` Class](chttpconnection-class.md)\ Manages your connection to an HTTP server. -[`CHttpFile` Class](../../mfc/reference/chttpfile-class.md)
+[`CHttpFile` Class](chttpfile-class.md)\ Provides the functionality to request and read files on an HTTP server. -[`CHwndRenderTarget` Class](../../mfc/reference/chwndrendertarget-class.md)
+[`CHwndRenderTarget` Class](chwndrendertarget-class.md)\ A wrapper for `ID2D1HwndRenderTarget`. -[`CImageList` Class](../../mfc/reference/cimagelist-class.md)
+[`CImageList` Class](cimagelist-class.md)\ Provides the functionality of the Windows common image list control. -[`CInstantaneousTransition` Class](../../mfc/reference/cinstantaneoustransition-class.md)
+[`CInstantaneousTransition` Class](cinstantaneoustransition-class.md)\ Encapsulates an instantaneous transition. -[`CInternetConnection` Class](../../mfc/reference/cinternetconnection-class.md)
+[`CInternetConnection` Class](cinternetconnection-class.md)\ Manages your connection to an Internet server. -[`CInternetException` Class](../../mfc/reference/cinternetexception-class.md)
+[`CInternetException` Class](cinternetexception-class.md)\ Represents an exception condition related to an Internet operation. -[`CInternetFile` Class](../../mfc/reference/cinternetfile-class.md)
+[`CInternetFile` Class](cinternetfile-class.md)\ Enables access to files on remote systems that use Internet protocols. -[`CInternetSession` Class](../../mfc/reference/cinternetsession-class.md)
+[`CInternetSession` Class](cinternetsession-class.md)\ Creates and initializes a single or several simultaneous Internet sessions and, if necessary, describes your connection to a proxy server. -[`CInterpolatorBase` Class](../../mfc/reference/cinterpolatorbase-class.md)
+[`CInterpolatorBase` Class](cinterpolatorbase-class.md)\ Implements a callback, which is called by the Animation API when it has to calculate a new value of an animation variable. -[`CInvalidArgException` Class](../../mfc/reference/cinvalidargexception-class.md)
+[`CInvalidArgException` Class](cinvalidargexception-class.md)\ This class represents an invalid argument exception condition. -[`CIPAddressCtrl` Class](../../mfc/reference/cipaddressctrl-class.md)
+[`CIPAddressCtrl` Class](cipaddressctrl-class.md)\ Provides the functionality of the Windows common IP Address control. -[`CJumpList` Class](../../mfc/reference/cjumplist-class.md)
+[`CJumpList` Class](cjumplist-class.md)\ The list of shortcuts revealed when you right click on an icon in the task bar. -[`CKeyboardManager` Class](../../mfc/reference/ckeyboardmanager-class.md)
+[`CKeyboardManager` Class](ckeyboardmanager-class.md)\ Manages shortcut key tables for the main frame window and child frame windows. -[`CKeyFrame` Class](../../mfc/reference/ckeyframe-class.md)
+[`CKeyFrame` Class](ckeyframe-class.md)\ Represents an animation keyframe. -[`CLinearTransition` Class](../../mfc/reference/clineartransition-class.md)
+[`CLinearTransition` Class](clineartransition-class.md)\ Encapsulates a linear transition. -[`CLinearTransitionFromSpeed` Class](../../mfc/reference/clineartransitionfromspeed-class.md)
+[`CLinearTransitionFromSpeed` Class](clineartransitionfromspeed-class.md)\ Encapsulates a linear-speed transition. -[`CLinkCtrl` Class](../../mfc/reference/clinkctrl-class.md)
+[`CLinkCtrl` Class](clinkctrl-class.md)\ Provides the functionality of the Windows common SysLink control. -[`CList` Class](../../mfc/reference/clist-class.md)
+[`CList` Class](clist-class.md)\ Supports ordered lists of nonunique objects accessible sequentially or by value. -[`CListBox` Class](../../mfc/reference/clistbox-class.md)
+[`CListBox` Class](clistbox-class.md)\ Provides the functionality of a Windows list box. -[`CListCtrl` Class](../../mfc/reference/clistctrl-class.md)
+[`CListCtrl` Class](clistctrl-class.md)\ Encapsulates the functionality of a "list view control," which displays a collection of items each consisting of an icon (from an image list) and a label. -[`CListView` Class](../../mfc/reference/clistview-class.md)
-Simplifies use of the list control and of [`CListCtrl` Class](../../mfc/reference/clistctrl-class.md), the class that encapsulates list-control functionality, with MFC's document-view architecture. +[`CListView` Class](clistview-class.md)\ +Simplifies use of the list control and of [`CListCtrl` Class](clistctrl-class.md), the class that encapsulates list-control functionality, with MFC's document-view architecture. -[`CLongBinary` Class](../../mfc/reference/clongbinary-class.md)
+[`CLongBinary` Class](clongbinary-class.md)\ Simplifies working with very large binary data objects (often called BLOBs, or "binary large objects") in a database. -[`CMap` Class](../../mfc/reference/cmap-class.md)
+[`CMap` Class](cmap-class.md)\ A dictionary collection class that maps unique keys to values. -[`CMapPtrToPtr` Class](../../mfc/reference/cmapptrtoptr-class.md)
+[`CMapPtrToPtr` Class](cmapptrtoptr-class.md)\ Supports maps of void pointers keyed by void pointers. -[`CMapPtrToWord` Class](../../mfc/reference/cmapptrtoword-class.md)
+[`CMapPtrToWord` Class](cmapptrtoword-class.md)\ Supports maps of 16-bit words keyed by void pointers. -[`CMapStringToOb` Class](../../mfc/reference/cmapstringtoob-class.md)
+[`CMapStringToOb` Class](cmapstringtoob-class.md)\ A dictionary collection class that maps unique `CString` objects to `CObject` pointers. -[`CMapStringToPtr` Class](../../mfc/reference/cmapstringtoptr-class.md)
+[`CMapStringToPtr` Class](cmapstringtoptr-class.md)\ Supports maps of void pointers keyed by `CString` objects. -[`CMapStringToString` Class](../../mfc/reference/cmapstringtostring-class.md)
+[`CMapStringToString` Class](cmapstringtostring-class.md)\ Supports maps of `CString` objects keyed by `CString` objects. -[`CMapWordToOb` Class](../../mfc/reference/cmapwordtoob-class.md)
+[`CMapWordToOb` Class](cmapwordtoob-class.md)\ Supports maps of `CObject` pointers keyed by 16-bit words. -[`CMapWordToPtr` Class](../../mfc/reference/cmapwordtoptr-class.md)
+[`CMapWordToPtr` Class](cmapwordtoptr-class.md)\ Supports maps of void pointers keyed by 16-bit words. -[`CMDIChildWnd` Class](../../mfc/reference/cmdichildwnd-class.md)
+[`CMDIChildWnd` Class](cmdichildwnd-class.md)\ Provides the functionality of a Windows multiple document interface (MDI) child window, along with members for managing the window. -[`CMDIChildWndEx` Class](../../mfc/reference/cmdichildwndex-class.md)
-Provides the functionality of a Windows multiple document interface (MDI) child window. It extends the functionality of [`CMDIChildWnd` Class](../../mfc/reference/cmdichildwnd-class.md). The framework requires this class when an MDI application uses certain MFC classes. +[`CMDIChildWndEx` Class](cmdichildwndex-class.md)\ +Provides the functionality of a Windows multiple document interface (MDI) child window. It extends the functionality of [`CMDIChildWnd` Class](cmdichildwnd-class.md). The framework requires this class when an MDI application uses certain MFC classes. -[`CMDIFrameWnd` Class](../../mfc/reference/cmdiframewnd-class.md)
+[`CMDIFrameWnd` Class](cmdiframewnd-class.md)\ Provides the functionality of a Windows multiple document interface (MDI) frame window, along with members for managing the window. -[`CMDIFrameWndEx` Class](../../mfc/reference/cmdiframewndex-class.md)
-Extends the functionality of [`CFrameWnd` Class](../../mfc/reference/cframewnd-class.md), a Windows Multiple Document Interface (MDI) frame window. +[`CMDIFrameWndEx` Class](cmdiframewndex-class.md)\ +Extends the functionality of [`CFrameWnd` Class](cframewnd-class.md), a Windows Multiple Document Interface (MDI) frame window. -[`CMDITabInfo` Class](../../mfc/reference/cmditabinfo-class.md)
-Used to pass parameters to [`CMDIFrameWndEx::EnableMDITabbedGroups`](../../mfc/reference/cmdiframewndex-class.md#enablemditabbedgroups) method. Set members of this class to control the behavior of MDI tabbed groups. +[`CMDITabInfo` Class](cmditabinfo-class.md)\ +Used to pass parameters to [`CMDIFrameWndEx::EnableMDITabbedGroups`](cmdiframewndex-class.md#enablemditabbedgroups) method. Set members of this class to control the behavior of MDI tabbed groups. -[`CMemFile` Class](../../mfc/reference/cmemfile-class.md)
-The [`CFile` Class](../../mfc/reference/cfile-class.md)-derived class that supports memory files. +[`CMemFile` Class](cmemfile-class.md)\ +The [`CFile` Class](cfile-class.md)-derived class that supports memory files. -[`CMemoryException` Class](../../mfc/reference/cmemoryexception-class.md)
+[`CMemoryException` Class](cmemoryexception-class.md)\ Represents an out-of-memory exception condition. -[`CMenu` Class](../../mfc/reference/cmenu-class.md)
+[`CMenu` Class](cmenu-class.md)\ An encapsulation of the Windows `HMENU`. -[`CMenuTearOffManager` Class](../../mfc/reference/cmenutearoffmanager-class.md)
+[`CMenuTearOffManager` Class](cmenutearoffmanager-class.md)\ Manages tear-off menus. A tear-off menu is a menu on the menu bar. The user can remove a tear-off menu from the menu bar, causing the tear-off menu to float. -[`CMetaFileDC` Class](../../mfc/reference/cmetafiledc-class.md)
+[`CMetaFileDC` Class](cmetafiledc-class.md)\ Implements a Windows metafile, which contains a sequence of graphics device interface (GDI) commands that you can replay to create a desired image or text. -[`CMFCAcceleratorKey` Class](../../mfc/reference/cmfcacceleratorkey-class.md)
+[`CMFCAcceleratorKey` Class](cmfcacceleratorkey-class.md)\ Helper class that implements virtual key mapping and formatting. -[`CMFCAcceleratorKeyAssignCtrl` Class](../../mfc/reference/cmfcacceleratorkeyassignctrl-class.md)
-Extends the [`CEdit` Class](../../mfc/reference/cedit-class.md) to support extra system buttons such as ALT, CONTROL, and SHIFT. +[`CMFCAcceleratorKeyAssignCtrl` Class](cmfcacceleratorkeyassignctrl-class.md)\ +Extends the [`CEdit` Class](cedit-class.md) to support extra system buttons such as ALT, CONTROL, and SHIFT. -[`CMFCAutoHideButton` Class](../../mfc/reference/cmfcautohidebutton-class.md)
-A button that displays or hides a [`CDockablePane` Class](../../mfc/reference/cdockablepane-class.md) that is configured to hide. +[`CMFCAutoHideButton` Class](cmfcautohidebutton-class.md)\ +A button that displays or hides a [`CDockablePane` Class](cdockablepane-class.md) that is configured to hide. -[`CMFCBaseTabCtrl` Class](../../mfc/reference/cmfcbasetabctrl-class.md)
+[`CMFCBaseTabCtrl` Class](cmfcbasetabctrl-class.md)\ Implements the base functionality for tabbed windows. -[`CMFCButton` Class](../../mfc/reference/cmfcbutton-class.md)
-Adds functionality to the [`CButton` Class](../../mfc/reference/cbutton-class.md) class such as aligning button text, combining button text and an image, selecting a cursor, and specifying a tool tip. +[`CMFCButton` Class](cmfcbutton-class.md)\ +Adds functionality to the [`CButton` Class](cbutton-class.md) class such as aligning button text, combining button text and an image, selecting a cursor, and specifying a tool tip. -[`CMFCCaptionBar` Class](../../mfc/reference/cmfccaptionbar-class.md)
+[`CMFCCaptionBar` Class](cmfccaptionbar-class.md)\ Control bar that can display three elements: a button, a text label, and a bitmap. It can only display one element of each type at a time. You can align each element to the left or right edges of the control or to the center. You can also apply a flat or 3D style to the top and bottom borders of the caption bar. -[`CMFCCaptionButton` Class](../../mfc/reference/cmfccaptionbutton-class.md)
+[`CMFCCaptionButton` Class](cmfccaptionbutton-class.md)\ Implements a button that is displayed on the caption bar for a docking pane or a mini-frame window. Typically, the framework creates caption buttons automatically. -[`CMFCColorBar` Class](../../mfc/reference/cmfccolorbar-class.md)
+[`CMFCColorBar` Class](cmfccolorbar-class.md)\ Represents a docking control bar that can select colors in a document or application. -[`CMFCColorButton` Class](../../mfc/reference/cmfccolorbutton-class.md)
-The `CMFCColorButton` and [`CMFCColorBar` Class](../../mfc/reference/cmfccolorbar-class.md) classes are used together to implement a color picker control. +[`CMFCColorButton` Class](cmfccolorbutton-class.md)\ +The `CMFCColorButton` and [`CMFCColorBar` Class](cmfccolorbar-class.md) classes are used together to implement a color picker control. -[`CMFCColorDialog` Class](../../mfc/reference/cmfccolordialog-class.md)
+[`CMFCColorDialog` Class](cmfccolordialog-class.md)\ Represents a color selection dialog box. -[`CMFCColorMenuButton` Class](../../mfc/reference/cmfccolormenubutton-class.md)
+[`CMFCColorMenuButton` Class](cmfccolormenubutton-class.md)\ Supports a menu command or a toolbar button that starts a color picker dialog box. -[`CMFCColorPickerCtrl` Class](../../mfc/reference/cmfccolorpickerctrl-class.md)
+[`CMFCColorPickerCtrl` Class](cmfccolorpickerctrl-class.md)\ Provides functionality for a control that is used to select colors. -[`CMFCDesktopAlertDialog` Class](../../mfc/reference/cmfcdesktopalertdialog-class.md)
-Used together with the [`CMFCDesktopAlertWnd` Class](../../mfc/reference/cmfcdesktopalertwnd-class.md) to display a custom dialog in a popup window. +[`CMFCDesktopAlertDialog` Class](cmfcdesktopalertdialog-class.md)\ +Used together with the [`CMFCDesktopAlertWnd` Class](cmfcdesktopalertwnd-class.md) to display a custom dialog in a popup window. -[`CMFCDesktopAlertWnd` Class](../../mfc/reference/cmfcdesktopalertwnd-class.md)
+[`CMFCDesktopAlertWnd` Class](cmfcdesktopalertwnd-class.md)\ Implements the functionality of a modeless dialog box which appears on the screen to inform the user about an event. -[`CMFCDesktopAlertWndInfo` Class](../../mfc/reference/cmfcdesktopalertwndinfo-class.md)
-Used with the [`CMFCDesktopAlertWnd` Class](../../mfc/reference/cmfcdesktopalertwnd-class.md). It specifies the controls that are displayed if the desktop alert window pops up. +[`CMFCDesktopAlertWndInfo` Class](cmfcdesktopalertwndinfo-class.md)\ +Used with the [`CMFCDesktopAlertWnd` Class](cmfcdesktopalertwnd-class.md). It specifies the controls that are displayed if the desktop alert window pops up. -[`CMFCDragFrameImpl` Class](../../mfc/reference/cmfcdragframeimpl-class.md)
+[`CMFCDragFrameImpl` Class](cmfcdragframeimpl-class.md)\ Draws the drag rectangle that appears when the user drags a pane in the standard dock mode. -[`CMFCDropDownToolBar` Class](../../mfc/reference/cmfcdropdowntoolbar-class.md)
+[`CMFCDropDownToolBar` Class](cmfcdropdowntoolbar-class.md)\ A toolbar that appears when the user presses and holds a top-level toolbar button. -[`CMFCDropDownToolbarButton` Class](../../mfc/reference/cmfcdropdowntoolbarbutton-class.md)
-A type of toolbar button that behaves like a regular button when it is clicked. However, it opens a drop-down toolbar ([`CMFCDropDownToolBar` Class](../../mfc/reference/cmfcdropdowntoolbar-class.md) if the user presses and holds the toolbar button down. +[`CMFCDropDownToolbarButton` Class](cmfcdropdowntoolbarbutton-class.md)\ +A type of toolbar button that behaves like a regular button when it is clicked. However, it opens a drop-down toolbar ([`CMFCDropDownToolBar` Class](cmfcdropdowntoolbar-class.md)) if the user presses and holds the toolbar button down. -[`CMFCDynamicLayout` Class](../../mfc/reference/cmfcdynamiclayout-class.md)
+[`CMFCDynamicLayout` Class](cmfcdynamiclayout-class.md)\ Specifies how controls in a window are moved and resized as the user resizes the window. -[`CMFCEditBrowseCtrl` Class](../../mfc/reference/cmfceditbrowsectrl-class.md)
+[`CMFCEditBrowseCtrl` Class](cmfceditbrowsectrl-class.md)\ Supports the edit browse control, which is an editable text box that optionally contains a browse button. When the user clicks the browse button, the control performs a custom action or displays a standard dialog box that contains a file browser or a folder browser. -[`CMFCFilterChunkValueImpl` Class](../../mfc/reference/cmfcfilterchunkvalueimpl-class.md)
+[`CMFCFilterChunkValueImpl` Class](cmfcfilterchunkvalueimpl-class.md)\ Simplifies both chunk and property value pair logic. -[`CMFCFontComboBox` Class](../../mfc/reference/cmfcfontcombobox-class.md)
+[`CMFCFontComboBox` Class](cmfcfontcombobox-class.md)\ Creates a combo box control that contains a list of fonts. -[`CMFCFontInfo` Class](../../mfc/reference/cmfcfontinfo-class.md)
+[`CMFCFontInfo` Class](cmfcfontinfo-class.md)\ Describes the name and other attributes of a font. -[`CMFCHeaderCtrl` Class](../../mfc/reference/cmfcheaderctrl-class.md)
+[`CMFCHeaderCtrl` Class](cmfcheaderctrl-class.md)\ Supports sorting multiple columns in a header control. -[`CMFCImageEditorDialog` Class](../../mfc/reference/cmfcimageeditordialog-class.md)
+[`CMFCImageEditorDialog` Class](cmfcimageeditordialog-class.md)\ Supports an image editor dialog box. -[`CMFCKeyMapDialog` Class](../../mfc/reference/cmfckeymapdialog-class.md)
+[`CMFCKeyMapDialog` Class](cmfckeymapdialog-class.md)\ Supports a control that maps commands to keys on the keyboard. -[`CMFCLinkCtrl` Class](../../mfc/reference/cmfclinkctrl-class.md)
+[`CMFCLinkCtrl` Class](cmfclinkctrl-class.md)\ Displays a button as a hyperlink and invokes the link's target when the button is clicked. -[`CMFCListCtrl` Class](../../mfc/reference/cmfclistctrl-class.md)
-Extends the functionality of [`CListCtrl` Class](../../mfc/reference/clistctrl-class.md) class by supporting the advanced header control functionality of the [`CMFCHeaderCtrl` Class](../../mfc/reference/cmfcheaderctrl-class.md). +[`CMFCListCtrl` Class](cmfclistctrl-class.md)\ +Extends the functionality of [`CListCtrl` Class](clistctrl-class.md) class by supporting the advanced header control functionality of the [`CMFCHeaderCtrl` Class](cmfcheaderctrl-class.md). -[`CMFCMaskedEdit` Class](../../mfc/reference/cmfcmaskededit-class.md)
+[`CMFCMaskedEdit` Class](cmfcmaskededit-class.md)\ Supports a masked edit control, which validates user input against a mask and displays the validated results according to a template. -[`CMFCMenuBar` Class](../../mfc/reference/cmfcmenubar-class.md)
+[`CMFCMenuBar` Class](cmfcmenubar-class.md)\ A menu bar that implements docking. -[`CMFCMenuButton` Class](../../mfc/reference/cmfcmenubutton-class.md)
+[`CMFCMenuButton` Class](cmfcmenubutton-class.md)\ A button that displays a pop-up menu and reports on the user's menu selections. -[`CMFCOutlookBar` Class](../../mfc/reference/cmfcoutlookbar-class.md)
-A tabbed pane with the visual appearance of the **Navigation Pane** in Microsoft Outlook 2000 or Outlook 2003. The `CMFCOutlookBar` object contains a [`CMFCOutlookBarTabCtrl` Class](../../mfc/reference/cmfcoutlookbartabctrl-class.md) object and a series of tabs. The tabs can be either [`CMFCOutlookBarPane` Class](../../mfc/reference/cmfcoutlookbarpane-class.md) objects or `CWnd`-derived objects. To the user, the Outlook bar appears as a series of buttons and a display area. When the user clicks a button, the corresponding control or button pane is displayed. +[`CMFCOutlookBar` Class](cmfcoutlookbar-class.md)\ +A tabbed pane with the visual appearance of the **Navigation Pane** in Microsoft Outlook 2000 or Outlook 2003. The `CMFCOutlookBar` object contains a [`CMFCOutlookBarTabCtrl` Class](cmfcoutlookbartabctrl-class.md) object and a series of tabs. The tabs can be either [`CMFCOutlookBarPane` Class](cmfcoutlookbarpane-class.md) objects or `CWnd`-derived objects. To the user, the Outlook bar appears as a series of buttons and a display area. When the user clicks a button, the corresponding control or button pane is displayed. -[`CMFCOutlookBarPane` Class](../../mfc/reference/cmfcoutlookbarpane-class.md)
-A control derived from [`CMFCToolBar` Class](../../mfc/reference/cmfctoolbar-class.md) that can be inserted into an Outlook bar ([`CMFCOutlookBar` Class](../../mfc/reference/cmfcoutlookbar-class.md)). The Outlook bar pane contains a column of large buttons. The user can scroll up and down the list of buttons if it is larger than the pane. When the user detaches an Outlook bar pane from the Outlook bar, it can float or dock in the main frame window. +[`CMFCOutlookBarPane` Class](cmfcoutlookbarpane-class.md)\ +A control derived from [`CMFCToolBar` Class](cmfctoolbar-class.md) that can be inserted into an Outlook bar ([`CMFCOutlookBar` Class](cmfcoutlookbar-class.md)). The Outlook bar pane contains a column of large buttons. The user can scroll up and down the list of buttons if it is larger than the pane. When the user detaches an Outlook bar pane from the Outlook bar, it can float or dock in the main frame window. -[`CMFCOutlookBarTabCtrl` Class](../../mfc/reference/cmfcoutlookbartabctrl-class.md)
+[`CMFCOutlookBarTabCtrl` Class](cmfcoutlookbartabctrl-class.md)\ A tab control that has the visual appearance of the **Navigation Pane** in Microsoft Outlook. -[`CMFCPopupMenu` Class](../../mfc/reference/cmfcpopupmenu-class.md)
+[`CMFCPopupMenu` Class](cmfcpopupmenu-class.md)\ Implements Windows pop-up menu functionality and extends it by adding features such as tear-off menus and tooltips. -[`CMFCPopupMenuBar` Class](../../mfc/reference/cmfcpopupmenubar-class.md)
+[`CMFCPopupMenuBar` Class](cmfcpopupmenubar-class.md)\ A menu bar embedded into a pop-up menu. -[`CMFCPreviewCtrlImpl` Class](../../mfc/reference/cmfcpreviewctrlimpl-class.md)
+[`CMFCPreviewCtrlImpl` Class](cmfcpreviewctrlimpl-class.md)\ Implements a window that is placed on a host window provided by the Shell for Rich Preview. -[`CMFCPropertyGridColorProperty` Class](../../mfc/reference/cmfcpropertygridcolorproperty-class.md)
+[`CMFCPropertyGridColorProperty` Class](cmfcpropertygridcolorproperty-class.md)\ Supports a property list control item that opens a color selection dialog box. -[`CMFCPropertyGridCtrl` Class](../../mfc/reference/cmfcpropertygridctrl-class.md)
+[`CMFCPropertyGridCtrl` Class](cmfcpropertygridctrl-class.md)\ Supports an editable property grid control that can display properties in alphabetical or hierarchical order. -[`CMFCPropertyGridFileProperty` Class](../../mfc/reference/cmfcpropertygridfileproperty-class.md)
+[`CMFCPropertyGridFileProperty` Class](cmfcpropertygridfileproperty-class.md)\ Supports a property list control item that opens a file selection dialog box. -[`CMFCPropertyGridFontProperty` Class](../../mfc/reference/cmfcpropertygridfontproperty-class.md)
+[`CMFCPropertyGridFontProperty` Class](cmfcpropertygridfontproperty-class.md)\ Supports a property list control item that opens a font selection dialog box. -[`CMFCPropertyGridProperty` Class](../../mfc/reference/cmfcpropertygridproperty-class.md)
+[`CMFCPropertyGridProperty` Class](cmfcpropertygridproperty-class.md)\ Represents a list item in a property list control. -[`CMFCPropertyPage` Class](../../mfc/reference/cmfcpropertypage-class.md)
+[`CMFCPropertyPage` Class](cmfcpropertypage-class.md)\ Supports the display of pop-up menus on a property page. -[`CMFCPropertySheet` Class](../../mfc/reference/cmfcpropertysheet-class.md)
+[`CMFCPropertySheet` Class](cmfcpropertysheet-class.md)\ Supports a property sheet where each property page is denoted by a page tab, a toolbar button, a tree control node, or a list item. -[`CMFCReBar` Class](../../mfc/reference/cmfcrebar-class.md)
+[`CMFCReBar` Class](cmfcrebar-class.md)\ Control bar that provides layout, persistence, and state information for rebar controls. -[`CMFCRibbonApplicationButton` Class](../../mfc/reference/cmfcribbonapplicationbutton-class.md)
+[`CMFCRibbonApplicationButton` Class](cmfcribbonapplicationbutton-class.md)\ Implements a special button located in the top-left corner of the application window. When clicked, the button opens a menu that usually contains common **File** commands like **Open**, **Save**, and **Exit**. -[`CMFCRibbonBaseElement` Class](../../mfc/reference/cmfcribbonbaseelement-class.md)
-Base class for all elements that you can add to a [`CMFCRibbonBar` Class](../../mfc/reference/cmfcribbonbar-class.md). Examples of ribbon elements are ribbon buttons, ribbon check boxes, and ribbon combo boxes. +[`CMFCRibbonBaseElement` Class](cmfcribbonbaseelement-class.md)\ +Base class for all elements that you can add to a [`CMFCRibbonBar` Class](cmfcribbonbar-class.md). Examples of ribbon elements are ribbon buttons, ribbon check boxes, and ribbon combo boxes. -[`CMFCRibbonButton` Class](../../mfc/reference/cmfcribbonbutton-class.md)
+[`CMFCRibbonButton` Class](cmfcribbonbutton-class.md)\ Implements buttons that you can position on ribbon bar elements such as panels, Quick Access Toolbars, and pop-up menus. -[`CMFCRibbonButtonsGroup` Class](../../mfc/reference/cmfcribbonbuttonsgroup-class.md)
+[`CMFCRibbonButtonsGroup` Class](cmfcribbonbuttonsgroup-class.md)\ Lets you organize a set of ribbon buttons into a group. All buttons in the group are directly adjacent to each other horizontally and enclosed in a border. -[`CMFCRibbonCategory` Class](../../mfc/reference/cmfcribboncategory-class.md)
-Implements a ribbon tab that contains a group of [`CMFCRibbonPanel` Class](../../mfc/reference/cmfcribbonpanel-class.md). +[`CMFCRibbonCategory` Class](cmfcribboncategory-class.md)\ +Implements a ribbon tab that contains a group of [`CMFCRibbonPanel` Class](cmfcribbonpanel-class.md). -[`CMFCRibbonCheckBox` Class](../../mfc/reference/cmfcribboncheckbox-class.md)
+[`CMFCRibbonCheckBox` Class](cmfcribboncheckbox-class.md)\ Implements a check box that you can add to a ribbon panel, Quick Access Toolbar, or popup menu. -[`CMFCRibbonColorButton` Class](../../mfc/reference/cmfcribboncolorbutton-class.md)
+[`CMFCRibbonColorButton` Class](cmfcribboncolorbutton-class.md)\ Implements a color button that you can add to a ribbon bar. The ribbon color button displays a drop-down menu that contains one or more color palettes. -[`CMFCRibbonComboBox` Class](../../mfc/reference/cmfcribboncombobox-class.md)
+[`CMFCRibbonComboBox` Class](cmfcribboncombobox-class.md)\ Implements a combo box control that you can add to a ribbon bar, a ribbon panel, or a ribbon popup menu. -[`CMFCRibbonContextCaption` Class](../../mfc/reference/cmfcribboncontextcaption-class.md)
+[`CMFCRibbonContextCaption` Class](cmfcribboncontextcaption-class.md)\ Implements a colored caption that appears at the top of a ribbon category or a context category. -[`CMFCRibbonEdit` Class](../../mfc/reference/cmfcribbonedit-class.md)
+[`CMFCRibbonEdit` Class](cmfcribbonedit-class.md)\ Implements an edit control that is positioned on a ribbon. -[`CMFCRibbonFontComboBox` Class](../../mfc/reference/cmfcribbonfontcombobox-class.md)
+[`CMFCRibbonFontComboBox` Class](cmfcribbonfontcombobox-class.md)\ Implements a combo box that contains a list of fonts. You place the combo box on a ribbon panel. -[`CMFCRibbonGallery` Class](../../mfc/reference/cmfcribbongallery-class.md)
+[`CMFCRibbonGallery` Class](cmfcribbongallery-class.md)\ Implements Office 2007-style ribbon galleries. -[`CMFCRibbonGalleryMenuButton` Class](../../mfc/reference/cmfcribbongallerymenubutton-class.md)
+[`CMFCRibbonGalleryMenuButton` Class](cmfcribbongallerymenubutton-class.md)\ Implements a ribbon menu button that contains ribbon galleries. -[`CMFCRibbonLabel` Class](../../mfc/reference/cmfcribbonlabel-class.md)
+[`CMFCRibbonLabel` Class](cmfcribbonlabel-class.md)\ Implements a non-clickable text label for a ribbon. -[`CMFCRibbonLinkCtrl` Class](../../mfc/reference/cmfcribbonlinkctrl-class.md)
+[`CMFCRibbonLinkCtrl` Class](cmfcribbonlinkctrl-class.md)\ Implements a hyperlink that is positioned on a ribbon. The hyperlink opens a Web page when you click it. -[`CMFCRibbonMainPanel` Class](../../mfc/reference/cmfcribbonmainpanel-class.md)
-Implements a ribbon panel that displays when you click the [`CMFCRibbonApplicationButton` Class](../../mfc/reference/cmfcribbonapplicationbutton-class.md). +[`CMFCRibbonMainPanel` Class](cmfcribbonmainpanel-class.md)\ +Implements a ribbon panel that displays when you click the [`CMFCRibbonApplicationButton` Class](cmfcribbonapplicationbutton-class.md). -[`CMFCRibbonMiniToolBar` Class](../../mfc/reference/cmfcribbonminitoolbar-class.md)
+[`CMFCRibbonMiniToolBar` Class](cmfcribbonminitoolbar-class.md)\ Implements a contextual popup toolbar. -[`CMFCRibbonPanel` Class](../../mfc/reference/cmfcribbonpanel-class.md)
+[`CMFCRibbonPanel` Class](cmfcribbonpanel-class.md)\ Implements a panel that contains a set of ribbon elements. When the panel is drawn, it displays as many elements as possible, given the size of the panel. -[`CMFCRibbonProgressBar` Class](../../mfc/reference/cmfcribbonprogressbar-class.md)
+[`CMFCRibbonProgressBar` Class](cmfcribbonprogressbar-class.md)\ Implements a control that visually indicates the progress of a lengthy operation. -[`CMFCRibbonSlider` Class](../../mfc/reference/cmfcribbonslider-class.md)
+[`CMFCRibbonSlider` Class](cmfcribbonslider-class.md)\ Implements a slider control that you can add to a ribbon bar or ribbon status bar. The ribbon slider control resembles the zoom sliders that appear in Office 2007 applications. -[`CMFCRibbonStatusBar` Class](../../mfc/reference/cmfcribbonstatusbar-class.md)
+[`CMFCRibbonStatusBar` Class](cmfcribbonstatusbar-class.md)\ Implements a status bar control that can display ribbon elements. -[`CMFCRibbonStatusBarPane` Class](../../mfc/reference/cmfcribbonstatusbarpane-class.md)
+[`CMFCRibbonStatusBarPane` Class](cmfcribbonstatusbarpane-class.md)\ Implements a ribbon element that you can add to a ribbon status bar. -[`CMFCRibbonUndoButton` Class](../../mfc/reference/cmfcribbonundobutton-class.md)
+[`CMFCRibbonUndoButton` Class](cmfcribbonundobutton-class.md)\ Implements a split button, a small button with a downward pointing triangle on the rightmost part of the main button. Users can click the triangle to display a drop-down list of their most recently performed actions. Users can then select one or more actions from the drop-down list. However, if the user clicks the button, only the last (the most recently added) action on the drop-down list is undone. You should populate the list with actions as the user performs them. -[`CMFCShellListCtrl` Class](../../mfc/reference/cmfcshelllistctrl-class.md)
+[`CMFCShellListCtrl` Class](cmfcshelllistctrl-class.md)\ Provides Windows list control functionality and expands it by including the ability to display a list of shell items. -[`CMFCShellTreeCtrl` Class](../../mfc/reference/cmfcshelltreectrl-class.md)
-Extends [`CTreeCtrl` Class](../../mfc/reference/ctreectrl-class.md) functionality by displaying a hierarchy of Shell items. +[`CMFCShellTreeCtrl` Class](cmfcshelltreectrl-class.md)\ +Extends [`CTreeCtrl` Class](ctreectrl-class.md) functionality by displaying a hierarchy of Shell items. -[`CMFCSpinButtonCtrl` Class](../../mfc/reference/cmfcspinbuttonctrl-class.md)
+[`CMFCSpinButtonCtrl` Class](cmfcspinbuttonctrl-class.md)\ Supports a visual manager that draws a spin button control. -[`CMFCStatusBar` Class](../../mfc/reference/cmfcstatusbar-class.md)
+[`CMFCStatusBar` Class](cmfcstatusbar-class.md)\ Implements a status bar similar to the `CStatusBar` class. However, the `CMFCStatusBar` class has features not offered by the `CStatusBar` class, such as the ability to display images, animations, and progress bars; and the ability to respond to mouse double-clicks. -[`CMFCTabCtrl` Class](../../mfc/reference/cmfctabctrl-class.md)
+[`CMFCTabCtrl` Class](cmfctabctrl-class.md)\ Provides functionality for a tab control. The tab control displays a dockable window with flat or three-dimensional tabs at its top or bottom. The tabs can display text and an image and can change color when active. -[`CMFCTabToolTipInfo Structure](../../mfc/reference/cmfctabtooltipinfo-structure.md)
+[`CMFCTabToolTipInfo` Structure](cmfctabtooltipinfo-structure.md)\ Provides information about the MDI tab that the user is hovering over. -[`CMFCTasksPane` Class](../../mfc/reference/cmfctaskspane-class.md)
+[`CMFCTasksPane` Class](cmfctaskspane-class.md)\ Implements a list of clickable items (tasks). -[`CMFCTasksPaneTask` Class](../../mfc/reference/cmfctaskspanetask-class.md)
-Helper class that represents tasks for the task pane control ([`CMFCTasksPane` Class](../../mfc/reference/cmfctaskspane-class.md)). The task object represents an item in the task group ([`CMFCTasksPaneTaskGroup` Class](../../mfc/reference/cmfctaskspanetaskgroup-class.md)). Each task can have a command that the framework executes when a user clicks on the task and an icon that appears to the left of the task name. +[`CMFCTasksPaneTask` Class](cmfctaskspanetask-class.md)\ +Helper class that represents tasks for the task pane control ([`CMFCTasksPane` Class](cmfctaskspane-class.md)). The task object represents an item in the task group ([`CMFCTasksPaneTaskGroup` Class](cmfctaskspanetaskgroup-class.md)). Each task can have a command that the framework executes when a user clicks on the task and an icon that appears to the left of the task name. -[`CMFCTasksPaneTaskGroup` Class](../../mfc/reference/cmfctaskspanetaskgroup-class.md)
-Helper class used by the [`CMFCTasksPane` Class](../../mfc/reference/cmfctaskspane-class.md) control. Objects of type `CMFCTasksPaneTaskGroup` represent a *task group*. The task group is a list of items that the framework displays in a separate box that has a collapse button. The box can have an optional caption (group name). If a group is collapsed, the list of tasks is not visible. +[`CMFCTasksPaneTaskGroup` Class](cmfctaskspanetaskgroup-class.md)\ +Helper class used by the [`CMFCTasksPane` Class](cmfctaskspane-class.md) control. Objects of type `CMFCTasksPaneTaskGroup` represent a *task group*. The task group is a list of items that the framework displays in a separate box that has a collapse button. The box can have an optional caption (group name). If a group is collapsed, the list of tasks is not visible. -[`CMFCToolBar` Class](../../mfc/reference/cmfctoolbar-class.md)
-Resembles [`CToolBar` Class](../../mfc/reference/ctoolbar-class.md), but provides additional support for user interface features. These include flat toolbars, toolbars with hot images, large icons, pager buttons, locked toolbars, rebar controls, text under images, background images, and tabbed toolbars. The `CMFCToolBar` class also contains built-in support for user customization of toolbars and menus, drag-and-drop between toolbars and menus, combo box buttons, edit box buttons, color pickers, and roll-up buttons. +[`CMFCToolBar` Class](cmfctoolbar-class.md)\ +Resembles [`CToolBar` Class](ctoolbar-class.md), but provides additional support for user interface features. These include flat toolbars, toolbars with hot images, large icons, pager buttons, locked toolbars, rebar controls, text under images, background images, and tabbed toolbars. The `CMFCToolBar` class also contains built-in support for user customization of toolbars and menus, drag-and-drop between toolbars and menus, combo box buttons, edit box buttons, color pickers, and roll-up buttons. -[`CMFCToolBarImages` Class](../../mfc/reference/cmfctoolbarimages-class.md)
+[`CMFCToolBarImages` Class](cmfctoolbarimages-class.md)\ Manages toolbar images loaded from application resources or from files. -[`CMFCToolBarInfo` Class](../../mfc/reference/cmfctoolbarinfo-class.md)
-Contains the resource IDs of toolbar images in various states. `CMFCToolBarInfo` is a helper class that is used as a parameter of the [`CMFCToolBar::LoadToolBarEx`](../../mfc/reference/cmfctoolbar-class.md#loadtoolbarex) method. +[`CMFCToolBarInfo` Class](cmfctoolbarinfo-class.md)\ +Contains the resource IDs of toolbar images in various states. `CMFCToolBarInfo` is a helper class that is used as a parameter of the [`CMFCToolBar::LoadToolBarEx`](cmfctoolbar-class.md#loadtoolbarex) method. -[`CMFCToolBarMenuButton` Class](../../mfc/reference/cmfctoolbarmenubutton-class.md)
+[`CMFCToolBarMenuButton` Class](cmfctoolbarmenubutton-class.md)\ A toolbar button that contains a pop-up menu. -[`CMFCToolBarsCustomizeDialog` Class](../../mfc/reference/cmfctoolbarscustomizedialog-class.md)
-A modeless tab dialog box ([`CPropertySheet` Class](../../mfc/reference/cpropertysheet-class.md)) that enables the user to customize the toolbars, menus, keyboard shortcuts, user-defined tools, and visual style in an application. Typically, the user accesses this dialog box by selecting **Customize** from the **Tools** menu. +[`CMFCToolBarsCustomizeDialog` Class](cmfctoolbarscustomizedialog-class.md)\ +A modeless tab dialog box ([`CPropertySheet` Class](cpropertysheet-class.md)) that enables the user to customize the toolbars, menus, keyboard shortcuts, user-defined tools, and visual style in an application. Typically, the user accesses this dialog box by selecting **Customize** from the **Tools** menu. -[`CMFCToolTipCtrl` Class](../../mfc/reference/cmfctooltipctrl-class.md)
-An extended tooltip implementation based on the [`CToolTipCtrl` Class](../../mfc/reference/ctooltipctrl-class.md). A tooltip based on the `CMFCToolTipCtrl` class can display an icon, a label, and a description. You can customize its visual appearance by using a gradient fill, custom text and border colors, bold text, rounded corners, or a balloon style. +[`CMFCToolTipCtrl` Class](cmfctooltipctrl-class.md)\ +An extended tooltip implementation based on the [`CToolTipCtrl` Class](ctooltipctrl-class.md). A tooltip based on the `CMFCToolTipCtrl` class can display an icon, a label, and a description. You can customize its visual appearance by using a gradient fill, custom text and border colors, bold text, rounded corners, or a balloon style. -[`CMFCToolTipInfo` Class](../../mfc/reference/cmfctooltipinfo-class.md)
+[`CMFCToolTipInfo` Class](cmfctooltipinfo-class.md)\ Stores information about the visual appearance of tooltips. -[`CMFCVisualManager` Class](../../mfc/reference/cmfcvisualmanager-class.md)
+[`CMFCVisualManager` Class](cmfcvisualmanager-class.md)\ Provides support for changing the appearance of your application at a global level. The `CMFCVisualManager` class works together with a class that provides instructions to draw the GUI controls of your application using a consistent style. These other classes are referred to as visual managers and they inherit from `CMFCBaseVisualManager`. -[`CMFCVisualManagerOffice2003` Class](../../mfc/reference/cmfcvisualmanageroffice2003-class.md)
+[`CMFCVisualManagerOffice2003` Class](cmfcvisualmanageroffice2003-class.md)\ Gives an application a Microsoft Office 2003 appearance. -[`CMFCVisualManagerOffice2007` Class](../../mfc/reference/cmfcvisualmanageroffice2007-class.md)
+[`CMFCVisualManagerOffice2007` Class](cmfcvisualmanageroffice2007-class.md)\ Gives an application a Microsoft Office 2007 appearance. -[`CMFCVisualManagerVS2005` Class](../../mfc/reference/cmfcvisualmanagervs2005-class.md)
+[`CMFCVisualManagerVS2005` Class](cmfcvisualmanagervs2005-class.md)\ Gives an application a Microsoft Visual Studio 2005 appearance. -[`CMFCVisualManagerWindows` Class](../../mfc/reference/cmfcvisualmanagerwindows-class.md)
+[`CMFCVisualManagerWindows` Class](cmfcvisualmanagerwindows-class.md)\ Mimics the appearance of Microsoft Windows XP or Microsoft Vista when the user selects a Windows XP or Vista theme. -[`CMFCVisualManagerWindows7` Class](../../mfc/reference/cmfcvisualmanagerwindows7-class.md)
+[`CMFCVisualManagerWindows7` Class](cmfcvisualmanagerwindows7-class.md)\ Gives an application the appearance of a Windows 7 application. -[`CMFCWindowsManagerDialog` Class](../../mfc/reference/cmfcwindowsmanagerdialog-class.md)
+[`CMFCWindowsManagerDialog` Class](cmfcwindowsmanagerdialog-class.md)\ Enables a user to manage MDI child windows in an MDI application. -[`CMiniFrameWnd` Class](../../mfc/reference/cminiframewnd-class.md)
+[`CMiniFrameWnd` Class](cminiframewnd-class.md)\ Represents a half-height frame window typically seen around floating toolbars. -[`CMonikerFile` Class](../../mfc/reference/cmonikerfile-class.md)
+[`CMonikerFile` Class](cmonikerfile-class.md)\ Represents a stream of data ([`IStream`](/windows/win32/api/objidl/nn-objidl-istream)) named by an [`IMoniker`](/windows/win32/api/objidl/nn-objidl-imoniker). -[`CMonthCalCtrl` Class](../../mfc/reference/cmonthcalctrl-class.md)
+[`CMonthCalCtrl` Class](cmonthcalctrl-class.md)\ Encapsulates the functionality of a month calendar control. -[`CMouseManager` Class](../../mfc/reference/cmousemanager-class.md)
-Lets a user associate different commands with a particular [`CView` Class](../../mfc/reference/cview-class.md) object when the user double-clicks inside that view. +[`CMouseManager` Class](cmousemanager-class.md)\ +Lets a user associate different commands with a particular [`CView` Class](cview-class.md) object when the user double-clicks inside that view. -[`CMultiDocTemplate` Class](../../mfc/reference/cmultidoctemplate-class.md)
+[`CMultiDocTemplate` Class](cmultidoctemplate-class.md)\ Defines a document template that implements the multiple document interface (MDI). -[`CMultiLock` Class](../../mfc/reference/cmultilock-class.md)
+[`CMultiLock` Class](cmultilock-class.md)\ Represents the access-control mechanism used in controlling access to resources in a multithreaded program. -[`CMultiPageDHtmlDialog` Class](../../mfc/reference/cmultipagedhtmldialog-class.md)
+[`CMultiPageDHtmlDialog` Class](cmultipagedhtmldialog-class.md)\ A multipage dialog displays multiple HTML pages sequentially and handles the events from each page. -[`CMultiPaneFrameWnd` Class](../../mfc/reference/cmultipaneframewnd-class.md)
-Extends [`CPaneFrameWnd` Class](../../mfc/reference/cpaneframewnd-class.md). It can support multiple panes. Instead of a single embedded handle to a control bar, `CMultiPaneFrameWnd` contains a [`CPaneContainerManager` Class](../../mfc/reference/cpanecontainermanager-class.md) object that enables the user to dock one `CMultiPaneFrameWnd` to another and dynamically create multiple floating, tabbed windows. +[`CMultiPaneFrameWnd` Class](cmultipaneframewnd-class.md)\ +Extends [`CPaneFrameWnd` Class](cpaneframewnd-class.md). It can support multiple panes. Instead of a single embedded handle to a control bar, `CMultiPaneFrameWnd` contains a [`CPaneContainerManager` Class](cpanecontainermanager-class.md) object that enables the user to dock one `CMultiPaneFrameWnd` to another and dynamically create multiple floating, tabbed windows. -[`CMutex` Class](../../mfc/reference/cmutex-class.md)
+[`CMutex` Class](cmutex-class.md)\ Represents a mutex, which is a synchronization object that allows one thread mutually exclusive access to a resource. -[`CNetAddressCtrl` Class](../../mfc/reference/cnetaddressctrl-class.md)
+[`CNetAddressCtrl` Class](cnetaddressctrl-class.md)\ The `CNetAddressCtrl` class represents the network address control, which you can use to input and validate the format of IPv4, IPv6, and named DNS addresses. -[`CNotSupportedException` Class](../../mfc/reference/cnotsupportedexception-class.md)
+[`CNotSupportedException` Class](cnotsupportedexception-class.md)\ Represents an exception that is the result of a request for an unsupported feature. -[`CObArray` Class](../../mfc/reference/cobarray-class.md)
+[`CObArray` Class](cobarray-class.md)\ Supports arrays of `CObject` pointers. -[`CObject` Class](../../mfc/reference/cobject-class.md)
+[`CObject` Class](cobject-class.md)\ The principal base class for the Microsoft Foundation Class Library. -[`CObList` Class](../../mfc/reference/coblist-class.md)
+[`CObList` Class](coblist-class.md)\ Supports ordered lists of non-unique `CObject` pointers accessible sequentially or by pointer value. -[`COccManager` Class](../../mfc/reference/coccmanager-class.md)
+[`COccManager` Class](coccmanager-class.md)\ Manages various custom control sites; implemented by `COleControlContainer` and `COleControlSite` objects. -[`COleBusyDialog` Class](../../mfc/reference/colebusydialog-class.md)
+[`COleBusyDialog` Class](colebusydialog-class.md)\ Used for the OLE Server Not Responding or Server Busy dialog boxes. -[`COleChangeIconDialog` Class](../../mfc/reference/colechangeicondialog-class.md)
+[`COleChangeIconDialog` Class](colechangeicondialog-class.md)\ Used for the OLE Change Icon dialog box. -[`COleChangeSourceDialog` Class](../../mfc/reference/colechangesourcedialog-class.md)
+[`COleChangeSourceDialog` Class](colechangesourcedialog-class.md)\ Used for the OLE Change Source dialog box. -[`COleClientItem` Class](../../mfc/reference/coleclientitem-class.md)
+[`COleClientItem` Class](coleclientitem-class.md)\ Defines the container interface to OLE items. -[`COleCmdUI` Class](../../mfc/reference/colecmdui-class.md)
+[`COleCmdUI` Class](colecmdui-class.md)\ Implements a method for MFC to update the state of user-interface objects related to the `IOleCommandTarget`-driven features of your application. -[`COleControl` Class](../../mfc/reference/colecontrol-class.md)
+[`COleControl` Class](colecontrol-class.md)\ A powerful base class for developing OLE controls. -[`COleControlContainer` Class](../../mfc/reference/colecontrolcontainer-class.md)
+[`COleControlContainer` Class](colecontrolcontainer-class.md)\ Acts as a control container for ActiveX controls. -[`COleControlModule` Class](../../mfc/reference/colecontrolmodule-class.md)
+[`COleControlModule` Class](colecontrolmodule-class.md)\ The base class from which you derive an OLE control module object. -[`COleControlSite` Class](../../mfc/reference/colecontrolsite-class.md)
+[`COleControlSite` Class](colecontrolsite-class.md)\ Provides support for custom client-side control interfaces. -[`COleConvertDialog` Class](../../mfc/reference/coleconvertdialog-class.md)
+[`COleConvertDialog` Class](coleconvertdialog-class.md)\ For more information, see the [`OLEUICONVERT`](/windows/win32/api/oledlg/ns-oledlg-oleuiconvertw) structure in the Windows SDK. -[`COleCurrency` Class](../../mfc/reference/colecurrency-class.md)
+[`COleCurrency` Class](colecurrency-class.md)\ Encapsulates the `CURRENCY` data type of OLE automation. -[`COleDataObject` Class](../../mfc/reference/coledataobject-class.md)
+[`COleDataObject` Class](coledataobject-class.md)\ Used in data transfers for retrieving data in various formats from the Clipboard, through drag and drop, or from an embedded OLE item. -[`COleDataSource` Class](../../mfc/reference/coledatasource-class.md)
+[`COleDataSource` Class](coledatasource-class.md)\ Acts as a cache into which an application places the data that it will offer during data transfer operations, such as Clipboard or drag-and-drop operations. -[`COleDBRecordView` Class](../../mfc/reference/coledbrecordview-class.md)
+[`COleDBRecordView` Class](coledbrecordview-class.md)\ A view that displays database records in controls. -[`COleDialog` Class](../../mfc/reference/coledialog-class.md)
+[`COleDialog` Class](coledialog-class.md)\ Provides functionality common to dialog boxes for OLE. -[`COleDispatchDriver` Class](../../mfc/reference/coledispatchdriver-class.md)
+[`COleDispatchDriver` Class](coledispatchdriver-class.md)\ Implements the client side of OLE automation. -[`COleDispatchException` Class](../../mfc/reference/coledispatchexception-class.md)
+[`COleDispatchException` Class](coledispatchexception-class.md)\ Handles exceptions specific to the OLE `IDispatch` interface, which is a key part of OLE automation. -[`COleDocObjectItem` Class](../../mfc/reference/coledocobjectitem-class.md)
+[`COleDocObjectItem` Class](coledocobjectitem-class.md)\ Implements Active document containment. -[`COleDocument` Class](../../mfc/reference/coledocument-class.md)
+[`COleDocument` Class](coledocument-class.md)\ The base class for OLE documents that support visual editing. -[`COleDropSource` Class](../../mfc/reference/coledropsource-class.md)
+[`COleDropSource` Class](coledropsource-class.md)\ Enables data to be dragged to a drop target. -[`COleDropTarget` Class](../../mfc/reference/coledroptarget-class.md)
+[`COleDropTarget` Class](coledroptarget-class.md)\ Provides the communication mechanism between a window and the OLE libraries. -[`COleException` Class](../../mfc/reference/coleexception-class.md)
+[`COleException` Class](coleexception-class.md)\ Represents an exception condition related to an OLE operation. -[`COleInsertDialog` Class](../../mfc/reference/coleinsertdialog-class.md)
+[`COleInsertDialog` Class](coleinsertdialog-class.md)\ Used for the OLE Insert Object dialog box. -[`COleIPFrameWnd` Class](../../mfc/reference/coleipframewnd-class.md)
+[`COleIPFrameWnd` Class](coleipframewnd-class.md)\ The base for your application's in-place editing window. -[`COleIPFrameWndEx` Class](../../mfc/reference/coleipframewndex-class.md)
-Implements an OLE container that supports MFC. You must derive the in-place frame window class for your application from the `COleIPFrameWndEx` class, instead of deriving it from the [`COleIPFrameWnd`](../../mfc/reference/coleipframewnd-class.md) class. +[`COleIPFrameWndEx` Class](coleipframewndex-class.md)\ +Implements an OLE container that supports MFC. You must derive the in-place frame window class for your application from the `COleIPFrameWndEx` class, instead of deriving it from the [`COleIPFrameWnd`](coleipframewnd-class.md) class. -[`COleLinkingDoc` Class](../../mfc/reference/colelinkingdoc-class.md)
+[`COleLinkingDoc` Class](colelinkingdoc-class.md)\ The base class for OLE container documents that support linking to the embedded items they contain. -[`COleLinksDialog` Class](../../mfc/reference/colelinksdialog-class.md)
+[`COleLinksDialog` Class](colelinksdialog-class.md)\ Used for the OLE Edit Links dialog box. -[`COleMessageFilter` Class](../../mfc/reference/colemessagefilter-class.md)
+[`COleMessageFilter` Class](colemessagefilter-class.md)\ Manages the concurrency required by the interaction of OLE applications. -[`COleObjectFactory` Class](../../mfc/reference/coleobjectfactory-class.md)
+[`COleObjectFactory` Class](coleobjectfactory-class.md)\ Implements the OLE class factory, which creates OLE objects such as servers, automation objects, and documents. -[`COlePasteSpecialDialog` Class](../../mfc/reference/colepastespecialdialog-class.md)
+[`COlePasteSpecialDialog` Class](colepastespecialdialog-class.md)\ Used for the OLE Paste Special dialog box. -[`COlePropertiesDialog` Class](../../mfc/reference/colepropertiesdialog-class.md)
+[`COlePropertiesDialog` Class](colepropertiesdialog-class.md)\ Encapsulates the Windows common OLE Object Properties dialog box. -[`COlePropertyPage` Class](../../mfc/reference/colepropertypage-class.md)
+[`COlePropertyPage` Class](colepropertypage-class.md)\ Used to display the properties of a custom control in a graphical interface, similar to a dialog box. -[`COleResizeBar` Class](../../mfc/reference/coleresizebar-class.md)
+[`COleResizeBar` Class](coleresizebar-class.md)\ A type of control bar that supports resizing of in-place OLE items. -[`COleSafeArray` Class](../../mfc/reference/colesafearray-class.md)
+[`COleSafeArray` Class](colesafearray-class.md)\ A class for working with arrays of arbitrary type and dimension. -[`COleServerDoc` Class](../../mfc/reference/coleserverdoc-class.md)
+[`COleServerDoc` Class](coleserverdoc-class.md)\ The base class for OLE server documents. -[`COleServerItem` Class](../../mfc/reference/coleserveritem-class.md)
+[`COleServerItem` Class](coleserveritem-class.md)\ Provides the server interface to OLE items. -[`COleStreamFile` Class](../../mfc/reference/colestreamfile-class.md)
+[`COleStreamFile` Class](colestreamfile-class.md)\ Represents a stream of data (`IStream`) in a compound file as part of OLE Structured Storage. -[`COleTemplateServer` Class](../../mfc/reference/coletemplateserver-class.md)
+[`COleTemplateServer` Class](coletemplateserver-class.md)\ Used for OLE visual editing servers, automation servers, and link containers (applications that support links to embeddings). -[`COleUpdateDialog` Class](../../mfc/reference/coleupdatedialog-class.md)
+[`COleUpdateDialog` Class](coleupdatedialog-class.md)\ Used for a special case of the OLE Edit Links dialog box, which should be used when you need to update only existing linked or embedded objects in a document. -[`COleVariant` Class](../../mfc/reference/colevariant-class.md)
+[`COleVariant` Class](colevariant-class.md)\ Encapsulates the [`VARIANT`](/windows/win32/api/oaidl/ns-oaidl-variant) data type. -[`CPagerCtrl` Class](../../mfc/reference/cpagerctrl-class.md)
+[`CPagerCtrl` Class](cpagerctrl-class.md)\ The `CPagerCtrl` class wraps the Windows pager control, which can scroll into view a contained window that does not fit the containing window. -[`CPageSetupDialog` Class](../../mfc/reference/cpagesetupdialog-class.md)
+[`CPageSetupDialog` Class](cpagesetupdialog-class.md)\ Encapsulates the services provided by the Windows common OLE Page Setup dialog box with additional support for setting and modifying print margins. -[`CPaintDC` Class](../../mfc/reference/cpaintdc-class.md)
-A device-context class derived from [`CDC` Class](../../mfc/reference/cdc-class.md). +[`CPaintDC` Class](cpaintdc-class.md)\ +A device-context class derived from [`CDC` Class](cdc-class.md). -[`CPalette` Class](../../mfc/reference/cpalette-class.md)
+[`CPalette` Class](cpalette-class.md)\ Encapsulates a Windows color palette. -[`CPane` Class](../../mfc/reference/cpane-class.md)
-Enhancement of the [`CControlBar` Class](../../mfc/reference/ccontrolbar-class.md). If you are upgrading an existing MFC project, you need to replace all occurrences of `CControlBar` with `CPane`. +[`CPane` Class](cpane-class.md)\ +Enhancement of the [`CControlBar` Class](ccontrolbar-class.md). If you are upgrading an existing MFC project, you need to replace all occurrences of `CControlBar` with `CPane`. -[`CPaneContainer` Class](../../mfc/reference/cpanecontainer-class.md)
-Basic component of the docking model implemented by MFC. An object of this class stores pointers to two docking panes or to two instances of `CPaneContainer`. It also stores a pointer to the divider that separates the panes (or the containers). By nesting containers inside containers, the framework can build a binary tree that represents complex docking layouts. The root of the binary tree is stored in a [`CPaneContainerManager` Class](../../mfc/reference/cpanecontainermanager-class.md) object. +[`CPaneContainer` Class](cpanecontainer-class.md)\ +Basic component of the docking model implemented by MFC. An object of this class stores pointers to two docking panes or to two instances of `CPaneContainer`. It also stores a pointer to the divider that separates the panes (or the containers). By nesting containers inside containers, the framework can build a binary tree that represents complex docking layouts. The root of the binary tree is stored in a [`CPaneContainerManager` Class](cpanecontainermanager-class.md) object. -[`CPaneContainerManager` Class](../../mfc/reference/cpanecontainermanager-class.md)
+[`CPaneContainerManager` Class](cpanecontainermanager-class.md)\ Manages the storage and display of the current docking layout. -[`CPaneDialog` Class](../../mfc/reference/cpanedialog-class.md)
+[`CPaneDialog` Class](cpanedialog-class.md)\ Supports a modeless, dockable dialog box. -[`CPaneDivider` Class](../../mfc/reference/cpanedivider-class.md)
+[`CPaneDivider` Class](cpanedivider-class.md)\ Divides two panes, divides two groups of panes, or separates a group of panes from the client area of the main frame window. -[`CPaneFrameWnd` Class](../../mfc/reference/cpaneframewnd-class.md)
+[`CPaneFrameWnd` Class](cpaneframewnd-class.md)\ Implements a mini-frame window that contains one pane. The pane fills the client area of the window. -[`CParabolicTransitionFromAcceleration` Class](../../mfc/reference/cparabolictransitionfromacceleration-class.md)
+[`CParabolicTransitionFromAcceleration` Class](cparabolictransitionfromacceleration-class.md)\ Encapsulates a parabolic-acceleration transition. -[`CPen` Class](../../mfc/reference/cpen-class.md)
+[`CPen` Class](cpen-class.md)\ Encapsulates a Windows graphics device interface (GDI) pen. -[`CPictureHolder` Class](../../mfc/reference/cpictureholder-class.md)
+[`CPictureHolder` Class](cpictureholder-class.md)\ Implements a Picture property, which lets the user display a picture in your control. -[`CPoint` Class](../../atl-mfc-shared/reference/cpoint-class.md)
+[`CPoint` Class](../../atl-mfc-shared/reference/cpoint-class.md)\ Similar to the Windows `POINT` structure. -[`CPrintDialog` Class](../../mfc/reference/cprintdialog-class.md)
+[`CPrintDialog` Class](cprintdialog-class.md)\ Encapsulates the services provided by the Windows common dialog box for printing. -[`CPrintDialogEx` Class](../../mfc/reference/cprintdialogex-class.md)
+[`CPrintDialogEx` Class](cprintdialogex-class.md)\ Encapsulates the services provided by the Windows Print property sheet. -[`CProgressCtrl` Class](../../mfc/reference/cprogressctrl-class.md)
+[`CProgressCtrl` Class](cprogressctrl-class.md)\ Provides the functionality of the Windows common progress bar control. -[`CPropertyPage` Class](../../mfc/reference/cpropertypage-class.md)
+[`CPropertyPage` Class](cpropertypage-class.md)\ Represents individual pages of a property sheet, otherwise known as a tab dialog box. -[`CPropertySheet` Class](../../mfc/reference/cpropertysheet-class.md)
+[`CPropertySheet` Class](cpropertysheet-class.md)\ Represents property sheets, also known as tab dialog boxes. -[`CPropExchange` Class](../../mfc/reference/cpropexchange-class.md)
+[`CPropExchange` Class](cpropexchange-class.md)\ Supports the implementation of persistence for your OLE controls. -[`CPtrArray` Class](../../mfc/reference/cptrarray-class.md)
+[`CPtrArray` Class](cptrarray-class.md)\ Supports arrays of void pointers. -[`CPtrList` Class](../../mfc/reference/cptrlist-class.md)
+[`CPtrList` Class](cptrlist-class.md)\ Supports lists of void pointers. -[`CReBar` Class](../../mfc/reference/crebar-class.md)
+[`CReBar` Class](crebar-class.md)\ A control bar that provides layout, persistence, and state information for rebar controls. -[`CReBarCtrl` Class](../../mfc/reference/crebarctrl-class.md)
+[`CReBarCtrl` Class](crebarctrl-class.md)\ Encapsulates the functionality of a rebar control, which is a container for a child window. -[`CRecentDockSiteInfo` Class](../../mfc/reference/crecentdocksiteinfo-class.md)
-Helper class that stores recent state information for the [`CPane` Class](../../mfc/reference/cpane-class.md). +[`CRecentDockSiteInfo` Class](crecentdocksiteinfo-class.md)\ +Helper class that stores recent state information for the [`CPane` Class](cpane-class.md). -[`CRecentFileList` Class](../../mfc/reference/crecentfilelist-class.md)
+[`CRecentFileList` Class](crecentfilelist-class.md)\ Supports control of the most recently used (MRU) file list. -[`CRecordset` Class](../../mfc/reference/crecordset-class.md)
+[`CRecordset` Class](crecordset-class.md)\ Represents a set of records selected from a data source. -[`CRecordView` Class](../../mfc/reference/crecordview-class.md)
+[`CRecordView` Class](crecordview-class.md)\ A view that displays database records in controls. -[`CRect` Class](../../atl-mfc-shared/reference/crect-class.md)
+[`CRect` Class](../../atl-mfc-shared/reference/crect-class.md)\ Similar to a Windows [`RECT` structure](/windows/win32/api/windef/ns-windef-rect). -[`CRectTracker` Class](../../mfc/reference/crecttracker-class.md)
+[`CRectTracker` Class](crecttracker-class.md)\ Enables an item to be displayed, moved, and resized in different fashions. -[`CRenderTarget` Class](../../mfc/reference/crendertarget-class.md)
+[`CRenderTarget` Class](crendertarget-class.md)\ A wrapper for `ID2D1RenderTarget`. -[`CResourceException` Class](../../mfc/reference/cresourceexception-class.md)
+[`CResourceException` Class](cresourceexception-class.md)\ Generated when Windows cannot find or allocate a requested resource. -[`CReversalTransition` Class](../../mfc/reference/creversaltransition-class.md)
+[`CReversalTransition` Class](creversaltransition-class.md)\ Encapsulates a reversal transition. -[`CRgn` Class](../../mfc/reference/crgn-class.md)
+[`CRgn` Class](crgn-class.md)\ Encapsulates a Windows graphics device interface (GDI) region. -[`CRichEditCntrItem` Class](../../mfc/reference/cricheditcntritem-class.md)
-With [`CRichEditView` Class](../../mfc/reference/cricheditview-class.md) and [`CRichEditDoc` Class](../../mfc/reference/cricheditdoc-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. +[`CRichEditCntrItem` Class](cricheditcntritem-class.md)\ +With [`CRichEditView` Class](cricheditview-class.md) and [`CRichEditDoc` Class](cricheditdoc-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. -[`CRichEditCtrl` Class](../../mfc/reference/cricheditctrl-class.md)
+[`CRichEditCtrl` Class](cricheditctrl-class.md)\ Provides the functionality of the rich edit control. -[`CRichEditDoc` Class](../../mfc/reference/cricheditdoc-class.md)
-With [`CRichEditView` Class](../../mfc/reference/cricheditview-class.md) and [`CRichEditCntrItem` Class](../../mfc/reference/cricheditcntritem-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. +[`CRichEditDoc` Class](cricheditdoc-class.md)\ +With [`CRichEditView` Class](cricheditview-class.md) and [`CRichEditCntrItem` Class](cricheditcntritem-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. -[`CRichEditView` Class](../../mfc/reference/cricheditview-class.md)
-With [`CRichEditDoc` Class](../../mfc/reference/cricheditdoc-class.md) and [`CRichEditCntrItem` Class](../../mfc/reference/cricheditcntritem-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. +[`CRichEditView` Class](cricheditview-class.md)\ +With [`CRichEditDoc` Class](cricheditdoc-class.md) and [`CRichEditCntrItem` Class](cricheditcntritem-class.md), provides the functionality of the rich edit control within the context of MFC's document view architecture. -[`CScrollBar` Class](../../mfc/reference/cscrollbar-class.md)
+[`CScrollBar` Class](cscrollbar-class.md)\ Provides the functionality of a Windows scroll-bar control. -[`CScrollView` Class](../../mfc/reference/cscrollview-class.md)
-A [`CView` Class](../../mfc/reference/cview-class.md) with scrolling capabilities. +[`CScrollView` Class](cscrollview-class.md)\ +A [`CView` Class](cview-class.md) with scrolling capabilities. -[`CSemaphore` Class](../../mfc/reference/csemaphore-class.md)
+[`CSemaphore` Class](csemaphore-class.md)\ Represents a "semaphore", which is a synchronization object that allows a limited number of threads in one or more processes to access aMaintains a count of the number of threads currently accessing a specified resource. -[`CSettingsStore` Class](../../mfc/reference/csettingsstore-class.md)
+[`CSettingsStore` Class](csettingsstore-class.md)\ Wraps Windows API functions, providing an object-oriented interface that you use to access the registry. -[`CSettingsStoreSP` Class](../../mfc/reference/csettingsstoresp-class.md)
-Helper class that you can use to create instances of the [`CSettingsStore` Class](../../mfc/reference/csettingsstore-class.md). +[`CSettingsStoreSP` Class](csettingsstoresp-class.md)\ +Helper class that you can use to create instances of the [`CSettingsStore` Class](csettingsstore-class.md). -[`CSharedFile` Class](../../mfc/reference/csharedfile-class.md)
-The [`CMemFile` Class](../../mfc/reference/cmemfile-class.md)-derived class that supports shared memory files. +[`CSharedFile` Class](csharedfile-class.md)\ +The [`CMemFile` Class](cmemfile-class.md)-derived class that supports shared memory files. -[`CShellManager` Class](../../mfc/reference/cshellmanager-class.md)
+[`CShellManager` Class](cshellmanager-class.md)\ Implements several methods that enable you to work with pointers to identifier lists (PIDLs). -[`CSimpleException` Class](../../mfc/reference/csimpleexception-class.md)
+[`CSimpleException` Class](csimpleexception-class.md)\ This class is a base class for resource-critical MFC exceptions. -[`CSingleDocTemplate` Class](../../mfc/reference/csingledoctemplate-class.md)
+[`CSingleDocTemplate` Class](csingledoctemplate-class.md)\ Defines a document template that implements the single document interface (SDI). -[`CSingleLock` Class](../../mfc/reference/csinglelock-class.md)
+[`CSingleLock` Class](csinglelock-class.md)\ Represents the access-control mechanism used in controlling access to a resource in a multithreaded program. -[`CSinusoidalTransitionFromRange` Class](../../mfc/reference/csinusoidaltransitionfromrange-class.md)
+[`CSinusoidalTransitionFromRange` Class](csinusoidaltransitionfromrange-class.md)\ Encapsulates a sinusoidal-range transition that has a given range of oscillation. -[`CSinusoidalTransitionFromVelocity` Class](../../mfc/reference/csinusoidaltransitionfromvelocity-class.md)
+[`CSinusoidalTransitionFromVelocity` Class](csinusoidaltransitionfromvelocity-class.md)\ Encapsulates a sinusoidal-velocity transition that has an amplitude that is determined by the initial velocity of the animation variable. -[`CSize` Class](../../atl-mfc-shared/reference/csize-class.md)
+[`CSize` Class](../../atl-mfc-shared/reference/csize-class.md)\ Similar to the Windows [`SIZE`](/windows/win32/api/windef/ns-windef-size) structure, which implements a relative coordinate or position. -[`CSliderCtrl` Class](../../mfc/reference/csliderctrl-class.md)
+[`CSliderCtrl` Class](csliderctrl-class.md)\ Provides the functionality of the Windows common slider control. -[`CSmartDockingInfo` Class](../../mfc/reference/csmartdockinginfo-class.md)
+[`CSmartDockingInfo` Class](csmartdockinginfo-class.md)\ Defines the appearance of smart docking markers. -[`CSmoothStopTransition` Class](../../mfc/reference/csmoothstoptransition-class.md)
+[`CSmoothStopTransition` Class](csmoothstoptransition-class.md)\ Encapsulates a smooth-stop transition. -[`CSocket` Class](../../mfc/reference/csocket-class.md)
+[`CSocket` Class](csocket-class.md)\ Derives from `CAsyncSocket`, and represents a higher level of abstraction of the Windows Sockets API. -[`CSocketFile` Class](../../mfc/reference/csocketfile-class.md)
+[`CSocketFile` Class](csocketfile-class.md)\ A `CFile` object used for sending and receiving data across a network via Windows Sockets. -[`CSpinButtonCtrl` Class](../../mfc/reference/cspinbuttonctrl-class.md)
+[`CSpinButtonCtrl` Class](cspinbuttonctrl-class.md)\ Provides the functionality of the Windows common spin button control. -[`CSplitButton` Class](../../mfc/reference/csplitbutton-class.md)
+[`CSplitButton` Class](csplitbutton-class.md)\ Represents a split button control. The split button control performs a default behavior when a user clicks the main part of the button, and displays a drop-down menu when a user clicks the drop-down arrow of the button. -[`CSplitterWnd` Class](../../mfc/reference/csplitterwnd-class.md)
+[`CSplitterWnd` Class](csplitterwnd-class.md)\ Provides the functionality of a splitter window, which is a window that contains multiple panes. -[`CSplitterWndEx` Class](csplitterwndex-class.md)
+[`CSplitterWndEx` Class](csplitterwndex-class.md)\ Represents a customized splitter window. -[`CStatic` Class](../../mfc/reference/cstatic-class.md)
+[`CStatic` Class](cstatic-class.md)\ Provides the functionality of a Windows static control. -[`CStatusBar` Class](../../mfc/reference/cstatusbar-class.md)
+[`CStatusBar` Class](cstatusbar-class.md)\ A control bar with a row of text output panes, or "indicators". -[`CStatusBarCtrl` Class](../../mfc/reference/cstatusbarctrl-class.md)
+[`CStatusBarCtrl` Class](cstatusbarctrl-class.md)\ Provides the functionality of the Windows common status bar control. -[`CStdioFile` Class](../../mfc/reference/cstdiofile-class.md)
+[`CStdioFile` Class](cstdiofile-class.md)\ Represents a C run-time stream file as opened by the run-time function [`fopen`, `_wfopen`](../../c-runtime-library/reference/fopen-wfopen.md). -[`CStringArray` Class](../../mfc/reference/cstringarray-class.md)
+[`CStringArray` Class](cstringarray-class.md)\ Supports arrays of `CString` objects. -[`CStringList` Class](../../mfc/reference/cstringlist-class.md)
+[`CStringList` Class](cstringlist-class.md)\ Supports lists of `CString` objects. -[`CSyncObject` Class](../../mfc/reference/csyncobject-class.md)
+[`CSyncObject` Class](csyncobject-class.md)\ A pure virtual class that provides functionality common to the synchronization objects in Win32. -[`CTabbedPane` Class](../../mfc/reference/ctabbedpane-class.md)
+[`CTabbedPane` Class](ctabbedpane-class.md)\ Implements the functionality of a pane with detachable tabs. -[`CTabCtrl` Class](../../mfc/reference/ctabctrl-class.md)
+[`CTabCtrl` Class](ctabctrl-class.md)\ Provides the functionality of the Windows common tab control. -[`CTabView` Class](../../mfc/reference/ctabview-class.md)
-Simplifies the use of the tab control class ([`CTabView` Class](../../mfc/reference/ctabview-class.md)) in applications that use MFC's document/view architecture. +[`CTabView` Class](ctabview-class.md)\ +Simplifies the use of the tab control class ([`CTabView` Class](ctabview-class.md)) in applications that use MFC's document/view architecture. -[`CTaskDialog` Class](../../mfc/reference/ctaskdialog-class.md)
+[`CTaskDialog` Class](ctaskdialog-class.md)\ A pop-up dialog box that functions like a message box but can display additional information to the user. The `CTaskDialog` also includes functionality for gathering information from the user. -[`CToolBar` Class](../../mfc/reference/ctoolbar-class.md)
+[`CToolBar` Class](ctoolbar-class.md)\ Control bars that have a row of bitmapped buttons and optional separators. -[`CToolBarCtrl` Class](../../mfc/reference/ctoolbarctrl-class.md)
+[`CToolBarCtrl` Class](ctoolbarctrl-class.md)\ Provides the functionality of the Windows toolbar common control. -[`CToolTipCtrl` Class](../../mfc/reference/ctooltipctrl-class.md)
+[`CToolTipCtrl` Class](ctooltipctrl-class.md)\ Encapsulates the functionality of a "tool tip control", a small pop-up window that displays a single line of text describing the purpose of a tool in an application. -[`CTooltipManager` Class](../../mfc/reference/ctooltipmanager-class.md)
+[`CTooltipManager` Class](ctooltipmanager-class.md)\ Maintains runtime information about tooltips. The `CTooltipManager` class is instantiated one time per application. -[`CTreeCtrl` Class](../../mfc/reference/ctreectrl-class.md)
+[`CTreeCtrl` Class](ctreectrl-class.md)\ Provides the functionality of the Windows common tree view control. -[`CTreeView` Class](../../mfc/reference/ctreeview-class.md)
-Simplifies use of the tree control and of [`CTreeCtrl` Class](../../mfc/reference/ctreectrl-class.md), the class that encapsulates tree-control functionality, with MFC's document-view architecture. +[`CTreeView` Class](ctreeview-class.md)\ +Simplifies use of the tree control and of [`CTreeCtrl` Class](ctreectrl-class.md), the class that encapsulates tree-control functionality, with MFC's document-view architecture. -[`CTypedPtrArray` Class](../../mfc/reference/ctypedptrarray-class.md)
+[`CTypedPtrArray` Class](ctypedptrarray-class.md)\ Provides a type-safe "wrapper" for objects of class `CPtrArray` or `CObArray`. -[`CTypedPtrList` Class](../../mfc/reference/ctypedptrlist-class.md)
+[`CTypedPtrList` Class](ctypedptrlist-class.md)\ Provides a type-safe "wrapper" for objects of class `CPtrList`. -[`CTypedPtrMap` Class](../../mfc/reference/ctypedptrmap-class.md)
+[`CTypedPtrMap` Class](ctypedptrmap-class.md)\ Provides a type-safe "wrapper" for objects of the pointer-map classes `CMapPtrToPtr`, `CMapPtrToWord`, `CMapWordToPtr`, and `CMapStringToPtr`. -[`CUIntArray` Class](../../mfc/reference/cuintarray-class.md)
+[`CUIntArray` Class](cuintarray-class.md)\ Supports arrays of unsigned integers. -[`CUserException` Class](../../mfc/reference/cuserexception-class.md)
+[`CUserException` Class](cuserexception-class.md)\ Thrown to stop an end-user operation. -[`CUserTool` Class](../../mfc/reference/cusertool-class.md)
-Menu item that runs an external application. The **Tools** tab of the **Customize** dialog box ([`CMFCToolBarsCustomizeDialog` Class](../../mfc/reference/cmfctoolbarscustomizedialog-class.md)) enables the user to add user tools, and to specify the name, command, arguments, and initial directory for each user tool. +[`CUserTool` Class](cusertool-class.md)\ +Menu item that runs an external application. The **Tools** tab of the **Customize** dialog box ([`CMFCToolBarsCustomizeDialog` Class](cmfctoolbarscustomizedialog-class.md)) enables the user to add user tools, and to specify the name, command, arguments, and initial directory for each user tool. -[`CUserToolsManager` Class](../../mfc/reference/cusertoolsmanager-class.md)
-Maintains the collection of [`CUserTool` Class](../../mfc/reference/cusertool-class.md) objects in an application. A user tool is a menu item that runs an external application. The `CUserToolsManager` object enables the user or developer to add new user tools to the application. It supports the execution of the commands associated with user tools, and it also saves information about user tools in the Windows registry. +[`CUserToolsManager` Class](cusertoolsmanager-class.md)\ +Maintains the collection of [`CUserTool` Class](cusertool-class.md) objects in an application. A user tool is a menu item that runs an external application. The `CUserToolsManager` object enables the user or developer to add new user tools to the application. It supports the execution of the commands associated with user tools, and it also saves information about user tools in the Windows registry. -[`CView` Class](../../mfc/reference/cview-class.md)
+[`CView` Class](cview-class.md)\ Provides the basic functionality for user-defined view classes. -[`CVSListBox` Class](../../mfc/reference/cvslistbox-class.md)
+[`CVSListBox` Class](cvslistbox-class.md)\ Supports an editable list control. -[`CWaitCursor` Class](../../mfc/reference/cwaitcursor-class.md)
+[`CWaitCursor` Class](cwaitcursor-class.md)\ Provides a one-line way to show a wait cursor, which is usually displayed as an hourglass, while you're doing a lengthy operation. -[`CWinApp` Class](../../mfc/reference/cwinapp-class.md)
+[`CWinApp` Class](cwinapp-class.md)\ The base class from which you derive a Windows application object. -[`CWinAppEx` Class](../../mfc/reference/cwinappex-class.md)
+[`CWinAppEx` Class](cwinappex-class.md)\ Handles the application state, saves the state to the registry, loads the state from the registry, initializes application managers, and provides links to those same application managers. -[`CWindowDC` Class](../../mfc/reference/cwindowdc-class.md)
+[`CWindowDC` Class](cwindowdc-class.md)\ Derived from `CDC`. -[`CWinFormsControl` Class](../../mfc/reference/cwinformscontrol-class.md)
+[`CWinFormsControl` Class](cwinformscontrol-class.md)\ Provides the basic functionality for hosting of a Windows Forms control. -[`CWinFormsDialog` Class](../../mfc/reference/cwinformsdialog-class.md)
+[`CWinFormsDialog` Class](cwinformsdialog-class.md)\ A wrapper for an MFC dialog class that hosts a Windows Forms user control. -[`CWinFormsView` Class](../../mfc/reference/cwinformsview-class.md)
+[`CWinFormsView` Class](cwinformsview-class.md)\ Provides generic functionality for hosting of a Windows Forms control as an MFC view. -[`CWinThread` Class](../../mfc/reference/cwinthread-class.md)
+[`CWinThread` Class](cwinthread-class.md)\ Represents a thread of execution within an application. -[`CWnd` Class](../../mfc/reference/cwnd-class.md)
+[`CWnd` Class](cwnd-class.md)\ Provides the base functionality of all window classes in the Microsoft Foundation Class Library. -[`CWordArray` Class](../../mfc/reference/cwordarray-class.md)
+[`CWordArray` Class](cwordarray-class.md)\ Supports arrays of 16-bit words. ## Related Sections -[MFC Desktop Applications](../../mfc/mfc-desktop-applications.md)
+[MFC Desktop Applications](../mfc-desktop-applications.md)\ Contains links to topics about the classes, global functions, global variables, and macros that make up the MFC Library. diff --git a/docs/mfc/reference/styles-used-by-mfc.md b/docs/mfc/reference/styles-used-by-mfc.md index 3afec125db..7dc94df529 100644 --- a/docs/mfc/reference/styles-used-by-mfc.md +++ b/docs/mfc/reference/styles-used-by-mfc.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Styles Used by MFC" title: "Styles Used by MFC" -ms.date: "06/20/2018" +description: "Learn more about: Styles Used by MFC" +ms.date: 06/20/2018 helpviewer_keywords: ["button objects (CButton), button styles", "button styles [MFC]", "buttons, MFC toolbars", "combo boxes [MFC], styles", "edit styles [MFC]", "extended window styles [MFC]", "frame windows [MFC], styles", "list boxes [MFC], styles", "message-box styles [MFC]", "scroll bars [MFC], styles", "scroll-bar styles [MFC]", "static styles [MFC]", "styles [MFC], button objects", "styles [MFC], MFC", "styles [MFC], windows", "styles [MFC]", "window styles, in MFC", "window styles [MFC]", "BS_3STATE constant [MFC]", "BS_AUTO3STATE constant [MFC]", "BS_AUTOCHECKBOX constant [MFC]", "BS_AUTORADIOBUTTON constant [MFC]", "BS_BITMAP constant [MFC]", "BS_BOTTOM constant [MFC]", "BS_CENTER constant [MFC]", "BS_CHECKBOX constant [MFC]", "BS_DEFPUSHBUTTON constant [MFC]", "BS_FLAT constant [MFC]", "BS_GROUPBOX constant [MFC]", "BS_ICON constant [MFC]", "BS_LEFT constant [MFC]", "BS_LEFTTEXT constant [MFC]", "BS_MULTILINE constant [MFC]", "BS_NOTIFY constant [MFC]", "BS_OWNERDRAW constant [MFC]", "BS_PUSHBUTTON constant [MFC]", "BS_PUSHLIKE constant [MFC]", "BS_RADIOBUTTON constant [MFC]", "BS_RIGHT constant [MFC]", "BS_RIGHTBUTTON constant [MFC]", "BS_TEXT constant [MFC]", "BS_TOP constant [MFC]", "BS_USERBUTTON constant [MFC]", "BS_VCENTER constant [MFC]", "CBS_AUTOHSCROLL constant [MFC]", "CBS_DISABLENOSCROLL constant [MFC]", "CBS_DROPDOWN constant [MFC]", "CBS_DROPDOWNLIST constant [MFC]", "CBS_HASSTRINGS constant [MFC]", "CBS_LOWERCASE constant [MFC]", "CBS_NOINTEGRALHEIGHT constant [MFC]", "CBS_OEMCONVERT constant [MFC]", "CBS_OWNERDRAWFIXED constant [MFC]", "CBS_OWNERDRAWVARIABLE constant [MFC]", "CBS_SIMPLE constant [MFC]", "CBS_SORT constant [MFC]", "CBS_UPPERCASE constant [MFC]", "ES_AUTOHSCROLL constant [MFC]", "ES_AUTOVSCROLL constant [MFC]", "ES_CENTER constant [MFC]", "ES_LEFT constant [MFC]", "ES_LOWERCASE constant [MFC]", "ES_MULTILINE constant [MFC]", "ES_NOHIDESEL constant [MFC]", "ES_NUMBER constant [MFC]", "ES_OEMCONVERT constant [MFC]", "ES_PASSWORD constant [MFC]", "ES_READONLY constant [MFC]", "ES_RIGHT constant [MFC]", "ES_UPPERCASE constant [MFC]", "ES_WANTRETURN constant [MFC]", "FWS_ADDTOTITLE constant [MFC]", "FWS_PREFIXTITLE constant [MFC]", "FWS_SNAPTOBARS constant [MFC]", "LBS_DISABLENOSCROLL constant [MFC]", "LBS_EXTENDEDSEL constant [MFC]", "LBS_HASSTRINGS constant [MFC]", "LBS_MULTICOLUMN constant [MFC]", "LBS_MULTIPLESEL constant [MFC]", "LBS_NODATA constant [MFC]", "LBS_NOINTEGRALHEIGHT constant [MFC]", "LBS_NOREDRAW constant [MFC]", "LBS_NOSEL constant [MFC]", "LBS_NOTIFY constant [MFC]", "LBS_OWNERDRAWFIXED constant [MFC]", "LBS_OWNERDRAWVARIABLE constant [MFC]", "LBS_SORT constant [MFC]", "LBS_STANDARD constant [MFC]", "LBS_USETABSTOPS constant [MFC]", "LBS_WANTKEYBOARDINPUT constant [MFC]", "MB_ABORTRETRYOVERWRITE constant [MFC]", "MB_APPLMODAL constant [MFC]", "MB_DEFBUTTON1 constant [MFC]", "MB_DEFBUTTON2 constant [MFC]", "MB_DEFBUTTON3 constant [MFC]", "MB_ICONEXCLAMATION constant [MFC]", "MB_ICONINFORMATION constant [MFC]", "MB_ICONQUESTION constant [MFC]", "MB_ICONSTOP constant [MFC]", "MB_OK constant [MFC]", "MB_OKCANCEL constant [MFC]", "MB_RETRYCANCEL constant [MFC]", "MB_SYSTEMMODAL constant [MFC]", "MB_TASKMODAL constant [MFC]", "MB_YESNO constant [MFC]", "MB_YESNOCANCEL constant [MFC]", "SBS_BOTTOMALIGN constant [MFC]", "SBS_HORZ constant [MFC]", "SBS_LEFTALIGN constant [MFC]", "SBS_RIGHTALIGN constant [MFC]", "SBS_SIZEBOX constant [MFC]", "SBS_SIZEBOXBOTTOMRIGHTALIGN constant [MFC]", "SBS_SIZEBOXTOPLEFTALIGN constant [MFC]", "SBS_TOPALIGN constant [MFC]", "SBS_VERT constant [MFC]", "SS_BITMAP constant [MFC]", "SS_BLACKFRAME constant [MFC]", "SS_BLACKRECT constant [MFC]", "SS_CENTER constant [MFC]", "SS_CENTERIMAGE constant [MFC]", "SS_ENDELLIPSIS constant [MFC]", "SS_ENHMETAFILE constant [MFC]", "SS_ETCHEDFRAME constant [MFC]", "SS_ETCHEDHORZ constant [MFC]", "SS_ETCHEDVERT constant [MFC]", "SS_GRAYFRAME constant [MFC]", "SS_GRAYRECT constant [MFC]", "SS_ICON constant [MFC]", "SS_LEFT constant [MFC]", "SS_LEFTNOWORDWRAP constant [MFC]", "SS_NOPREFIX constant [MFC]", "SS_NOTIFY constant [MFC]", "SS_OWNERDRAW constant [MFC]", "SS_PATHELLIPSIS constant [MFC]", "SS_REALSIZEIMAGE constant [MFC]", "SS_RIGHT constant [MFC]", "SS_RIGHTJUST constant [MFC]", "SS_SIMPLE constant [MFC]", "SS_SUNKEN constant [MFC]", "SS_USERITEM constant [MFC]", "SS_WHITEFRAME constant [MFC]", "SS_WHITERECT constant [MFC]", "SS_WORDELLIPSIS constant [MFC]", "WS_BORDER constant [MFC]", "WS_CAPTION constant [MFC]", "WS_CHILD constant [MFC]", "WS_CHILDWINDOW constant [MFC]", "WS_CLIPCHILDREN constant [MFC]", "WS_CLIPSIBLINGS constant [MFC]", "WS_DISABLED constant [MFC]", "WS_DLGFRAME constant [MFC]", "WS_GROUP constant [MFC]", "WS_HSCROLL constant [MFC]", "WS_ICONIC constant [MFC]", "WS_MAXIMIZE constant [MFC]", "WS_MAXIMIZEBOX constant [MFC]", "WS_MINIMIZE constant [MFC]", "WS_MINIMIZEBOX constant [MFC]", "WS_OVERLAPPED constant [MFC]", "WS_OVERLAPPEDWINDOW constant [MFC]", "WS_POPUP constant [MFC]", "WS_POPUPWINDOW constant [MFC]", "WS_SIZEBOX constant [MFC]", "WS_SYSMENU constant [MFC]", "WS_TABSTOP constant [MFC]", "WS_THICKFRAME constant [MFC]", "WS_TILED constant [MFC]", "WS_TILEDWINDOW constant [MFC]", "WS_VISIBLE constant [MFC]", "WS_VSCROLL constant [MFC]", "WS_EX_ACCEPTFILES constant [MFC]", "WS_EX_APPWINDOW constant [MFC]", "WS_EX_CLIENTEDGE constant [MFC]", "WS_EX_CONTEXTHELP constant [MFC]", "WS_EX_CONTROLPARENT constant [MFC]", "WS_EX_DLGMODALFRAME constant [MFC]", "WS_EX_LEFT constant [MFC]", "WS_EX_LEFTSCROLLBAR constant [MFC]", "WS_EX_LTRREADING constant [MFC]", "WS_EX_MDICHILD constant [MFC]", "WS_EX_NOPARENTNOTIFY constant [MFC]", "WS_EX_OVERLAPPEDWINDOW constant [MFC]", "WS_EX_PALETTEWINDOW constant [MFC]", "WS_EX_RIGHT constant [MFC]", "WS_EX_RIGHTSCROLLBAR constant [MFC]", "WS_EX_RTLREADING constant [MFC]", "WS_EX_STATICEDGE constant [MFC]", "WS_EX_TOOLWINDOW constant [MFC]", "WS_EX_TOPMOST constant [MFC]", "WS_EX_TRANSPARENT constant [MFC]", "WS_EX_WINDOWEDGE constant [MFC]"] -ms.assetid: d3b9af37-31b5-4c97-a8ad-189fd724b04c --- # Styles Used by MFC @@ -11,7 +10,7 @@ Use the following style flags to specify window or control appearance and behavi ## Button styles -Button styles apply to [`CButton Class`](../../mfc/reference/cbutton-class.md) objects, such as radio buttons, check boxes and pushbuttons. Specify a combination of styles in the *`dwStyle`* parameter of [`CButton::Create`](../../mfc/reference/cbutton-class.md#create). For more information on button styles in Windows, see [Button Styles (Windows)](/windows/win32/Controls/button-styles). +Button styles apply to [`CButton Class`](cbutton-class.md) objects, such as radio buttons, check boxes and pushbuttons. Specify a combination of styles in the *`dwStyle`* parameter of [`CButton::Create`](cbutton-class.md#create). For more information on button styles in Windows, see [Button Styles (Windows)](/windows/win32/Controls/button-styles). ### Button types @@ -24,8 +23,8 @@ The following table lists button types. You can optionally choose one of the fol |`BS_AUTOCHECKBOX`|Creates a check box button with two states: `BST_CHECKED` and `BST_UNCHECKED`. Clicking on the button sends a `BN_CLICKED` notification to the owner window and changes the state of the button. By default, associated text is displayed to the right of the check box. To display text to the left of the check box, use the `BS_LEFTTEXT` or `BS_RIGHTBUTTON` style.| |`BS_AUTORADIOBUTTON`|Creates a radio button with two states: `BST_CHECKED` and `BST_UNCHECKED`. Radio buttons are usually used in groups, with each group having a maximum of one checked option at a time. Clicking on the button sends a `BN_CLICKED` notification to the owner window, sets the state of the clicked radio button to `BST_CHECKED`, and sets the states of all other radio buttons in the button group to `BST_UNCHECKED`. By default, associated text is displayed to the right of the radio button. To display text to the left of the radio button, use the `BS_LEFTTEXT` or `BS_RIGHTBUTTON` style.| |`BS_CHECKBOX`|Creates a check box button with two states: `BST_CHECKED` and `BST_UNCHECKED`. Clicking on the button sends a `BN_CLICKED` notification to the owner window but does not change the state of the button. By default, associated text is displayed to the right of the check box. To display text to the left of the check box, use the `BS_LEFTTEXT` or `BS_RIGHTBUTTON` style.| -|`BS_COMMANDLINK`|Creates a command link button. A command link button is a command button specific to Windows Vista that displays a green arrow to the left of the main text and a note below the main text. You can set the note text using [`CButton::SetNote`](../../mfc/reference/cbutton-class.md#setnote).| -|`BS_DEFCOMMANDLINK`|Creates a command link button. A command link button is a command button specific to Windows Vista that displays a green arrow to the left of the main text and a note below the main text. You can set the note text using [`CButton::SetNote`](../../mfc/reference/cbutton-class.md#setnote). If the button is in a dialog box, pressing the ENTER key sends a `BN_CLICKED` notification to the dialog box even when the button does not have the input focus.| +|`BS_COMMANDLINK`|Creates a command link button. A command link button is a command button specific to Windows Vista that displays a green arrow to the left of the main text and a note below the main text. You can set the note text using [`CButton::SetNote`](cbutton-class.md#setnote).| +|`BS_DEFCOMMANDLINK`|Creates a command link button. A command link button is a command button specific to Windows Vista that displays a green arrow to the left of the main text and a note below the main text. You can set the note text using [`CButton::SetNote`](cbutton-class.md#setnote). If the button is in a dialog box, pressing the ENTER key sends a `BN_CLICKED` notification to the dialog box even when the button does not have the input focus.| |`BS_DEFPUSHBUTTON`|Creates a command button that has a heavy black border. If the button is in a dialog box, pressing the ENTER key sends a `BN_CLICKED` notification to the dialog box even when the button does not have the input focus.| |`BS_DEFSPLITBUTTON`|Creates a split button. A split button is a command button specific to Windows Vista that contains a button adjacent to a drop-down arrow. When you click the button, the default command is executed. When you click the drop-down arrow, a menu of additional commands appears. If the split button is in a dialog box, pressing the ENTER key sends a `BN_CLICKED` notification to the dialog box even when the button does not have the input focus| |`BS_GROUPBOX`|Creates a rectangle in which other buttons can be grouped. Text associated with this style is displayed in the rectangle's upper-left corner.| @@ -100,7 +99,7 @@ The following combo-box styles are available in MFC. For more information about ## Edit styles -Edit styles apply to [`CEdit` Class](../../mfc/reference/cedit-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CEdit::Create`](../../mfc/reference/cedit-class.md#create). For more information about edit control styles in Windows, see [Edit Control Styles (Windows)](/windows/win32/Controls/edit-control-styles). +Edit styles apply to [`CEdit` Class](cedit-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CEdit::Create`](cedit-class.md#create). For more information about edit control styles in Windows, see [Edit Control Styles (Windows)](/windows/win32/Controls/edit-control-styles). |Style|Description| |-----------|-----------------| @@ -121,17 +120,17 @@ Edit styles apply to [`CEdit` Class](../../mfc/reference/cedit-class.md) objects ## Frame-window styles -Frame-window styles apply to [`CFrameWnd` Class](../../mfc/reference/cframewnd-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CFrameWnd::Create`](../../mfc/reference/cframewnd-class.md#create). +Frame-window styles apply to [`CFrameWnd` Class](cframewnd-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CFrameWnd::Create`](cframewnd-class.md#create). |Style|Description| |-----------|-----------------| |`FWS_ADDTOTITLE`|Specifies information to append to the end of a frame window title. For example, "Microsoft Draw - Drawing in Document1". You can specify the strings displayed in the Document Template Strings tab in the Application Wizard. If you need to turn this option off, override the `CWnd::PreCreateWindow` member function.| |`FWS_PREFIXTITLE`|Shows the document name before the application name in a frame window title. For example, "Document - WordPad". You can specify the strings displayed in the Document Template Strings tab in the Application Wizard. If you need to turn this option off, override the `CWnd::PreCreateWindow` member function.| -|FWS_SNAPTOBARS|Controls sizing of the frame window that encloses a control bar when it is in a floating window rather than docked to a frame window. This style sizes the window to fit the control bar.| +|`FWS_SNAPTOBARS`|Controls sizing of the frame window that encloses a control bar when it is in a floating window rather than docked to a frame window. This style sizes the window to fit the control bar.| ## List-box styles -List-box styles apply to [`CListBox` Class](../../mfc/reference/clistbox-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CListBox::Create`](../../mfc/reference/clistbox-class.md#create). For more information about list box styles in Windows, see [List Box Styles (Windows)](/windows/win32/Controls/list-box-styles). +List-box styles apply to [`CListBox` Class](clistbox-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CListBox::Create`](clistbox-class.md#create). For more information about list box styles in Windows, see [List Box Styles (Windows)](/windows/win32/Controls/list-box-styles). |Style|Description| |-----------|-----------------| @@ -154,7 +153,7 @@ List-box styles apply to [`CListBox` Class](../../mfc/reference/clistbox-class.m ## Message-box styles -Message-box styles apply to [`AfxMessageBox`](../../mfc/reference/cstring-formatting-and-message-box-display.md#afxmessagebox) items. Specify a combination of styles in the *`nType`* parameter of `AfxMessageBox`. For more information about message box styles in Windows, see [`MessageBox` Function (Windows)](/windows/win32/api/winuser/nf-winuser-messagebox). +Message-box styles apply to [`AfxMessageBox`](cstring-formatting-and-message-box-display.md#afxmessagebox) items. Specify a combination of styles in the *`nType`* parameter of `AfxMessageBox`. For more information about message box styles in Windows, see [`MessageBox` Function (Windows)](/windows/win32/api/winuser/nf-winuser-messagebox). The following message-box styles are available. @@ -196,7 +195,7 @@ The following message-box styles are available. ## Scroll-bar styles -Scroll-bar styles apply to [`CScrollBar` Class](../../mfc/reference/cscrollbar-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CScrollBar::Create`](../../mfc/reference/cscrollbar-class.md#create). For more information about scroll bar control styles in Windows, see [Scroll Bar Control Styles (Windows)](/windows/win32/Controls/scroll-bar-control-styles). +Scroll-bar styles apply to [`CScrollBar` Class](cscrollbar-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CScrollBar::Create`](cscrollbar-class.md#create). For more information about scroll bar control styles in Windows, see [Scroll Bar Control Styles (Windows)](/windows/win32/Controls/scroll-bar-control-styles). |Style|Description| |-----------|-----------------| @@ -213,7 +212,7 @@ Scroll-bar styles apply to [`CScrollBar` Class](../../mfc/reference/cscrollbar-c ## Static styles -Static styles apply to [`CStatic` Class](../../mfc/reference/cstatic-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CStatic::Create`](../../mfc/reference/cstatic-class.md#create). For more information about static control styles in Windows, see [Static Control Styles (Windows)](/windows/win32/Controls/static-control-styles). +Static styles apply to [`CStatic` Class](cstatic-class.md) objects. Specify a combination of styles in the *`dwStyle`* parameter of [`CStatic::Create`](cstatic-class.md#create). For more information about static control styles in Windows, see [Static Control Styles (Windows)](/windows/win32/Controls/static-control-styles). |Style|Description| |-----------|-----------------| @@ -247,7 +246,7 @@ Static styles apply to [`CStatic` Class](../../mfc/reference/cstatic-class.md) o ## Window styles -Window styles apply to [`CWnd` Class](../../mfc/reference/cwnd-class.md) objects. Specify a combination of styles in the *dwStyle* parameter of [`CWnd::Create`](../../mfc/reference/cwnd-class.md#create) or [`CWnd::CreateEx`](../../mfc/reference/cwnd-class.md#createex). For more information about window styles in Windows, see [Window Styles (Windows)](/windows/win32/winmsg/window-styles). +Window styles apply to [`CWnd` Class](cwnd-class.md) objects. Specify a combination of styles in the *dwStyle* parameter of [`CWnd::Create`](cwnd-class.md#create) or [`CWnd::CreateEx`](cwnd-class.md#createex). For more information about window styles in Windows, see [Window Styles (Windows)](/windows/win32/winmsg/window-styles). |Style|Description| |-----------|-----------------| @@ -281,7 +280,7 @@ Window styles apply to [`CWnd` Class](../../mfc/reference/cwnd-class.md) objects ## Extended window styles -Extended window styles apply to [`CWnd` Class](../../mfc/reference/cwnd-class.md) objects. Specify a combination of styles in the *`dwExStyle`* parameter of [`CWnd::CreateEx`](../../mfc/reference/cwnd-class.md#createex). For more information about extended window styles in Windows, see [Extended Window Styles (Windows)](/windows/win32/winmsg/extended-window-styles). +Extended window styles apply to [`CWnd` Class](cwnd-class.md) objects. Specify a combination of styles in the *`dwExStyle`* parameter of [`CWnd::CreateEx`](cwnd-class.md#createex). For more information about extended window styles in Windows, see [Extended Window Styles (Windows)](/windows/win32/winmsg/extended-window-styles). |Style|Description| |-----------|-----------------| @@ -310,21 +309,21 @@ Extended window styles apply to [`CWnd` Class](../../mfc/reference/cwnd-class.md ## See also -[MFC Class Overview](../../mfc/class-library-overview.md)
-[`CWnd::Create`](../../mfc/reference/cwnd-class.md#create)
-[`CWnd::CreateEx`](../../mfc/reference/cwnd-class.md#createex)
-[`CEdit::Create`](../../mfc/reference/cedit-class.md#create)
-[`CScrollBar::Create`](../../mfc/reference/cscrollbar-class.md#create)
-[`CStatic::Create`](../../mfc/reference/cstatic-class.md#create)
-[`AfxMessageBox`](../../mfc/reference/cstring-formatting-and-message-box-display.md#afxmessagebox)
-[`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww)
-[`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw)
-[Button Styles (Windows)](/windows/win32/Controls/button-styles)
-[Combo Box Styles (Windows)](/windows/win32/Controls/combo-box-styles)
-[Edit Control Styles (Windows)](/windows/win32/Controls/edit-control-styles)
-[List Box Styles (Windows)](/windows/win32/Controls/list-box-styles)
-[`MessageBox` Function (Windows)](/windows/win32/api/winuser/nf-winuser-messagebox)
-[Scroll Bar Control Styles (Windows)](/windows/win32/Controls/scroll-bar-control-styles)
-[Static Control Styles (Windows)](/windows/win32/Controls/static-control-styles)
-[Window Styles (Windows)](/windows/win32/winmsg/window-styles)
+[MFC Class Overview](../class-library-overview.md)\ +[`CWnd::Create`](cwnd-class.md#create)\ +[`CWnd::CreateEx`](cwnd-class.md#createex)\ +[`CEdit::Create`](cedit-class.md#create)\ +[`CScrollBar::Create`](cscrollbar-class.md#create)\ +[`CStatic::Create`](cstatic-class.md#create)\ +[`AfxMessageBox`](cstring-formatting-and-message-box-display.md#afxmessagebox)\ +[`CreateWindow`](/windows/win32/api/winuser/nf-winuser-createwindoww)\ +[`CreateWindowEx`](/windows/win32/api/winuser/nf-winuser-createwindowexw)\ +[Button Styles (Windows)](/windows/win32/Controls/button-styles)\ +[Combo Box Styles (Windows)](/windows/win32/Controls/combo-box-styles)\ +[Edit Control Styles (Windows)](/windows/win32/Controls/edit-control-styles)\ +[List Box Styles (Windows)](/windows/win32/Controls/list-box-styles)\ +[`MessageBox` Function (Windows)](/windows/win32/api/winuser/nf-winuser-messagebox)\ +[Scroll Bar Control Styles (Windows)](/windows/win32/Controls/scroll-bar-control-styles)\ +[Static Control Styles (Windows)](/windows/win32/Controls/static-control-styles)\ +[Window Styles (Windows)](/windows/win32/winmsg/window-styles)\ [Extended Window Styles (Windows)](/windows/win32/winmsg/extended-window-styles) diff --git a/docs/mfc/tn002-persistent-object-data-format.md b/docs/mfc/tn002-persistent-object-data-format.md index da977b57ee..46c468bb74 100644 --- a/docs/mfc/tn002-persistent-object-data-format.md +++ b/docs/mfc/tn002-persistent-object-data-format.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: TN002: Persistent Object Data Format" title: "TN002: Persistent Object Data Format" -ms.date: "11/04/2016" +description: "Learn more about: TN002: Persistent Object Data Format" +ms.date: 11/04/2016 helpviewer_keywords: ["VERSIONABLE_SCHEMA macro [MFC]", "persistent object data", "CArchive class [MFC], support for persistent data", "persistent C++ objects [MFC]", "TN002"] -ms.assetid: 553fe01d-c587-4c8d-a181-3244a15c2be9 --- # TN002: Persistent Object Data Format @@ -56,7 +55,7 @@ If the object has not been saved before, there are two possibilities to consider The descriptor for this class is then inserted into the archive using the `CRuntimeClass::Store` method. `CRuntimeClass::Store` inserts the schema number of the class (see below) and the ASCII text name of the class. Note that the use of the ASCII text name does not guarantee uniqueness of the archive across applications. Therefore, you should tag your data files to prevent corruption. Following the insertion of the class information, the archive puts the object into the *m_pStoreMap* and then calls the `Serialize` method to insert class-specific data. Placing the object into the *m_pStoreMap* before calling `Serialize` prevents multiple copies of the object from being saved to the store. -When returning to the initial caller (usually the root of the network of objects), you must call [CArchive::Close](../mfc/reference/carchive-class.md#close). If you plan to perform other [CFile](../mfc/reference/cfile-class.md)operations, you must call the `CArchive` method [Flush](../mfc/reference/carchive-class.md#flush) to prevent corruption of the archive. +When returning to the initial caller (usually the root of the network of objects), you must call [CArchive::Close](../mfc/reference/carchive-class.md#close). If you plan to perform other [CFile](../mfc/reference/cfile-class.md) operations, you must call the `CArchive` method [Flush](../mfc/reference/carchive-class.md#flush) to prevent corruption of the archive. > [!NOTE] > This implementation imposes a hard limit of 0x3FFFFFFE indices per archive context. This number represents the maximum number of unique objects and classes that can be saved in a single archive, but a single disk file can have an unlimited number of archive contexts. diff --git a/docs/mfc/tn014-custom-controls.md b/docs/mfc/tn014-custom-controls.md index 6cfdbcff96..d6eb5e03e1 100644 --- a/docs/mfc/tn014-custom-controls.md +++ b/docs/mfc/tn014-custom-controls.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: TN014: Custom Controls" title: "TN014: Custom Controls" +description: "Learn more about: TN014: Custom Controls" ms.date: "06/28/2018" f1_keywords: ["vc.controls"] helpviewer_keywords: ["TN014", "custom controls [MFC]"] -ms.assetid: 1917a498-f643-457c-b570-9a0af7dbf7bb --- # TN014: Custom Controls @@ -39,44 +38,44 @@ By using self-draw controls you can build reusable control classes that use owne - For self-draw buttons: ```cpp - CButton:DrawItem(LPDRAWITEMSTRUCT); + CButton::DrawItem(LPDRAWITEMSTRUCT); // insert code to draw this button ``` - For self-draw menus: ```cpp - CMenu:MeasureItem(LPMEASUREITEMSTRUCT); + CMenu::MeasureItem(LPMEASUREITEMSTRUCT); // insert code to measure the size of an item in this menu - CMenu:DrawItem(LPDRAWITEMSTRUCT); + CMenu::DrawItem(LPDRAWITEMSTRUCT); // insert code to draw an item in this menu ``` - For self-draw list boxes: ```cpp - CListBox:MeasureItem(LPMEASUREITEMSTRUCT); + CListBox::MeasureItem(LPMEASUREITEMSTRUCT); // insert code to measure the size of an item in this list box - CListBox:DrawItem(LPDRAWITEMSTRUCT); + CListBox::DrawItem(LPDRAWITEMSTRUCT); // insert code to draw an item in this list box - CListBox:CompareItem(LPCOMPAREITEMSTRUCT); + CListBox::CompareItem(LPCOMPAREITEMSTRUCT); // insert code to compare two items in this list box if LBS_SORT - CListBox:DeleteItem(LPDELETEITEMSTRUCT); + CListBox::DeleteItem(LPDELETEITEMSTRUCT); // insert code to delete an item from this list box ``` - For self-draw combo boxes: ```cpp - CComboBox:MeasureItem(LPMEASUREITEMSTRUCT); + CComboBox::MeasureItem(LPMEASUREITEMSTRUCT); // insert code to measure the size of an item in this combo box - CComboBox:DrawItem(LPDRAWITEMSTRUCT); + CComboBox::DrawItem(LPDRAWITEMSTRUCT); // insert code to draw an item in this combo box - CComboBox:CompareItem(LPCOMPAREITEMSTRUCT); + CComboBox::CompareItem(LPCOMPAREITEMSTRUCT); // insert code to compare two items in this combo box if CBS_SORT - CComboBox:DeleteItem(LPDELETEITEMSTRUCT); + CComboBox::DeleteItem(LPDELETEITEMSTRUCT); // insert code to delete an item from this combo box ``` @@ -118,7 +117,7 @@ There are three common ways these are related: - `CWnd` is attached to an existing `HWND` and you can modify the behavior in a derived class. This is called dynamic subclassing because we are changing the behavior, and therefore the class, of a Windows object at run time. -You can achieve dynamic subclassing by using the methods [CWnd::SubclassWindow](../mfc/reference/cwnd-class.md#subclasswindow) and[CWnd::SubclassDlgItem](../mfc/reference/cwnd-class.md#subclassdlgitem). +You can achieve dynamic subclassing by using the methods [CWnd::SubclassWindow](../mfc/reference/cwnd-class.md#subclasswindow) and [CWnd::SubclassDlgItem](../mfc/reference/cwnd-class.md#subclassdlgitem). Both routines attach a `CWnd` object to an existing `HWND`. `SubclassWindow` takes the `HWND` directly. `SubclassDlgItem` is a helper function that takes a control ID and the parent window. `SubclassDlgItem` is designed for attaching C++ objects to dialog controls created from a dialog template. @@ -126,5 +125,5 @@ See the [CTRLTEST](../overview/visual-cpp-samples.md) example for several exampl ## See also -[Technical Notes by Number](../mfc/technical-notes-by-number.md)
+[Technical Notes by Number](../mfc/technical-notes-by-number.md)\ [Technical Notes by Category](../mfc/technical-notes-by-category.md) diff --git a/docs/mfc/tn038-mfc-ole-iunknown-implementation.md b/docs/mfc/tn038-mfc-ole-iunknown-implementation.md index a7e7375d13..f9dd6560fb 100644 --- a/docs/mfc/tn038-mfc-ole-iunknown-implementation.md +++ b/docs/mfc/tn038-mfc-ole-iunknown-implementation.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: TN038: MFC/OLE IUnknown Implementation" title: "TN038: MFC-OLE IUnknown Implementation" +description: "Learn more about: TN038: MFC/OLE IUnknown Implementation" ms.date: "06/28/2018" helpviewer_keywords: ["aggregation macros [MFC]", "COM interfaces, base interface", "IUnknown interface", "END_INTERFACE_MAP macro [MFC]", "TN038", "BEGIN_INTERFACE_PART macro [MFC]", "DECLARE_INTERFACE_MAP macro [MFC]", "BEGIN_INTERFACE_MAP macro [MFC]", "OLE [MFC], implementing IUnknown interface", "METHOD_PROLOGUE macro [MFC]", "STDMETHOD macro [MFC]", "END_INTERFACE_PART macro [MFC]", "INTERFACE_PART macro"] -ms.assetid: 19d946ba-beaf-4881-85c6-0b598d7f6f11 --- # TN038: MFC/OLE IUnknown Implementation @@ -518,7 +517,7 @@ END_INTERFACE_PART(MyAdviseSink) would define a local class called XMyAdviseSink derived from IAdviseSink, and a member of the class in which it is declared called m_xMyAdviseSink.Note: > [!NOTE] -> The lines beginning with `STDMETHOD`_ are essentially copied from OLE2.H and modified slightly. Copying them from OLE2.H can reduce errors that are hard to resolve. +> The lines beginning with `STDMETHOD_` are essentially copied from OLE2.H and modified slightly. Copying them from OLE2.H can reduce errors that are hard to resolve. ### BEGIN_INTERFACE_MAP and END_INTERFACE_MAP — Macro Descriptions diff --git a/docs/mfc/walkthrough-adding-a-ctaskdialog-to-an-application.md b/docs/mfc/walkthrough-adding-a-ctaskdialog-to-an-application.md index 962e3caae7..1174ea2988 100644 --- a/docs/mfc/walkthrough-adding-a-ctaskdialog-to-an-application.md +++ b/docs/mfc/walkthrough-adding-a-ctaskdialog-to-an-application.md @@ -1,18 +1,17 @@ --- -description: "Learn more about: Walkthrough: Adding a CTaskDialog to an Application" +description: "Learn how to add a CTaskDialog to a MFC application" title: "Walkthrough: Adding a CTaskDialog to an Application" -ms.date: "04/25/2019" +ms.date: "2/7/2025" helpviewer_keywords: ["CTaskDialog, adding", "walkthroughs [MFC], dialogs"] -ms.assetid: 3a62abb8-2d86-4bec-bdb8-5784d5f9a9f8 --- -# Walkthrough: Adding a CTaskDialog to an Application +# Walkthrough: Adding a CTaskDialog to an application -This walkthrough introduces the [CTaskDialog Class](../mfc/reference/ctaskdialog-class.md) and shows you how to add one to your application. +This walkthrough introduces the [`CTaskDialog` class](../mfc/reference/ctaskdialog-class.md) and shows how to add it to your application. -The `CTaskDialog` is a task dialog box that replaces the Windows message box in Windows Vista or later. The `CTaskDialog` improves the original message box and adds functionality. The Windows message box is still supported in Visual Studio. +The `CTaskDialog` is a task dialog box that replaces the Windows message box in Windows Vista or later. The `CTaskDialog` improves on the original message box and adds functionality. The Windows message box is still supported in Visual Studio. > [!NOTE] -> Versions of Windows earlier than Windows Vista do not support the `CTaskDialog`. You must program an alternative dialog box option if you want to show a message to a user who runs your application on an earlier version of Windows. You can use the static method [CTaskDialog::IsSupported](../mfc/reference/ctaskdialog-class.md#issupported) to determine at run time whether a user's computer can display a `CTaskDialog`. In addition, the `CTaskDialog` is only available when your application is built with the Unicode library. +> Versions of Windows earlier than Windows Vista don't support the `CTaskDialog`. You must program an alternative dialog box option if you want to show a message to a user who runs your application on an earlier version of Windows. You can use the static method [CTaskDialog::IsSupported](../mfc/reference/ctaskdialog-class.md#issupported) to determine at run time whether a user's computer can display a `CTaskDialog`. In addition, the `CTaskDialog` is only available when your application is built with the Unicode library. The `CTaskDialog` supports several optional elements to gather and display information. For example, a `CTaskDialog` can display command links, customized buttons, customized icons, and a footer. The `CTaskDialog` also has several methods that enable you to query the state of the task dialog box to determine what optional elements the user selected. @@ -21,37 +20,30 @@ The `CTaskDialog` supports several optional elements to gather and display infor You need the following components to complete this walkthrough: - Visual Studio 2010 or later - - Windows Vista or later -## Replacing a Windows Message Box with a CTaskDialog - -The following procedure demonstrates the most basic use of the `CTaskDialog`, which is to replace the Windows message box. This example also changes the icon associated with the task dialog box. Changing the icon makes the `CTaskDialog` appear same to the Windows message box. - -### To Replace a Windows Message Box with a CTaskDialog +## Replace the Windows message box with a CTaskDialog -1. Use the **MFC Application Wizard** to create an MFC application with all the default settings. See [Walkthrough: Using the New MFC Shell Controls](walkthrough-using-the-new-mfc-shell-controls.md) for instructions on how to open the wizard for your version of Visual Studio. +The following demonstrates the most basic use of the `CTaskDialog`, which is to replace the Windows message box. This example also changes the icon associated with the task dialog box. Changing the icon makes the `CTaskDialog` appear similar to the Windows message box. +1. Use the **MFC Application Wizard** to create a Microsoft Foundation Classes (MFC) application with all the default settings. See [Walkthrough: Using the New MFC Shell Controls](walkthrough-using-the-new-mfc-shell-controls.md) for instructions on how to open the wizard for your version of Visual Studio. 1. Call it *MyProject*. - -1. Use the **Solution Explorer** to open the file MyProject.cpp. - +1. Use the **Solution Explorer** to open `MyProject.cpp`. 1. Add `#include "afxtaskdialog.h"` after the list of includes. - 1. Find the method `CMyProjectApp::InitInstance`. Insert the following lines of code before the `return TRUE;` statement. This code creates the strings that we use in either the Windows message box or in the `CTaskDialog`. ```cpp CString message("My message to the user"); CString dialogTitle("My Task Dialog title"); CString emptyString; - ``` - -1. Add the following code after the code from step 4. This code guarantees that the user's computer supports the `CTaskDialog`. If the dialog isn't supported, the application displays a Windows message box instead. - ```cpp + // Check whether the user's computer supports `CTaskDialog`. + // If not, display a Windows message box instead. if (CTaskDialog::IsSupported()) { - + CTaskDialog taskDialog(message, emptyString, dialogTitle, TDCBF_OK_BUTTON); + taskDialog.SetMainIcon(TD_WARNING_ICON); // Set the icon to be the same as the Windows message box + taskDialog.DoModal(); } else { @@ -59,45 +51,18 @@ The following procedure demonstrates the most basic use of the `CTaskDialog`, wh } ``` -1. Insert the following code between the brackets after the **`if`** statement from step 5. This code creates the `CTaskDialog`. - - ```cpp - CTaskDialog taskDialog(message, emptyString, dialogTitle, TDCBF_OK_BUTTON); - ``` - -1. On the next line, add the following code. This code sets the warning icon. - - ```cpp - taskDialog.SetMainIcon(TD_WARNING_ICON); - ``` - -1. On the next line, add the following code. This code displays the task dialog box. - - ```cpp - taskDialog.DoModal(); - ``` - -You can avoid step 7 if you don't want the `CTaskDialog` to display the same icon as the Windows message box. If you avoid that step, the `CTaskDialog` has no icon when the application displays it. - Compile and run the application. The application displays the task dialog box after it starts. -## Adding Functionality to the CTaskDialog - -The following procedure shows you how to add functionality to the `CTaskDialog` that you created in the previous procedure. The example code shows you how to execute specific instructions based on the user's selections. - -### To Add Functionality to the CTaskDialog +## Add functionality to the CTaskDialog -1. Navigate to the **Resource View**. If you can't see the **Resource View**, you can open it from the **View** menu. +The following shows you how to add functionality to the `CTaskDialog` that you created in the previous procedure. The example code shows you how to execute specific instructions based on the user's selections. -1. Expand the **Resource View** until you can select the **String Table** folder. Expand it and double-click the **String Table** entry. - -1. Scroll to the bottom of the string table and add a new entry. Change the ID to `TEMP_LINE1`. Set the caption to **Command Line 1**. - -1. Add another new entry. Change the ID to `TEMP_LINE2`. Set the caption to **Command Line 2**. - -1. Navigate back to MyProject.cpp. - -1. After `CString emptyString;`, add the following code: +1. Navigate to the **Resource View** via **View** > **Other Windows** > **Resource View**. +1. Expand the **Resource View** to the **String Table** folder. Expand it and double-click **String Table**. +1. Scroll to the bottom of the string table and add a new entry. Change the ID to `TEMP_LINE1`. Set the caption to `Command Line 1`. +1. Add another new entry. Change the ID to `TEMP_LINE2`. Set the caption to `Command Line 2`. +1. Navigate back to `MyProject.cpp`. +1. In the `CMyProjectApp::InitInstance()` function, after `CString emptyString;` add the following code: ```cpp CString expandedLabel("Hide extra information"); @@ -109,67 +74,52 @@ The following procedure shows you how to add functionality to the `CTaskDialog` ```cpp taskDialog.SetMainInstruction(L"Warning"); - taskDialog.SetCommonButtons( - TDCBF_YES_BUTTON | TDCBF_NO_BUTTON | TDCBF_CANCEL_BUTTON); + taskDialog.SetCommonButtons(TDCBF_YES_BUTTON | TDCBF_NO_BUTTON | TDCBF_CANCEL_BUTTON); taskDialog.LoadCommandControls(TEMP_LINE1, TEMP_LINE2); - taskDialog.SetExpansionArea( - expansionInfo, collapsedLabel, expandedLabel); + taskDialog.SetExpansionArea(expansionInfo, collapsedLabel, expandedLabel); taskDialog.SetFooterText(L"This is a small footnote to the user"); taskDialog.SetVerificationCheckboxText(L"Remember your selection"); - ``` - -1. Add the following line of code that displays the task dialog box to the user and retrieves the user's selection: - - ```cpp INT_PTR result = taskDialog.DoModal(); - ``` - -1. Insert the following code after the call to `taskDialog.DoModal()`. This section of code processes the user's input: - ```cpp if (taskDialog.GetVerificationCheckboxState()) { - // PROCESS IF the user selects the verification checkbox + // Your code if the user selects the verification checkbox } switch (result) { - case TEMP_LINE1: - // PROCESS IF the first command line - break; - case TEMP_LINE2: - // PROCESS IF the second command line - break; - case IDYES: - // PROCESS IF the user clicks yes - break; - case IDNO: - // PROCESS IF the user clicks no - break; - case IDCANCEL: - // PROCESS IF the user clicks cancel - break; - default: - // This case should not be hit because closing - // the dialog box results in IDCANCEL - break; + case TEMP_LINE1: + // PROCESS IF the first command line + break; + case TEMP_LINE2: + // PROCESS IF the second command line + break; + case IDYES: + // PROCESS IF the user clicks yes + break; + case IDNO: + // PROCESS IF the user clicks no + break; + case IDCANCEL: + // PROCESS IF the user clicks cancel + break; + default: + // This case should not be hit because closing + // the dialog box results in IDCANCEL + break; } ``` -In the code in step 9, replace the comments that start with `PROCESS IF` with the code that you want to execute under the specified conditions. - Compile and run the application. The application displays the task dialog box that uses the new controls and additional information. ## Displaying a CTaskDialog Without Creating a CTaskDialog Object -The following procedure shows you how to display a `CTaskDialog` without first creating a `CTaskDialog` object. This example continues the previous procedures. +The following shows you how to display a `CTaskDialog` without first creating a `CTaskDialog` object. This example continues the previous procedures. ### To Display a CTaskDialog Without Creating a CTaskDialog Object -1. Open the MyProject.cpp file if it isn't already open. - -1. Navigate to the closing bracket for the `if (CTaskDialog::IsSupported())` statement. - +1. Open the `MyProject.cpp` file. +1. In the `CMyProjectApp::InitInstance()` function, navigate to the closing bracket for the `if (CTaskDialog::IsSupported())` statement. 1. Insert the following code immediately before the closing bracket of the **`if`** statement (before the **`else`** block): ```cpp @@ -180,12 +130,12 @@ The following procedure shows you how to display a `CTaskDialog` without first c TEMP_LINE2); ``` -Compile and run the application. The application displays two task dialog boxes. The first dialog box is from the **To Add Functionality to the CTaskDialog** procedure; the second dialog box is from the last procedure. +Compile and run the application. The application displays two task dialog boxes. The first dialog box is from the **To Add Functionality to the CTaskDialog** procedure; the second dialog box is from the previous procedure. These examples don't demonstrate all the available options for a `CTaskDialog`, but should help you get started. See [CTaskDialog Class](../mfc/reference/ctaskdialog-class.md) for a full description of the class. ## See also -[Dialog Boxes](../mfc/dialog-boxes.md)
-[CTaskDialog Class](../mfc/reference/ctaskdialog-class.md)
+[Dialog Boxes](../mfc/dialog-boxes.md)\ +[CTaskDialog Class](../mfc/reference/ctaskdialog-class.md)\ [CTaskDialog::CTaskDialog](../mfc/reference/ctaskdialog-class.md#ctaskdialog) diff --git a/docs/mfc/windows-sockets-using-class-casyncsocket.md b/docs/mfc/windows-sockets-using-class-casyncsocket.md index b0a5671636..992332b73a 100644 --- a/docs/mfc/windows-sockets-using-class-casyncsocket.md +++ b/docs/mfc/windows-sockets-using-class-casyncsocket.md @@ -1,16 +1,16 @@ --- -description: "Learn more about: Windows Sockets: Using Class CAsyncSocket" title: "Windows Sockets: Using Class CAsyncSocket" +description: "Learn more about: Windows Sockets: Using Class CAsyncSocket" ms.date: "6/8/2021" helpviewer_keywords: ["CAsyncSocket class [MFC], programming model", "Windows Sockets [MFC], asynchronous", "sockets [MFC], converting between Unicode and MBCS strings", "SOCKET handle", "sockets [MFC], asynchronous operation", "Windows Sockets [MFC], converting Unicode and MBCS strings"] --- # Windows Sockets: Using Class `CAsyncSocket` -This article explains how to use class [`CAsyncSocket`](../mfc/reference/casyncsocket-class.md). This class encapsulates the Windows Sockets API at a very low level. `CAsyncSocket` is for use by programmers who know network communications in detail but want the convenience of callbacks for notification of network events. Based on this assumption, this article provides only basic instruction. You should probably consider using `CAsyncSocket` if you want Windows Sockets' ease of dealing with multiple network protocols in an MFC application but don't want to sacrifice flexibility. You might also feel that you can get better efficiency by programming the communications more directly yourself than you could using the more general alternative model of class `CSocket`. +This article explains how to use class [`CAsyncSocket`](reference/casyncsocket-class.md). This class encapsulates the Windows Sockets API at a very low level. `CAsyncSocket` is for use by programmers who know network communications in detail but want the convenience of callbacks for notification of network events. Based on this assumption, this article provides only basic instruction. You should probably consider using `CAsyncSocket` if you want Windows Sockets' ease of dealing with multiple network protocols in an MFC application but don't want to sacrifice flexibility. You might also feel that you can get better efficiency by programming the communications more directly yourself than you could using the more general alternative model of class `CSocket`. `CAsyncSocket` is documented in the *MFC Reference*. Visual C++ also supplies the Windows Sockets specification, located in the Windows SDK. The details are left to you. Visual C++ doesn't supply a sample application for `CAsyncSocket`. -If you aren't highly knowledgeable about network communications and want a simple solution, use class [`CSocket`](../mfc/reference/csocket-class.md) with a `CArchive` object. See [Windows Sockets: Using Sockets with Archives](../mfc/windows-sockets-using-sockets-with-archives.md) for more information. +If you aren't highly knowledgeable about network communications and want a simple solution, use class [`CSocket`](reference/csocket-class.md) with a `CArchive` object. See [Windows Sockets: Using Sockets with Archives](windows-sockets-using-sockets-with-archives.md) for more information. This article covers: @@ -22,19 +22,19 @@ This article covers: #### To use `CAsyncSocket` -1. Construct a [`CAsyncSocket`](../mfc/reference/casyncsocket-class.md) object and use the object to create the underlying **`SOCKET`** handle. +1. Construct a [`CAsyncSocket`](reference/casyncsocket-class.md) object and use the object to create the underlying **`SOCKET`** handle. Creation of a socket follows the MFC pattern of two-stage construction. For example: - [!code-cpp[NVC_MFCSimpleSocket#3](../mfc/codesnippet/cpp/windows-sockets-using-class-casyncsocket_1.cpp)] + [!code-cpp[NVC_MFCSimpleSocket#3](codesnippet/cpp/windows-sockets-using-class-casyncsocket_1.cpp)] -or- - [!code-cpp[NVC_MFCSimpleSocket#4](../mfc/codesnippet/cpp/windows-sockets-using-class-casyncsocket_2.cpp)] + [!code-cpp[NVC_MFCSimpleSocket#4](codesnippet/cpp/windows-sockets-using-class-casyncsocket_2.cpp)] - The first constructor above creates a `CAsyncSocket` object on the stack. The second constructor creates a `CAsyncSocket` on the heap. The first [`Create`](../mfc/reference/casyncsocket-class.md#create) call above uses the default parameters to create a stream socket. The second `Create` call creates a datagram socket with a specified port and address. (You can use either `Create` version with either construction method.) + The first constructor above creates a `CAsyncSocket` object on the stack. The second constructor creates a `CAsyncSocket` on the heap. The first [`Create`](reference/casyncsocket-class.md#create) call above uses the default parameters to create a stream socket. The second `Create` call creates a datagram socket with a specified port and address. (You can use either `Create` version with either construction method.) The parameters to `Create` are: @@ -48,34 +48,34 @@ This article covers: This is your Internet Protocol (IP) address on the network. You'll probably always rely on the default value for this parameter. - The terms "port" and "socket address" are explained in [Windows Sockets: Ports and Socket Addresses](../mfc/windows-sockets-ports-and-socket-addresses.md). + The terms "port" and "socket address" are explained in [Windows Sockets: Ports and Socket Addresses](windows-sockets-ports-and-socket-addresses.md). -1. If the socket is a client, connect the socket object to a server socket, using [`CAsyncSocket::Connect`](../mfc/reference/casyncsocket-class.md#connect). +1. If the socket is a client, connect the socket object to a server socket, using [`CAsyncSocket::Connect`](reference/casyncsocket-class.md#connect). -or- - If the socket is a server, set the socket to begin listening (with [`CAsyncSocket::Listen`](../mfc/reference/casyncsocket-class.md#listen)) for connect attempts from a client. Upon receiving a connection request, accept it with [`CAsyncSocket::Accept`](../mfc/reference/casyncsocket-class.md#accept). + If the socket is a server, set the socket to begin listening (with [`CAsyncSocket::Listen`](reference/casyncsocket-class.md#listen)) for connect attempts from a client. Upon receiving a connection request, accept it with [`CAsyncSocket::Accept`](reference/casyncsocket-class.md#accept). After accepting a connection, you can do tasks like validating passwords. > [!NOTE] - > The `Accept` member function takes a reference to a new, empty `CSocket` object as its parameter. You must construct this object before you call `Accept`. If this socket object goes out of scope, the connection closes. Don't call `Create` for this new socket object. For an example, see the article [Windows Sockets: Sequence of Operations](../mfc/windows-sockets-sequence-of-operations.md). + > The `Accept` member function takes a reference to a new, empty `CSocket` object as its parameter. You must construct this object before you call `Accept`. If this socket object goes out of scope, the connection closes. Don't call `Create` for this new socket object. For an example, see the article [Windows Sockets: Sequence of Operations](windows-sockets-sequence-of-operations.md). 1. Carry out communications with other sockets by calling the `CAsyncSocket` object's member functions that encapsulate the Windows Sockets API functions. - See the Windows Sockets specification and class [`CAsyncSocket`](../mfc/reference/casyncsocket-class.md) in the *MFC Reference*. + See the Windows Sockets specification and class [`CAsyncSocket`](reference/casyncsocket-class.md) in the *MFC Reference*. 1. Destroy the `CAsyncSocket` object. If you created the socket object on the stack, its destructor is called when the containing function goes out of scope. If you created the socket object on the heap, using the **`new`** operator, you're responsible for using the **`delete`** operator to destroy the object. - The destructor calls the object's [`Close`](../mfc/reference/casyncsocket-class.md#close) member function before destroying the object. + The destructor calls the object's [`Close`](reference/casyncsocket-class.md#close) member function before destroying the object. -For an example of this sequence in code (actually for a `CSocket` object), see [Windows Sockets: Sequence of Operations](../mfc/windows-sockets-sequence-of-operations.md). +For an example of this sequence in code (actually for a `CSocket` object), see [Windows Sockets: Sequence of Operations](windows-sockets-sequence-of-operations.md). ## Your responsibilities with `CAsyncSocket` -When you create an object of class [`CAsyncSocket`](../mfc/reference/casyncsocket-class.md), the object encapsulates a Windows **`SOCKET`** handle and supplies operations on that handle. When you use `CAsyncSocket`, you must deal with all the issues you might face if using the API directly. For example: +When you create an object of class [`CAsyncSocket`](reference/casyncsocket-class.md), the object encapsulates a Windows **`SOCKET`** handle and supplies operations on that handle. When you use `CAsyncSocket`, you must deal with all the issues you might face if using the API directly. For example: - "Blocking" scenarios. @@ -83,16 +83,16 @@ When you create an object of class [`CAsyncSocket`](../mfc/reference/casyncsocke - Converting between Unicode and multibyte character set (MBCS) strings. -For definitions of these terms and additional information, see [Windows Sockets: Blocking](../mfc/windows-sockets-blocking.md), [Windows Sockets: Byte Ordering](../mfc/windows-sockets-byte-ordering.md), [Windows Sockets: Converting Strings](../mfc/windows-sockets-converting-strings.md). +For definitions of these terms and additional information, see [Windows Sockets: Blocking](windows-sockets-blocking.md), [Windows Sockets: Byte Ordering](windows-sockets-byte-ordering.md), [Windows Sockets: Converting Strings](windows-sockets-converting-strings.md). Despite these issues, class `CAsyncSocket` may be the right choice for you if your application requires all the flexibility and control you can get. If not, consider using class `CSocket` instead. `CSocket` hides many details from you: it pumps Windows messages during blocking calls and gives you access to `CArchive`, which manages byte order differences and string conversion for you. For more information, see: -- [Windows Sockets: Background](../mfc/windows-sockets-background.md)\ -- [Windows Sockets: Stream Sockets](../mfc/windows-sockets-stream-sockets.md)\ -- [Windows Sockets: Datagram Sockets](../mfc/windows-sockets-datagram-sockets.md) +- [Windows Sockets: Background](windows-sockets-background.md) +- [Windows Sockets: Stream Sockets](windows-sockets-stream-sockets.md) +- [Windows Sockets: Datagram Sockets](windows-sockets-datagram-sockets.md) ## See also -[Windows Sockets in MFC](../mfc/windows-sockets-in-mfc.md) +[Windows Sockets in MFC](windows-sockets-in-mfc.md) diff --git a/docs/overview/compiler-versions.md b/docs/overview/compiler-versions.md index e35858c146..60666e3f29 100644 --- a/docs/overview/compiler-versions.md +++ b/docs/overview/compiler-versions.md @@ -1,7 +1,7 @@ --- description: "Learn more about Microsoft Visual C++ compiler versioning." title: "Microsoft Visual C++ compiler versioning (Visual C++)" -ms.date: 02/13/2024 +ms.date: 02/12/2025 ms.service: "visual-cpp" ms.subservice: "tools" helpviewer_keywords: ["Visual C++, platforms supported", "platforms [C++]"] @@ -52,7 +52,7 @@ The macros reflect these values like this: ### Service releases starting with Visual Studio 2017 -Servicing releases can be distinguished by `_MSC_FULL_VER`. The build field (the BBBBB in the MMNNBBBBB version number) typically increases by 1. +Servicing releases are distinguished by `_MSC_FULL_VER`. The build field (the BBBBB in the MMNNBBBBB version number) typically increases by 1. For example, two cases where `_MSC_FULL_VER` is useful is to distinguish Visual Studio 2019 16.8 from 16.9, and Visual Studio 2019 16.10 from 16.11. That's because those versions share the same major and minor versions, and so have the same value for `_MSC_VER`. @@ -71,7 +71,7 @@ R - revision version **[`_MSC_VER`](../preprocessor/predefined-macros.md)** distinguishes between major and minor releases. It has the form: MMNN. -**[`_MSC_FULL_VER`](../preprocessor/predefined-macros.md)** represents the major, minor, and build version of the compiler. It has the form: MMNNBBBBB. Use it to distinguish between different versions of the compiler, including servicing releases. See [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017) for more information about Visual Studio 2019 16.8, 16.9, 16.10 and 16.11. +**[`_MSC_FULL_VER`](../preprocessor/predefined-macros.md)** represents the major, minor, and build version of the compiler. It has the form: MMNNBBBBB. Use it to distinguish between different versions of the compiler, including servicing releases. For more information about Visual Studio 2019 16.8, 16.9, 16.10 and 16.11, see [Service releases starting with Visual Studio 2017](#service-releases-starting-with-visual-studio-2017). **[`_MSC_BUILD`](../preprocessor/predefined-macros.md)** represents the build version of the compiler. It has the form: R. Use it to distinguish between servicing releases. @@ -120,6 +120,10 @@ The following table lists the Visual C++ compiler `_MSC_VER` for each Visual Stu | Visual Studio 2022 version 17.8 | 1938 | | Visual Studio 2022 version 17.9 | 1939 | | Visual Studio 2022 version 17.10 | 1940 | +| Visual Studio 2022 version 17.11 | 1941 | +| Visual Studio 2022 version 17.12 | 1942 | +| Visual Studio 2022 version 17.13 | 1943 | +| Visual Studio 2022 version 17.14 | 1944 | a Visual Studio 2019 16.8 and 16.9 share the same major and minor versions (and so have the same value for `_MSC_VER`). To distinguish them, use `_MSC_FULL_VER`. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.8 is 192829333. The minimum value of `_MSC_FULL_VER` for Visual Studio 2019 16.9 is 192829910. diff --git a/docs/overview/cpp-conformance-improvements-2019.md b/docs/overview/cpp-conformance-improvements-2019.md index c7da028474..e3b390b72f 100644 --- a/docs/overview/cpp-conformance-improvements-2019.md +++ b/docs/overview/cpp-conformance-improvements-2019.md @@ -445,7 +445,7 @@ The unordered container `reserve` function now actually reserves for N elements, - Added the overloads for container merge and extract member functions that accept rvalue containers. For more information, see [P0083 "Splicing Maps And Sets"](https://wg21.link/p0083r3) -### `std::basic_istream::read` processing of `\r\n`` =>`\n` +### `std::basic_istream::read` processing of `\r\n` => `\n` `std::basic_istream::read` was fixed to not write into parts of the supplied buffer temporarily as part of `\r\n` to `\n` processing. This change gives up some of the performance advantage that was gained in Visual Studio 2017 15.8 for reads larger than 4K in size. However, efficiency improvements from avoiding three virtual calls per character are still present. @@ -1249,7 +1249,7 @@ void f() { Previously, thread-local variables in DLLs weren't correctly initialized. Other than on the thread that loaded the DLL, they weren't initialized before first use on threads that existed before the DLL was loaded. This defect has now been corrected. Thread-local variables in such a DLL get initialized immediately before their first use on such threads. -This new behavior of testing for initialization on uses of thread-local variables may be disabled by using the **`/Zc:tlsGuards-`** compiler option. Or, by adding the `[[msvc:no_tls_guard]]` attribute to particular thread local variables. +This new behavior of testing for initialization on uses of thread-local variables may be disabled by using the **`/Zc:tlsGuards-`** compiler option. Or, by adding the `[[msvc::no_tls_guard]]` attribute to particular thread local variables. ### Better diagnosis of call to deleted functions @@ -1934,14 +1934,14 @@ C++20 doesn't support coroutines with a return type that includes a placeholder auto my_generator() { ... co_yield next; -}; +} // /std:c++latest #include std::experimental::generator my_generator() { ... co_yield next; -}; +} ``` #### Return type of `return_value` diff --git a/docs/overview/cpp-conformance-improvements.md b/docs/overview/cpp-conformance-improvements.md index d3b8b4c9a5..2249e10efa 100644 --- a/docs/overview/cpp-conformance-improvements.md +++ b/docs/overview/cpp-conformance-improvements.md @@ -1,23 +1,221 @@ --- title: "C++ conformance improvements in Visual Studio 2022" description: "Microsoft C++ in Visual Studio is improving standards conformance and fixing bugs regularly." -ms.date: 06/06/2024 +ms.date: 05/13/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- # C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 -Microsoft C/C++ in Visual Studio (MSVC) makes conformance improvements and bug fixes in every release. This article lists the significant improvements by major release, then by version. To jump directly to the changes for a specific version, use the **In this article** links. +Microsoft C/C++ in Visual Studio (MSVC) makes conformance improvements and bug fixes in every release. This article lists the significant improvements by major release, then by version. To jump directly to the changes for a specific version, use the **In this article** links at the top of this article. This document lists the changes in Visual Studio 2022. -For changes in Visual Studio 2019, see [C++ conformance improvements in Visual Studio 2019](cpp-conformance-improvements-2019.md).\ -For changes in Visual Studio 2017, see [C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md).\ -For changes in older versions, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). +For changes in earlier versions of Visual Studio: + +| Version | Conformance improvements link | +|---|---| +| 2019 | [C++ conformance improvements in Visual Studio 2019](cpp-conformance-improvements-2019.md) | +| 2017 | [C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md) | +| 2003-2015 | [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md) | + +## Conformance improvements in Visual Studio 2022 version 17.14 + +Visual Studio 2022 version 17.14 includes the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. + +### Conformance improvements + +- Standard library hardening ([P3471R4](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3471r4.html)) turns some instances of undefined behavior in the standard library into a call to [__fastfail](../intrinsics/fastfail.md). Off by default. Define `_MSVC_STL_HARDENING=1` project-wide to enable. + +### Enhanced behavior + +- Implemented "destructor tombstones" to mitigate use-after-free mistakes. Off by default. Define `_MSVC_STL_DESTRUCTOR_TOMBSTONES=1` project-wide to enable. + +### Bug fixes + +- Fixed errant compiler errors when using `` in a CUDA project. +- Fixed a compiler issue where the address of a local variable could "leak" during `constexpr` evaluation. For example: + + ```cpp + const unsigned & func() + { + const int x = 0; + constexpr const unsigned & r1 = x; // Previously accepted, now an error + return r1; + } + + auto r = func(); // Previously, the local address leaked + ``` + + **Example #2** + + ```cpp + #include + + void test() + { + constexpr std::initializer_list xs { 1, 2, 3 }; // Previously accepted, now an error + + static constexpr std::initializer_list ys { 1, 2, 3 }; // Correct usage - note use of static + } + ``` + +- Code compiled with `/permissive-` no longer accepts a combination of `friend` and `static` on a declaration. The fix is usually to remove `static` from the declaration. For example: + + ```cpp + struct S + { + friend static void f(); // Previously accepted, now emits error C2440: 'static' cannot be used with 'friend' + }; + ``` + +- Reference binding to volatile-qualified types fixed when referring to a base or derived class. For example: + + ```cpp + struct A {}; + struct B : public A {}; + + void f(A&); // 1 + void f(const volatile A&); // 2 + + f(B{}); // Previously called 2. This is ill-formed under /permissive- or /Zc:referenceBinding. Chooses 1 if relaxed reference binding rules are enabled. + ``` + +For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.14](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1714). + +## Conformance improvements in Visual Studio 2022 version 17.13 + +Visual Studio 2022 version 17.13 includes the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. + +For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.13](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1713). + +### Argument-dependent lookup (ADL) + +Language constructs such as range-for and structured bindings have special argument-dependent lookup rules for certain identifiers such as `begin`, `end`, or `get`. Previously, this lookup included candidates from the `std` namespace, even when namespace `std` isn't part of the ordinary set of associated namespaces for argument-dependent lookup. + +Programs that introduced declarations to `std` for these constructs no longer compile. Instead, the declarations should be in a normal associated namespace for the types involved (possibly including the global namespace). + +```cpp +template +struct Foo {}; + +namespace std +{ + // To correct the program, move these declarations from std to the global namespace + template + T* begin(Foo& f); + template + T* end(Foo& f); +} + +void f(Foo foo) +{ + for (auto x : foo) // Previously compiled. Now emits error C3312: no callable 'begin' function found for type 'Foo' + { + ... + } +} +``` + +### Can't modify implementation-reserved macros + +Previously, the compiler permitted changing or undefining certain implementation-provided macros such as `_MSC_EXTENSIONS`. Altering the definition of certain macros can result in undefined behavior. + +Attempting to alter or undefine certain reserved macro names now results in the level-1 warning `C5308`. In `/permissive-` mode, this warning is treated as an error. + +```cpp +#undef _MSC_EXTENSIONS // Warning C5308: Modifying reserved macro name `_MSC_EXTENSIONS` may cause undefined behavior +``` + +## Conformance improvements in Visual Studio 2022 version 17.12 + +Visual Studio 2022 version 17.12 includes the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. + +For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.12](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1712). + +### `_com_ptr_t::operator bool()` is now explicit + +This is a source/binary breaking change. + +The implicit conversion to `bool` from `_com_ptr_t` instances can be surprising or lead to compiler errors. [C.164: Avoid implicit conversion operators](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c164-avoid-implicit-conversion-operators) in the C++ Core Guidelines discourage implicit conversion functions. And `_com_ptr_t` contained implicit conversions to both `bool` and `Interface*`. These two implicit conversions can lead to ambiguities. + +To address this, the conversion to `bool` is now explicit. The conversion to `Interface*` is unchanged. + +A macro is provided to opt-out of this new behavior and restore the previous implicit conversion. Compile with `/D_COM_DISABLE_EXPLICIT_OPERATOR_BOOL` to opt-out of this change. We recommend that you modify the code to not rely on implicit conversions. + +For example: + +```cpp +#include + +template +using _com_ptr = _com_ptr_t<_com_IIID>; + +int main() +{ + _com_ptr unk; + if (unk) // Still valid + { + // ... + } + bool b = unk; // Still valid. + int v = unk; // Previously permitted, now emits C2240: cannot convert from '_com_ptr_t<_com_IIID>' to 'int' +} +``` + +### Constant expressions are no longer always `noexcept` in permissive mode + +This is a source/binary breaking change. + +A constant expression was always `noexcept`, even if it involved a function call to a function declared with a potentially throwing exception specification. This wording was removed in C++17, although the Microsoft Visual C++ compiler still supported it in `/permissive` mode in all C++ language versions. + +This `/permissive` mode behavior is removed. Constant expressions are no longer given special implicit behavior. + +The `noexcept` specifier on `constexpr` functions is now respected in all modes. This change is required for correct implementation of later core issue resolutions that rely on the standard `noexcept` behavior. + +For example: + +```cpp +constexpr int f(bool b) noexcept(false) +{ + if (b) + { + throw 1; + } + else + { + return 1; + } +} + +void g(bool b) +{ + noexcept(f(b)); // false. No change to behavior + noexcept(f(true)); // false. No change to behavior + noexcept(f(false)); // false. Was true in /permissive mode only in previous versions. +} +``` + +## Conformance improvements in Visual Studio 2022 version 17.11 + +Visual Studio 2022 version 17.11 includes the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. + +For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.11](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1711). + +### Print blank lines with `println` + +Per [P3142R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3142r0.pdf), it's now easy to generate a blank line with `println`. This feature is available when compiling with `/std:c++latest`. +Before this change, you wrote: `println("");` Now you write: `println();`. +- `println();` is equivalent to `println(stdout);` +- `println(FILE* stream);` is equivalent to `println(stream, "\n");` + +### Implemented `range_formatter` + +Per [P2286R8](https://wg21.link/P2286R8), `range_formatter` is now implemented. This feature is available when compiling with `/std:c++latest`. ## Conformance improvements in Visual Studio 2022 version 17.10 -Visual Studio 2022 version 17.10 has the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. +Visual Studio 2022 version 17.10 includes the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. For an in-depth summary of changes made to the Standard Template Library, including conformance changes, bug fixes, and performance improvements, see [STL Changelog VS 2022 17.10](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710). @@ -166,7 +364,7 @@ To fix this warning, either use an equality operator, `value == 9`, if this is w Visual Studio 2022 version 17.9 contains the following conformance improvements, bug fixes, and behavior changes in the Microsoft C/C++ compiler. -For a broader summary of changes made to the Standard Template Library, see [STL Changelog VS 2022 17.9](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179). +For a broader summary of changes made to the Standard Template Library, see [STL Changelog VS 2022 17.9](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-179). ### Application of `_Alignas` on a structured type in C @@ -255,7 +453,7 @@ The C compiler used to accept the `/FU` option, even though it hasn't support ma The C++23 named modules `std` and `std.compat` are now available when compiling with `/std:c++20`. -For a broader summary of changes made to the C++ Standard Library, see [STL Changelog VS 2022 17.8](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178). +For a broader summary of changes made to the C++ Standard Library, see [STL Changelog VS 2022 17.8](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-178). ## Conformance improvements in Visual Studio 2022 version 17.7 @@ -271,7 +469,7 @@ The `` library is now supported. See [P2093R14 Formatted output](https:// Implemented `views::cartesian_product`. -For a broader summary of changes made to the Standard Template Library, see [STL Changelog VS 2022 17.7](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-177). +For a broader summary of changes made to the Standard Template Library, see [STL Changelog VS 2022 17.7](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-177). ### `using` conformance @@ -391,7 +589,7 @@ bool b = S{} != S{}; The compiler accepts this code, which means that the compiler is more strict with code such as: -```c++ +```cpp struct S { operator bool() const; @@ -543,7 +741,7 @@ bidi.cpp(8): warning C5255: unterminated bidirectional character encountered: 'U ### `from_chars()` `float` tiebreaker -Visual Studio 2022 version 17.2 fixes a bug in `` `from_chars()` `float` tiebreaker rules that produced incorrect results. This bug affected decimal strings that were at the exact midpoint of consecutive `float` values, within a narrow range. (The smallest and largest affected values were `32768.009765625` and `131071.98828125`, respectively.) The tiebreaker rule wanted to round to "even", and "even" happened to be "down", but the implementation incorrectly rounded "up" (`double` was unaffected.) For more information and implementation details, see [microsoft/STL#2366](https://github.com/microsoft/STL/pull/2366). +Visual Studio 2022 version 17.2 fixes a bug in `` `from_chars()` `float` tiebreaker rules that produced incorrect results. This bug affected decimal strings that were at the exact midpoint of consecutive `float` values, within a narrow range. (The smallest and largest affected values were `32768.009765625` and `131071.98828125`, respectively.) The tiebreaker rule wanted to round to "even," and "even" happened to be "down," but the implementation incorrectly rounded "up" (`double` was unaffected.) For more information and implementation details, see [microsoft/STL#2366](https://github.com/microsoft/STL/pull/2366). This change affects runtime behavior in the specified range of cases: diff --git a/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md b/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md index b1265868d2..5fff09d04d 100644 --- a/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md +++ b/docs/overview/how-to-report-a-problem-with-the-visual-cpp-toolset.md @@ -13,9 +13,9 @@ If you find problems in the Microsoft C++ compiler (MSVC), the linker, or other ## How to report a C++ toolset issue -The best way to let us know about a problem is to send us a report that includes a description of the problem you've discovered. It should have all the details about how you build your program. And it should include a *repro*, a complete test case we can use to reproduce the problem on our own machines. This information lets us quickly verify that the problem exists in our code and isn't local to your environment. It helps us determine whether it affects other versions of the compiler, and to diagnose its cause. +The best way to let us know about a problem is to send us a report that includes a description of the problem you discovered. It should have all the details about how you build your program. And it should include a *repro*, a complete test case we can use to reproduce the problem on our own machines. This information lets us quickly verify that the problem exists in our code and isn't local to your environment. It helps us determine whether it affects other versions of the compiler, and to diagnose its cause. -In the sections below, you'll read about what makes a good report. We describe how to generate a repro for the kind of issue you've found, and how to send your report to the product team. Your reports are important to us and to other developers like you. Thank you for helping us improve Microsoft C++! +In the following sections, read about what makes a good report. We describe how to generate a repro for the kind of issue you found, and how to send your report to the product team. Your reports are important to us and to other developers like you. Thank you for helping us improve Microsoft C++! ## How to prepare your report @@ -66,15 +66,15 @@ Copy and paste the entire output into your report. ### The command line -We need the exact command line, cl.exe and all of its arguments, used to build your code. That's so we can build it in exactly the same way on our machines. It's important because the problem you've found might only exist when building with a certain argument or combination of arguments. +We need the exact command line, cl.exe and all of its arguments, used to build your code. That's so we can build it in exactly the same way on our machines. It's important because the problem you found might only exist when building with a certain argument or combination of arguments. The best place to find this information is in the build log immediately after you experience the problem. It ensures that the command line contains exactly the same arguments that might contribute to the problem. #### To report the contents of the command line -1. Locate the **CL.command.1.tlog** file and open it. By default, this file is located in your Documents folder in \\Visual Studio *version*\\Projects\\*SolutionName*\\*ProjectName*\\*Configuration*\\*ProjectName*.tlog\\CL.command.1.tlog, or in your User folder under \\Source\\Repos\\*SolutionName*\\*ProjectName*\\*Configuration*\\*ProjectName*.tlog\\CL.command.1.tlog. It may be in a different location if you use another build system, or if you've changed the default location for your project. +1. Locate the **CL.command.1.tlog** file and open it. By default, this file is located in your Documents folder in \\Visual Studio *version*\\Projects\\*SolutionName*\\*ProjectName*\\*Configuration*\\*ProjectName*.tlog\\CL.command.1.tlog, or in your User folder under \\Source\\Repos\\*SolutionName*\\*ProjectName*\\*Configuration*\\*ProjectName*.tlog\\CL.command.1.tlog. It may be in a different location if you use another build system, or if you changed the default location for your project. - Inside this file, you'll find the names of your source code files, followed by the command-line arguments used to compile them, each on separate lines. + Inside this file, find the names of your source code files, followed by the command-line arguments used to compile them, each on separate lines. 1. Locate the line that contains the name of the source code file where the problem occurs. The line below it contains the corresponding cl.exe command arguments. @@ -82,19 +82,19 @@ Copy and paste the entire command line into your report. ### A description of the problem -We need a detailed description of the problem you've found. That's so we can verify that we see the same effect on our machines. It's also sometimes useful for us to know what you were trying to accomplish, and what you expected to happen. +We need a detailed description of the problem you found. That's so we can verify that we see the same effect on our machines. It's also sometimes useful for us to know what you were trying to accomplish, and what you expected to happen. -A good description provides the **exact error messages** given by the toolset, or the exact runtime behavior you see. We need this information to verify that we've properly reproduced the issue. Include **all** of the compiler output, not just the last error message. We need to see everything that led up to the issue you report. If you can duplicate the issue by using the command-line compiler, that compiler output is preferred. The IDE and other build systems may filter the error messages you see, or only capture the first line of an error message. +A good description provides the **exact error messages** given by the toolset, or the exact runtime behavior you see. We need this information to verify that we properly reproduced the issue. Include **all** of the compiler output, not just the last error message. We need to see everything that led up to the issue you report. If you can duplicate the issue by using the command-line compiler, that compiler output is preferred. The IDE and other build systems may filter the error messages you see, or only capture the first line of an error message. If the issue is that the compiler accepts invalid code and doesn't generate a diagnostic, include that in your report. -To report a runtime behavior problem, include an **exact copy** of what the program prints, and what you expect to see. Ideally, you'll embed it in the output statement itself, for example, `printf("This should be 5: %d\n", actual_result);`. If your program crashes or hangs, mention that as well. +To report a runtime behavior problem, include an **exact copy** of what the program prints, and what you expect to see. Ideally, embed it in the output statement itself, for example, `printf("This should be 5: %d\n", actual_result);`. If your program crashes or hangs, mention that as well. -Add any other details that might help us diagnose the problem you found, such as any work-arounds you've discovered. Try not to repeat information found elsewhere in your report. +Add any other details that might help us diagnose the problem you found, such as any work-arounds you discovered. Try not to repeat information found elsewhere in your report. ### The repro -A *repro* is a complete, self-contained source code example. It reproducibly demonstrates the problem you've found, hence the name. We need a repro so that we can reproduce the error on our machines. The code should be sufficient by itself to create a basic executable that compiles and runs. Or, that *would* compile and run, if not for the problem you've found. A repro isn't a code snippet. It should have complete functions and classes, and contain all the necessary #include directives, even for the standard headers. +A *repro* is a complete, self-contained source code example. It reproducibly demonstrates the problem you found, hence the name. We need a repro so that we can reproduce the error on our machines. The code should be sufficient by itself to create a basic executable that compiles and runs. Or, that *would* compile and run, if not for the problem you found. A repro isn't a code snippet. It should have complete functions and classes, and contain all the necessary #include directives, even for the standard headers. #### What makes a good repro @@ -104,9 +104,9 @@ A good repro is: - **Self-Contained.** Repros should avoid unnecessary dependencies. If you can reproduce the problem without third-party libraries, then do so. If you can reproduce the problem without any library code besides simple output statements (for example, `puts("this shouldn't compile");`, `std::cout << value;`, and `printf("%d\n", value);`), then do so. It's ideal if the example can be condensed to a single source code file, without reference to any user headers. Reducing the amount of code we have to consider as a possible contributor to the problem is enormously helpful to us. -- **Against the latest compiler version.** Repros should use the most recent update to the latest version of the toolset whenever possible. Or, use the most recent prerelease version of the next update or next major release. Problems you may find in older versions of the toolset have often been fixed in newer versions. Fixes are backported to older versions only in exceptional circumstances. +- **Against the latest compiler version.** Repros should use the most recent update to the latest version of the toolset whenever possible. Or, use the most recent prerelease version of the next update or next major release. Problems you may find in older versions of the toolset are often fixed in newer versions. Fixes are backported to older versions only in exceptional circumstances. -- **Checked against other compilers** if relevant. Repros that involve portable C++ code should verify behavior against other compilers if possible. The C++ standard ultimately determines program correctness, and no compiler is perfect. However, when Clang and GCC accept your code without a diagnostic, and MSVC doesn't, you've probably found a bug in our compiler. (Other possibilities include differences in Unix and Windows behavior, or different levels of C++ standards implementation, and so on.) When all the compilers reject your code, then it's likely that your code is incorrect. Seeing different error messages may help you diagnose the issue yourself. +- **Checked against other compilers** if relevant. Repros that involve portable C++ code should verify behavior against other compilers if possible. The C++ standard ultimately determines program correctness, and no compiler is perfect. However, when Clang and GCC accept your code without a diagnostic, and MSVC doesn't, you probably found a bug in our compiler. (Other possibilities include differences in Unix and Windows behavior, or different levels of C++ standards implementation, and so on.) When all the compilers reject your code, then it's likely that your code is incorrect. Seeing different error messages may help you diagnose the issue yourself. You can find lists of online compilers to test your code against in [Online C++ compilers](https://isocpp.org/blog/2013/01/online-c-compilers) on the ISO C++ website, or this curated [List of Online C++ Compilers](https://arnemertz.github.io/online-compilers/) on GitHub. Some specific examples include [Wandbox](https://wandbox.org/) and [Compiler Explorer](https://godbolt.org/). @@ -169,7 +169,7 @@ If the line that begins with **INTERNAL COMPILER ERROR** mentions link.exe, rath #### Linker crash -Linker crashes occur during the linking phase, after the compiler has run. Typically, the linker will emit [Linker Tools Error LNK1000](../error-messages/tool-errors/linker-tools-error-lnk1000.md). +Linker crashes occur during the linking phase, after the compiler has run. Typically, the linker emits [Linker Tools Error LNK1000](../error-messages/tool-errors/linker-tools-error-lnk1000.md). > [!NOTE] > If the output mentions C1001 or involves Link-Time Code Generation, refer to [Backend (code generation) crash](#backend-code-generation-crash) instead. @@ -214,7 +214,7 @@ If incremental linking is enabled, and the crash occurred only after a successfu #### Bad code generation -Bad code generation is rare. It occurs when the compiler mistakenly generates incorrect code that causes your application to crash at runtime. Instead, it should generate correct code, or detect a problem at compile time. If you believe the problem you've found results in bad code generation, treat your report the same as a [Backend (code generation) crash](#backend-code-generation-crash). +Bad code generation is rare. It occurs when the compiler mistakenly generates incorrect code that causes your application to crash at runtime. Instead, it should generate correct code, or detect a problem at compile time. If you believe the problem you found results in bad code generation, treat your report the same as a [Backend (code generation) crash](#backend-code-generation-crash). For this kind of crash, provide a [Link repro](#link-repros) if you're using the **/GL** command-line argument to cl.exe. Provide a [Preprocessed repro](#preprocessed-repros) if not. @@ -222,11 +222,11 @@ For this kind of crash, provide a [Link repro](#link-repros) if you're using the To help us track down the source of the problem, a [good repro](#what-makes-a-good-repro) is vital. Before you do any of the steps outlined below for specific kinds of repros, try to condense the code that demonstrates the problem as much as possible. Try to eliminate or minimize dependencies, required headers, and libraries. Limit the compiler options and preprocessor definitions used, if possible. -Below are instructions for generating the various kinds of repros you'll use to report different kinds of problems. +Below are instructions for generating the various kinds of repros to use to report different kinds of problems. ### Preprocessed repros -A *Preprocessed repro* is a single source file that demonstrates a problem. It's generated from the output of the C preprocessor. To create one, use the **/P** compiler option on the original repro source file. This option inlines the included headers to remove dependencies on additional source and header files. The option also resolves macros, #ifdef conditionals, and other preprocessor commands that could depend on your local environment. +A *Preprocessed repro* is a single source file that demonstrates a problem. It's generated from the output of the C preprocessor. To create one, use the **/P** compiler option on the original repro source file. This option inlines the included headers to remove dependencies on other source and header files. The option also resolves macros, #ifdef conditionals, and other preprocessor commands that could depend on your local environment. > [!NOTE] > Preprocessed repros are not as useful for problems that might be the result of bugs in our standard library implementation, because we will often want to substitute our latest, in-progress implementation to see whether we've already fixed the problem. In this case, don't preprocess the repro, and if you can't reduce the problem to a single source file, package your code into a .zip file or similar, or consider using an IDE project repro. For more information, see [Other repros](#other-repros). @@ -241,9 +241,9 @@ A *Preprocessed repro* is a single source file that demonstrates a problem. It's 1. In the developer command prompt console window, enter the command **cl /P** *arguments* *filename.cpp*. For *arguments*, use the list of arguments you captured above. *filename.cpp* is the name of your repro source file. This command replicates the command line you used for the repro, but stops the compilation after the preprocessor pass. Then it writes the preprocessed source code to *filename.i*. -If you're preprocessing a C++/CX source code file, or you're using the C++ Modules feature, some additional steps are required. For more information, see the sections below. +If you're preprocessing a C++/CX source code file, or you're using the C++ Modules feature, some more steps are required. For more information, see the sections below. -After you've generated the preprocessed file, it's a good idea to make sure that the problem still repros when you compile the preprocessed file. +After you generate the preprocessed file, it's a good idea to make sure that the problem still repros when you compile the preprocessed file. #### To confirm the preprocessed file still repros the error @@ -299,7 +299,7 @@ If you're using the Modules feature of the C++ compiler, there are some differen 1. In the developer command prompt console window, enter the command **cl /P** *arguments* *modulename.ixx*. The *arguments* are the arguments captured above, and *modulename.ixx* is the name of the file that creates the module interface. -After you've generated the preprocessed files, it's a good idea to make sure the problem still repros when you use the preprocessed file. +After you generate the preprocessed files, it's a good idea to make sure the problem still repros when you use the preprocessed file. #### To confirm the preprocessed file still repros the error @@ -329,7 +329,7 @@ A *link repro* is the linker-generated contents of a directory, specified either 1. To build the repro project in Visual Studio, in the developer command prompt console window, enter the command **devenv**. It ensures that the value of the **link\_repro** environment variable is visible to Visual Studio. To build the project at the command line, use the command-line arguments captured above to duplicate the repro build. -1. Build your repro project, and confirm that the expected problem has occurred. +1. Build your repro project, and confirm that the expected problem occurred. 1. Close Visual Studio, if you used it to do the build. @@ -364,22 +364,25 @@ You have a couple of good ways to get your report to us. You can use Visual Stud ### Use the Report a Problem tool -The **Report a Problem** tool in Visual Studio is a way for Visual Studio users to report problems with just a few clicks. It pops up a simple form to send detailed information about the problem you've found. You can then submit your report without ever leaving the IDE. +The **Report a Problem** tool in Visual Studio is a way for Visual Studio users to report problems with just a few clicks. It pops up a simple form to send detailed information about the problem you found. You can then submit your report without ever leaving the IDE. Reporting your problem through the **Report a Problem** tool is easy and convenient from the IDE. You can access it from the title bar by choosing the **Send Feedback** icon next to the **Quick Launch** search box. Or, you can find it on the menu bar in **Help** > **Send Feedback** > **Report a Problem**. -When you choose to report a problem, first search the Developer Community for similar problems. In case your problem has been reported before, upvote the report and add comments with additional specifics. If you don't see a similar problem, choose the **Report new problem** button at the bottom of the Visual Studio Feedback dialog and follow the steps to report your problem. +When you choose to report a problem, first search the Developer Community for similar problems. In case your problem has been reported before, upvote the report and add comments with more specifics. If you don't see a similar problem, choose the **Report new problem** button at the bottom of the Visual Studio Feedback dialog and follow the steps to report your problem. ### Use the Visual Studio Developer Community pages The Visual Studio Developer Community pages are another convenient way to report problems and find solutions for Visual Studio and the C++ compiler, tools, and libraries. There are specific Developer Community pages for [Visual Studio](https://aka.ms/feedback/report?space=8), [Visual Studio for Mac](https://aka.ms/feedback/report?space=41), [.NET](https://aka.ms/feedback/report?space=61), [C++](https://aka.ms/feedback/report?space=62), [Azure DevOps](https://aka.ms/feedback/report?space=21), and [Azure DevOps Server](https://aka.ms/feedback/report?space=22). -Beneath the community tabs, near the top of each page, is a search box. You can use it to find posts that report problems similar to yours. You may find a solution or other useful information related to your problem is already available. If someone has reported the same problem before, then upvote and comment on that report, rather than create a new problem report. To comment, vote, or report a new problem, you may be asked to sign in to your Visual Studio account. The first time you sign in, you'll have to agree to give the Developer Community app access to your profile. +Beneath the community tabs, near the top of each page, is a search box. You can use it to find posts that report problems similar to yours. You may find a solution or other useful information related to your problem is already available. If someone has reported the same problem before, then upvote and comment on that report, rather than create a new problem report. To comment, vote, or report a new problem, you may be asked to sign in to your Visual Studio account. The first time you sign in, you have to agree to give the Developer Community app access to your profile. + +For issues with the C++ compiler, linker, and other tools and libraries, first search the [C++ Developer Community](https://aka.ms/vsfeedback/browsecpp) page. If you search for your problem, and it isn't already reported, choose the **Report a problem** button next to the search box. You can include your repro code and command line, screenshots, links to related discussions, and any other information you think is relevant and useful. -For issues with the C++ compiler, linker, and other tools and libraries, first search the [C++ Developer Community](https://aka.ms/vsfeedback/browsecpp) page. If you search for your problem, and it hasn't been reported before, choose the **Report a problem** button next to the search box. You can include your repro code and command line, screenshots, links to related discussions, and any other information you think is relevant and useful. +> [!TIP] +> Information in the initial Developer Community report will always be public. If this is a concern, see the next section about [Reports and privacy](#reports-and-privacy). > [!TIP] -> For other kinds of problems you might find in Visual Studio that are unrelated to the C++ toolset (For example, UI issues, broken IDE functionality, or general crashes), use the **Report a Problem** tool in the IDE. This is the best choice, due to its screenshot capabilities and its ability to record UI actions that lead to the problem you've found. These kinds of errors can also be looked up on the Visual Studio [Developer Community](https://aka.ms/feedback/report?space=8) site. For more information, see [How to report a problem with Visual Studio](/visualstudio/ide/how-to-report-a-problem-with-visual-studio). +> For other kinds of problems you might find in Visual Studio that are unrelated to the C++ toolset (For example, UI issues, broken IDE functionality, or general crashes), use the **Report a Problem** tool in the IDE. This is the best choice, due to its screenshot capabilities and its ability to record UI actions that lead to the problem you found. These kinds of errors can also be looked up on the Visual Studio [Developer Community](https://aka.ms/feedback/report?space=8) site. For more information, see [How to report a problem with Visual Studio](/visualstudio/ide/how-to-report-a-problem-with-visual-studio). ### Reports and privacy @@ -405,6 +408,6 @@ To maintain your privacy and keep your sensitive information out of public view, ## How to report a C++ documentation issue -We use GitHub issues to track problems reported in our documentation. You can now create GitHub issues directly from a content page, which enables you interact in a much richer way with writers and product teams. If you see an issue with a document, a bad code sample, a confusing explanation, a critical omission, or even just a typo, you can easily let us know. Scroll to the bottom of the page and select **Sign in to give documentation feedback**. You'll need to create a GitHub account if you don't have one already. When you have a GitHub account, you can see all of our documentation issues and their status. You also get notifications when changes are made for the issue you reported. For more information, see our [Feedback System blog entry](/teamblog/a-new-feedback-system-is-coming-to-docs). +We use GitHub issues to track problems reported in our documentation. You can now create GitHub issues directly from a content page, which enables you interact in a richer way with writers and product teams. If you see an issue with a document, a bad code sample, a confusing explanation, a critical omission, or even just a typo, you can easily let us know. Scroll to the bottom of the page and select **Sign in to give documentation feedback**. You need to create a GitHub account if you don't have one already. When you have a GitHub account, you can see all of our documentation issues and their status. You also get notifications when changes are made for the issue you reported. For more information, see our [Feedback System blog entry](/teamblog/a-new-feedback-system-is-coming-to-docs). -You create a documentation issue on GitHub when you use the documentation feedback button. The issue is automatically filled in with some information about the page you created the issue on. That's how we know where the problem is located, so don't edit this information. Just append the details about what's wrong, and if you like, a suggested fix. [Our C++ docs are open source](https://github.com/MicrosoftDocs/cpp-docs/), so if you'd like to submit a fix yourself, you can. For more information about how you can contribute to our documentation, see our [Contributing guide](https://github.com/MicrosoftDocs/cpp-docs/blob/master/CONTRIBUTING.md) on GitHub. +You create a documentation issue on GitHub when you use the documentation feedback button. The issue is automatically filled in with some information about the page you created the issue on. That's how we know where the problem is located, so don't edit this information. Just append the details about what's wrong, and if you like, a suggested fix. [Our C++ docs are open source](https://github.com/MicrosoftDocs/cpp-docs/), so if you'd like to submit a fix yourself, you can. For more information about how you can contribute to our documentation, see our [Contributing guide](https://github.com/MicrosoftDocs/cpp-docs/blob/main/CONTRIBUTING.md) on GitHub. diff --git a/docs/overview/languages-cpp.md b/docs/overview/languages-cpp.md index b02dc239e2..8618404b3e 100644 --- a/docs/overview/languages-cpp.md +++ b/docs/overview/languages-cpp.md @@ -1,8 +1,8 @@ --- -description: "Learn more about: Languages" title: "Languages" -ms.date: "03/29/2019" -helpviewer_keywords: ["C lanugage", "C++ Language", "Assembly Language", "Compiler Intrinsics"] +description: "Learn more about: Languages" +ms.date: 03/29/2019 +helpviewer_keywords: ["C language", "C++ Language", "Assembly Language", "Compiler Intrinsics"] --- # Languages diff --git a/docs/overview/media/build-insights-filter-by-project.png b/docs/overview/media/build-insights-filter-by-project.png new file mode 100644 index 0000000000..4a2f902081 Binary files /dev/null and b/docs/overview/media/build-insights-filter-by-project.png differ diff --git a/docs/overview/media/build-insights-run-on-selected-files.png b/docs/overview/media/build-insights-run-on-selected-files.png new file mode 100644 index 0000000000..1a5c0f8556 Binary files /dev/null and b/docs/overview/media/build-insights-run-on-selected-files.png differ diff --git a/docs/overview/media/build-insights-view-explanations.png b/docs/overview/media/build-insights-view-explanations.png new file mode 100644 index 0000000000..3b33e677bc Binary files /dev/null and b/docs/overview/media/build-insights-view-explanations.png differ diff --git a/docs/overview/media/cmake-intellisense.png b/docs/overview/media/cmake-intellisense.png new file mode 100644 index 0000000000..7f55a9ca39 Binary files /dev/null and b/docs/overview/media/cmake-intellisense.png differ diff --git a/docs/overview/media/cmake-module-intellisense.png b/docs/overview/media/cmake-module-intellisense.png new file mode 100644 index 0000000000..0d66cfc4df Binary files /dev/null and b/docs/overview/media/cmake-module-intellisense.png differ diff --git a/docs/overview/media/command-line-argument-dropdown.png b/docs/overview/media/command-line-argument-dropdown.png new file mode 100644 index 0000000000..9f38ed0e6f Binary files /dev/null and b/docs/overview/media/command-line-argument-dropdown.png differ diff --git a/docs/overview/media/copilot-fix-my-code-suggestion.png b/docs/overview/media/copilot-fix-my-code-suggestion.png new file mode 100644 index 0000000000..6f9ffb6cbc Binary files /dev/null and b/docs/overview/media/copilot-fix-my-code-suggestion.png differ diff --git a/docs/overview/media/copilot-fix-my-code.png b/docs/overview/media/copilot-fix-my-code.png new file mode 100644 index 0000000000..480b05db75 Binary files /dev/null and b/docs/overview/media/copilot-fix-my-code.png differ diff --git a/docs/overview/media/copilot-rename.png b/docs/overview/media/copilot-rename.png new file mode 100644 index 0000000000..7919d0d70a Binary files /dev/null and b/docs/overview/media/copilot-rename.png differ diff --git a/docs/overview/media/copilot-smart-variable-explanation.png b/docs/overview/media/copilot-smart-variable-explanation.png new file mode 100644 index 0000000000..6d39d04e0d Binary files /dev/null and b/docs/overview/media/copilot-smart-variable-explanation.png differ diff --git a/docs/overview/media/copilot-smart-variable-inspection.png b/docs/overview/media/copilot-smart-variable-inspection.png new file mode 100644 index 0000000000..8680b64068 Binary files /dev/null and b/docs/overview/media/copilot-smart-variable-inspection.png differ diff --git a/docs/overview/media/debugger-inline-return-values.png b/docs/overview/media/debugger-inline-return-values.png new file mode 100644 index 0000000000..5a56492bbe Binary files /dev/null and b/docs/overview/media/debugger-inline-return-values.png differ diff --git a/docs/overview/media/github-copilot-quick-info.png b/docs/overview/media/github-copilot-quick-info.png new file mode 100644 index 0000000000..c01f573bbb Binary files /dev/null and b/docs/overview/media/github-copilot-quick-info.png differ diff --git a/docs/overview/media/include-diagnostics-improved.png b/docs/overview/media/include-diagnostics-improved.png new file mode 100644 index 0000000000..326070a28e Binary files /dev/null and b/docs/overview/media/include-diagnostics-improved.png differ diff --git a/docs/overview/media/model-picker.png b/docs/overview/media/model-picker.png new file mode 100644 index 0000000000..287be12cea Binary files /dev/null and b/docs/overview/media/model-picker.png differ diff --git a/docs/overview/media/vs2022-copilot-comment-example.png b/docs/overview/media/vs2022-copilot-comment-example.png new file mode 100644 index 0000000000..523959124d Binary files /dev/null and b/docs/overview/media/vs2022-copilot-comment-example.png differ diff --git a/docs/overview/media/vs2022-copilot-edit-session-example.png b/docs/overview/media/vs2022-copilot-edit-session-example.png new file mode 100644 index 0000000000..4d154f0bd0 Binary files /dev/null and b/docs/overview/media/vs2022-copilot-edit-session-example.png differ diff --git a/docs/overview/media/vs2022-copilot-edit-session.png b/docs/overview/media/vs2022-copilot-edit-session.png new file mode 100644 index 0000000000..d4a5e14951 Binary files /dev/null and b/docs/overview/media/vs2022-copilot-edit-session.png differ diff --git a/docs/overview/media/vs2022-copilot-git-changes-review.png b/docs/overview/media/vs2022-copilot-git-changes-review.png new file mode 100644 index 0000000000..b42accbd5f Binary files /dev/null and b/docs/overview/media/vs2022-copilot-git-changes-review.png differ diff --git a/docs/overview/toc.yml b/docs/overview/toc.yml index eb098aa480..66d418921e 100644 --- a/docs/overview/toc.yml +++ b/docs/overview/toc.yml @@ -12,8 +12,6 @@ items: href: ../overview/what-s-new-for-cpp-2019.md - name: What's new for C++ in Visual Studio 2017 href: ../overview/what-s-new-for-cpp-2017.md - - name: What's new for Microsoft C++ docs - href: ../overview/whats-new-cpp-docs.md - name: C++ conformance improvements in Visual Studio 2022 href: ../overview/cpp-conformance-improvements.md - name: C++ conformance improvements in Visual Studio 2019 diff --git a/docs/overview/visual-cpp-language-conformance.md b/docs/overview/visual-cpp-language-conformance.md index 0996e5c48c..f24433753c 100644 --- a/docs/overview/visual-cpp-language-conformance.md +++ b/docs/overview/visual-cpp-language-conformance.md @@ -87,7 +87,7 @@ For details on conformance improvements, see [C++ conformance improvements in Vi |  [`P1825R0 Merged wording for P0527R1 and P1155R3, more implicit moves`](https://wg21.link/p1825r0) | VS 2019 16.4 [17](#note_17) | |  [`P0929R2 Checking for abstract class types`](https://wg21.link/P0929R2) | VS 2019 16.5 [17](#note_17) | |  [`P0962R1 Relaxing the range-for loop customization point finding rules`](https://wg21.link/p0962r1) | VS 2019 16.5 [17](#note_17) | -|  [`P0859R0 CWG 1581: When are constexpr member functions defined`](https://wg21.link/p0859r0) | Partial in VS 2019 16.7 [E](#note_E) | +|  [`P0859R0 CWG 1581: When are constexpr member functions defined`](https://wg21.link/p0859r0) | Partial in VS 2019 16.7 [E](#note_E), Full in VS 2022 17.1 | |  [`P1009R2 Array size deduction in new-expressions`](https://wg21.link/P1009R2) | VS 2019 16.7 [17](#note_17) | |  [`P1286R2 Contra CWG DR1778`](https://wg21.link/P1286R2) | VS 2019 16.8 [17](#note_17) | | **C++20 Core language features** | **Supported** | @@ -530,8 +530,8 @@ A group of papers listed together indicates a Standard feature along with one or |  Alignment specifiers `` | VS 2019 16.8 [C11](#note_C11), [2104](#note_2104) | |  `aligned_alloc` | No [M](#note_M) | |  No return specifiers `` | VS 2019 16.8 [C11](#note_C11), [2104](#note_2104) | -|  Threading support `` | No | -|  Atomic support `` | No | +|  Threading support `` | yes | +|  Atomic support `` | experimental | |  `char16_t`, `char32_t` `` | VS 2019 16.8 [C11](#note_C11) | |  `gets()` removed | VS 2019 16.8 [C11](#note_C11), [N](#note_N) | |  `gets_s()` | VS 2019 16.8 [C11](#note_C11) | @@ -541,6 +541,7 @@ A group of papers listed together indicates a Standard feature along with one or |  `quick_exit` | VS 2019 16.8 [C11](#note_C11) | |  `` macros | VS 2019 16.8 [C11](#note_C11) | |  floating point characteristics `` | VS 2019 16.8 [C11](#note_C11) | +|  C11 threads `` | VS 2022 17.8 [C11](#note_C11) | ### Supported values @@ -576,7 +577,7 @@ A group of papers listed together indicates a Standard feature along with one or **A** In [`/std:c++14`](../build/reference/std-specify-language-standard-version.md) mode, dynamic exception specifications remain unimplemented, and `throw()` is still treated as a synonym for `__declspec(nothrow)`. In C++17, dynamic exception specifications were mostly removed by P0003R5, except for one vestige: `throw()` is deprecated and required to behave as a synonym for **`noexcept`**. In [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) mode, MSVC now conforms to the Standard by giving `throw()` the same behavior as **`noexcept`**, that is, enforcement via termination. -The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md) requests the old behavior of `__declspec(nothrow)`. It's likely that `throw()` will be removed in a future version of C++. To help with migrating code in response to these changes in the Standard and the Microsoft implementation, new compiler warnings for exception specification issues have been added under [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and [`/permissive-`](../build/reference/permissive-standards-conformance.md). +The compiler option [`/Zc:noexceptTypes`](../build/reference/zc-noexcepttypes.md) requests the old behavior of `__declspec(nothrow)`. It's likely that `throw()` will be removed in a future version of C++. To help with migrating code in response to these changes in the Standard and the Microsoft implementation, new compiler warnings for exception specification issues are added under [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) and [`/permissive-`](../build/reference/permissive-standards-conformance.md). **B** Supported in [`/permissive-`](../build/reference/permissive-standards-conformance.md) mode in Visual Studio 2017 version 15.7. For more information, see [`Two-phase name lookup support comes to MSVC`](https://devblogs.microsoft.com/cppblog/two-phase-name-lookup-support-comes-to-msvc/). diff --git a/docs/overview/visual-cpp-samples.md b/docs/overview/visual-cpp-samples.md index ab94351935..3898b2ae6c 100644 --- a/docs/overview/visual-cpp-samples.md +++ b/docs/overview/visual-cpp-samples.md @@ -1,11 +1,11 @@ --- title: "Visual Studio C++ Samples" -description: "Summary descriptions of the samples available in the archived Visual Studio C++ samples repository on GitHub." -ms.date: "03/23/2020" +description: "Learn about the samples available in the archived Visual Studio C++ samples repository on GitHub." +ms.date: 03/25/2025 ms.service: "visual-cpp" ms.subservice: "cpp-lang" --- -# Visual Studio C++ Samples +# Visual Studio C++ samples Samples for Visual Studio C++ are available on the web. Microsoft has produced many C++ samples that demonstrate different functionalities across multiple technologies. Here are a few of the places to find additional samples: @@ -21,7 +21,24 @@ Samples for Visual Studio C++ are available on the web. Microsoft has produced m ## Archived C++ samples on GitHub -Visual Studio included C++ sample code in previous versions. The sample code was either installed with Visual Studio, or was available as a separate download. Many articles in our documentation refer to these samples. They don't get installed by Visual Studio anymore. Instead, a repository is available on GitHub. The tables below have descriptions for each sample, and links to the sample's directory in the repository. +Previous versions of Visual Studio included C++ sample code. The sample code was either installed with Visual Studio, or was available as a separate download. Many articles in our documentation refer to these samples. They don't get installed by Visual Studio anymore. Instead, a repository is available on GitHub. The following tables have descriptions for each sample, and links to the sample's directory in the repository. + +- [ATL samples](#atl-samples) +- [CLR and language samples](#clr-and-language-samples---windows-forms) +- [COM events samples](#com-events-samples) +- [ComTypeLibfor7 samples](#comtypelibfor7-samples) +- [Compiler samples](#compiler-samples) +- [CRT samples](#crt-samples) +- [Debugging samples](#debugging-samples) +- [Fusion samples](#fusion-samples) +- [Hilo sample](#hilo-sample) +- [International samples](#international-samples) +- [Language samples](#language-samples---general) +- [MFC samples](#mfc-samples) +- [ODBC samples](#odbc-samples) +- [OS samples](#os-samples) +- [Unix samples](#unix-samples) +- [Windows 8 samples](#windows-8-samples) [!INCLUDE[note_security_samplecode](includes/note_security_samplecode_md.md)] @@ -34,10 +51,10 @@ Visual Studio included C++ sample code in previous versions. The sample code was | [ActiveDoc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Demonstrates how to implement an Active Document Server. | | [Async](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Downloads data asynchronously from a URL. | | [ATLButton](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Creates a button that displays itself with three different bitmaps depending on its state. | -| [ATLDuck](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Demonstrates using connection points with ATL controls. | +| [ATLDuck](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Demonstrates how to use connection points with ATL controls. | | [ATLSecurity](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Shows how to use the ATL security classes to examine security settings. | | [ATLTraceTool](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Displays the output generated by the `ATLTRACE2` macro. | -| [Connect](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Illustrates the implementation and use of connection points (the IConnectionPointContainer and IConnectionPoint interfaces) in a multithreaded environment. | +| [Connect](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Illustrates the implementation and use of connection points (the `IConnectionPointContainer` and `IConnectionPoint` interfaces) in a multithreaded environment. | | [CThreadPool](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Shows how to use a thread pool in an application and how implementing a thread pool can improve the application's performance. | | [DCOM](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Demonstrates how to call a COM object (implemented in a Windows service) from multiple clients, running on different machines. | | [MFCATL](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/Advanced) | Illustrates how ATL COM objects can be used in an MFC server EXE. | @@ -72,7 +89,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was |--|--| | [CatDB](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/OLEDB/Consumer) | Displays the schema information, such as tables and columns, of OLE DB providers. | | [DBViewer](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/OLEDB/Consumer) | Demonstrates a mid-level application that relies on the `CManualAccessor` class to take full control of data bindings for your applications. | -| [DynamicConsumer](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/OLEDB/Consumer) | Demonstrates using dynamic accessor and schema rowset classes to read metadata from a database. | +| [DynamicConsumer](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/OLEDB/Consumer) | Demonstrates how to use dynamic accessor and schema rowset classes to read metadata from a database. | | [MultiRead](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ATL/OLEDB/Consumer) | Reads through a table in a database using multiple threads. | ### ATL samples - OLEDB - Provider @@ -88,7 +105,6 @@ Visual Studio included C++ sample code in previous versions. The sample code was |--|--| | [BirthdayPicker](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/Language/Windows%20Forms) | Shows how the .NET Framework resource mechanism can be used in C++ applications. It also demonstrates some common Window Forms components. | | [Calculator](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/Language/Windows%20Forms) | Implements a simple pocket calculator using C++ and the .NET Framework Windows Forms classes. | -| Scribble (using MFC) | An MFC implementation of the Scribble sample, updated and extended to include new .NET functionality. | | [Scribble (Windows Forms)](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/Language/General) | A Windows Forms implementation of the Scribble sample, updated and extended to include new .NET functionality. | | [STLCLR](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/CLR/stlclr/StlClr%20Sample) | Demonstrates some of the capabilities available when using the STL/CLR Library. | @@ -109,9 +125,9 @@ Visual Studio included C++ sample code in previous versions. The sample code was | [Connect](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Illustrates the use and implementation of connection points (the `IConnectionPointContainer` and `IConnectionPoint` interfaces) in a multithreaded environment. | | [DCOM](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates how to call a COM object (implemented in a Windows service) from multiple clients, running on different computers. | | [FreeThrd](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates a multithreaded client and free-threaded server with compiler COM support. | -| [InProc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates an in-process Automation server application with compiler COM support. | +| [InProc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates an in-process automation server application with compiler COM support. | | [Labrador](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Implements an EXE server that doesn't have any user interface. | -| [MFCCalc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates an Automation server application with compiler COM support. | +| [MFCCalc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/ComTypeLibfor7) | Demonstrates an automation server application with compiler COM support. | ## Compiler samples @@ -119,7 +135,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was | Sample name | Description | |--|--| -| [ccWrapper](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/Compiler) | Demonstrates how to map C/C++ compiler flags from other compilers to the Visual C++ compiler (cl.exe). | +| [ccWrapper](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/Compiler) | Demonstrates how to map C/C++ compiler flags from other compilers to the Visual C++ compiler (`cl.exe`). | ### Compiler samples - MASM @@ -137,10 +153,10 @@ Visual Studio included C++ sample code in previous versions. The sample code was |--|--| | [CPUID](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Determines the capabilities of the CPU being run. | | [CRT_Dbg1](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Illustrates the basic debugging features of the C run-time libraries. | -| [CRT_Dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Demonstrates the C run-time debugging hook functions. | +| [CRT_Dbg2](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Demonstrates the C runtime debugging hook functions. | | [DFACObjs](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Shows how to use the _CrtDoForAllClientObjects C run-time function to iterate through a linked list of client objects. | -| [Report](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Illustrates the C run-time debugging report functions. | -| [RTC](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Demonstrates the run-time error checks feature. | +| [Report](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Illustrates the C runtime debugging report functions. | +| [RTC](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | Demonstrates the runtime error checks feature. | | [SecureCRT](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/crt) | This sample demonstrates how to upgrade code that used deprecated CRT functions to increase code security. | ## Debugging samples @@ -159,7 +175,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was | Sample name | Description | |--|--| -| [Hilo](https://github.com/Microsoft/VCSamples/tree/master/VC2013Samples/Hilo) | Hilo is a series of articles and sample applications. They demonstrate the power of Windows 7, Visual Studio and C++ to build high performance, responsive client applications. Hilo provides both source code and guidance that will help you design and develop compelling, touch-enabled Windows applications of your own.

This sample has been updated for Visual Studio 2013. It includes a hot fix to the *AsyncLoaderMemoryManager.cpp* file (in lines 36 and 37), which addresses a common crash issue. | +| [Hilo](https://github.com/Microsoft/VCSamples/tree/master/VC2013Samples/Hilo) | Hilo is a series of articles and sample applications. They demonstrate the power of Windows 7, Visual Studio and C++ to build high performance, responsive client applications. Hilo provides both source code and guidance that help you design and develop compelling, touch-enabled Windows applications of your own. | ## International samples @@ -201,13 +217,13 @@ Visual Studio included C++ sample code in previous versions. The sample code was | Sample name | Description | |--|--| | [Button](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates use of an in-place active menu, a stock property page, and the About box control option. | -| [Circ](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates ActiveX control basics. These include control painting, stock and custom properties, stock and custom events, use of colors and fonts, the stock Font property page, the default property page, and versioning. | +| [Circ](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates ActiveX control basics. These include control painting, stock and custom properties, stock and custom events, use of colors and fonts, the stock font property page, the default property page, and versioning. | | [CmnCtrl](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates some of the new controls available with MFC on wiprlhext: The command link button (`CButton`), the pager control (`CPagerCtrl`), the split button (`CSplitButton`), and the network address control (`CNetAddressCtrl`). | | [Contain](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates a Visual Editing Container Application. | | [Image](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates how to use MFC to build an ActiveX control that downloads data asynchronously. | | [Licensed](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | A control that enforces use of a design-time and run-time license. | | [Localize](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | A control with a localized user interface that demonstrates use of separate type libraries and resource dynamic-link libraries (DLLs) for localization. | -| [NetAddr](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates use of the Windows Vista "Net Address Verifier" control. | +| [NetAddr](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates use of the Windows Vista *Net Address Verifier* control. | | [Pal](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Control that displays the colors of a palette. It demonstrates read-only properties, persistent Get/Set properties, persistent parameterized properties, and picture properties. | | [Push](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Control subclassed from a Windows owner-drawn button control. It demonstrates stock properties, custom events, and picture holders. | | [RegSvr](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/controls) | Demonstrates the invocation of Self-Registration Code. | @@ -227,7 +243,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was | [CtrlBars](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Custom toolbar and status bar, dialog bar, and floating palette. | | [CtrlTest](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Owner-draw list box and menu, custom control, bitmap button, spin control. | | [DBVList](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Uses the `CListView` and `CDaoRecordset` classes to implement the virtual list view functionality available for the list view common control. | -| [DIBLook](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Demonstrates the Use of DIBs and Color Palettes. | +| [DIBLook](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Demonstrates the use of DIBs and color palettes. | | [DlgCbr32](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Adding a toolbar and a status bar to a dialog-based application. | | [DlgTempl](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Demonstrates the dynamic creation of dialog templates. | | [DockTool](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/general) | Dragging and floating toolbars that are dockable. | @@ -258,23 +274,23 @@ Visual Studio included C++ sample code in previous versions. The sample code was |--|--| | [DHTMLExplore](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/internet) | Demonstrates handling DHTML events and using DHTML DDX. | | [HTMLEdit](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/internet) | Wraps the Internet Explorer MSHTML editing control. | -| [MFCIE](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/internet) | Demonstrates the MFC `CHtmlView` and `CReBar` Classes. | +| [MFCIE](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/internet) | Demonstrates the MFC `CHtmlView` and `CReBar` classes. | | [Scheduler](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/internet) | Demonstrates how to create an HTML-based dialog box using the Visual C++ libraries classes. | ### MFC samples - OLE | Sample name | Description | |--|--| -| [ACDual](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Demonstrates how to add dual interface support to an MFC-based Automation server. | -| [AutoClik](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Illustrates Automation features. Includes AUTODRIV, a simple Automation client application that drives the AUTOCLIK sample application. | +| [ACDual](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Demonstrates how to add dual interface support to an MFC-based automation server. | +| [AutoClik](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Illustrates automation features. Includes AUTODRIV, a simple Automation client application that drives the AUTOCLIK sample application. | | [CalcDriv](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Automation client. | | [DrawCli](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Full-featured object-oriented drawing application that is also an ActiveX Visual Editing container. | -| [HierSvr](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Demonstrates a Server Application with OLE Drag and Drop. | -| [InProc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | An in-process Automation server that can be loaded as a DLL in the client's address space. | -| [IPDrive](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | A simple Automation client application that drives the INPROC sample application. | -| [MFCBind](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Shows how to create an Active document (formerly known as a DocObject) container. | -| [MFCCalc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | An Automation server that implements a simple calculator. | -| [OClient](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | ActiveX Visual Editing container application, with drag and drop. | +| [HierSvr](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Demonstrates a server application with OLE Drag and Drop. | +| [InProc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | An in-process automation server that can be loaded as a DLL in the client's address space. | +| [IPDrive](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | A simple automation client application that drives the INPROC sample application. | +| [MFCBind](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Shows how to create an active document (formerly known as a DocObject) container. | +| [MFCCalc](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | An automation server that implements a simple calculator. | +| [OClient](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | ActiveX visual editing container application, with drag and drop. | | [OLEView](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Implementing an OLE object browser through custom OLE interfaces. | | [SuperPad](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Demonstrates a visual editing server that edits text using CEditView. | | [TstCon](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/ole) | Implements an ActiveX control container using MFC's support for OLE embedding. You can use TSTCON to test ActiveX controls, change their properties, and invoke their methods. | @@ -306,7 +322,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was | [OutlookDemo](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Demonstrates how to create an application similar to Outlook 2003/2007. | | [OutlookMultiViews](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Demonstrates how to switch between multiple views on a single document in an SDI application. The sample uses the Outlook bar control to list the available views and switch between them. | | [OwnerDrawMenu](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Illustrates how to draw popup menu items dynamically. | -| [PaletteDemo](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Illustrates how to create a multi-column toolbar with an owner-draw information area. Click 2, 3 or 4 buttons on the Standard toolbar to change at runtime the number of columns of the custom toolbar. | +| [PaletteDemo](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Illustrates how to create a multi-column toolbar with an owner-draw information area. Click 2, 3, or 4 buttons on the Standard toolbar to change at runtime the number of columns of the custom toolbar. | | [PropSheetDemo](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Illustrates the following types of Property Sheet control: simple, with tabs at the left side, with tree control at the left side, OneNote-style tabs, list of items at the left side. | | [RebarTest](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Demonstrates a customizable Rebar control that hosts a toolbar. | | [RibbonGadgets](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack) | Illustrates various controls that can be hosted in the Ribbon Control. At the bottom of the main frame, you can find the Source Code window with source code text, which outlines how to create a particular gadget. | @@ -349,7 +365,7 @@ Visual Studio included C++ sample code in previous versions. The sample code was | Sample name | Description | |--|--| -| [Unix - ccWrapper](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples) | Demonstrates a wrapper that maps flags from the Sun Forte and gcc compilers to the Microsoft Visual C++ compiler (cl.exe). | +| [Unix - ccWrapper](https://github.com/Microsoft/VCSamples/tree/master/VC2010Samples) | Demonstrates a wrapper that maps flags from the Sun Forte and gcc compilers to the Microsoft Visual C++ compiler (`cl.exe`). | ## Windows 8 samples @@ -362,27 +378,27 @@ More information is available about the programming models, platforms, languages | [Background Transfer sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the power-friendly, cost-aware, and flexible behavior of the Background Transfer API for Windows Runtime applications. Provided sample scenarios cover file downloads and uploads. | | [CryptoWinRT sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the new Cryptography APIs. | | [Print sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how apps can integrate the Windows print experience. The scenarios demonstrated in this sample include: Printing from the app by using the charms bar and the print contract, Printing from within the app experience, and more. | -| [HttpClient sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the use of the HttpClient class and the IXMLHTTPRequest2 interface to upload and download various types of content from an HTTP server using the networking features provided by the Windows Runtime. | -| [Accelerometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Accelerometer` API. This sample allows the user to view the acceleration forces along the X-, Y-, and Z-axes for a 3-axis accelerometer. You can choose one of three scenarios. | +| [HttpClient sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the use of the `HttpClient` class and the `IXMLHTTPRequest2` interface to upload and download various types of content from an HTTP server using the networking features provided by the Windows Runtime. | +| [Accelerometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Accelerometer` API. This sample allows the user to view the acceleration forces along the X-, Y-, and Z-axes for a three-axis accelerometer. You can choose one of three scenarios. | | [Account picture name sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates different ways of getting the name of the user that is currently logged in. It also demonstrates how to get and set the image used for the user's tile. | | [App settings sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the ApplicationSettings API and settings flyouts to integrate an app's settings UI with the Settings charm. The sample uses the `Windows.UI.ApplicationSettings` namespace and `WinJS.UI.SettingsFlyout`. | | [Windows Store device app for camera sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to create a Windows Store device app for a camera. A Windows Store device app is provided by an IHV or OEM to differentiate the capture experience for a particular camera. | | [Getting started with C++ simple blog reader sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The sample demonstrates some basic principles of Windows Store app development in native C++ using XAML to define the user interface. It's a complete working version of the application discussed on the Windows Developer Center. | -| [Reading and writing data sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the DataReader and DataWriter classes to store and retrieve data. | +| [Reading and writing data sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `DataReader` and `DataWriter` classes to store and retrieve data. | | [Application data sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows you how to store and retrieve data that is specific to each user and Windows Store app using the Windows Runtime application data APIs. Application data includes session state, user preferences, and other settings. | -| [Custom driver access sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use CreateDeviceAccessInstance and IDeviceIoControl to access a specialized device. | +| [Custom driver access sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use `CreateDeviceAccessInstance` and `IDeviceIoControl` to access a specialized device. | | [XAML ListView and GridView essentials sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the GridView and ListView controls. | | [Animation metrics sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the Animation Metrics APIs in `Windows.UI.Core.AnimationMetrics` to access the raw parameters that define the animations in the Windows Animation Library. | -| [Playback Manager msAudioCategory sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to select the correct msAudioCategory category for an audio-video (AV) stream to configure it as an audio playback stream. | +| [Playback Manager msAudioCategory sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to select the correct `msAudioCategory` category for an audio-video (AV) stream to configure it as an audio playback stream. | | [XAML DirectX 3D shooting game sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the implementation of a simple first person 3-D game using DirectX (Direct3D 11.1, Direct2D, XInput, and XAudio2) and XAML in a C++ app. XAML is used for the heads-up display and game state messages. | | [XAML scrolling, panning, and zooming sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the ScrollViewer control to pan and zoom. | | [XAML FlipView control sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the FlipView control to enable users to flip through a collection. | -| [Gyrometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Gyrometer` API. This sample allows the user to view the angular velocity along the X-, Y-, and Z-axis for a 3-axis gyrometer. | +| [Gyrometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Gyrometer` API. This sample allows the user to view the angular velocity along the X-, Y-, and Z-axis for a three-axis gyrometer. | | [Device app for printers SDK sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to create a device app for printers that can be activated from the tile contract, the printTaskSettings contract, and from toast displayed by backgroundTask in response to print driver event. | | [Background task sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows you how to create and register background tasks using the Windows Runtime background task API. A background task is triggered by a system or time event, and can be constrained by one or more conditions. | -| [StreamSocket sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the basics of the StreamSocket class using the networking features provided by the Windows Runtime. The client component of the sample creates a TCP socket to make a network connection, uses the socket to send data, and more. | +| [StreamSocket sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the basics of the `StreamSocket` class using the networking features provided by the Windows Runtime. The client component of the sample creates a TCP socket to make a network connection, uses the socket to send data, and more. | | [Scheduled notifications sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use scheduled and recurring tile updates and toast notifications for an app. This ability enables you to specify a precise time to deliver the notification, even if the app isn't running. | -| [Playback Manager Companion Sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to select the correct msAudioCategory category for an audio-video stream to configure it as an audio playback stream. | +| [Playback Manager Companion Sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to select the correct `msAudioCategory` category for an audio-video stream to configure it as an audio playback stream. | | [OrientationSensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.OrientationSensor` API. It allows the user to view the rotation matrix and Quaternion values that reflect the current device orientation. | | [File access sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to create, read, write, copy and delete a file, how to retrieve file properties, and how to track a file or folder so that your app can access it again. This sample uses `Windows.Storage` and `Windows.Storage.AccessCache` API. | | [Removable storage sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The removable storage sample demonstrates how to transfer files to and from removable storage devices. This sample requires a removable storage device connected to the system, such as a camera, media player, cellular phone, or a USB thumb drive. | @@ -397,7 +413,7 @@ More information is available about the programming models, platforms, languages | [DirectX 3D shooting game sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the implementation of a simple first person 3-D game using DirectX (Direct3D 11.1, Direct2D, XInput, and XAudio2) in a C++ app. | | [XAML AppBar control sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the AppBar control to present navigation, commands, and tools to users. The app bar is hidden by default and appears when users swipe a finger from the top or bottom edge of the screen. | | [Date and time formatting sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the DateTimeFormatter class in the `Windows.Globalization.DateTimeFormatting` namespace to display dates and times according to the user's preferences. | -| [Secondary tiles sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to pin and use a secondary tile. That's a tile that directly accesses a specific, non-default section or experience within an app, such as a saved game, or a specific friend in a social networking app. | +| [Secondary tiles sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to pin and use a secondary tile. That's a tile that directly accesses a specific, nondefault section or experience within an app, such as a saved game, or a specific friend in a social networking app. | | [Input Touch hit testing sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample uses a polygon shapes puzzle to demonstrate how to handle pointer input, implement custom hit testing for touch input, and process manipulations in a Windows Store app using C++ and DirectX. | | [Network information sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the Windows Runtime Network Information APIs. | | [Input Simplified ink sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use ink functionality in Windows Store apps. | @@ -406,11 +422,11 @@ More information is available about the programming models, platforms, languages | [Check if current session is remote sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the use of `Windows.System.RemoteDesktop` API. | | [Application resources and localization sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use application resources to separate localizable content from application code. The sample uses the `Windows.ApplicationModel.Resources.Core` and `Windows.Globalization` namespaces, and `WinJS.Resources`. | | [Context menu sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to create a context menu and how to replace the default context menu for text. This sample uses `Windows.UI.Popups` API, including the PopupMenu and the oncontextmenu event. | -| [Geolocation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The Geolocation sample demonstrates how to use the Geolocation API to get the geographic location of the user's PC. An app can use the Geolocation API to get location one time, or it can continuously track the location. | +| [Geolocation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The Geolocation sample demonstrates how to use the Geolocation API to get the geographic location of the user's PC. An app can use the `Geolocation` API to get location one time, or it can continuously track the location. | | [Message dialog sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use a MessageDialog for displaying dialogs, setting commands and their actions, and changing the default button. The `Windows.UI.Popups` namespace contains the MessageDialog class. | | [MediaStreamSource media extension sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to support the Microsoft Silverlight MediaStreamSource concept in a Windows Store app. | | [DirectWrite vertical text sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample uses DirectWrite and Direct2D to properly display vertical text in a custom layout shape. | -| [DXGI swap chain rotation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the IDXGISwapChain1::SetRotation method and how you can use the method in conjunction with prerotated content to improve presentation performance. | +| [DXGI swap chain rotation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the IDXGISwapChain1::SetRotation method and how you can use the method with prerotated content to improve presentation performance. | | [Direct2D custom image effects sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to implement custom Direct2D Effects using standard pixel, vertex, and compute shaders. | | [DirectX touch input sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates touch and mouse navigation of a 3-D environment in a C++ app with Direct3D. | | [XInput game controller sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the use of the XInput APIs in a C++ app. It reads input from an Xbox game controller and displays data about the analog stick movements and button presses. | @@ -425,14 +441,14 @@ More information is available about the programming models, platforms, languages | [Display orientation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the `DisplayProperties` class to set the display orientation in an app. | | [Direct2D interpolation modes sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows the various interpolation modes used by Direct2D. | | [Globalization preferences sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the `Windows.System.UserProfile.GlobalizationPreferences` class to obtain the user's globalization preferences. It also shows how to use the `GeographicRegion` and `Language` classes. | -| [Direct2D geometry realization sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how multi-core geometry tessellation can help reduce geometry rendering time. Using opacity masks and meshes is an alternative to traditional geometry rendering that may be better in some situations. | +| [Direct2D geometry realization sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how multi-core geometry tessellation can help reduce geometry rendering time. Using opacity masks and meshes is an alternative to traditional geometry rendering that might be better in some situations. | | [Language font mapping sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to obtain language-specific font recommendations using the `LanguageFontGroup` class in the `Windows.Globalization.Fonts` namespace. | -| [Inclinometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Inclinometer` API. This sample allows the user to view the angles of incline about the X-, Y-, and Z-axis for a 3-axis inclinometer. | +| [Inclinometer sensor sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Devices.Sensors.Inclinometer` API. This sample allows the user to view the angles of incline about the X-, Y-, and Z-axis for a three-axis inclinometer. | | [XAML high contrast style sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates various techniques for implementing support for high contrast mode in your app. Support for high contrast mode is important to make your app accessible to people with eyesight problems. | | [Input Device capabilities sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to query the input devices that are connected to the user's device. And, how to support the pointer, touch, pen/stylus, mouse, and keyboard input modes of Windows Store apps. | | [EAS policies for mail clients sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how mail clients can retrieved device information and work with supplied Exchange Active Sync (EAS) policies. Windows Store apps can configure their mail clients to stay compliant with the given EAS policies. | | [DatagramSocket sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the basics of the `DatagramSocket` class using the networking features provided by the Windows Runtime. The client component of the sample creates a UDP socket, uses the socket to send and receive data, and closes the socket. | -| [DirectWrite hello world sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use DirectWrite and Direct2D to render the text "Hello World" to a `CoreWindow`. | +| [DirectWrite hello world sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use DirectWrite and Direct2D to render the text *Hello World* to a `CoreWindow`. | | [Compression sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to read structured data from a file and write compressed data to a new file and how to read compressed data and write decompressed data to a new file. Many applications need to compress and decompress data. | | [Network status background sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to determine a change in Internet connection profile by registering a background task handler for Network Status Change event using an Internet Present condition. | | [App package information sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows you how to get package information using the Windows Runtime packaging API. Users acquire your Windows Store app as an app package. Windows uses the information in an app package to install the app on a per-user basis. | @@ -473,7 +489,7 @@ More information is available about the programming models, platforms, languages | [Playlist sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to create, save, display, and edit a playlist of audio files. This sample uses classes that are in the `Windows.Media.Playlists` namespace. | | [Media Server client sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to create a Media Server client using the Media Server API. The Media Server sample demonstrates how to browse a Digital Media Server programmatically on your local network, and display all of its video files. | | [Direct2D magazine app sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use Direct2D, DirectWrite, Windows Imaging Component (WIC), and XAML to build an app with a magazine-type presentation. | -| [Mobile broadband account and device management sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the Windows 8 Mobile Broadband API (`Windows.Networking.NetworkOperators`) employed by Mobile Network Operators (MNO). It demonstrates how to use the MobileBroadbandAccount APIs to retrieve and display available Mobile Broadband accounts. | +| [Mobile broadband account and device management sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the Windows 8 Mobile Broadband API (`Windows.Networking.NetworkOperators`) employed by Mobile Network Operators (MNO). It demonstrates how to use the `MobileBroadbandAccount` APIs to retrieve and display available Mobile Broadband accounts. | | [Proximity sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the `PeerFinder` and `ProximityDevice` classes to communicate with nearby computers. You can use the `Proximity` API to exchange small messages during a tap gesture or set up a socket connection between peer apps. | | [Creating a Windows Runtime in-process component sample (C++CX) (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to create a component in C++/CX that's used in C++/CX, JavaScript, and C# client code. The OvenServer project contains a runtime class named `Oven`, which implements an `IOven` interface and an `IAppliance` interface. | | [Device auto rotation preferences sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `DisplayProperties` class to handle and verify device rotation events. | @@ -495,14 +511,14 @@ More information is available about the programming models, platforms, languages | [Device enumeration sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the Device Enumeration API to find available devices and look for device information. The sample presents two scenarios: In the first scenario, the Device Enumeration API is used to look for specific device interfaces. | | [DirectWrite paragraph text sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use DirectWrite and Direct2D to render paragraph text to a `CoreWindow`. And, apply justification and character spacing to the layout. | | [Responding to the appearance of the on-screen keyboard sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | [This documentation is preliminary and is subject to change.] This sample shows how to listen for and respond to the appearance of the onscreen soft keyboard. When focus is given to an element that requires text input on a device that doesn't have a keyboard. | -| [XAML data binding sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates basic data binding techniques using the Binding class and Binding markup extension. | +| [XAML data binding sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates basic data binding techniques using the `Binding` class and `Binding` markup extension. | | [Direct3D tutorial sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample is a five-lesson tutorial. It provides an introduction to the Direct3D API, and introduces the concepts and code used in many of the other DirectX samples. | | [Direct2D effects photo adjustment app sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows various common photo manipulation techniques using Direct2D Effects. This sample is divided into several parts. Lesson 1: Shows the basics of loading and drawing an image using Direct2D Effects. | | [Windows Audio Session (WASAPI) sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | Demonstrates how to do various audio related tasks using the Windows Audio Session API (WASAPI). | | [User domain name sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the domain-related functionality provided by the `UserInformation` class of the `Windows.System.UserProfile` namespace. The UserInformation class enables an app to get and set information about the user. | | [USSD message management sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates network account management using the USSD protocol with GSM-capable mobile broadband devices. USSD is typically used for account management of a mobile broadband profile by the Mobile Network Operator (MNO). | | [Bing Maps Trip Optimizer sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The sample demonstrates how to use JavaScript and Visual C++ and to create app for Windows 8 named Bing Maps Trip Optimizer. Bing Maps Trip Optimizer uses JavaScript to define the UI, and C++ for a computationally expensive algorithm in parallel. | -| [Direct2D and DirectWrite animated text on a path sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use Direct2D and DirectWrite to render a string of text along an animated, non-linear geometric path. The app renders "Hello, World!" repeated several times in different languages along a Bezier curve. | +| [Direct2D and DirectWrite animated text on a path sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use Direct2D and DirectWrite to render a string of text along an animated, nonlinear geometric path. The app renders "Hello, World!" repeated several times in different languages along a Bezier curve. | | [Wi-Fi hotspot authentication sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the Windows 8 Mobile Broadband API (`Windows.Networking.NetworkOperators`) for Wi-Fi hotspot authentication. Use this mechanism as an alternative to configuring static credentials for a Wi-Fi hotspot. | | [XAML images sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates various techniques for displaying and manipulating images in your app using the Image control and the BitmapImage class. | | [HomeGroup app sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use a `HomeGroup` to open, search, and share files. This sample uses some of the `HomeGroup` options found in the `Windows.Storage.Pickers` and `Windows.Storage.KnownFolders`. | @@ -527,9 +543,9 @@ More information is available about the programming models, platforms, languages | [Direct2D command list sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the use of a command list. It's used for recording a set of vector commands, creating an image brush from the command list, and then filling a rectangle geometry with it. The command list preserves resolution independence of the vector. | | [ControlChannelTrigger XMLHTTPRequest sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | The sample shows how to use the `ControlChannelTrigger` class to enable a Windows Store app using `IXMLHTTPRequest2` to be always connected and always reachable. This sample demonstrates the use of background network notifications in a Windows Store app. | | [XInput and JavaScript controller sketch sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to wrap the XInput C++ API in a Windows Runtime component. Then, it calls it from a Windows Store app using JavaScript. This sample implements a sketch app that lets you use the Xbox game controller to select line thickness and more. | -| [Direct2D convolve matrix effect sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the Direct2D Effects convolve matrix effect. This sample has some example convolution kernel matrices: Passthrough (no-op), Box blur (width 5), Simple edge detect, Simple sharpen, Emboss, Vertical smear (height 10) theses and more. | +| [Direct2D convolve matrix effect sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates the Direct2D Effects convolve matrix effect. This sample has some example convolution kernel matrices: Passthrough (no-op), Box blur (width 5), Simple edge detect, Simple sharpen, Emboss, Vertical smear (height 10) these and more. | | [DirectX swap chain implementation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to receive `CoreWindow` events in a native application, and how to connect a DirectX swap chain to the application view. | -| [Credential picker sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Security.Credentials.UI.CredentialPicker` class to retrieve credentials. These credentials may be passed to APIs that require them, for example, `HttpClient`. | +| [Credential picker sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use the `Windows.Security.Credentials.UI.CredentialPicker` class to retrieve credentials. These credentials might be passed to APIs that require them, for example, `HttpClient`. | | [Direct2D animation sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to use Direct2D to render and animate a Direct2D primitive along a spiral path. | | [Sharing content target app sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how an app can receive content shared from another app. This sample uses classes from the `Windows.ApplicationModel.DataTransfer` and `Windows.ApplicationModel.DataTransfer.Share` namespaces. | | [Direct2D save to image file sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to render to the screen using Direct2D and DirectWrite. And, how to save the rendered image to disk using the WIC API. | @@ -537,7 +553,7 @@ More information is available about the programming models, platforms, languages | [Creating a Windows Runtime in-process component sample (C#) (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to create a component in C# that's used in C++/CX, JavaScript, and C# client code. The OvenServer project contains a runtime class named `Oven`, which implements an `IOven` interface and an `IAppliance` interface. | | [Push and periodic notifications client-side sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how a client app can register and listen for push notifications sent from a web server. Push notifications can be used to update a badge or a tile, raise a toast notification, or launch a background task. | | [Portable device API sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample shows how to access the `IPortableDevice` COM API from a C++ app. To learn how to access the `IPortableDevice` COM API from a Desktop C++ app, refer to the Portable Devices COM API Sample. | -| [PlayToReceiver sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to create a software Play To receiver. To advertise the software Play To Receiver, click the Start Receiver button. To stop the receiver, click the Stop Receiver button. | +| [PlayToReceiver sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to create a software Play To receiver. To advertise the software Play To receiver, select the **Start Receiver** button. To stop the receiver, select the **Stop Receiver** button. | | [Lock screen personalization sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the `LockScreen` API to set the current user's lock screen image. This sample uses classes from the `Windows.System.UserProfile` namespace. | | [Credential locker sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates how to use the WinRT `PasswordVault` APIs, and how to use the credential locker to store web credentials. Specific scenarios include a single user with a single resource, and multiple users with a single resource. | | [Media engine native C++ video playback sample (Windows 8)](https://github.com/Microsoft/VCSamples/tree/master/VC2012Samples/Windows%208%20samples/C%2B%2B/Windows%208%20app%20samples) | This sample demonstrates video playback using the `MediaEngine` API in a native C++ app. | diff --git a/docs/overview/what-s-new-for-cpp-2017.md b/docs/overview/what-s-new-for-cpp-2017.md index d6cf9b9e02..ada04edf00 100644 --- a/docs/overview/what-s-new-for-cpp-2017.md +++ b/docs/overview/what-s-new-for-cpp-2017.md @@ -420,7 +420,7 @@ The Clang/C2 toolset that ships with Visual Studio 2017 now supports the **`/big The C++ Core Checkers for enforcing the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines) are now distributed with Visual Studio. Enable the checkers in the **Code Analysis Extensions** page in the project's property pages. The extensions are then included when you run code analysis. For more information, see [Using the C++ Core Guidelines checkers](../code-quality/using-the-cpp-core-guidelines-checkers.md). -![Screenshot of the Property Pages dialog box showing Configuration Properties > Code Analysis > General selected and a number of Core Checks listed in teh Run this rule set section.](media/CppCoreCheck.png "CppCoreCheck properties page") +![Screenshot of the Property Pages dialog box showing Configuration Properties > Code Analysis > General selected and a number of Core Checks listed in the Run this rule set section.](media/CppCoreCheck.png "CppCoreCheck properties page") ##### Visual Studio 2017 version 15.3 diff --git a/docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md b/docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md index 42e13dd66a..c603b8f916 100644 --- a/docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md +++ b/docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md @@ -1,7 +1,7 @@ --- title: "What's new for C++ in Visual Studio" description: "The new features and fixes in the Microsoft C/C++ compiler and tools in Visual Studio." -ms.date: 06/6/2024 +ms.date: 05/13/2025 ms.service: "visual-cpp" ms.subservice: "ide" ms.custom: intro-whats-new @@ -12,25 +12,264 @@ ai-usage: ai-assisted Visual Studio 2022 brings many updates and fixes to the Microsoft C++ compiler and tools. The Visual Studio IDE also offers significant improvements in performance and productivity, and now runs natively as a 64-bit application. -- For more information on what's new in all of Visual Studio, see [What's new in Visual Studio 2022](/visualstudio/ide/whats-new-visual-studio-2022?view=vs-2022&preserve-view=true). -- For information about what's new in the C++ docs, see [Microsoft C++ docs: What's new](./whats-new-cpp-docs.md). +- For more information on what's new in all of Visual Studio, see [What's new in Visual Studio 2022](/visualstudio/ide/whats-new-visual-studio-2022). - For information about version build dates, see [Visual Studio 2022 Release History](/visualstudio/releases/2022/release-history). +## What's new for C++ in Visual Studio version 17.14 + +*Released May 2025* + +| For more information about | See | +|---|---| +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.14](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-14/) | +| Standard Library (STL) merged C++26 and C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.14](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1714) | +| New features in the IDE |[Visual Studio 2022 version 17.14 Release Notes](/visualstudio/releases/2022/release-notes) | +| C++ language updates | [C++ Language Updates in MSVC in Visual Studio 2022 17.14](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-in-visual-studio-2022-17-14/) | +| C++ language conformance improvements | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.14](cpp-conformance-improvements.md#improvements_1714) | + +A quick highlight of some of the new features: + +- C++ Dynamic Debugging allows you to debug optimized code without impacting performance. For more information, see [C++ Dynamic Debugging](/visualstudio/debugger/cpp-dynamic-debugging). +- Implemented C++23 features (requires `/std:c++latest` or `/std:c++23preview`): + - [`static operator()`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1169r4.html) + - [`static operator[]`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2589r1.pdf) + - [`if consteval`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1938r3.html). Allows you to run different code depending on whether the statement is executed at compile time or run time. +- Automatically generate documentation comments with GitHub Copilot. For more information, see [Introducing automatic documentation comment generation in Visual Studio](https://devblogs.microsoft.com/visualstudio/introducing-automatic-documentation-comment-generation-in-visual-studio/). +- Use the Model Picker in Visual Studio to select your AI model for GitHub Copilot. For more information, see [Changing the AI model for Copilot Chat](https://docs.github.com/en/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat). This screenshot shows the Model Picker at the bottom of the GitHub Copilot chat window: + :::image type="complex" source="./media/model-picker.png" alt-text="A screenshot of the GitHub Copilot chat window with the Model Picker dropdown highlighted."::: + The dropdown for the Model Picker is open. The options include: GPT-4o, o3-mini, Claude 3.7 Sonnet Thinking, and others. + :::image-end::: +- Unreal Engine integration improvements: + - The Visual Studio C++ debugger now supports Unreal Engine Blueprints. + - Commands for building files, modules, and plugins are available natively in Visual Studio. +- New compiler flag [/forceInterlockedFunctions](../build/reference/force-interlocked-functions.md) dynamically selects between Armv8.0 load, store exclusive instructions or Armv8.1 Large System Extension (LSE) atomic instructions based on CPU capability at runtime. +- Added support for IntelliSense-based completions and quick info for CMake modules in Visual Studio. You can view all available CMake modules and when you hover over a referenced CMake module, IntelliSense provides more info about the selected module: + :::image type="complex" source="./media/cmake-module-intellisense.png" alt-text="A screenshot of intellisense explaining C Make Print Helpers."::: + The screenshot is of an edit in the C Make Lists .txt file. The cursor is on include ( CMakePrintHelpers ). Intellisense says: Convenience functions for printing properties and variables, useful for debugging. + :::image-end::: + + When you start typing a CMake module name in your `CMakeLists.txt` or other CMake script files, IntelliSense provides a list of available modules to choose from: + :::image type="complex" source="./media/cmake-intellisense.png" alt-text="A screenshot of intellisense for a include statement."::: + The screenshot is of an edit in the C Make Lists .txt file. The cursor is on include ( C Make. The Intellisense dropdown contains entries for C Make Add Fortran Subdirectory, C Make Dependent Option, and more. + :::image-end::: +- Guidelines Support Library (GSL) 4.2.0: This release includes performance improvements for `gsl::span`, new features, and better alignment with C++ standards. For more information, see [Announcing Guidelines Support Library v4.2.0](https://devblogs.microsoft.com/cppblog/announcing-guidelines-support-library-v4-2-0/). + +## What's new for C++ in Visual Studio version 17.13 + +*Released February 2025* + +| For more information about | See | +|---|---| +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.13](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-13/) | +| Standard Library (STL) C++26 and C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.13](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1713) | +| New features in the IDE |[Visual Studio 2022 version 17.13 Release Notes](/visualstudio/releases/2022/release-notes) | +| C++ language updates | [MSVC compiler updates in Visual Studio 2022 17.13](https://devblogs.microsoft.com/cppblog/msvc-compiler-updates-in-visual-studio-2022-version-17-13/) | +| C++ language conformance improvements | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.13](cpp-conformance-improvements.md#improvements_1713) | + +A quick highlight of some new features: + +- **C++ language enhancements** + + - Try out C++23 preview features by setting the C++ Language Standard to `/std:c++23preview`. This setting enables the latest C++23 features and bug fixes. For more information, see [/std (Specify Language Standard Version)](../build/reference/std-specify-language-standard-version.md#stdc23preview). + - Support for C++23’s `size_t` literal suffix, which helps avoid truncations or signed comparison mismatches--especially when writing loops. For example: + ```cpp + // Infinite loop if v.size > max unsigned int + for (auto i = 0u; i < v.size(); ++i) + { + ... + } + + // Fixed because of uz literal + for (auto i = 0uz; i < v.size(); ++i) + { + ... + } + ``` + + - Support for vector lengths for code generation on x86 and x64. For more information, see [/vlen](../build/reference/vlen.md). + - Support for Intel Advanced Vector Extensions 10 version 1. For more information about `/arch:AVX10.1`, see [/arch (x64)](../build/reference/arch-x64.md). + +- **Standard Library enhancements** + + - Standard library support for couroutines. In this example from [P2502R2](https://wg21.link/p2502r2), the `fib` function is a coroutine. When the `co_yield` statement is executed, `fib` is suspended and the value is returned to the caller. You can resume the `fib` coroutine later to produce more values without requiring any manual state handling: + + ```cpp + std::generator fib() + { + auto a = 0, b = 1; + + while (true) + { + co_yield std::exchange(a, std::exchange(b, a + b)); + } + } + + int answer_to_the_universe() + { + auto rng = fib() | std::views::drop(6) | std::views::take(3); + return std::ranges::fold_left(std::move(range), 0, std::plus{}); + } + ``` + + - Moved `system_clock`, `high_resolution_clock`, and `chrono_literals` from a commonly included internal header to ``. If you see compiler errors that types like `system_clock` or user-defined literals like `1729ms` aren't recognized, include ``. + - Improved the vectorized implementations of `bitset` constructors from strings, `basic_string::find_last_of()`, `remove()`, `ranges::remove`, and the `minmax_element()` and `minmax()` algorithm families. + - Added vectorized implementations of: + - `find_end()` and `ranges::find_end` for 1-byte and 2-byte elements. + - `basic_string::find()` and `basic_string::rfind()` for a substring. + - `basic_string::rfind()` for a single character. + - Merged C++23 Defect Reports: + - [P3107R5](https://wg21.link/P3107R5) Permit an efficient implementation of ``. + - [P3235R3](https://wg21.link/P3235R3) `std::print` More types faster with less memory. + +- **GitHub Copilot** + + - GitHub Copilot Free is now available. Get 2,000 code completions and 50 chat requests per month at no cost. + - GitHub Copilot code completions provide autocomplete suggestions inline as you code. To enhance the experience of C++ developers, GitHub Copilot includes other relevant files as context. This reduces errors while offering more relevant and accurate suggestions. + - You can now request a code review from GitHub Copilot from the Git Changes window: + :::image type="complex" source="./media/vs2022-copilot-git-changes-review.png" alt-text="A screenshot of the Git Changes window with the GitHub Copilot Review button highlighted."::: + The Git Changes window is open with the GitHub Copilot Review button highlighted. + :::image-end::: + + GitHub Copilot looks for potential issues and creates comments for them: + + :::image type="complex" source="./media/vs2022-copilot-comment-example.png" alt-text="A screenshot of the GitHub Copilot explaining an issue."::: + GitHub Copilot found an issue with the line if ( is_enabled_) new_site.disable(). It says it may be a mistake and should likely be if ( is_enabled_) new_site.enable() because the intention seem to be enabling the new site if the breakpoint is enabled. + :::image-end::: + + To use this feature, ensure the following are turned on: + - **Tools**>**Options**> **Preview Features** > **Pull Request Comments** + - **Tools** >**Options** > **GitHub** > **Copilot** > **Source Control Integration** > **Enable Git preview features**. + + - GitHub Copilot Edits is a new feature that can make changes across multiple files in your project. To start a new Edits session, click **Create new edit session** at the top of the GitHub Copilot Chat window: + + :::image type="content" source="./media/vs2022-copilot-edit-session.png" alt-text="A screenshot of the GitHub Copilot Chat window. The Create new edit session button is highlighted."::: + + Describe the changes you want to make and Copilot suggests relevant edits. You can preview the edits one-by-one and accept the ones you want or make corrections: + + :::image type="complex" source="./media/vs2022-copilot-edit-session-example.png" alt-text="A screenshot of the GitHub Copilot Chat window displaying the files it edited."::: + GitHub Copilot is displaying a summary of the changes it made, such as 1. Create a new subclass range_breakpoint in include/libsdb/breakpoint.hpp" and 2. Implement the range_breakpoint class in src/breakpoint.cpp. An option to accept the changes is displayed. + :::image-end::: + + For more information, see [Iterate across multiple files more efficiently with GitHub Copilot Edits](https://devblogs.microsoft.com/visualstudio/iterate-across-multiple-files-more-efficiently-with-github-copilot-edits-preview/). + +- **CMake** + - Now supports CMake Presets v9. New macro expansions in a preset's include field. For more information, see [Macro expansion](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#macro-expansion) in the official CMake documentation. + +## What's new for C++ in Visual Studio version 17.12 + +*Released November 2024* + +| For more information about | See | +|---|---| +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.12](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-12/) | +| Standard Library (STL) merged C++26 and C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.12](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1712) | +| New features in the Visual Studio 17.12 IDE |[Visual Studio 2022 version 17.12 Release Notes](/visualstudio/releases/2022/release-notes) | +| C++ language conformance improvements in Visual Studio 2022 17.12 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.12](cpp-conformance-improvements.md#improvements_1712) | + +A quick highlight of some of the new features: + +- **Standard Library Enhancements** + - C++23 Formatting ranges ([P2286R8](https://wg21.link/P2286R8)) implementation complete. Added formatters for the container adaptors `stack`, `queue`, and `priority_queue`. + - Added multidimensional subscript operators, which also support ``. For example: `print("m[{}, {}]: '{}'; ", i, j, m[i, j])`. +- **Game development in C++** + - Directly open Unreal Engine projects in Visual Studio without having to generate a Visual Studio solution file wrapping the Unreal Engine project. For more information, see [Work with Unreal Engine projects in Visual Studio](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-quickstart). + - You can specify the command line arguments to pass when debugging directly from the toolbar. For more information, see [Set command line arguments for Unreal Engine projects](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-quickstart#set-command-line-arguments). + :::image type="content" source="./media/command-line-argument-dropdown.png" alt-text="A screenshot of the command-line argument dropdown. It contains one command line argument: -graphicsadaptor=0."::: +- **Build Insights** + - You can run Build Insights on selected files. Select the files you want in the **Solution Explorer**, right-click, and choose **Run Build Insights on Selected Files**: + :::image type="content" source="./media/build-insights-run-on-selected-files.png" alt-text="A screenshot of files in the Solution Explorer. The context menu is open and the option to Run Build Insights on Selected Files is highlighted."::: + - You can filter Build Insights results by project. Click the filter button on the filter column header and select the projects you want to see results for: + :::image type="content" source="./media/build-insights-filter-by-project.png" alt-text="A screenshot of the Build Insights window with the Included Files tab open. The filter button was selected and a list of projects appears. Checkboxes next to Two projects are checked."::: + - Clicking the question mark icon in the Build Insights window to see a short description for the tabs in the Build Insights window, and a link to the documentation for a detailed explanation: + :::image type="content" source="./media/build-insights-view-explanations.png" alt-text="A screenshot of the Build Insights window with the view explanations button (a question mark in a circle) highlighted."::: +- **GitHub Copilot** + - You can click **Ask Copilot** next to the value of a variable to get AI-driven insights into what led to its current state. For example, the following program has an off-by-one error in its loop condition: + :::image type="complex" source="./media/copilot-smart-variable-inspection.png" alt-text="A screenshot of the Autos window. The variable named it is NULL. The Ask Copilot icon next to it is highlighted."::: + The code that caused this problem is: for (auto it = h.animals_.begin(); it <= h.animals_.end(); it++). + :::image-end::: + If you click Ask Copilot icon for the `it` variable, it tells you why it is ``: + :::image type="complex" source="./media/copilot-smart-variable-explanation.png" alt-text="A screenshot of a GitHub Copilot window."::: + This error is inside a function defined as int calculate_number_of_cats(const house& h). The GitHub Copilot message says: "The value of the expression it is NULL, which means that the iterator is not pointing to any valid element in the vector animals_. In the context of your program, it is supposed to iterate over the animals_ vector in the house object to count the number of cat objects. Why it is null. Based on the locals and call stack context: the house object h has an empty animals_ vector (size=0). The loop condition it <= h.animals_.end() is incorrect. It should be it != h.animals_.end()." + :::image-end::: + - You can click **Ask Copilot** about errors in the Visual Studio **Error List** to get help on the error and a suggested fix. For example: + :::image type="complex" source="./media/copilot-fix-my-code.png" alt-text="A screenshot of the Error List window."::: + The Ask Copilot icon is highlighted next to an error that unique_ptr is attempting to reference a deleted function. + :::image-end::: + If you click Ask Copilot, it tells you about the error: + :::image type="complex" source="./media/copilot-fix-my-code-suggestion.png" alt-text="A screenshot of the GitHub Copilot explanation for the error."::: + The Copilot message says: "The error occurs because the range-based for loop was attempting to copy std::unique_ptr objects, which is not allowed since std::unique_ptr cannot be copied. To fix this, I changed the loop to use a reference to avoid copying the std::unique_ptr objects. This way, the loop iterates over references to the std::unique_ptr objects, which is allowed." + :::image-end::: +- **Debugging** + - New debug visualizers for `mutex`, `recursive_mutex`, and `move_iterator`. + - The debugger now displays return values inline: + :::image type="content" source="./media/debugger-inline-return-values.png" alt-text="A screenshot of a tooltip showing the value 8.25. It's the result of the expression following the return statement that was stepped over."::: + +## What's new for C++ in Visual Studio version 17.11 + +*Released August 2024* + +| For more information about | See | +|---|---| +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.11](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-11/) | +| Standard Library (STL) merged C++26 and C++23 features, C++20 defect reports, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.11](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1711) | +| New features in the Visual Studio 17.11 IDE |[Visual Studio 2022 version 17.11 Release Notes](/visualstudio/releases/2022/release-notes) | +| C++ language conformance improvements in Visual Studio 2022 17.11 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.11](cpp-conformance-improvements.md#improvements_1711) | + +A partial list of new features: + +- **Standard Library Enhancements** + - The formatted output implementation now includes `std::range_formatter` and formatters for `std::pair` and `std::tuple`. + - Added support for `std::println()` with no arguments. This prints a blank line as proposed in [P3142R0](https://wg21.link/P3142R0). + - Improved vectorization for several algorithms including `replace_copy()`, `replace_copy_if()`, `ranges::replace_copy`, `ranges::replace_copy_if`, `find_first_of()` and `ranges::find_first_of`, for 8-bit and 16-bit elements, `mismatch()`, `ranges::mismatch`, `count()`, `ranges::count`, `find()`, `ranges::find`, `ranges::find_last`, and `ranges::iota`. + +- **Game development in C++** + - You can now add common Unreal Engine class templates, modules, and plugins from within Visual Studio. For more information, see [Add Unreal Engine classes, modules, and plugins in Visual Studio](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-add-class-module-plugin). + - The new Unreal Engine toolbar provides quick access to Unreal Engine related actions from within Visual Studio. The toolbar allows you to quickly attach to Unreal Engine processes, rescan the Blueprints cache, quickly access the Unreal Engine Log, and provides quick access to the Unreal Engine Configuration Page for Visual Studio. For more information, see [Unreal Engine Toolbar](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-quickstart#unreal-engine-toolbar). + - You can now filter trace results by project. Also, results in each row show the relative path and file name instead of the full path. Results grouping in the **Included Files** view is also improved: + :::image type="complex" source="./media/include-diagnostics-improved.png" alt-text="A screenshot of the improved Included Files diagnostics results."::: + The Included Files view has a new column for the project. The Project column is selected and projects such as (Select All), CompilerIdC, OpenAL, common, and so on, are selected. The included files are listed by relative path and file name and grouped together. + :::image-end::: +- **CMake debugging** + - You can now debug your CMake scripts and `CMakeLists.txt` files in the Visual Studio debugger for CMake projects that target Linux via Windows Subsystem for Linux (WSL) or SSH. To start a CMake debugging session in Visual Studio, set a breakpoint in your `CMakeLists.txt` file and then navigate to **Project** > **Configure Cache with CMake Debugging**. +- **GitHub Copilot** + - When you hover over symbols in the code editor, click the Copilot **Tell me more** button in the Quick Info dialog to learn more about a given symbol: + :::image type="complex" source="./media/github-copilot-quick-info.png" alt-text="A screenshot of the Quick Info window."::: + The Quick Info window is shown above a function. The Tell me more link is highlighted. + :::image-end::: + - GitHub Copilot can generate naming suggestions for your identifiers (variables, methods, or classes) based on how your identifier is used and the style of your code. + :::image type="complex" source="./media/copilot-rename.png" alt-text="A screenshot of the GitHub Copilot Rename dialog."::: + The Rename dialog has a New name field with a dropdown list that shows these choices: text_color, font_color, display_color, console_color, and menu_text_color. + :::image-end::: + You need an active [GitHub Copilot subscription](https://visualstudio.microsoft.com/github-copilot/). Right-click the variable you wish to rename, and choose **Rename** (`Ctrl+R`, `Ctrl+R`). Select the GitHub Copilot sparkle icon to generate naming suggestions. + +- **Debugging** + - Conditional breakpoints in C++ are faster. + +- **Diagnostics improvements** + - Improved diagnostics when calling `std::get` on a `std::tuple` that has multiple instances of `T` in its template arguments. MSVC used to report:\ + `error C2338: static_assert failed: 'duplicate type T in get(tuple)'`.\ + Now it reports:\ + `error C2338: static_assert failed: 'get(tuple&) requires T to occur exactly once in Types.(N4971 [tuple.elemm]/5)'` + - Improved diagnostics when `std::ranges::to` is unable to construct the requested result. MSVC used to report:\ + `error C2338: static_assert failed: 'the program is ill-formed per N4950 [range.utility.conv.to]/2.3'`\ + Now it reports:\ + `error C2338: static_assert failed: 'ranges::to requires the result to be constructible from the source range, either by using a suitable constructor, or by inserting each element of the range into the default-constructed object. (N4981 [range.utility.conv.to]/2.1.5)'` + ## What's new for C++ in Visual Studio version 17.10 *Released May 2024* | For more information about | See | |---|---| -| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.10](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-10/) | -| Standard Library (STL) merged C++26 and C++23 features, C++20 defect reports, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.10](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710) | +| What's new for C++ developers | [What's new for C++ Developers in Visual Studio 2022 17.10](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-10/) | +| Standard Library (STL) merged C++26 and C++23 features, C++20 defect reports, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.10](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710) | | New features in the Visual Studio 17.10 IDE |[Visual Studio 2022 version 17.10 Release Notes](/visualstudio/releases/2022/release-notes) | | C++ language conformance improvements in Visual Studio 2022 17.10 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.10](cpp-conformance-improvements.md#improvements_1710) | A partial list of new features: -- **MSVC Toolset Update**: The MSVC toolset version is updated from 19.39 to 19.40. This may affect projects that have version assumptions. For more information about some ways in which this will affect projects that assume that MSVC versions are all 19.3X for Visual Studio 2022 releases, see [MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10](https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/). -- **Standard Library Enhancements**: The standard library added support for [P2510R3 Formatting Pointers](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2510r3.pdf) which brings the set of format specifiers for pointers when using `std::format` more in line with those that already exist for integers. Improved the vectorized implementations of `std::min_element`, `std::ranges::min`, and friends. +- **MSVC Toolset Update**: The MSVC toolset version is updated from 19.39 to 19.40. This may affect projects that have version assumptions. For more information about some ways in which this affects projects that assume that MSVC versions are all 19.3X for Visual Studio 2022 releases, see [MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10](https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/). +- **Standard Library Enhancements**: The standard library added support for [P2510R3 Formatting Pointers](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2510r3.pdf), which brings the set of format specifiers for pointers when using `std::format` more in line with those that already exist for integers. Improved the vectorized implementations of `std::min_element`, `std::ranges::min`, and friends. - **Build Insights**: Now provides template instantiation information. See [Templates View for Build Insights in Visual Studio](https://devblogs.microsoft.com/cppblog/templates-view-for-build-insights-in-visual-studio-2/) or the [Pure Virtual C++ - Templates view for Build Insights in Visual Studio](https://youtu.be/68pOEQ5YA5s) recording. - **Unreal Engine Plugin**: There's a new opt-in feature for the Unreal Engine Plugin to run in the background, reducing startup costs. This is an opt-in feature that is activated via **Tools** > **Options** > **Unreal Engine**. - **New features for Linux**: See [New Linux Development Features in Visual Studio](https://youtu.be/jZTMRvm8AwY). @@ -38,13 +277,13 @@ A partial list of new features: - **Connection Manager UX**: The user experience provides a more seamless experience when connecting to remote systems. For more information, see [Usability Improvements in the Visual Studio Connection Manager](https://devblogs.microsoft.com/cppblog/usability-improvements-in-the-visual-studio-connection-manager/). - **Pull request comments**: You can now view GitHub and Azure DevOps comments directly in your working file. Enable the feature flag, **Pull Request Comments** in **Options** > **Environment** > **Preview Features** and checkout the pull request branch to get started. - **AI-Generated Content**: GitHub Copilot can now draft pull request descriptions. Requires an active GitHub Copilot subscription. Try it out by clicking the **Add AI Generated Pull Request Description** sparkle pen icon within the **Create a Pull Request** window. -- **Image Preview**: Hover over an image path to see a preview with size details. The size is capped to 500px wide and high. +- **Image Preview**: Hover over an image path to see a preview with size details. The size is capped to 500 px wide and high. :::image type="complex" source="media/hover-preview.png" alt-text="Screenshot of hover preview."::: - The mouse is hovering over the line std::filesystem::path vs_logo_path = "../images/vs_logo.png". Underneath appears a preview of the Visual Studio logo and the information that it is 251 x 500 pixels and 13.65 KB in size. + The mouse is hovering over the line std::filesystem::path vs_logo_path = "../images/vs_logo.png". Underneath appears a preview of the Visual Studio logo and the information that it's 251 x 500 pixels and 13.65 KB in size. :::image-end::: - **Breakpoint/Tracepoint Creation**: You can now create conditional breakpoints or tracepoints directly from expressions in the source code from the right-click menu. This works on property or field names and values from autos, locals, watch windows, or DataTips. - **Attach to Process Dialog**: The functionality provided by the Attach to Process dialog is more user-friendly. You can now easily switch between tree and list views, organize processes better with collapsible sections, and select code types with a simplified combobox. Also, the "Select/Track Window" feature is now easier to use, allowing two-way tracking: selecting a process highlights its window, and clicking on a window selects its process. -- **GitHub Copilot Integration**: We have unified the GitHub Copilot and Copilot Chat extensions and now ship them directly in Visual Studio. To install it, install the **GitHub Copilot** component in the **Visual Studio Installer**: +- **GitHub Copilot Integration**: GitHub Copilot and Copilot Chat extensions are now unified and now ship directly in Visual Studio. To install it, install the **GitHub Copilot** component in the **Visual Studio Installer**: :::image type="complex" source="media/github-copilot-install-option.png" alt-text="Screenshot of the Visual Studio Installer GitHub Copilot installation option." lightbox="media/github-copilot-install-option-expanded.png"::: The Visual Studio installer is open to the Workloads tab. In the installation details pane, GitHub Copilot is shown as selected. :::image-end::: @@ -59,8 +298,8 @@ A partial list of new features: | For more information about | See | |---|---| -| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.9](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-9/) | -| Standard Library (STL) merged C++23 features, performance improvements, enhanced behavior, LWG issue resolutions, and fixed bugs | [STL Changelog 17.9](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179) | +| What's new for C++ developers | [What's new for C++ Developers in Visual Studio 2022 17.9](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-9/) | +| Standard Library (STL) merged C++23 features, performance improvements, enhanced behavior, Language Working Group (LWG) issue resolutions, and fixed bugs | [STL Changelog 17.9](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-179) | | New features in the Visual Studio 17.9 IDE |[Visual Studio 2022 version 17.9 Release Notes](/visualstudio/releases/2022/release-notes-v17.9) | | C++ language conformance improvements in Visual Studio 2022 17.9 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_179) | | Summary of C++ backend updates | [MSVC Backend updates since Visual Studio 2022 version 17.3](https://devblogs.microsoft.com/cppblog/msvc-backend-updates-since-visual-studio-2022-version-17-3/) | @@ -69,7 +308,7 @@ A partial list of new features: - `#include` diagnostics, which provides a detailed analysis of your `#include` directives. Activate this feature by right-clicking an `#include` and choosing **#include directives** > **Turn #include directive diagnostics on**. Above each `#include` is the number of times your code references that `#include` file. Click the **reference** link to navigate to where your code uses something from that header file. To view the build time of your `#include` directives, run Build Insights by navigating to **Build** > **Run Build Insights on Solution** > **Build**. :::image type="complex" source="media/include-diagnostics.png" alt-text="Screenshot of #include diagnostics."::: - Above the # include is a **reference** link and a number of the references to this # include file (in this case 1). The build time is also listed (in this case less than 1/2 a second). + Above the # include is a **reference** link and many of the references to this # include file (in this case 1). The build time is also listed (in this case less than 1/2 a second). :::image-end::: - Memory layout visualization, which shows how memory is arranged for your classes, structs, and unions. Hover over a type and choose the **Memory Layout** link in the **Quick Info** to open a dedicated window displaying the memory layout of the selected type. Hovering over individual data types within this window provides detailed information about their size and offset within the type. :::image type="complex" source="media/memory-layout-window.png" alt-text="Screenshot of the memory layout window"::: @@ -92,8 +331,8 @@ A partial list of new features: | For more information about | See | |---|---| -| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.8](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-8/) | -| Standard Library (STL) merged C++26, C++23 features, C++20 extensions, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.8](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-178) | +| What's new for C++ developers | [What's new for C++ Developers in Visual Studio 2022 17.8](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-8/) | +| Standard Library (STL) merged C++26, C++23 features, C++20 extensions, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.8](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-178) | | New features in the Visual Studio 17.8 IDE |[Visual Studio 2022 version 17.8 Release Notes](/visualstudio/releases/2022/release-notes-v17.8) | | C++ language conformance improvements in Visual Studio 2022 17.8 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_178) | | An overview of C++ improvements in Visual Studio, VS Code, and vcpkg during 2023 | [A year of C++ improvements](https://devblogs.microsoft.com/cppblog/a-year-of-cpp-improvements-in-visual-studio-vs-code-and-vcpkg) | @@ -102,14 +341,14 @@ A partial list of new features: - C++ structured diagnostics in the Output window and a new problem details window that provides more information about the error. For more information, see [Structured SARIF Output](../build/reference/sarif-output.md) and [Problem Details Window](/visualstudio/ide/reference/problem-details-window). - A feature that lets you visualize the size and alignment of your classes, structs, unions, base types, or enums even before the code is compiled. Hover over the identifier and a Quick Info displays the size and alignment information. -- A feature that suggests when to mark member functions `const` because they don’t modify the object’s state. Hover over a member function and click the light bulb icon to mark the function as `const`. +- A feature that suggests when to mark member functions `const` because they don't modify the object's state. Hover over a member function and click the light bulb icon to mark the function as `const`. - Visual Studio now prompts you to mark global functions as static via a screwdriver icon that appears by the function name. Click the screwdriver icon to mark the function as static. - Unused #include directives are dimmed in the editor. You can hover over a dimmed include and use the light bulb menu to either remove that include or all unused includes. You can also add `#include` directives for entities that are indirectly included via other headers. For more information, see [Clean up C/C++ includes in Visual Studio](../ide/include-cleanup-overview.md). - More Unreal Engine support: - Unreal Engine Test Adapter lets you discover, run, manage, and debug your Unreal Engine tests without leaving the Visual Studio IDE. - With Unreal Engine Code Snippets, you can find common Unreal Engine constructs as snippets in your member list. - Build Insights is now integrated with Visual Studio 2022 and works with MSBuild and CMake projects using MSVC. You can now see additional information about the compilation of a function such as how long it took to compile and the number of ForceInlines, and the impact of header files on build time. For more information, see [Tutorial: Troubleshoot function inlining on build time](../build-insights/tutorials/build-insights-function-view.md) and [Tutorial: Troubleshoot header file impact on build time](../build-insights/tutorials/build-insights-included-files-view.md). -- Remote Linux unit test support now lets you run your CTest and GTest tests on your remote Linux machines from Visual Studio’s Test Explorer, just like your local tests. +- Remote Linux unit test support now lets you run your CTest and GTest tests on your remote Linux machines from Visual Studio's Test Explorer, just like your local tests. ## What's new for C++ in Visual Studio version 17.7 @@ -117,9 +356,9 @@ A partial list of new features: | For more information about | See | |---|---| -| What's new for C++ developers | [What’s New for C++ Developers in Visual Studio 2022 17.7](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-7/) | +| What's new for C++ developers | [What's new for C++ Developers in Visual Studio 2022 17.7](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-7/) | | New C++ features specific to game development | [Unleashing the Power of Visual Studio 2022 for C++ Game Development](https://devblogs.microsoft.com/visualstudio/unleashing-the-power-of-visual-studio-2022-for-c-game-development/) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.7](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-177) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.7](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-177) | | New features in the Visual Studio 17.7 IDE |[Visual Studio 2022 version 17.7 Release Notes](/visualstudio/releases/2022/release-notes-v17.7) | | C++ language conformance improvements in Visual Studio 2022 17.7 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_177) | @@ -139,8 +378,8 @@ A partial list of new features: | For more information about | See | |---|---| -| What's new for C++ developers | [What’s New for C++ Developers in Visual Studio 2022 17.6](https://devblogs.microsoft.com/cppblog/visual-studio-17-6-for-cpp-devs/) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.6](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-176) | +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.6](https://devblogs.microsoft.com/cppblog/visual-studio-17-6-for-cpp-devs/) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.6](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-176) | | New features in the Visual Studio 17.6 IDE | [Visual Studio 2022 version 17.6 Release Notes](/visualstudio/releases/2022/release-notes-v17.6) | | C++ language conformance improvements in Visual Studio 2022 17.6 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_176) | @@ -157,8 +396,8 @@ A partial list of new features includes: | For more information about | See | |---|---| -| What's new for C++ developers | [What’s New for C++ Developers in Visual Studio 2022 17.5](https://devblogs.microsoft.com/cppblog/visual-studio-17-5-for-cpp-devs/) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.5](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-175) | +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.5](https://devblogs.microsoft.com/cppblog/visual-studio-17-5-for-cpp-devs/) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.5](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-175) | | New features in the Visual Studio 17.5 IDE | [Visual Studio 2022 version 17.5 Release Notes](/visualstudio/releases/2022/release-notes-v17.5) | A partial list of new features includes: @@ -196,8 +435,8 @@ A partial list of new features includes: | For more information about | See | |---|---| -| What's new for C++ developers | [What’s New for C++ Developers in Visual Studio 2022 17.4](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-4/) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.4](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-174) | +| What's new for C++ developers | [What's New for C++ Developers in Visual Studio 2022 17.4](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-4/) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.4](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-174) | | New features in the Visual Studio 17.4 IDE | [Visual Studio 2022 version 17.4 Release Notes](/visualstudio/releases/2022/release-notes-v17.4) | | C++ language conformance improvements in Visual Studio 2022 17.4 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_174) | @@ -246,7 +485,7 @@ A partial list of new features in 17.4: | For more information about | See | |---|---| | What's new for C++ developers | [C++ improvements in 17.3](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-3-is-now-available/#c-improvements) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.3](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-173) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.3](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-173) | | New features in the Visual Studio 17.3 IDE | [Visual Studio 2022 version 17.3 Release Notes](/visualstudio/releases/2022/release-notes-v17.3) | | C++ language conformance improvements in Visual Studio 2022 17.3 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_173) | @@ -273,7 +512,7 @@ The responsiveness of **Go To All** is improved. Previously, results appeared af | For more information about | See | |---|---| | What's new for C++ developers | [Visual Studio 2022 17.2 is now available](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-2-is-now-available/) | -| Standard Library (STL) merged C++20 defect reports, C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.2](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-172) | +| Standard Library (STL) merged C++20 defect reports, C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.2](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-172) | | New features in the Visual Studio 17.2 IDE | [Visual Studio 2022 version 17.2 Release Notes](/visualstudio/releases/2022/release-notes-v17.2) | | C++ language conformance improvements in Visual Studio 2022 17.2 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_172) | @@ -289,7 +528,7 @@ A partial list of new features in 17.2: - When you select the start and end values for the stack pointer in the RTOS tool window, it opens in the memory window. - Added thread awareness for device targets to the call stack window. - Users can now select a pin icon next to peripherals, registers, or fields to pin them the top of the Peripheral View. -- Added implementations of the remaining C++20 defect reports (also known as *backports*). All C++20 features are now available under the **`/std:c++20`** option. For more information about the implemented backports, see the [C++20 Defect Reports project](https://github.com/microsoft/STL/projects/9) in the Microsoft/STL GitHub repository and the [MSVC's STL Completes `/std:c++20`](https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/) blog post. +- Added implementations of the remaining C++20 defect reports (also known as *backports*). All C++20 features are now available under the **`/std:c++20`** option. For more information about the implemented backports, see the [VS 2022 Changelog](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-172) in the Microsoft/STL GitHub repository and the [MSVC's STL Completes `/std:c++20`](https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/) blog post. - We added various C++23 Library features, available under the **`/std:c++latest`** option. For more information about the new features, see the [STL Repo changelog](https://github.com/microsoft/STL/wiki/Changelog). - Improved performance of the initial C++ indexing by up to 20%, depending on the depth of the include graph. @@ -300,7 +539,7 @@ A partial list of new features in 17.2: | For more information about | See | |---|---| | What's new for C++ developers | [Visual Studio 2022 17.1 is now available!](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-1-is-now-available/) | -| Standard Library (STL) merged C++23 features, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.1](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-171) | +| Standard Library (STL) merged C++23 features, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.1](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-171) | | New features in the Visual Studio 17.1 IDE | [Visual Studio 2022 version 17.1 Release Notes](/visualstudio/releases/2022/release-notes-v17.1) | | C++ language conformance improvements in Visual Studio 2022 17.1 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](cpp-conformance-improvements.md#improvements_171) | @@ -320,7 +559,7 @@ A partial list of new features in 17.1: | For more information about | See | |---|---| | New features in the Visual Studio 17.0 IDE | [Visual Studio 2022 version 17.0 Release Notes](/visualstudio/releases/2022/release-notes-v17.0) | -| Standard Library (STL) merged C++26 and C++23 features, C++20 defect reports, LWG issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.0](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710) | +| Standard Library (STL) merged C++23 and C++26 features, C++20 defect reports, Language Working Group (LWG) issue resolutions, performance improvements, enhanced behavior, and fixed bugs | [STL Changelog 17.0](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710) | | C++ language conformance improvements in Visual Studio 2022 17.0 | [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022 17.10](cpp-conformance-improvements.md#improvements_170) | An overview of some of the new features in Visual Studio 2022 version 17.0: @@ -353,12 +592,12 @@ In Visual Studio 2022, when you start your app in the debugger, you can use the ### Standard Library improvements -Select Standard Library (STL) improvements are highlighted here. For a comprehensive list of new functionality, changes, bug fixes, and performance improvements, see the STL team's [Changelog](https://github.com/microsoft/STL/wiki/Changelog#vs-2022). +Select Standard Library (STL) improvements are highlighted here. For a comprehensive list of new functionality, changes, bug fixes, and performance improvements, see the STL team's [Changelog](https://github.com/microsoft/STL/wiki/Changelog). - Added debugging visualizers to improve how the following types are displayed: `source_location`, `bind_front()`, `u8string` (and its iterators), `default_sentinel_t`, `unreachable_sentinel_t`, `ranges::empty_view`, `ranges::single_view`, `ranges::iota_view` (and its iterator/sentinel), `ranges::ref_view`, `thread`, `thread::id`, `jthread`, and `filesystem::path` - Added `[[nodiscard]]` to the `stoi()` family of functions in `` and to various functions in `` such as the `collate` member functions, `has_facet()`, and the `isalnum()` and `tolower()` families. - [P0980R1](https://wg21.link/P0980R1) Made `std::string` `constexpr` in VS 2019 16.10. Now supported for Clang. -- [P1004R2](https://wg21.link/P1004R2) Made `std::vector` `constexpr`in VS 2019 16.10. Now supported for Clang. +- [P1004R2](https://wg21.link/P1004R2) Made `std::vector` `constexpr` in VS 2019 16.10. Now supported for Clang. **Highlighted C++23 features** @@ -367,7 +606,7 @@ Select Standard Library (STL) improvements are highlighted here. For a comprehen - [P1679R3](https://wg21.link/P1679R3) `contains()` For `basic_string` and `basic_string_view` - [P1682R3](https://wg21.link/P1682R3) `to_underlying()` for enumerations - [P2162R2](https://wg21.link/P2162R2) Allow inheriting from `std::variant` -- [P2166R1](https://wg21.link/P2166R1) Prohibit constructing`basic_string` and `basic_string_view` from `nullptr`. This change is a source-breaking change. Code that previously had undefined behavior at runtime is now rejected with compiler errors. +- [P2166R1](https://wg21.link/P2166R1) Prohibit constructing `basic_string` and `basic_string_view` from `nullptr`. This change is a source-breaking change. Code that previously had undefined behavior at runtime is now rejected with compiler errors. - [P2186R2](https://wg21.link/P2186R2) Removed garbage collection support. This change removes `declare_reachable`, `undeclare_reachable`, `declare_no_pointers`, `undeclare_no_pointers`, `get_pointer_safety`. Previously, these functions had no effect. **Highlighted performance improvements** @@ -413,7 +652,7 @@ Release notes for older C++ versions are also available: - For information on what's new for C++ in Visual Studio 2019, see [What's new for C++ in Visual Studio 2019](what-s-new-for-cpp-2019.md). - For information on what's new for C++ in Visual Studio 2017, see [What's new for C++ in Visual Studio 2017](what-s-new-for-cpp-2017.md). -- For information on what's new in earlier versions, see [Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). +- For information on what's new in earlier versions, see [Visual C++ What's new 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md). ## Known issues diff --git a/docs/overview/whats-new-cpp-docs.md b/docs/overview/whats-new-cpp-docs.md deleted file mode 100644 index e2a136c581..0000000000 --- a/docs/overview/whats-new-cpp-docs.md +++ /dev/null @@ -1,287 +0,0 @@ ---- -title: "What's new for the Microsoft C++ docs" -ms.date: 11/10/2023 -description: "A list of new articles and doc updates for the Microsoft C/C++ compiler, ATL/MFC, C runtime, and standard library docs." -ms.custom: intro-whats-new -monikerRange: '>=msvc-160' ---- - -# Microsoft C++ docs: What's new for August 2023 to November 2023 - -This article lists major changes to the Microsoft C++ docs for May 2023 through early November 2023. - -- For what was new in the docs in previous months, see [What's new history](#whats-new-history). -- For what's new related to C++ in Visual Studio, see [What's new for C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md). -- For the latest C and C++ conformance with ISO standards status, see [C++ conformance improvements in Visual Studio](cpp-conformance-improvements.md). - -### Active Template Library (ATL), Microsoft Foundation Classes (MFC) - -**Updated articles** - -- [CComDynamicUnkArray Class](../atl/reference/ccomdynamicunkarray-class.md) - Updated remarks. - -### C/C++ projects and build systems - -**New articles** - -- [`/ifcMap`](../build/reference/ifc-map.md) -- [`/Zc:checkGwOdr` (Enforce Standard C++ ODR violations under `/Gw`)](../build/reference/zc-check-gwodr.md) -- [/KERNEL (Create kernel mode binary)](../build/reference/link-code-for-kernel-mode.md) - -**Updated articles** - -- [Configure CMake debugging sessions](../build/configure-cmake-debugging-sessions.md) - Updated screenshots. -- [`/permissive-` (Standards conformance)](../build/reference/permissive-standards-conformance.md) - Reflect new behavior as of 17.6. -- [`/Zc:externConstexpr` (Enable extern constexpr variables)](../build/reference/zc-externconstexpr.md) - Reflect new behavior as of 17.6. -- [Overview of ARM64EC ABI conventions](../build/arm64ec-windows-abi-conventions.md) - Updated register mapping for integer registers table. -- [`/DEBUG` (Generate debug info)](../build/reference/debug-generate-debug-info.md) - Fix documentation for `/DEBUG:FASTLINK` and `/DEBUG`. - -### Code quality - -**New articles** - -- [Build reliable and secure C++ programs](../code-quality/build-reliable-secure-programs.md) -- [Warning C6395](../code-quality/c6395.md) -- [Warning C26479](../code-quality/c26479.md) - -**Updated articles** - -- [How to specify additional code information by using `_Analysis_assume_`](../code-quality/how-to-specify-additional-code-information-by-using-analysis-assume.md) - Updated remarks. - -Clarified behavior for the following warnings: - -- [Warning C6053](../code-quality/c6053.md) -- [Warning C26478](../code-quality/c26478.md) -- [Warning C26817](../code-quality/c26817.md) -- [Warning C26820](../code-quality/c26820.md) - -### C++ in Visual Studio - -**New articles** - -- [`alignas` (C++)](../cpp/alignas-specifier.md) - -**Updated articles** - -- [`alignas` (C++)](../cpp/alignas-specifier.md) - Several updates to the remarks. -- [if-else statement (C++)](../cpp/if-else-statement-cpp.md) - Improved code examples. -- [__fastcall](../cpp/fastcall.md) - Added info about classes, structs, and unions. -- [`decltype` (C++)](../cpp/decltype-cpp.md) - Fixed code example. -- [noreturn](../cpp/noreturn.md) - Improved example. - -### C runtime library - -**Updated articles** - -- [`fegetround`, `fesetround`](../c-runtime-library/reference/fegetround-fesetround2.md) - Noted change of the values for `FE_UPWARD` and `FE_DOWNWARD`. - -### C/C++ compiler and tools errors and warnings - -**Updated articles** - -Clarified behavior for the following warnings: - -- [Compiler Error C2018](../error-messages/compiler-errors-1/compiler-error-c2018.md), [Compiler Error C2023](../error-messages/compiler-errors-1/compiler-error-c2023.md) -- [Compiler Error C2024](../error-messages/compiler-errors-1/compiler-error-c2024.md), [Compiler Error C2049](../error-messages/compiler-errors-1/compiler-error-c2049.md) -- [Compiler Error C2058](../error-messages/compiler-errors-1/compiler-error-c2058.md), [Compiler Error C2061](../error-messages/compiler-errors-1/compiler-error-c2061.md) -- [Compiler Error C2082](../error-messages/compiler-errors-1/compiler-error-c2082.md), [Compiler Error C2129](../error-messages/compiler-errors-1/compiler-error-c2129.md) -- [Compiler Error C2345](../error-messages/compiler-errors-1/compiler-error-c2345.md), [Compiler Error C2397](../error-messages/compiler-errors-1/compiler-error-c2397.md) -- [Compiler Error C2510](../error-messages/compiler-errors-2/compiler-error-c2510.md), [Compiler Error C2534](../error-messages/compiler-errors-2/compiler-error-c2534.md) -- [Compiler Error C2993](../error-messages/compiler-errors-2/compiler-error-c2993.md), [Compiler Error C3550](../error-messages/compiler-errors-2/compiler-error-c3550.md) -- [Compiler Error C3551](../error-messages/compiler-errors-2/compiler-error-c3551.md) -### Read and write code using C++ in Visual Studio - -**New articles** - -- [Clean up C/C++ includes in Visual Studio](../ide/include-cleanup-overview.md) -- [Configure C/C++ Include Cleanup in Visual Studio](../ide/include-cleanup-config.md) -- [Include Cleanup messages](../ide/include-cleanup-messages.md) -- [`lnt-make-member-function-const`](../ide/lnt-make-member-function-const.md) -- [`lnt-naming-convention`](../ide/lnt-naming-convention.md) - -### C/C++ in Visual Studio overview - -**Updated articles** - -- [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](../overview/cpp-conformance-improvements.md) - Added conformance updates for 17.7 and 17.8. -- [What's new for C++ in Visual Studio 2022](../overview/what-s-new-for-visual-cpp-in-visual-studio.md) - Updated what's new in C++. - -### C++ Standard Template Library (STL) reference - -**Updated articles** - -- [auto_ptr class](../standard-library/auto-ptr-class.md) - Added deprecation info - -### Active Template Library (ATL), Microsoft Foundation Classes (MFC) - -**Updated articles** - -- [Connection maps](../mfc/reference/connection-maps.md) - Corrected parameter description of `pRefCount` in `AfxConnection(Un)Advise`. -- [`CSimpleStringT` Class](../atl-mfc-shared/reference/csimplestringt-class.md) - Updated code example. -- [MFC class hierarchy chart](../mfc/hierarchy-chart.md) - Updated MFC hierarchy chart. - -## Community contributors - -The following people contributed to the C++, C, and Assembler docs during this period. Thank you! See our [contributor guide](/contribute) if you'd like to learn how to contribute. - -- [Rageking8](https://github.com/Rageking8) ![26 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-26-green) -- [0xbadfca11](https://github.com/0xbadfca11) ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [edmund-leibert](https://github.com/edmund-leibert) - Edmund Leibert III ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [glenn-slayden](https://github.com/glenn-slayden) - Glenn Slayden ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [lb90](https://github.com/lb90) ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [tsuyo](https://github.com/tsuyo) - Tsuyoshi Miyake ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) - -## What's new history - -This section lists major changes to the Microsoft C++ docs for May 2023 to August 2023. - -For what's new related to C++ in Visual Studio, see [What's new for C++ in Visual Studio](what-s-new-for-visual-cpp-in-visual-studio.md). - -### Active Template Library (ATL), Microsoft Foundation Classes (MFC) - -**Updated articles** - -- [Connection maps](../mfc/reference/connection-maps.md) - Corrected parameter description of `pRefCount` in `AfxConnection(Un)Advise`. -- [`CSimpleStringT` Class](../atl-mfc-shared/reference/csimplestringt-class.md) - Updated code example. -- [MFC class hierarchy chart](../mfc/hierarchy-chart.md) - Updated MFC hierarchy chart. - -### C language - -**New articles** - -- [Generic selection (C11)](../c-language/generic-selection.md). - -**Updated articles** - -- [`register` storage-class specifier](../c-language/register-storage-class-specifier.md) - Added C5033 warning. -- [C Pragmas](../c-language/c-pragmas.md) - Added `system_header` pragma documentation. -- [C Bit Fields](../c-language/c-bit-fields.md) - Clarified example & documented that MSVC doesn't straddle bit-fields. - -### C runtime library - -**Updated articles** - -- [`_iob`](../c-runtime-library/iob.md) - Clarified value of `_IOB_ENTRIES` across VS versions. -- [`_snprintf_s`, `_snprintf_s_l`, `_snwprintf_s`, `_snwprintf_s_l`](../c-runtime-library/reference/snprintf-s-snprintf-s-l-snwprintf-s-snwprintf-s-l.md) - Summarized behavior for argument value combinations. -- [`snprintf`, `_snprintf`, `_snprintf_l`, `_snwprintf`, `_snwprintf_l`](../c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md) - Summarized behavior for argument value combinations. -- [`vsnprintf_s`, `_vsnprintf_s`, `_vsnprintf_s_l`, `_vsnwprintf_s`, `_vsnwprintf_s_l`](../c-runtime-library/reference/vsnprintf-s-vsnprintf-s-vsnprintf-s-l-vsnwprintf-s-vsnwprintf-s-l.md) - Summarized behavior for argument value combinations. -- [`vsnprintf`, `_vsnprintf`, `_vsnprintf_l`, `_vsnwprintf`, `_vsnwprintf_l`](../c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l.md) - Summarized behavior for argument value combinations. -- [`to` functions](../c-runtime-library/to-functions.md) - Fixed code example. -- [`strerror_s`, `_strerror_s`, `_wcserror_s`, `__wcserror_s`](../c-runtime-library/reference/strerror-s-strerror-s-wcserror-s-wcserror-s.md) - Clarified behavior. -- [`strerror`, `_strerror`, `_wcserror`, `__wcserror`](../c-runtime-library/reference/strerror-strerror-wcserror-wcserror.md) - Clarified behavior. -- [`_stat`, `_stat32`, `_stat64`, `_stati64`, `_stat32i64`, `_stat64i32`, `_wstat`, `_wstat32`, `_wstat64`, `_wstati64`, `_wstat32i64`, `_wstat64i32`](../c-runtime-library/reference/stat-functions.md) - Called out changes to `_stat` family of functions across versions of Visual Studio. - -### C/C++ compiler intrinsics and assembly language - -**Updated articles** - -- [`__umulh`](../intrinsics/umulh.md) - Updated the code example. - -### C/C++ in Visual Studio overview - -**Updated articles** - -- [C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2022](../overview/cpp-conformance-improvements.md) - Added 17.6 conformance info. - -### C/C++ projects and build systems - -**New articles** - -- [/jumptablerdata (put switch case jump tables in `.rdata`)](../build/reference/jump-table-rdata.md). - -**Updated articles** - -- [Advanced Property Page](../build/reference/advanced-property-page.md) - Updates regarding managed projects that target .NET Framework versus .NET. -- [`/openmp` (Enable OpenMP Support)](../build/reference/openmp-enable-openmp-2-0-support.md) - Added supported versions. -- [Create a C++ console app project](../build/vscpp-step-1-create.md) - Updated for current version of Visual Studio. -- [Build and run a C++ console app project](../build/vscpp-step-2-build.md) - Updated steps to accommodate Visual Studio version differences regarding the location of the debug folder. -- [`/ZW` (Windows Runtime Compilation)](../build/reference/zw-windows-runtime-compilation.md) - Added a note about an incompatibility. -- [Configure and build with CMake Presets in Visual Studio](../build/cmake-presets-vs.md) - Updated supported CMake and *`CMakePresets.json`* versions. -- [`/Zc:lambda` (Enable updated lambda processor)](../build/reference/zc-lambda.md) - Added note that `/permissive-` implies `/Zc:lambda`. -- [C/C++ Property Pages](../build/reference/c-cpp-prop-page.md) - Added description for C language and building ISO standard library modules properties. -- [Overview of ARM64 ABI conventions](../build/arm64-windows-abi-conventions.md) - Clarified terminology regarding register volatility. - -### C++ in Visual Studio - -**New articles** - -- [Visual Studio Tools for Unreal Engine overview](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-overview) -- [Install Visual Studio Tools for Unreal Engine](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-install) -- [Quickstart: Visual Studio Tools for Unreal Engine](/visualstudio/gamedev/unreal/get-started/vs-tools-unreal-quickstart) - -**Updated articles** - -- [Overview of modules in C++](../cpp/modules-cpp.md) - Add description for building ISO standard library modules. -- [Compiler Limits](../cpp/compiler-limits.md) - Updated Parameters in macro definition limits. -- [How to: Create and Use shared_ptr instances](../cpp/how-to-create-and-use-shared-ptr-instances.md) - Added a code example. -- [Tutorial: Import the C++ standard library using modules from the command line](../cpp/tutorial-import-stl-named-module.md) - Added a description for building ISO standard library modules. -- [type_info Class](../cpp/type-info-class.md) - Marked `raw_name` Microsoft-specific. - -### C++ porting and upgrade guide - -**Updated articles** - -- [Microsoft C/C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md)- Noted changes to `_stat` family of functions behavior. - -### C++ Standard Template Library (STL) reference - -**Updated articles** - -- [`basic_string` Class](../standard-library/basic-string-class.md) - Marked `_Copy_s` Microsoft-specific. - -### Code quality - -**New articles** - -- [Warning `C26831`](../code-quality/c26831.md) -- [Warning `C26832`](../code-quality/c26832.md) -- [Warning `C26833`](../code-quality/c26833.md) -- [Warning `C26835`](../code-quality/c26835.md) - -**Updated articles** - -- [Use the C++ Core Guidelines checkers](../code-quality/using-the-cpp-core-guidelines-checkers.md) - No longer suggest turning off annotation processing for CppCoreChecks. - -Clarified behavior for the following warnings: -- [Warning C6011](../code-quality/c6011.md), [Warning C6200](../code-quality/c6200.md) -- [Warning C26437](../code-quality/c26437.md), [Warning C26439](../code-quality/c26439.md) -- [Warning C26441](../code-quality/c26441.md), [Warning C26444](../code-quality/c26444.md) -- [Warning C26449](../code-quality/c26449.md), [Warning C26450](../code-quality/c26450.md) -- [Warning C26451](../code-quality/c26451.md), [Warning C26452](../code-quality/c26452.md) -- [Warning C26453](../code-quality/c26453.md), [Warning C26454](../code-quality/c26454.md) -- [Warning C26455](../code-quality/c26455.md), [Warning C26494](../code-quality/c26494.md) -- [Warning C26495](../code-quality/c26495.md), [Warning C26498](../code-quality/c26498.md) -- [Warning C26800](../code-quality/c26800.md), [Warning C26810](../code-quality/c26810.md) -- [Warning C26811](../code-quality/c26811.md), [Warning C26813](../code-quality/c26813.md) -- [Warning C26815](../code-quality/c26815.md), [Warning C26816](../code-quality/c26816.md) -- [Warning C26819](../code-quality/c26819.md), [Warning C26827](../code-quality/c26827.md) -- [Warning C26828](../code-quality/c26828.md), [Warning C28196](../code-quality/c28196.md) -- [Warning C28306](../code-quality/c28306.md), [Warning C28307](../code-quality/c28307.md) -- [Warning C33010](../code-quality/c33010.md) - -### Cross platform development - -**Updated articles** - -- [Build an OpenGL ES application on Android and iOS](../cross-platform/build-an-opengl-es-application-on-android-and-ios.md) - Updated documentation to reflect removal of OpenGL. - -### Overview of Windows programming in C++ - -**Updated articles** - -- [Microsoft Visual C++ Redistributable latest supported downloads](../windows/latest-supported-vc-redist.md) - Noted that VS 2012 reached end of extended support and clarified that the Visual C++ Redistributable for Visual Studio 2015-2022 doesn't have separate packages for different languages. - -### Community contributors - -The following people contributed to the C++, C, and Assembler docs during this period. Thank you! See our [contributor guide](/contribute) if you'd like to learn how to contribute. - -- [moonlit-melody](https://github.com/moonlit-melody) - melody ![4 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-4-green) -- [AlexGuteniev](https://github.com/AlexGuteniev) - Alex Guteniev ![2 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [MAP233224](https://github.com/MAP233224) - MAP ![2 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-2-green) -- [Alice2O3](https://github.com/Alice2O3) - ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [bearerer](https://github.com/bearerer) - ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [bryangalindo](https://github.com/bryangalindo) - Bryan Galindo ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [enricosebastian](https://github.com/enricosebastian) - Enrico Sebastian ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [fsb4000](https://github.com/fsb4000) - Igor Zhukov ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [Passw](https://github.com/Passw) - ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) -- [stephen9357](https://github.com/stephen9357) - ![1 pull requests.](https://img.shields.io/badge/Merged%20Pull%20Requests-1-green) diff --git a/docs/parallel/amp/graphics-cpp-amp.md b/docs/parallel/amp/graphics-cpp-amp.md index 745744c100..2de8ab623c 100644 --- a/docs/parallel/amp/graphics-cpp-amp.md +++ b/docs/parallel/amp/graphics-cpp-amp.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Graphics (C++ AMP)" title: "Graphics (C++ AMP)" -ms.date: "11/04/2016" +description: "Learn more about: Graphics (C++ AMP)" +ms.date: 11/04/2016 --- # Graphics (C++ AMP) @@ -139,7 +139,7 @@ There are limits on the size of each dimension of the `texture` object, as shown ### Reading from Texture Objects -You can read from a `texture` object by using [texture::operator\[\]](reference/texture-class.md#operator_at), [texture::operator() Operator](reference/texture-class.md#operator_call), or [texture::get Method](reference/texture-class.md#get). The two operators return a value, not a reference. Therefore, you cannot write to a `texture` object by using `texture::operator\[\]`. +You can read from a `texture` object by using [texture::operator\[\]](reference/texture-class.md#operator_at), [texture::operator() Operator](reference/texture-class.md#operator_call), or [texture::get Method](reference/texture-class.md#get). The two operators return a value, not a reference. Therefore, you cannot write to a `texture` object by using `texture::operator[]`. ```cpp void readTexture() { diff --git a/docs/parallel/amp/reference/accelerator-class.md b/docs/parallel/amp/reference/accelerator-class.md index 02b879fba9..e5f08b9b8a 100644 --- a/docs/parallel/amp/reference/accelerator-class.md +++ b/docs/parallel/amp/reference/accelerator-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: accelerator Class" title: "accelerator Class" -ms.date: "11/04/2016" +description: "Learn more about: accelerator Class" +ms.date: 11/04/2016 f1_keywords: ["AMPRT/accelerator", "AMPRT/Concurrency::accelerator::accelerator", "AMPRT/Concurrency::accelerator::create_view", "AMPRT/Concurrency::accelerator::get_all", "AMPRT/Concurrency::accelerator::get_auto_selection_view", "AMPRT/Concurrency::accelerator::get_dedicated_memory", "AMPRT/Concurrency::accelerator::get_default_cpu_access_type", "AMPRT/Concurrency::accelerator::get_default_view", "AMPRT/Concurrency::accelerator::get_description", "AMPRT/Concurrency::accelerator::get_device_path", "AMPRT/Concurrency::accelerator::get_has_display", "AMPRT/Concurrency::accelerator::get_is_debug", "AMPRT/Concurrency::accelerator::get_is_emulated", "AMPRT/Concurrency::accelerator::get_supports_cpu_shared_memory", "AMPRT/Concurrency::accelerator::get_supports_double_precision", "AMPRT/Concurrency::accelerator::get_supports_limited_double_precision", "AMPRT/Concurrency::accelerator::get_version", "AMPRT/Concurrency::accelerator::set_default", "AMPRT/Concurrency::accelerator::set_default_cpu_access_type", "AMPRT/Concurrency::accelerator::cpu_accelerator", "AMPRT/Concurrency::accelerator::dedicated_memory", "AMPRT/Concurrency::accelerator::default_accelerator", "AMPRT/Concurrency::accelerator::default_cpu_access_type", "AMPRT/Concurrency::accelerator::default_view", "AMPRT/Concurrency::accelerator::description", "AMPRT/Concurrency::accelerator::device_path", "AMPRT/Concurrency::accelerator::direct3d_ref", "AMPRT/Concurrency::accelerator::direct3d_warp", "AMPRT/Concurrency::accelerator::has_display", "AMPRT/Concurrency::accelerator::is_debug", "AMPRT/Concurrency::accelerator::is_emulated", "AMPRT/Concurrency::accelerator::supports_cpu_shared_memory", "AMPRT/Concurrency::accelerator::supports_double_precision", "AMPRT/Concurrency::accelerator::supports_limited_double_precision", "AMPRT/Concurrency::accelerator::version"] helpviewer_keywords: ["accelerator class"] -ms.assetid: 37eed593-cf87-4611-9cdc-e98df6c2377a --- # accelerator Class @@ -45,7 +44,7 @@ class accelerator; |[get_supports_limited_double_precision](#get_supports_limited_double_precision)|Determines whether the `accelerator` has limited support for double-precision math.| |[get_version](#get_version)|Returns the version of the `accelerator`.| |[set_default](#set_default)|Returns the path of the default accelerator.| -|[set_default_cpu_access_type](#set_default_cpu_access_type)|Sets the default CPU [access_type](concurrency-namespace-enums-amp.md#access_type)for arrays and implicit memory allocations made on this `accelerator`.| +|[set_default_cpu_access_type](#set_default_cpu_access_type)|Sets the default CPU [access_type](concurrency-namespace-enums-amp.md#access_type) for arrays and implicit memory allocations made on this `accelerator`.| ### Public Operators @@ -62,7 +61,7 @@ class accelerator; |[cpu_accelerator](#cpu_accelerator)|Gets a string constant for the CPU `accelerator`.| |[dedicated_memory](#dedicated_memory)|Gets the dedicated memory for the `accelerator`, in kilobytes.| |[default_accelerator](#default_accelerator)|Gets a string constant for the default `accelerator`.| -|[default_cpu_access_type](#default_cpu_access_type)|Gets or sets the default CPU [access_type](concurrency-namespace-enums-amp.md#access_type)for arrays and implicit memory allocations made on this `accelerator`.| +|[default_cpu_access_type](#default_cpu_access_type)|Gets or sets the default CPU [access_type](concurrency-namespace-enums-amp.md#access_type) for arrays and implicit memory allocations made on this `accelerator`.| |[default_view](#default_view)|Gets the default `accelerator_view` object that is associated with the `accelerator`.| |[description](#description)|Gets a short description of the `accelerator` device.| |[device_path](#device_path)|Gets the path of the device.| @@ -165,7 +164,7 @@ static const wchar_t default_accelerator[]; ## default_cpu_access_type -The default cpu [access_type](concurrency-namespace-enums-amp.md#access_type)for arrays and implicit memory allocations made on this `accelerator`. +The default cpu [access_type](concurrency-namespace-enums-amp.md#access_type) for arrays and implicit memory allocations made on this `accelerator`. ```cpp __declspec(property(get= get_default_cpu_access_type)) access_type default_cpu_access_type; diff --git a/docs/parallel/amp/reference/concurrency-direct3d-namespace-functions-amp.md b/docs/parallel/amp/reference/concurrency-direct3d-namespace-functions-amp.md index c93112ffca..d0a6ddd7c4 100644 --- a/docs/parallel/amp/reference/concurrency-direct3d-namespace-functions-amp.md +++ b/docs/parallel/amp/reference/concurrency-direct3d-namespace-functions-amp.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Concurrency::direct3d namespace functions (AMP)" title: "Concurrency::direct3d namespace functions (AMP)" +description: "Learn more about: Concurrency::direct3d namespace functions (AMP)" ms.date: "08/31/2018" f1_keywords: ["amp/Concurrency::direct3d::abs", "amp/Concurrency::direct3d::countbits", "amp/Concurrency::direct3d::create_accelerator_view", "amp/Concurrency::direct3d::d3d_access_lock", "amp/Concurrency::direct3d::d3d_access_unlock", "amp/Concurrency::direct3d::firstbithigh", "amp/Concurrency::direct3d::get_buffer", "amp/Concurrency::direct3d::get_device", "amp/Concurrency::direct3d::imax", "amp/Concurrency::direct3d::is_timeout_disabled", "amp/Concurrency::direct3d::mad", "amp/Concurrency::direct3d::noise", "amp/Concurrency::direct3d::radians", "amp/Concurrency::direct3d::reversebits", "amp/Concurrency::direct3d::saturate", "amp/Concurrency::direct3d::smoothstep", "amp/Concurrency::direct3d::step", "amp/Concurrency::direct3d::umin"] -ms.assetid: 28943b62-52c9-42dc-baf1-ca7b095c1a19 --- # Concurrency::direct3d namespace functions (AMP) @@ -47,11 +46,12 @@ ms.assetid: 28943b62-52c9-42dc-baf1-ca7b095c1a19 ## Requirements **Header:** amp.h + **Namespace:** Concurrency ## abs -Returns the absolute value of the argument +Returns the absolute value of the argument. ```cpp inline int abs(int _X) restrict(amp); @@ -59,7 +59,7 @@ inline int abs(int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Integer value ### Return Value @@ -84,13 +84,13 @@ inline int clamp( ### Parameters -*_X*
-The value to be clamped +*_X*\ +The value to be clamped. -*_Min*
+*_Min*\ The lower bound of the clamping range. -*_Max*
+*_Max*\ The upper bound of the clamping range. ### Return Value @@ -99,7 +99,7 @@ The clamped value of `_X`. ## countbits -Counts the number of set bits in _X +Counts the number of set bits in `_X`. ```cpp inline unsigned int countbits(unsigned int _X) restrict(amp); @@ -107,12 +107,12 @@ inline unsigned int countbits(unsigned int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Unsigned integer value ### Return Value -Returns the number of set bits in _X +Returns the number of set bits in `_X`. ## create_accelerator_view @@ -122,27 +122,27 @@ Creates an [accelerator_view](accelerator-view-class.md) object from a pointer t ```cpp accelerator_view create_accelerator_view( - IUnknown * _D3D_device + IUnknown * _D3D_device, queuing_mode _Qmode = queuing_mode_automatic); accelerator_view create_accelerator_view( accelerator& _Accelerator, - bool _Disable_timeout + bool _Disable_timeout, queuing_mode _Qmode = queuing_mode_automatic); ``` ### Parameters -*_Accelerator*
+*_Accelerator*\ The accelerator on which the new accelerator_view is to be created. -*_D3D_device*
+*_D3D_device*\ The pointer to the Direct3D device interface. -*_Disable_timeout*
+*_Disable_timeout*\ A Boolean parameter that specifies whether timeout should be disabled for the newly created accelerator_view. This corresponds to the D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT flag for Direct3D device creation and is used to indicate if the operating system should allow workloads that take more than 2 seconds to execute without resetting the device per the Windows timeout detection and recovery mechanism. Use of this flag is recommended if you need to perform time consuming tasks on the accelerator_view. -*_Qmode*
+*_Qmode*\ The [queuing_mode](concurrency-namespace-enums-amp.md#queuing_mode) to be used for the newly created accelerator_view. This parameter has a default value of `queuing_mode_automatic`. ## Return Value @@ -167,7 +167,7 @@ void __cdecl d3d_access_lock(accelerator_view& _Av); ### Parameters -*_Av*
+*_Av*\ The accelerator_view to lock. ## d3d_access_try_lock @@ -180,7 +180,7 @@ bool __cdecl d3d_access_try_lock(accelerator_view& _Av); ### Parameters -*_Av*
+*_Av*\ The accelerator_view to lock. ### Return Value @@ -197,12 +197,12 @@ void __cdecl d3d_access_unlock(accelerator_view& _Av); ### Parameters -*_Av*
+*_Av*\ The accelerator_view for which the lock is to be released. ## firstbithigh -Gets the location of the first set bit in _X, beginning with the highest-order bit and moving towards the lowest-order bit. +Gets the location of the first set bit in `_X`, beginning with the highest-order bit and moving towards the lowest-order bit. ```cpp inline int firstbithigh(int _X) restrict(amp); @@ -210,16 +210,16 @@ inline int firstbithigh(int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Integer value ### Return Value -The location of the first set bit +The location of the first set bit. ## firstbitlow -Gets the location of the first set bit in _X, beginning with the lowest-order bit and working toward the highest-order bit. +Gets the location of the first set bit in `_X`, beginning with the lowest-order bit and working toward the highest-order bit. ```cpp inline int firstbitlow(int _X) restrict(amp); @@ -227,12 +227,12 @@ inline int firstbitlow(int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Integer value ### Return Value -Returns The location of the first set bit +Returns The location of the first set bit. ## get_buffer @@ -244,25 +244,25 @@ template< int _Rank > IUnknown *get_buffer( - const array& _Array) ; + const array& _Array); ``` ### Parameters -*value_type*
+*value_type*\ The type of elements in the array. -*_Rank*
+*_Rank*\ The rank of the array. -*_Array*
+*_Array*\ An array on a Direct3D accelerator_view for which the underlying Direct3D buffer interface is returned. ### Return Value The IUnknown interface pointer corresponding to the Direct3D buffer underlying the array. -## get_device +## get_device Get the D3D device interface underlying a accelerator_view. @@ -272,7 +272,7 @@ IUnknown* get_device(const accelerator_view Av); ### Parameters -*Av*
+*Av*\ The D3D accelerator_view for which the underlying D3D device interface is returned. ### Return value @@ -281,7 +281,7 @@ The `IUnknown` interface pointer of the D3D device underlying the accelerator_vi ## imax -Determine the maximum numeric value of the arguments +Determine the maximum numeric value of the arguments. ```cpp inline int imax( @@ -291,19 +291,19 @@ inline int imax( ### Parameters -*_X*
+*_X*\ Integer value -*_Y*
+*_Y*\ Integer value ### Return Value -Return the maximum numeric value of the arguments +Return the maximum numeric value of the arguments. ## imin -Determine the minimum numeric value of the arguments +Determine the minimum numeric value of the arguments. ```cpp inline int imin( @@ -313,15 +313,15 @@ inline int imin( ### Parameters -*_X*
+*_X*\ Integer value -*_Y*
+*_Y*\ Integer value ### Return Value -Return the minimum numeric value of the arguments +Return the minimum numeric value of the arguments. ## is_timeout_disabled @@ -333,7 +333,7 @@ bool __cdecl is_timeout_disabled(const accelerator_view& _Accelerator_view); ### Parameters -*_Accelerator_view*
+*_Accelerator_view*\ The accelerator_view for which the timeout disabled setting is to be queried. ### Return Value @@ -368,13 +368,13 @@ inline unsigned int mad( ### Parameters -*_X*
+*_X*\ The first specified argument. -*_Y*
+*_Y*\ The second specified argument. -*_Z*
+*_Z*\ The third specified argument. ### Return Value @@ -393,24 +393,24 @@ template< array make_array( const extent<_Rank>& _Extent, const Concurrency::accelerator_view& _Rv, - IUnknown* _D3D_buffer) ; + IUnknown* _D3D_buffer); ``` ### Parameters -*value_type*
+*value_type*\ The element type of the array to be created. -*_Rank*
+*_Rank*\ The rank of the array to be created. -*_Extent*
+*_Extent*\ An extent that describes the shape of the array aggregate. -*_Rv*
+*_Rv*\ A D3D accelerator view on which the array is to be created. -*_D3D_buffer*
+*_D3D_buffer*\ IUnknown interface pointer of the D3D buffer to create the array from. ### Return Value @@ -419,7 +419,7 @@ An array created using the provided Direct3D buffer. ## noise -Generates a random value using the Perlin noise algorithm +Generates a random value using the Perlin noise algorithm. ```cpp inline float noise(float _X) restrict(amp); @@ -427,16 +427,16 @@ inline float noise(float _X) restrict(amp); ### Parameters -*_X*
-Floating-point value from which to generate Perlin noise +*_X*\ +Floating-point value from which to generate Perlin noise. ### Return Value -Returns The Perlin noise value within a range between -1 and 1 +Returns the Perlin noise value within a range between -1 and 1. ## radians -Converts _X from degrees to radians +Converts `_X` from degrees to radians. ```cpp inline float radians(float _X) restrict(amp); @@ -444,12 +444,12 @@ inline float radians(float _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Floating-point value ### Return Value -Returns _X converted from degrees to radians +Returns `_X` converted from degrees to radians. ## rcp @@ -463,7 +463,7 @@ inline double rcp(double _X) restrict(amp); ### Parameters -*_X*
+*_X*\ The value for which to compute the reciprocal. ### Return Value @@ -472,7 +472,7 @@ The reciprocal of the specified argument. ## reversebits -Reverses the order of the bits in _X +Reverses the order of the bits in `_X`. ```cpp inline unsigned int reversebits(unsigned int _X) restrict(amp); @@ -480,16 +480,16 @@ inline unsigned int reversebits(unsigned int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Unsigned integer value ### Return Value -Returns the value with the bit order reversed in _X +Returns the value with the bit order reversed in `_X`. ## saturate -Clamps _X within the range of 0 to 1 +Clamps `_X` within the range of 0 to 1. ```cpp inline float saturate(float _X) restrict(amp); @@ -497,12 +497,12 @@ inline float saturate(float _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Floating-point value ### Return Value -Returns _X clamped within the range of 0 to 1 +Returns `_X` clamped within the range of 0 to 1. ## sign @@ -514,7 +514,7 @@ inline int sign(int _X) restrict(amp); ### Parameters -*_X*
+*_X*\ Integer value ### Return Value @@ -523,7 +523,7 @@ The sign of the argument. ## smoothstep -Returns a smooth Hermite interpolation between 0 and 1, if _X is in the range [_Min, _Max]. +Returns a smooth Hermite interpolation between 0 and 1, if `_X` is in the range [_Min, _Max]. ```cpp inline float smoothstep( @@ -534,22 +534,22 @@ inline float smoothstep( ### Parameters -*_Min*
+*_Min*\ Floating-point value -*_Max*
+*_Max*\ Floating-point value -*_X*
+*_X*\ Floating-point value ### Return Value -Returns 0 if _X is less than _Min; 1 if _X is greater than _Max; otherwise, a value between 0 and 1 if _X is in the range [_Min, _Max] +Returns 0 if `_X` is less than _Min; 1 if `_X` is greater than _Max; otherwise, a value between 0 and 1 if `_X` is in the range [_Min, _Max]. ## step -Compares two values, returning 0 or 1 based on which value is greater +Compares two values, returning 0 or 1 based on which value is greater. ```cpp inline float step( @@ -559,19 +559,19 @@ inline float step( ### Parameters -*_Y*
+*_Y*\ Floating-point value -*_X*
+*_X*\ Floating-point value ### Return Value -Returns 1 if the _X is greater than or equal to _Y; otherwise, 0 +Returns 1 if the `_X` is greater than or equal to `_Y`; otherwise, 0. ## umax -Determine the maximum numeric value of the arguments +Determine the maximum numeric value of the arguments. ```cpp inline unsigned int umax( @@ -581,19 +581,19 @@ inline unsigned int umax( ### Parameters -*_X*
+*_X*\ Integer value -*_Y*
+*_Y*\ Integer value ### Return Value -Return the maximum numeric value of the arguments +Return the maximum numeric value of the arguments. ## umin -Determine the minimum numeric value of the arguments +Determine the minimum numeric value of the arguments. ```cpp inline unsigned int umin( @@ -603,15 +603,15 @@ inline unsigned int umin( ### Parameters -*_X*
+*_X*\ Integer value -*_Y*
+*_Y*\ Integer value ### Return Value -Return the minimum numeric value of the arguments +Return the minimum numeric value of the arguments. ## See also diff --git a/docs/parallel/amp/reference/concurrency-graphics-namespace-functions.md b/docs/parallel/amp/reference/concurrency-graphics-namespace-functions.md index ac0f29d676..e9e8eef189 100644 --- a/docs/parallel/amp/reference/concurrency-graphics-namespace-functions.md +++ b/docs/parallel/amp/reference/concurrency-graphics-namespace-functions.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: Concurrency::graphics namespace functions" title: "Concurrency::graphics namespace functions" -ms.date: "11/04/2016" +description: "Learn more about: Concurrency::graphics namespace functions" +ms.date: 11/04/2016 f1_keywords: ["amp_graphics/Concurrency::fast_math::copy_async", "amp_graphics/Concurrency::fast_math::copy"] -ms.assetid: ace01cd5-29d3-4356-930e-c81a61c5f934 --- # Concurrency::graphics namespace functions -[copy](#copy)\ -[copy_async](#copy_async) +The following functions are available in the `Concurrency::graphics` namespace: ## copy Function (Concurrency::graphics Namespace) diff --git a/docs/parallel/amp/reference/concurrency-namespace-constants-amp.md b/docs/parallel/amp/reference/concurrency-namespace-constants-amp.md index b3e6db41fd..a03bea4d1a 100644 --- a/docs/parallel/amp/reference/concurrency-namespace-constants-amp.md +++ b/docs/parallel/amp/reference/concurrency-namespace-constants-amp.md @@ -1,16 +1,14 @@ --- -description: "Learn more about: Concurrency namespace constants (AMP)" title: "Concurrency namespace constants (AMP)" -ms.date: "11/04/2016" +description: "Learn more about: Concurrency namespace constants (AMP)" +ms.date: 11/04/2016 f1_keywords: ["amp/Concurrency::HLSL_MAX_NUM_BUFFERS", "amp/Concurrency::MODULENAME_MAX_LENGTH"] -ms.assetid: 13a8e8cd-2eec-4e60-a91d-5d271072747b --- # Concurrency namespace constants (AMP) -[HLSL_MAX_NUM_BUFFERS](#hlsl_max_num_buffers)\ -[MODULENAME_MAX_LENGTH](#modulename_max_length) +The following constants are defined in the `Concurrency` namespace (AMP): -## HLSL_MAX_NUM_BUFFERS Constant +## `HLSL_MAX_NUM_BUFFERS` Constant The maximum number of buffers allowed by DirectX. @@ -18,9 +16,9 @@ The maximum number of buffers allowed by DirectX. static const UINT HLSL_MAX_NUM_BUFFERS = 64 + 128; ``` -## MODULENAME_MAX_LENGTH Constant +## `MODULENAME_MAX_LENGTH` constant -Stores the maximum length of the module name. This value must be the same on the compiler and runtime. +Stores the maximum length of the module name. This value must be the same at compile time and runtime. ```cpp static const UINT MODULENAME_MAX_LENGTH = 1024; diff --git a/docs/parallel/amp/reference/concurrency-namespace-enums-amp.md b/docs/parallel/amp/reference/concurrency-namespace-enums-amp.md index 55a34e9c71..feef3abec3 100644 --- a/docs/parallel/amp/reference/concurrency-namespace-enums-amp.md +++ b/docs/parallel/amp/reference/concurrency-namespace-enums-amp.md @@ -1,18 +1,14 @@ --- -description: "Learn more about: Concurrency namespace enums (AMP)" title: "Concurrency namespace enums (AMP)" -ms.date: "11/04/2016" +description: "Learn more about: Concurrency namespace enums (AMP)" +ms.date: 11/04/2016 f1_keywords: ["amp/Concurrency::access_type", "amp/Concurrency::queuing_mode"] -ms.assetid: 4c87457e-184f-4992-81ab-ca75e7d524ab --- -# Concurrency namespace enums (AMP) - -[access_type Enumeration](#access_type)\ -[queuing_mode Enumeration](#queuing_mode) +# `Concurrency` namespace enums (AMP) -## access_type Enumeration +The following enumerations are available in the `Concurrency` namespace: -Enumeration type used to denote the various types of access to data. +## `access_type` enumeration ```cpp enum access_type; @@ -28,7 +24,7 @@ enum access_type; |`access_type_read_write`|Shared. The allocation is accessible on the accelerator and is writable on the CPU.| |`access_type_write`|Shared. The allocation is accessible on the accelerator and is both readable and writable on the CPU.| -## queuing_mode Enumeration +## `queuing_mode` enumeration Specifies the queuing modes that are supported on the accelerator. diff --git a/docs/parallel/amp/reference/concurrency-precise-math-namespace-functions.md b/docs/parallel/amp/reference/concurrency-precise-math-namespace-functions.md index cfbff07214..a7908a8b41 100644 --- a/docs/parallel/amp/reference/concurrency-precise-math-namespace-functions.md +++ b/docs/parallel/amp/reference/concurrency-precise-math-namespace-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Concurrency::precise_math namespace functions" title: "Concurrency::precise_math namespace functions" +description: "Learn more about: Concurrency::precise_math namespace functions" ms.date: "11/04/2016" f1_keywords: ["amp_math/Concurrency::precise_math::acos", "amp_math/Concurrency::precise_math::acosh", "amp_math/Concurrency::precise_math::acoshf", "amp_math/Concurrency::precise_math::asinf", "amp_math/Concurrency::precise_math::asinh", "amp_math/Concurrency::precise_math::atan", "amp_math/Concurrency::precise_math::atan2", "amp_math/Concurrency::precise_math::atanf", "amp_math/Concurrency::precise_math::atanh", "amp_math/Concurrency::precise_math::cbrt", "amp_math/Concurrency::precise_math::cbrtf", "amp_math/Concurrency::precise_math::ceilf", "amp_math/Concurrency::precise_math::copysign", "amp_math/Concurrency::precise_math::cos", "amp_math/Concurrency::precise_math::cosf", "amp_math/Concurrency::precise_math::coshf", "amp_math/Concurrency::precise_math::cospi", "amp_math/Concurrency::precise_math::erf", "amp_math/Concurrency::precise_math::erfc", "amp_math/Concurrency::precise_math::erfcinv", "amp_math/Concurrency::precise_math::erfcinvf", "amp_math/Concurrency::precise_math::erfinv", "amp_math/Concurrency::precise_math::erfinvf", "amp_math/Concurrency::precise_math::exp10", "amp_math/Concurrency::precise_math::exp10f", "amp_math/Concurrency::precise_math::exp2f", "amp_math/Concurrency::precise_math::expf", "amp_math/Concurrency::precise_math::expm1f", "amp_math/Concurrency::precise_math::fabs", "amp_math/Concurrency::precise_math::floor", "amp_math/Concurrency::precise_math::fdim", "amp_math/Concurrency::precise_math::floorf", "amp_math/Concurrency::precise_math::fmaf", "amp_math/Concurrency::precise_math::fmaxf", "amp_math/Concurrency::precise_math::fmin", "amp_math/Concurrency::precise_math::fmod", "amp_math/Concurrency::precise_math::fmodf", "amp_math/Concurrency::precise_math::frexp", "amp_math/Concurrency::precise_math::frexpf", "amp_math/Concurrency::precise_math::hypotf", "amp_math/Concurrency::precise_math::ilogb", "amp_math/Concurrency::precise_math::isfinite", "amp_math/Concurrency::precise_math::isinf", "amp_math/Concurrency::precise_math::isnormal", "amp_math/Concurrency::precise_math::ldexp", "amp_math/Concurrency::precise_math::lgamma", "amp_math/Concurrency::precise_math::lgammaf", "amp_math/Concurrency::precise_math::log10", "amp_math/Concurrency::precise_math::log10f", "amp_math/Concurrency::precise_math::log1pf", "amp_math/Concurrency::precise_math::log2", "amp_math/Concurrency::precise_math::logb", "amp_math/Concurrency::precise_math::logbf", "amp_math/Concurrency::precise_math::modf", "amp_math/Concurrency::precise_math::modff", "amp_math/Concurrency::precise_math::nanf", "amp_math/Concurrency::precise_math::nearbyint", "amp_math/Concurrency::precise_math::nextafter", "amp_math/Concurrency::precise_math::nextafterf", "amp_math/Concurrency::precise_math::phif", "amp_math/Concurrency::precise_math::pow", "amp_math/Concurrency::precise_math::probit", "amp_math/Concurrency::precise_math::probitf", "amp_math/Concurrency::precise_math::rcbrtf", "amp_math/Concurrency::precise_math::remainder", "amp_math/Concurrency::precise_math::remquo", "amp_math/Concurrency::precise_math::remquof", "amp_math/Concurrency::precise_math::roundf", "amp_math/Concurrency::precise_math::rsqrt", "amp_math/Concurrency::precise_math::scalb", "amp_math/Concurrency::precise_math::scalbf", "amp_math/Concurrency::precise_math::scalbnf", "amp_math/Concurrency::precise_math::signbit", "amp_math/Concurrency::precise_math::sin", "amp_math/Concurrency::precise_math::sincos", "amp_math/Concurrency::precise_math::sinf", "amp_math/Concurrency::precise_math::sinh", "amp_math/Concurrency::precise_math::sinpi", "amp_math/Concurrency::precise_math::sinpif", "amp_math/Concurrency::precise_math::sqrtf", "amp_math/Concurrency::precise_math::tan", "amp_math/Concurrency::precise_math::tanh", "amp_math/Concurrency::precise_math::tanhf", "amp_math/Concurrency::precise_math::tanpif", "amp_math/Concurrency::precise_math::tgamma", "amp_math/Concurrency::precise_math::trunc", "amp_math/Concurrency::precise_math::truncf"] -ms.assetid: fae53ab4-d1c5-45bb-a6a0-a74258e9aea3 --- # Concurrency::precise_math namespace functions @@ -1049,7 +1048,7 @@ Floating-point value Returns the floor of the argument -## fma +## fma Computes the product of the first and second specified arguments, then adds the third specified argument to the result; the entire computation is performed as a single operation. diff --git a/docs/parallel/amp/reference/norm-3-class.md b/docs/parallel/amp/reference/norm-3-class.md index 96533633a3..a0e3841d4d 100644 --- a/docs/parallel/amp/reference/norm-3-class.md +++ b/docs/parallel/amp/reference/norm-3-class.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: norm_3 Class" title: "norm_3 Class" +description: "Learn more about: norm_3 Class" ms.date: "11/04/2016" f1_keywords: ["amp_short_vectors/Concurrency::graphics::norm_3::get_z", "amp_short_vectors/Concurrency::graphics::norm_3::operator=", "amp_short_vectors/Concurrency::graphics::norm_3::r", "amp_short_vectors/Concurrency::graphics::norm_3::set_zyx", "amp_short_vectors/Concurrency::graphics::norm_3::xyz", "amp_short_vectors/Concurrency::graphics::norm_3::operator/=", "amp_short_vectors/Concurrency::graphics::norm_3::yz", "amp_short_vectors/Concurrency::graphics::norm_3::get_xyz", "amp_short_vectors/Concurrency::graphics::norm_3::br", "amp_short_vectors/Concurrency::graphics::norm_3::xy", "amp_short_vectors/Concurrency::graphics::norm_3::get_yzx", "amp_short_vectors/Concurrency::graphics::norm_3::set_xyz", "amp_short_vectors/Concurrency::graphics::norm_3::gr", "amp_short_vectors/Concurrency::graphics::norm_3::g", "amp_short_vectors/Concurrency::graphics::norm_3::set_yxz", "amp_short_vectors/Concurrency::graphics::norm_3::get_zyx", "amp_short_vectors/Concurrency::graphics::norm_3::get_y", "amp_short_vectors/Concurrency::graphics::norm_3::zx", "amp_short_vectors/Concurrency::graphics::norm_3::yzx", "amp_short_vectors/Concurrency::graphics::norm_3::gb", "amp_short_vectors/Concurrency::graphics::norm_3::xzy", "amp_short_vectors/Concurrency::graphics::norm_3::xz", "amp_short_vectors/Concurrency::graphics::norm_3::rb", "amp_short_vectors/Concurrency::graphics::norm_3::rgb", "amp_short_vectors/Concurrency::graphics::norm_3::b", "amp_short_vectors/Concurrency::graphics::norm_3::z", "amp_short_vectors/Concurrency::graphics::norm_3::operator*=", "amp_short_vectors/Concurrency::graphics::norm_3::operator+=", "amp_short_vectors/Concurrency::graphics::norm_3::get_zy", "amp_short_vectors/Concurrency::graphics::norm_3::get_xz", "amp_short_vectors/Concurrency::graphics::norm_3::gbr", "amp_short_vectors/Concurrency::graphics::norm_3::get_yz", "amp_short_vectors/Concurrency::graphics::norm_3::get_zx", "amp_short_vectors/Concurrency::graphics::norm_3::get_xzy", "amp_short_vectors/Concurrency::graphics::norm_3::set_xz", "amp_short_vectors/Concurrency::graphics::norm_3::set_xzy", "amp_short_vectors/Concurrency::graphics::norm_3::set_zy", "amp_short_vectors/Concurrency::graphics::norm_3::get_xy", "amp_short_vectors/Concurrency::graphics::norm_3::y", "amp_short_vectors/Concurrency::graphics::norm_3::yx", "amp_short_vectors/Concurrency::graphics::norm_3::rbg", "amp_short_vectors/Concurrency::graphics::norm_3::zxy", "amp_short_vectors/Concurrency::graphics::norm_3", "amp_short_vectors/Concurrency::graphics::norm_3::set_yz", "amp_short_vectors/Concurrency::graphics::norm_3::brg", "amp_short_vectors/Concurrency::graphics::norm_3::operator--", "amp_short_vectors/Concurrency::graphics::norm_3::yxz", "amp_short_vectors/Concurrency::graphics::norm_3::x", "amp_short_vectors/Concurrency::graphics::norm_3::set_x", "amp_short_vectors/Concurrency::graphics::norm_3::get_x", "amp_short_vectors/Concurrency::graphics::norm_3::get_yxz", "amp_short_vectors/Concurrency::graphics::norm_3::grb", "amp_short_vectors/Concurrency::graphics::norm_3::get_yx", "amp_short_vectors/Concurrency::graphics::norm_3::zy", "amp_short_vectors/Concurrency::graphics::norm_3::rg", "amp_short_vectors/Concurrency::graphics::norm_3::set_yzx", "amp_short_vectors/Concurrency::graphics::norm_3::operator-=", "amp_short_vectors/Concurrency::graphics::norm_3::bg", "amp_short_vectors/Concurrency::graphics::norm_3::operator++", "amp_short_vectors/Concurrency::graphics::norm_3::set_y", "amp_short_vectors/Concurrency::graphics::norm_3::zyx", "amp_short_vectors/Concurrency::graphics::norm_3::set_z", "amp_short_vectors/Concurrency::graphics::norm_3::operator-", "amp_short_vectors/Concurrency::graphics::norm_3::get_zxy", "amp_short_vectors/Concurrency::graphics::norm_3::set_xy", "amp_short_vectors/Concurrency::graphics::norm_3::set_zxy", "amp_short_vectors/Concurrency::graphics::norm_3::set_yx", "amp_short_vectors/Concurrency::graphics::norm_3::set_zx", "amp_short_vectors/Concurrency::graphics::norm_3::bgr"] -ms.assetid: 17081060-14ce-477e-a71a-9801b0f1d9e4 --- # norm_3 Class @@ -200,7 +199,7 @@ The value for initialization. *_Other*
The object used to initialize. -## size Constant +## size Constant ### Syntax diff --git a/docs/parallel/amp/reference/texture-class.md b/docs/parallel/amp/reference/texture-class.md index f99e078681..67d5044bae 100644 --- a/docs/parallel/amp/reference/texture-class.md +++ b/docs/parallel/amp/reference/texture-class.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: texture Class" title: "texture Class" -ms.date: "11/04/2016" +description: "Learn more about: texture Class" +ms.date: 11/04/2016 f1_keywords: ["texture", "AMP_GRAPHICS/texture", "AMP_GRAPHICS/concurrency::graphics::texture::texture", "AMP_GRAPHICS/concurrency::graphics::texture::copy_to", "AMP_GRAPHICS/concurrency::graphics::texture::data", "AMP_GRAPHICS/concurrency::graphics::texture::get", "AMP_GRAPHICS/concurrency::graphics::texture::get_associated_accelerator_view", "AMP_GRAPHICS/concurrency::graphics::texture::get_depth_pitch", "AMP_GRAPHICS/concurrency::graphics::texture::get_row_pitch", "AMP_GRAPHICS/concurrency::graphics::texture::set", "AMP_GRAPHICS/concurrency::graphics::texture::rank", "AMP_GRAPHICS/concurrency::graphics::texture::associated_accelerator_view", "AMP_GRAPHICS/concurrency::graphics::texture::depth_pitch", "AMP_GRAPHICS/concurrency::graphics::texture::row_pitch"] -ms.assetid: 16e85d4d-e80a-474a-995d-8bf63fbdf34c --- # texture Class -A texture is a data aggregate on an `accelerator_view` in the extent domain. It is a collection of variables, one for each element in an extent domain. Each variable holds a value corresponding to C++ primitive type ( **`unsigned int`**, **`int`**, **`float`**, **`double`**), a scalar type ( `norm`, or `unorm`), or a short vector type. +A texture is a data aggregate on an `accelerator_view` in the extent domain. It is a collection of variables, one for each element in an extent domain. Each variable holds a value corresponding to C++ primitive type ( **`unsigned int`**, **`int`**, **`float`**, **`double`**), a scalar type (`norm`, or `unorm`), or a short vector type. ## Syntax diff --git a/docs/parallel/amp/reference/texture-view-class.md b/docs/parallel/amp/reference/texture-view-class.md index 610f6fedf5..2ab64c9f96 100644 --- a/docs/parallel/amp/reference/texture-view-class.md +++ b/docs/parallel/amp/reference/texture-view-class.md @@ -40,7 +40,7 @@ The rank of the `texture_view`. |----------|-----------------| |`value_type`|The type of the elements in the texture aggregates.| |`coordinates_type`|The type of the coordinate used to specify a texel in the `texture_view`—that is, a `short_vector` that has the same rank as the associated texture that has a value type of **`float`**.| -|`gather_return_type`|The return type used for gather operations—that is, a rank 4 `short_vector` that holds the four homogenous color components gathered from the four texel values sampled.| +|`gather_return_type`|The return type used for gather operations—that is, a rank 4 `short_vector` that holds the four homogeneous color components gathered from the four texel values sampled.| ### Public Constructors diff --git a/docs/parallel/amp/reference/tile-barrier-class.md b/docs/parallel/amp/reference/tile-barrier-class.md index a24d46e89a..d9c181b68b 100644 --- a/docs/parallel/amp/reference/tile-barrier-class.md +++ b/docs/parallel/amp/reference/tile-barrier-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: tile_barrier Class" title: "tile_barrier Class" +description: "Learn more about: tile_barrier Class" ms.date: "03/27/2019" f1_keywords: ["tile_barrier", "AMP/tile_barrier", "AMP/Concurrency::tile_barrier::tile_barrier::tile_barrier", "AMP/Concurrency::tile_barrier::tile_barrier::wait", "AMP/Concurrency::tile_barrier::tile_barrier::wait_with_all_memory_fence", "AMP/Concurrency::tile_barrier::tile_barrier::wait_with_global_memory_fence", "AMP/Concurrency::tile_barrier::tile_barrier::wait_with_tile_static_memory_fence"] helpviewer_keywords: ["tile_barrier class"] -ms.assetid: b4ccdccb-0032-4e11-b7bd-dc9d43445dee --- # tile_barrier Class @@ -79,7 +78,7 @@ Blocks execution of all threads in a tile until all threads in a tile have reach void wait_with_all_memory_fence() const restrict(amp); ``` -## wait_with_global_memory_fence +## wait_with_global_memory_fence Blocks execution of all threads in a tile until all threads in a tile have reached this call. This ensures that all global memory accesses are visible to other threads in the thread tile, and have been executed in program order. @@ -89,7 +88,7 @@ Blocks execution of all threads in a tile until all threads in a tile have reach void wait_with_global_memory_fence() const restrict(amp); ``` -## wait_with_tile_static_memory_fence +## wait_with_tile_static_memory_fence Blocks execution of all threads in a tile until all threads in a tile have reached this call. This ensures that `tile_static` memory accesses are visible to other threads in the thread tile, and have been executed in program order. diff --git a/docs/parallel/amp/using-accelerator-and-accelerator-view-objects.md b/docs/parallel/amp/using-accelerator-and-accelerator-view-objects.md index cb5312d969..fb4f51eb4c 100644 --- a/docs/parallel/amp/using-accelerator-and-accelerator-view-objects.md +++ b/docs/parallel/amp/using-accelerator-and-accelerator-view-objects.md @@ -1,11 +1,11 @@ --- -description: "Learn more about: Using accelerator and accelerator_view Objects" title: "Using accelerator and accelerator_view Objects" +description: "Learn more about: Using accelerator and accelerator_view Objects" ms.date: "11/04/2016" --- # Using accelerator and accelerator_view Objects -You can use the [accelerator](../../parallel/amp/reference/accelerator-class.md) and [accelerator_view](../../parallel/amp/reference/accelerator-view-class.md) classes to specify the device or emulator to run your C++ AMP code on. A system might have several devices or emulators that differ by amount of memory, shared memory support, debugging support, or double-precision support. C++ Accelerated Massive Parallelism (C++ AMP) provides APIs that you can use to examine the available accelerators, set one as the default, specify multiple accelerator_views for multiple calls to parallel_for_each, and perform special debugging tasks. +You can use the [accelerator](reference/accelerator-class.md) and [accelerator_view](reference/accelerator-view-class.md) classes to specify the device or emulator to run your C++ AMP code on. A system might have several devices or emulators that differ by amount of memory, shared memory support, debugging support, or double-precision support. C++ Accelerated Massive Parallelism (C++ AMP) provides APIs that you can use to examine the available accelerators, set one as the default, specify multiple accelerator_views for multiple calls to parallel_for_each, and perform special debugging tasks. > [!NOTE] > C++ AMP headers are deprecated starting with Visual Studio 2022 version 17.0. @@ -45,7 +45,7 @@ void default_properties() { ### CPPAMP_DEFAULT_ACCELERATOR Environment Variable -You can set the CPPAMP_DEFAULT_ACCELERATOR environment variable to specify the `accelerator::device_path` of the default accelerator. The path is hardware-dependent. The following code uses the `accelerator::get_all` function to retrieve a list of the available accelerators and then displays the path and characteristics of each accelerator. +You can set the `CPPAMP_DEFAULT_ACCELERATOR` environment variable to specify the `accelerator::device_path` of the default accelerator. The path is hardware-dependent. The following code uses the `accelerator::get_all` function to retrieve a list of the available accelerators and then displays the path and characteristics of each accelerator. ```cpp void list_all_accelerators() @@ -160,7 +160,7 @@ There are two ways to use multiple accelerators in your app: - You can pass `accelerator_view` objects to the calls to the [parallel_for_each](reference/concurrency-namespace-functions-amp.md#parallel_for_each) method. -- You can construct an **array** object using a specific `accelerator_view` object. The C+AMP runtime will pick up the `accelerator_view` object from the captured **array** object in the lambda expression. +- You can construct an **array** object using a specific `accelerator_view` object. The C++ AMP runtime will pick up the `accelerator_view` object from the captured **array** object in the lambda expression. ## Special Accelerators @@ -178,6 +178,6 @@ The C++ AMP runtime supports interoperability between the `accelerator_view` cla ## See also -[C++ AMP (C++ Accelerated Massive Parallelism)](../../parallel/amp/cpp-amp-cpp-accelerated-massive-parallelism.md)
-[Debugging GPU Code](/visualstudio/debugger/debugging-gpu-code)
-[accelerator_view Class](../../parallel/amp/reference/accelerator-view-class.md) +[C++ AMP (C++ Accelerated Massive Parallelism)](cpp-amp-cpp-accelerated-massive-parallelism.md)\ +[Debugging GPU Code](/visualstudio/debugger/debugging-gpu-code)\ +[accelerator_view Class](reference/accelerator-view-class.md) diff --git a/docs/parallel/concrt/reference/concurrency-namespace-functions.md b/docs/parallel/concrt/reference/concurrency-namespace-functions.md index f1aea9adb8..10f4a1627f 100644 --- a/docs/parallel/concrt/reference/concurrency-namespace-functions.md +++ b/docs/parallel/concrt/reference/concurrency-namespace-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: concurrency namespace functions" title: "concurrency namespace functions" -ms.date: "11/04/2016" +description: "Learn more about: concurrency namespace functions" +ms.date: 11/04/2016 f1_keywords: ["concrt/concurrency::Alloc", "concrt/concurrency::DisableTracing", "concrt/concurrency::EnableTracing", "concrtrm/concurrency::GetExecutionContextId", "concrtrm/concurrency::GetOSVersion", "concrtrm/concurrency::GetProcessorNodeCount", "concrtrm/concurrency::GetSchedulerId", "agents/concurrency::asend", "ppltasks/concurrency::cancel_current_task", "ppltasks/concurrency::create_async", "ppltasks/concurrency::create_task", "concurrent_vector/concurrency::internal_assign_iterators", "ppl/concurrency::interruption_point", "agents/concurrency::make_choice", "agents/concurrency::make_greedy_join", "ppl/concurrency::make_task", "ppl/concurrency::parallel_buffered_sort", "ppl/concurrency::parallel_for_each", "ppl/concurrency::parallel_invoke", "ppl/concurrency::parallel_reduce", "ppl/concurrency::parallel_sort", "agents/concurrency::receive", "ppl/concurrency::run_with_cancellation_token", "pplconcrt/concurrency::set_ambient_scheduler", "concrt/concurrency::set_task_execution_resources", "ppltasks/concurrency::task_from_exception", "ppltasks/concurrency::task_from_result", "concrt/concurrency::wait", "ppltasks/concurrency::when_all", "ppltasks/concurrency::when_any"] -ms.assetid: 520a6dff-9324-4df2-990d-302e3050af6a --- # concurrency namespace functions @@ -175,7 +174,7 @@ The lambda may take either zero, one or two arguments. The valid arguments are ` If the body of the lambda or function object returns a result (and not a task\), the lamdba will be executed asynchronously within the process MTA in the context of a task the Runtime implicitly creates for it. The `IAsyncInfo::Cancel` method will cause cancellation of the implicit task. -If the body of the lambda returns a task, the lamba executes inline, and by declaring the lambda to take an argument of type `cancellation_token` you can trigger cancellation of any tasks you create within the lambda by passing that token in when you create them. You may also use the `register_callback` method on the token to cause the Runtime to invoke a callback when you call `IAsyncInfo::Cancel` on the async operation or action produced.. +If the body of the lambda returns a task, the lambda executes inline, and by declaring the lambda to take an argument of type `cancellation_token` you can trigger cancellation of any tasks you create within the lambda by passing that token in when you create them. You may also use the `register_callback` method on the token to cause the Runtime to invoke a callback when you call `IAsyncInfo::Cancel` on the async operation or action produced. This function is only available to Windows Runtime apps. @@ -1532,7 +1531,7 @@ The concurrent vector providing the elements to be swapped, or the vector whose ### Remarks -The template function is an algorithm specialized on the container class `concurrent_vector` to execute the member function `_A`. [concurrent_vector::swap](concurrent-vector-class.md#swap)( `_B`). These are instances of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, `template void swap(T&, T&)`, in the algorithm class works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. +The template function is an algorithm specialized on the container class `concurrent_vector` to execute the member function `_A`. [concurrent_vector::swap](concurrent-vector-class.md#swap)(`_B`). These are instances of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, `template void swap(T&, T&)`, in the algorithm class works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. This method is not concurrency-safe. You must ensure that no other threads are performing operations on either of the concurrent vectors when you call this method. diff --git a/docs/parallel/concrt/reference/concurrent-priority-queue-class.md b/docs/parallel/concrt/reference/concurrent-priority-queue-class.md index 8e190a3606..5a6ba9ae4e 100644 --- a/docs/parallel/concrt/reference/concurrent-priority-queue-class.md +++ b/docs/parallel/concrt/reference/concurrent-priority-queue-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_priority_queue Class" title: "concurrent_priority_queue Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_priority_queue Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_priority_queue", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::concurrent_priority_queue", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::clear", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::empty", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::get_allocator", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::push", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::size", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::swap", "CONCURRENT_PRIORITY_QUEUE/concurrency::concurrent_priority_queue::try_pop"] helpviewer_keywords: ["concurrent_priority_queue class"] -ms.assetid: 3e740381-0f4e-41fc-8b66-ad0bb55f17a3 --- # concurrent_priority_queue Class @@ -14,10 +13,9 @@ The `concurrent_priority_queue` class is a container that allows multiple thread ```cpp template , - typename _Ax = std::allocator ->, - typename _Ax = std::allocator> class concurrent_priority_queue; + typename _Compare = std::less, + typename _Ax = std::allocator> +class concurrent_priority_queue; ``` ### Parameters diff --git a/docs/parallel/concrt/reference/concurrent-unordered-map-class.md b/docs/parallel/concrt/reference/concurrent-unordered-map-class.md index c9e47fc292..b777495b54 100644 --- a/docs/parallel/concrt/reference/concurrent-unordered-map-class.md +++ b/docs/parallel/concrt/reference/concurrent-unordered-map-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_unordered_map Class" title: "concurrent_unordered_map Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_unordered_map Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_unordered_map", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::concurrent_unordered_map", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::at", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::hash_function", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::insert", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::key_eq", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::swap", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_map::unsafe_erase"] helpviewer_keywords: ["concurrent_unordered_map class"] -ms.assetid: b2d879dd-87ef-4af9-a266-a5443fd538b8 --- # concurrent_unordered_map Class @@ -17,18 +16,8 @@ template , typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator> ->, -typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator>> class concurrent_unordered_map : public details::_Concurrent_hash, - _Allocator_type, -false>>; + typename _Allocator_type = std::allocator>> +class concurrent_unordered_map : public details::_Concurrent_hash, _Allocator_type, false>>; ``` ### Parameters @@ -81,7 +70,7 @@ The type that represents the stored allocator object that encapsulates details a |Name|Description| |----------|-----------------| -|[at](#at)|Overloaded. Finds an element in a `concurrent_unordered_map` with a specified key value.. This method is concurrency-safe.| +|[at](#at)|Overloaded. Finds an element in a `concurrent_unordered_map` with a specified key value. This method is concurrency-safe.| |[hash_function](#hash_function)|Gets the stored hash function object.| |[insert](#insert)|Overloaded. Adds elements to the `concurrent_unordered_map` object.| |[key_eq](#key_eq)|Gets the stored equality comparison function object.| @@ -115,7 +104,7 @@ For detailed information on the `concurrent_unordered_map` class, see [Parallel ## at -Finds an element in a `concurrent_unordered_map` with a specified key value.. This method is concurrency-safe. +Finds an element in a `concurrent_unordered_map` with a specified key value. This method is concurrency-safe. ```cpp mapped_type& at(const key_type& KVal); @@ -430,7 +419,7 @@ A pair that contains an iterator and a boolean value. See the Remarks section fo The first member function determines whether an element X exists in the sequence whose key has equivalent ordering to that of `value`. If not, it creates such an element X and initializes it with `value`. The function then determines the iterator `where` that designates X. If an insertion occurred, the function returns `std::pair(where, true)`. Otherwise, it returns `std::pair(where, false)`. -The second member function returns insert( `value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. +The second member function returns insert(`value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. The third member function inserts the sequence of element values from the range [ `first`, `last`). @@ -476,7 +465,7 @@ void max_load_factor(float _Newmax); ### Return Value -The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid.. +The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid. ## max_size @@ -766,5 +755,5 @@ The maximum number of buckets in this container. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [Parallel Containers and Objects](../../../parallel/concrt/parallel-containers-and-objects.md) diff --git a/docs/parallel/concrt/reference/concurrent-unordered-multimap-class.md b/docs/parallel/concrt/reference/concurrent-unordered-multimap-class.md index 9ede5be1d2..a28357a21e 100644 --- a/docs/parallel/concrt/reference/concurrent-unordered-multimap-class.md +++ b/docs/parallel/concrt/reference/concurrent-unordered-multimap-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_unordered_multimap Class" title: "concurrent_unordered_multimap Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_unordered_multimap Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_unordered_multimap", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::concurrent_unordered_multimap", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::hash_function", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::insert", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::key_eq", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::swap", "CONCURRENT_UNORDERED_MAP/concurrency::concurrent_unordered_multimap::unsafe_erase"] helpviewer_keywords: ["concurrent_unordered_multimap class"] -ms.assetid: 4dada5d7-15df-4382-b9c9-348e75b2f3c1 --- # concurrent_unordered_multimap Class @@ -17,18 +16,8 @@ template , typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator> ->, -typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator>> class concurrent_unordered_multimap : public details::_Concurrent_hash, - _Allocator_type, -true>>; + typename _Allocator_type = std::allocator>> +class concurrent_unordered_multimap : public details::_Concurrent_hash, _Allocator_type, true>>; ``` ### Parameters @@ -403,7 +392,7 @@ An iterator pointing to the insertion location. The first member function inserts the element `value` in the controlled sequence, then returns the iterator that designates the inserted element. -The second member function returns insert( `value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. +The second member function returns insert(`value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. The third member function inserts the sequence of element values from the range [ `first`, `last`). @@ -449,7 +438,7 @@ void max_load_factor(float _Newmax); ### Return Value -The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid.. +The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid. ## max_size @@ -708,5 +697,5 @@ The maximum number of buckets in this container. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [Parallel Containers and Objects](../../../parallel/concrt/parallel-containers-and-objects.md) diff --git a/docs/parallel/concrt/reference/concurrent-unordered-multiset-class.md b/docs/parallel/concrt/reference/concurrent-unordered-multiset-class.md index 3684631591..487bba1780 100644 --- a/docs/parallel/concrt/reference/concurrent-unordered-multiset-class.md +++ b/docs/parallel/concrt/reference/concurrent-unordered-multiset-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_unordered_multiset Class" title: "concurrent_unordered_multiset Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_unordered_multiset Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_unordered_multiset", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::concurrent_unordered_multiset", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::hash_function", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::insert", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::key_eq", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::swap", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_multiset::unsafe_erase"] helpviewer_keywords: ["concurrent_unordered_multiset class"] -ms.assetid: 219d7d67-1ff0-45f4-9400-e9cc272991a4 --- # concurrent_unordered_multiset Class @@ -16,15 +15,8 @@ The `concurrent_unordered_multiset` class is an concurrency-safe container that template , typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator ->, - typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator> class concurrent_unordered_multiset : public details::_Concurrent_hash, -_Allocator_type, - true>>; + typename _Allocator_type = std::allocator> +class concurrent_unordered_multiset : public details::_Concurrent_hash, _Allocator_type, true>>; ``` ### Parameters @@ -391,7 +383,7 @@ An iterator pointing to the insertion location. The first member function inserts the element `value` in the controlled sequence, then returns the iterator that designates the inserted element. -The second member function returns insert( `value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. +The second member function returns insert(`value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. The third member function inserts the sequence of element values from the range [ `first`, `last`). @@ -437,7 +429,7 @@ void max_load_factor(float _Newmax); ### Return Value -The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid.. +The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid. ## max_size @@ -694,5 +686,5 @@ The maximum number of buckets in this container. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [Parallel Containers and Objects](../../../parallel/concrt/parallel-containers-and-objects.md) diff --git a/docs/parallel/concrt/reference/concurrent-unordered-set-class.md b/docs/parallel/concrt/reference/concurrent-unordered-set-class.md index 52f91b4cfa..5265d958e5 100644 --- a/docs/parallel/concrt/reference/concurrent-unordered-set-class.md +++ b/docs/parallel/concrt/reference/concurrent-unordered-set-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_unordered_set Class" title: "concurrent_unordered_set Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_unordered_set Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_unordered_set", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::concurrent_unordered_set", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::hash_function", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::insert", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::key_eq", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::swap", "CONCURRENT_UNORDERED_SET/concurrency::concurrent_unordered_set::unsafe_erase"] helpviewer_keywords: ["concurrent_unordered_set class"] -ms.assetid: c61f9a9a-4fd9-491a-9251-e300737ecf4b --- # concurrent_unordered_set Class @@ -16,15 +15,8 @@ The `concurrent_unordered_set` class is an concurrency-safe container that contr template , typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator ->, - typename key_equality = std::equal_to, - typename _Allocator_type = std::allocator> class concurrent_unordered_set : public details::_Concurrent_hash, -_Allocator_type, - false>>; + typename _Allocator_type = std::allocator> +class concurrent_unordered_set : public details::_Concurrent_hash, _Allocator_type, false>>; ``` ### Parameters @@ -393,7 +385,7 @@ A pair that contains an iterator and a boolean value. See the Remarks section fo The first member function determines whether an element X exists in the sequence whose key has equivalent ordering to that of `value`. If not, it creates such an element X and initializes it with `value`. The function then determines the iterator `where` that designates X. If an insertion occurred, the function returns `std::pair(where, true)`. Otherwise, it returns `std::pair(where, false)`. -The second member function returns insert( `value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. +The second member function returns insert(`value`), using `_Where` as a starting place within the controlled sequence to search for the insertion point. The third member function inserts the sequence of element values from the range [ `first`, `last`). @@ -439,7 +431,7 @@ void max_load_factor(float _Newmax); ### Return Value -The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid.. +The first member function returns the stored maximum load factor. The second member function does not return a value but throws an [out_of_range](../../../standard-library/out-of-range-class.md) exception if the supplied load factor is invalid. ## max_size @@ -698,5 +690,5 @@ The maximum number of buckets in this container. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [Parallel Containers and Objects](../../../parallel/concrt/parallel-containers-and-objects.md) diff --git a/docs/parallel/concrt/reference/concurrent-vector-class.md b/docs/parallel/concrt/reference/concurrent-vector-class.md index af0edeecb8..1bdeb6f2c0 100644 --- a/docs/parallel/concrt/reference/concurrent-vector-class.md +++ b/docs/parallel/concrt/reference/concurrent-vector-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: concurrent_vector Class" title: "concurrent_vector Class" -ms.date: "11/04/2016" +description: "Learn more about: concurrent_vector Class" +ms.date: 11/04/2016 f1_keywords: ["concurrent_vector", "CONCURRENT_VECTOR/concurrency::concurrent_vector", "CONCURRENT_VECTOR/concurrency::concurrent_vector::concurrent_vector", "CONCURRENT_VECTOR/concurrency::concurrent_vector::assign", "CONCURRENT_VECTOR/concurrency::concurrent_vector::at", "CONCURRENT_VECTOR/concurrency::concurrent_vector::back", "CONCURRENT_VECTOR/concurrency::concurrent_vector::begin", "CONCURRENT_VECTOR/concurrency::concurrent_vector::capacity", "CONCURRENT_VECTOR/concurrency::concurrent_vector::cbegin", "CONCURRENT_VECTOR/concurrency::concurrent_vector::cend", "CONCURRENT_VECTOR/concurrency::concurrent_vector::clear", "CONCURRENT_VECTOR/concurrency::concurrent_vector::crbegin", "CONCURRENT_VECTOR/concurrency::concurrent_vector::crend", "CONCURRENT_VECTOR/concurrency::concurrent_vector::empty", "CONCURRENT_VECTOR/concurrency::concurrent_vector::end", "CONCURRENT_VECTOR/concurrency::concurrent_vector::front", "CONCURRENT_VECTOR/concurrency::concurrent_vector::get_allocator", "CONCURRENT_VECTOR/concurrency::concurrent_vector::grow_by", "CONCURRENT_VECTOR/concurrency::concurrent_vector::grow_to_at_least", "CONCURRENT_VECTOR/concurrency::concurrent_vector::max_size", "CONCURRENT_VECTOR/concurrency::concurrent_vector::push_back", "CONCURRENT_VECTOR/concurrency::concurrent_vector::rbegin", "CONCURRENT_VECTOR/concurrency::concurrent_vector::rend", "CONCURRENT_VECTOR/concurrency::concurrent_vector::reserve", "CONCURRENT_VECTOR/concurrency::concurrent_vector::resize", "CONCURRENT_VECTOR/concurrency::concurrent_vector::shrink_to_fit", "CONCURRENT_VECTOR/concurrency::concurrent_vector::size", "CONCURRENT_VECTOR/concurrency::concurrent_vector::swap"] helpviewer_keywords: ["concurrent_vector class"] -ms.assetid: a217b4ac-af2b-4d41-94eb-09a75ee28622 --- # concurrent_vector Class @@ -318,9 +317,9 @@ The second and third constructors specify a copy of the concurrent vector `_Vect The fourth constructor specifies a move of the concurrent vector `_Vector`. -The fifth constructor specifies a repetition of a specified number ( `_N`) of elements of the default value for class `T`. +The fifth constructor specifies a repetition of a specified number (`_N`) of elements of the default value for class `T`. -The sixth constructor specifies a repetition of ( `_N`) elements of value `_Item`. +The sixth constructor specifies a repetition of (`_N`) elements of value `_Item`. The last constructor specifies values supplied by the iterator range [ `_Begin`, `_End`). diff --git a/docs/parallel/concrt/reference/invalid-scheduler-policy-thread-specification-class.md b/docs/parallel/concrt/reference/invalid-scheduler-policy-thread-specification-class.md index b88cbe2494..eb5b16e095 100644 --- a/docs/parallel/concrt/reference/invalid-scheduler-policy-thread-specification-class.md +++ b/docs/parallel/concrt/reference/invalid-scheduler-policy-thread-specification-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: invalid_scheduler_policy_thread_specification Class" title: "invalid_scheduler_policy_thread_specification Class" +description: "Learn more about: invalid_scheduler_policy_thread_specification Class" ms.date: "11/04/2016" f1_keywords: ["concrt/concurrency::invalid_scheduler_policy_thread_specification"] helpviewer_keywords: ["invalid_scheduler_policy_thread_specification class"] -ms.assetid: 2d0fafb2-18f8-4284-8040-3db640d33303 --- # invalid_scheduler_policy_thread_specification Class @@ -22,7 +21,7 @@ class invalid_scheduler_policy_thread_specification : public std::exception; |Name|Description| |----------|-----------------| -|[invalid_scheduler_policy_thread_specification](invalid-scheduler-policy-value-class.md#ctor|Overloaded. Constructs an `invalid_scheduler_policy_value` object.| +|[invalid_scheduler_policy_thread_specification](#ctor)|Overloaded. Constructs an `invalid_scheduler_policy_thread_specification` object.| ## Inheritance Hierarchy @@ -48,10 +47,10 @@ invalid_scheduler_policy_thread_specification() throw(); ### Parameters -*_Message*
+*_Message*\ A descriptive message of the error. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [SchedulerPolicy Class](schedulerpolicy-class.md) diff --git a/docs/parallel/concrt/reference/invalid-scheduler-policy-value-class.md b/docs/parallel/concrt/reference/invalid-scheduler-policy-value-class.md index 111cc7fea2..8fbbc42ddf 100644 --- a/docs/parallel/concrt/reference/invalid-scheduler-policy-value-class.md +++ b/docs/parallel/concrt/reference/invalid-scheduler-policy-value-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: invalid_scheduler_policy_value Class" title: "invalid_scheduler_policy_value Class" +description: "Learn more about: invalid_scheduler_policy_value Class" ms.date: "11/04/2016" f1_keywords: ["concrt/concurrency::invalid_scheduler_policy_value"] helpviewer_keywords: ["invalid_scheduler_policy_value class"] -ms.assetid: 8c533e3f-2774-4192-8616-b2313b859bf7 --- # invalid_scheduler_policy_value Class @@ -22,7 +21,7 @@ class invalid_scheduler_policy_value : public std::exception; |Name|Description| |----------|-----------------| -|[invalid_scheduler_policy_value](invalid-scheduler-policy-thread-specification-class.md#ctor|Overloaded. Constructs an `invalid_scheduler_policy_value` object.| +|[invalid_scheduler_policy_value](#ctor)|Overloaded. Constructs an `invalid_scheduler_policy_value` object.| ## Inheritance Hierarchy @@ -48,10 +47,10 @@ invalid_scheduler_policy_value() throw(); ### Parameters -*_Message*
+*_Message*\ A descriptive message of the error. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [SchedulerPolicy Class](schedulerpolicy-class.md) diff --git a/docs/parallel/concrt/reference/reader-writer-lock-class.md b/docs/parallel/concrt/reference/reader-writer-lock-class.md index 12fe2bdb4b..ef5263b57d 100644 --- a/docs/parallel/concrt/reference/reader-writer-lock-class.md +++ b/docs/parallel/concrt/reference/reader-writer-lock-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: reader_writer_lock Class" title: "reader_writer_lock Class" +description: "Learn more about: reader_writer_lock Class" ms.date: "11/04/2016" f1_keywords: ["reader_writer_lock", "CONCRT/concurrency::reader_writer_lock", "CONCRT/concurrency::reader_writer_lock::scoped_lock", "CONCRT/concurrency::reader_writer_lock::scoped_lock_read", "CONCRT/concurrency::reader_writer_lock::reader_writer_lock", "CONCRT/concurrency::reader_writer_lock::lock", "CONCRT/concurrency::reader_writer_lock::lock_read", "CONCRT/concurrency::reader_writer_lock::try_lock", "CONCRT/concurrency::reader_writer_lock::try_lock_read", "CONCRT/concurrency::reader_writer_lock::unlock"] helpviewer_keywords: ["reader_writer_lock class"] -ms.assetid: 91a59cd2-ca05-4b74-8398-d826d9f86736 --- # reader_writer_lock Class @@ -158,7 +157,7 @@ explicit _CRTIMP scoped_lock_read(reader_writer_lock& _Reader_writer_lock); *_Reader_writer_lock*
The `reader_writer_lock` object to acquire as a reader. -## reader_writer_lock::scoped_lock_read::~scoped_lock_read Destructor +## reader_writer_lock::scoped_lock_read::~scoped_lock_read Destructor Destroys a `scoped_lock_read` object and releases the lock supplied in its constructor. @@ -206,5 +205,5 @@ If there are writers waiting on the lock, the release of the lock will always go ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [critical_section Class](critical-section-class.md) diff --git a/docs/parallel/concrt/reference/source-link-manager-class.md b/docs/parallel/concrt/reference/source-link-manager-class.md index d3ab18135c..ce7031d816 100644 --- a/docs/parallel/concrt/reference/source-link-manager-class.md +++ b/docs/parallel/concrt/reference/source-link-manager-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: source_link_manager Class" title: "source_link_manager Class" +description: "Learn more about: source_link_manager Class" ms.date: "11/04/2016" f1_keywords: ["source_link_manager", "AGENTS/concurrency::source_link_manager", "AGENTS/concurrency::source_link_manager::source_link_manager", "AGENTS/concurrency::source_link_manager::add", "AGENTS/concurrency::source_link_manager::begin", "AGENTS/concurrency::source_link_manager::contains", "AGENTS/concurrency::source_link_manager::count", "AGENTS/concurrency::source_link_manager::reference", "AGENTS/concurrency::source_link_manager::register_target_block", "AGENTS/concurrency::source_link_manager::release", "AGENTS/concurrency::source_link_manager::remove", "AGENTS/concurrency::source_link_manager::set_bound"] helpviewer_keywords: ["source_link_manager class"] -ms.assetid: 287487cf-e0fe-4c35-aa3c-24f081d1ddae --- # source_link_manager Class @@ -56,7 +55,7 @@ The network link registry. ## Remarks -Currently, the source blocks are reference counted. This is a wrapper on a `network_link_registry` object that allows concurrent access to the links and provides the ability to reference the links through callbacks. Message blocks ( `target_block`s or `propagator_block`s) should use this class for their source links. +Currently, the source blocks are reference counted. This is a wrapper on a `network_link_registry` object that allows concurrent access to the links and provides the ability to reference the links through callbacks. Message blocks (`target_block`s or `propagator_block`s) should use this class for their source links. ## Inheritance Hierarchy @@ -203,6 +202,6 @@ Destroys the `source_link_manager` object. ## See also -[concurrency Namespace](concurrency-namespace.md)
-[single_link_registry Class](single-link-registry-class.md)
+[concurrency Namespace](concurrency-namespace.md)\ +[single_link_registry Class](single-link-registry-class.md)\ [multi_link_registry Class](multi-link-registry-class.md) diff --git a/docs/parallel/concrt/reference/task-class.md b/docs/parallel/concrt/reference/task-class.md index 5f90e1fb29..18fabb896c 100644 --- a/docs/parallel/concrt/reference/task-class.md +++ b/docs/parallel/concrt/reference/task-class.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: task Class (Concurrency Runtime)" title: "task Class (Concurrency Runtime)" -ms.date: "07/30/2019" +description: "Learn more about: task Class (Concurrency Runtime)" +ms.date: 07/30/2019 f1_keywords: ["task", "PPLTASKS/concurrency::task", "PPLTASKS/concurrency::task::task", "PPLTASKS/concurrency::task::get", "PPLTASKS/concurrency::task::is_apartment_aware", "PPLTASKS/concurrency::task::is_done", "PPLTASKS/concurrency::task::scheduler", "PPLTASKS/concurrency::task::then", "PPLTASKS/concurrency::task::wait"] helpviewer_keywords: ["task class"] -ms.assetid: cdc3a8c0-5cbe-45a0-b5d5-e9f81d94df1a --- # task Class (Concurrency Runtime) -The Parallel Patterns Library (PPL) `task` class. A `task` object represents work that can be executed asynchronously and concurrently with other tasks and parallel work produced by parallel algorithms in the Concurrency Runtime. It produces a result of type `_ResultType` on successful completion. Tasks of type `task` produce no result. A task can be waited upon and canceled independently of other tasks. It can also be composed with other tasks using continuations( `then`), and join( `when_all`) and choice( `when_any`) patterns. When a task object is assigned to a new variable, the behavior is that of `std::shared_ptr`; in other words, both objects represent the same underlying task. +The Parallel Patterns Library (PPL) `task` class. A `task` object represents work that can be executed asynchronously and concurrently with other tasks and parallel work produced by parallel algorithms in the Concurrency Runtime. It produces a result of type `_ResultType` on successful completion. Tasks of type `task` produce no result. A task can be waited upon and canceled independently of other tasks. It can also be composed with other tasks using continuations(`then`), and join(`when_all`) and choice(`when_any`) patterns. When a task object is assigned to a new variable, the behavior is that of `std::shared_ptr`; in other words, both objects represent the same underlying task. ## Syntax @@ -91,7 +90,7 @@ The result of the task. If the task is canceled, a call to `get` will throw a [task_canceled](task-canceled-class.md) exception. If the task encountered an different exception or an exception was propagated to it from an antecedent task, a call to `get` will throw that exception. > [!IMPORTANT] -> In a Universal Windows Platform (UWP) app, do not call [concurrency::task::wait](#wait) or `get` ( `wait` calls `get`) in code that runs on the user-interface thread. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because these methods block the current thread and can cause the app to become unresponsive. However, you can call the `get` method to receive the result of the antecedent task in a task-based continuation because the result is immediately available. +> In a Universal Windows Platform (UWP) app, do not call [concurrency::task::wait](#wait) or `get` (`wait` calls `get`) in code that runs on the user-interface thread. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because these methods block the current thread and can cause the app to become unresponsive. However, you can call the `get` method to receive the result of the antecedent task in a task-based continuation because the result is immediately available. ## is_apartment_aware diff --git a/docs/parallel/concrt/reference/transformer-class.md b/docs/parallel/concrt/reference/transformer-class.md index b5e9aa9241..f5674f3eea 100644 --- a/docs/parallel/concrt/reference/transformer-class.md +++ b/docs/parallel/concrt/reference/transformer-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: transformer Class" title: "transformer Class" +description: "Learn more about: transformer Class" ms.date: "11/04/2016" f1_keywords: ["transformer", "AGENTS/concurrency::transformer", "AGENTS/concurrency::transformer::transformer", "AGENTS/concurrency::transformer::accept_message", "AGENTS/concurrency::transformer::consume_message", "AGENTS/concurrency::transformer::link_target_notification", "AGENTS/concurrency::transformer::propagate_message", "AGENTS/concurrency::transformer::propagate_to_any_targets", "AGENTS/concurrency::transformer::release_message", "AGENTS/concurrency::transformer::reserve_message", "AGENTS/concurrency::transformer::resume_propagation", "AGENTS/concurrency::transformer::send_message", "AGENTS/concurrency::transformer::supports_anonymous_source"] helpviewer_keywords: ["transformer class"] -ms.assetid: eea71925-7043-4a92-bfd4-dbc0ece5d081 --- # transformer Class @@ -13,17 +12,17 @@ A `transformer` messaging block is a single-target, multi-source, ordered `propa ## Syntax ```cpp -template +template class transformer : public propagator_block>, multi_link_registry>>; ``` ### Parameters -*_Input*
+*`_Input`*\ The payload type of the messages accepted by the buffer. -*_Output*
+*`_Output`*\ The payload type of the messages stored and propagated out by the buffer. ## Members @@ -32,27 +31,27 @@ The payload type of the messages stored and propagated out by the buffer. |Name|Description| |----------|-----------------| -|[transformer](#ctor)|Overloaded. Constructs a `transformer` messaging block.| -|[~transformer Destructor](#dtor)|Destroys the `transformer` messaging block.| +|[`transformer`](#ctor)|Overloaded. Constructs a `transformer` messaging block.| +|[`~transformer`](#dtor)|Destroys the `transformer` messaging block.| ### Protected Methods |Name|Description| |----------|-----------------| -|[accept_message](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.| -|[consume_message](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.| -|[link_target_notification](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.| -|[propagate_message](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.| -|[propagate_to_any_targets](#propagate_to_any_targets)|Executes the transformer function on the input messages.| -|[release_message](#release_message)|Releases a previous message reservation. (Overrides [source_block::release_message](source-block-class.md#release_message).)| -|[reserve_message](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [source_block::reserve_message](source-block-class.md#reserve_message).)| -|[resume_propagation](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [source_block::resume_propagation](source-block-class.md#resume_propagation).)| -|[send_message](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.| -|[supports_anonymous_source](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [ITarget::supports_anonymous_source](itarget-class.md#supports_anonymous_source).)| +|[`accept_message`](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.| +|[`consume_message`](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.| +|[`link_target_notification`](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.| +|[`propagate_message`](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.| +|[`propagate_to_any_targets`](#propagate_to_any_targets)|Executes the transformer function on the input messages.| +|[`release_message`](#release_message)|Releases a previous message reservation. (Overrides [`source_block::release_message`](source-block-class.md#release_message).)| +|[`reserve_message`](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [`source_block::reserve_message`](source-block-class.md#reserve_message).)| +|[`resume_propagation`](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [`source_block::resume_propagation`](source-block-class.md#resume_propagation).)| +|[`send_message`](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.| +|[`supports_anonymous_source`](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [`ITarget::supports_anonymous_source`](itarget-class.md#supports_anonymous_source).)| ## Remarks -For more information, see [Asynchronous Message Blocks](../../../parallel/concrt/asynchronous-message-blocks.md). +For more information, see [Asynchronous Message Blocks](../asynchronous-message-blocks.md). ## Inheritance Hierarchy @@ -72,7 +71,7 @@ For more information, see [Asynchronous Message Blocks](../../../parallel/concrt **Namespace:** concurrency -## accept_message +## `accept_message` Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller. @@ -82,14 +81,14 @@ virtual message<_Output>* accept_message(runtime_object_identity _MsgId); ### Parameters -*_MsgId*
+*`_MsgId`*\ The `runtime_object_identity` of the offered `message` object. ### Return Value A pointer to the `message` object that the caller now has ownership of. -## consume_message +## `consume_message` Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller. @@ -99,7 +98,7 @@ virtual message<_Output>* consume_message(runtime_object_identity _MsgId); ### Parameters -*_MsgId*
+*`_MsgId`*\ The `runtime_object_identity` of the `message` object being consumed. ### Return Value @@ -110,7 +109,7 @@ A pointer to the `message` object that the caller now has ownership of. Similar to `accept`, but is always preceded by a call to `reserve`. -## link_target_notification +## `link_target_notification` A callback that notifies that a new target has been linked to this `transformer` messaging block. @@ -118,7 +117,7 @@ A callback that notifies that a new target has been linked to this `transformer` virtual void link_target_notification(_Inout_ ITarget<_Output> *); ``` -## propagate_message +## `propagate_message` Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block. @@ -130,17 +129,17 @@ virtual message_status propagate_message( ### Parameters -*_PMessage*
+*`_PMessage`*\ A pointer to the `message` object. -*_PSource*
+*`_PSource`*\ A pointer to the source block offering the message. ### Return Value A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message. -## propagate_to_any_targets +## `propagate_to_any_targets` Executes the transformer function on the input messages. @@ -148,7 +147,7 @@ Executes the transformer function on the input messages. virtual void propagate_to_any_targets(_Inout_opt_ message<_Output> *); ``` -## release_message +## `release_message` Releases a previous message reservation. @@ -158,10 +157,10 @@ virtual void release_message(runtime_object_identity _MsgId); ### Parameters -*_MsgId*
+*`_MsgId`*\ The `runtime_object_identity` of the `message` object being released. -## reserve_message +## `reserve_message` Reserves a message previously offered by this `transformer` messaging block. @@ -171,7 +170,7 @@ virtual bool reserve_message(runtime_object_identity _MsgId); ### Parameters -*_MsgId*
+*`_MsgId`*\ The `runtime_object_identity` of the `message` object being reserved. ### Return Value @@ -182,7 +181,7 @@ The `runtime_object_identity` of the `message` object being reserved. After `reserve` is called, if it returns **`true`**, either `consume` or `release` must be called to either take or release ownership of the message. -## resume_propagation +## `resume_propagation` Resumes propagation after a reservation has been released. @@ -190,7 +189,7 @@ Resumes propagation after a reservation has been released. virtual void resume_propagation(); ``` -## send_message +## `send_message` Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block. @@ -202,17 +201,17 @@ virtual message_status send_message( ### Parameters -*_PMessage*
+*`_PMessage`*\ A pointer to the `message` object. -*_PSource*
+*`_PSource`*\ A pointer to the source block offering the message. ### Return Value A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message. -## supports_anonymous_source +## `supports_anonymous_source` Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. @@ -224,7 +223,7 @@ virtual bool supports_anonymous_source(); **`true`** because the block does not postpone offered messages. -## transformer +## `transformer` Constructs a `transformer` messaging block. @@ -263,19 +262,19 @@ transformer( ### Parameters -*_Func*
+*`_Func`*\ A function that will be invoked for each accepted message. -*_PTarget*
+*`_PTarget`*\ A pointer to a target block to link with the transformer. -*_Filter*
+*`_Filter`*\ A filter function which determines whether offered messages should be accepted. -*_PScheduler*
+*`_PScheduler`*\ The `Scheduler` object within which the propagation task for the `transformer` messaging block is scheduled. -*_PScheduleGroup*
+*`_PScheduleGroup`*\ The `ScheduleGroup` object within which the propagation task for the `transformer` messaging block is scheduled. The `Scheduler` object used is implied by the schedule group. ### Remarks @@ -286,7 +285,7 @@ The type `_Transform_method` is a functor with signature `_Output (_Input const The type `filter_method` is a functor with signature `bool (_Input const &)` which is invoked by this `transformer` messaging block to determine whether or not it should accept an offered message. -## ~transformer +## `~transformer` Destroys the `transformer` messaging block. @@ -296,5 +295,5 @@ Destroys the `transformer` messaging block. ## See also -[concurrency Namespace](concurrency-namespace.md)
+[concurrency Namespace](concurrency-namespace.md)\ [call Class](call-class.md) diff --git a/docs/parallel/openmp/c-openmp-c-and-cpp-grammar.md b/docs/parallel/openmp/c-openmp-c-and-cpp-grammar.md index 0fc7ddabdf..3e5249b640 100644 --- a/docs/parallel/openmp/c-openmp-c-and-cpp-grammar.md +++ b/docs/parallel/openmp/c-openmp-c-and-cpp-grammar.md @@ -1,15 +1,13 @@ --- -description: "Learn more about: C. OpenMP C and C++ grammar" title: "C. OpenMP C and C++ grammar" -ms.date: "01/16/2019" -ms.assetid: 97a878ce-1533-47f7-a134-66fcbff48524 +description: "Learn more about: C. OpenMP C and C++ grammar" +ms.date: 01/16/2019 --- # C. OpenMP C and C++ grammar -[C.1 Notation](#c1-notation)
-[C.2 Rules](#c2-rules) +Learn about the grammar rules and syntax extensions in C and C++ for OpenMP, a parallel programming framework. -## C.1 Notation +## C.1 notation The grammar rules consist of the name for a non-terminal, followed by a colon, followed by replacement alternatives on separate lines. @@ -22,7 +20,7 @@ The syntactic expression *term*optseq is equivalent to *term-seq* **`#pragma check_stack(`** [{ **`on`** | **`off`** }] **`)`**\ +> **`#pragma check_stack(`** { **`on`** | **`off`** } **`)`**\ > **`#pragma check_stack`** { **`+`** | **`-`** } ## Remarks -This pragma takes effect at the first function defined after the pragma is seen. Stack probes are neither a part of macros nor of functions that are generated inline. +This pragma only applies to 32-bit platforms (x86, ARM32). It has no effect on 64-bit platforms. -If you don't give an argument for the **`check_stack`** pragma, stack checking reverts to the behavior specified on the command line. For more information, see [Compiler options](../build/reference/compiler-options.md). The interaction of the `#pragma check_stack` and the [`/Gs`](../build/reference/gs-control-stack-checking-calls.md) option is summarized in the following table. +This pragma takes effect at the first function defined after the pragma is seen. Stack probes are not inserted for macros or functions that are generated inline. -### Using the check_stack Pragma +`#pragma check_stack(off)` / `#pragma Check_stack-` is ignored if the size of the function locals is larger than 4096 or the value specified by `/Gs`. -| Syntax | Compiled with

`/Gs` option? | Action | -|--|--|--| -| `#pragma check_stack( )` or

`#pragma check_stack` | Yes | Turns off stack checking for functions that follow | -| `#pragma check_stack( )` or

`#pragma check_stack` | No | Turns on stack checking for functions that follow | -| `#pragma check_stack(on)`

or `#pragma check_stack +` | Yes or No | Turns on stack checking for functions that follow | -| `#pragma check_stack(off)`

or `#pragma check_stack -` | Yes or No | Turns off stack checking for functions that follow | +The default behavior of the compiler is to insert stack probes at the beginning of each function if the size of the locals exceeds 4096 or the value specified by `/Gs`. + +Use [/Gs (Control stack checking calls)](../build/reference/gs-control-stack-checking-calls.md) to change the threshold of the locals that trigger stack probes. Use with caution. + +Using `#pragma check_stack()` without arguments is deprecated. ## See also +[Compiler options](../build/reference/compiler-options.md)\ [Pragma directives and the `__pragma` and `_Pragma` keywords](./pragma-directives-and-the-pragma-keyword.md) diff --git a/docs/preprocessor/hash-import-directive-cpp.md b/docs/preprocessor/hash-import-directive-cpp.md index 82e8088116..83b1bc8afb 100644 --- a/docs/preprocessor/hash-import-directive-cpp.md +++ b/docs/preprocessor/hash-import-directive-cpp.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: #import directive (C++)" title: "#import directive (C++)" +description: "Learn more about: #import directive (C++)" ms.date: "08/29/2019" f1_keywords: ["#import"] helpviewer_keywords: [".tlh files", "#import directive", "import directive (#import)", "tlh files", "tlbid switch", "preprocessor, directives", "COM, type library header file"] -ms.assetid: 787d1112-e543-40d7-ab15-a63d43f4030a --- # #import directive (C++) @@ -130,7 +129,7 @@ The primary type library header file consists of seven sections: Type `IMyInterfacePtr` can then be used in place of the raw interface pointer `IMyInterface*`. Consequently, there's no need to call the various `IUnknown` member functions -- Typeinfo declarations: Primarily consists of class definitions and other items exposing the individual typeinfo items returned by `ITypeLib:GetTypeInfo`. In this section, each typeinfo from the type library is reflected in the header in a form dependent on the `TYPEKIND` information. +- Typeinfo declarations: Primarily consists of class definitions and other items exposing the individual typeinfo items returned by `ITypeLib::GetTypeInfo`. In this section, each typeinfo from the type library is reflected in the header in a form dependent on the `TYPEKIND` information. - Optional old-style GUID definition: Contains initializations of the named GUID constants. These names have the form `CLSID_CoClass` and `IID_Interface`, similar to the ones generated by the MIDL compiler. diff --git a/docs/preprocessor/hash-using-directive-cpp.md b/docs/preprocessor/hash-using-directive-cpp.md index 170e412c40..a417e3cdc8 100644 --- a/docs/preprocessor/hash-using-directive-cpp.md +++ b/docs/preprocessor/hash-using-directive-cpp.md @@ -84,7 +84,7 @@ public: }; ``` -In the following sample, there's the compiler doesn't report an error about referencing *using_assembly_A.dll*, because the program doesn't use any of the types defined in *using_assembly_A.cpp*. +In the following sample, the compiler doesn't report an error about referencing *using_assembly_A.dll*, because the program doesn't use any of the types defined in *using_assembly_A.cpp*. ```cpp // using_assembly_C.cpp diff --git a/docs/preprocessor/predefined-macros.md b/docs/preprocessor/predefined-macros.md index afde55d6d8..40cceea515 100644 --- a/docs/preprocessor/predefined-macros.md +++ b/docs/preprocessor/predefined-macros.md @@ -69,19 +69,21 @@ MSVC supports other predefined macros: - `__ATOM__` Defined as 1 when the [`/favor:ATOM`](../build/reference/favor-optimize-for-architecture-specifics.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX__` Defined as 1 when the [`/arch:AVX`](../build/reference/arch-x86.md), [`/arch:AVX2`](../build/reference/arch-x86.md), or [`/arch:AVX512`](../build/reference/arch-x86.md) compiler options are set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX__` Defined as 1 when the [`/arch:AVX`](../build/reference/arch-x86.md), [`/arch:AVX2`](../build/reference/arch-x86.md), [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler options are set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX2__` Defined as 1 when the [`/arch:AVX2`](../build/reference/arch-x86.md) or [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX2__` Defined as 1 when the [`/arch:AVX2`](../build/reference/arch-x86.md), [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX512BW__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX512BW__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX512CD__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX512CD__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX512DQ__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX512DQ__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX512F__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX512F__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. -- `__AVX512VL__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. +- `__AVX512VL__` Defined as 1 when the [`/arch:AVX512`](../build/reference/arch-x86.md) or [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. + +- `__AVX10_VER__` Defined as an integer that represents version of AVX10 when the [`/arch:AVX10.1`](../build/reference/arch-x86.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined. - `_CHAR_UNSIGNED` Defined as 1 if the default **`char`** type is unsigned. This value is defined when the [**`/J`** (Default char type is unsigned)](../build/reference/j-default-char-type-is-unsigned.md) compiler option is set. Otherwise, undefined. @@ -235,7 +237,7 @@ MSVC supports other predefined macros: - 1 if the `/arch:SSE` compiler option was set. - - 2 if the `/arch:SSE2`, `/arch:AVX`, `/arch:AVX2`, or `/arch:AVX512` compiler option was set. This value is the default if an `/arch` compiler option wasn't specified. When `/arch:AVX` is specified, the macro `__AVX__` is also defined. When `/arch:AVX2` is specified, both `__AVX__` and `__AVX2__` are also defined. When `/arch:AVX512` is specified, `__AVX__`, `__AVX2__`, `__AVX512BW__`, `__AVX512CD__`, `__AVX512DQ__`, `__AVX512F__`, and `__AVX512VL__` are also defined. + - 2 if the `/arch:SSE2`, `/arch:AVX`, `/arch:AVX2`, `/arch:AVX512` or `/arch:AVX10.1` compiler option was set. This value is the default if an `/arch` compiler option wasn't specified. When `/arch:AVX` is specified, the macro `__AVX__` is also defined. When `/arch:AVX2` is specified, both `__AVX__` and `__AVX2__` are also defined. When `/arch:AVX512` is specified, `__AVX__`, `__AVX2__`, `__AVX512BW__`, `__AVX512CD__`, `__AVX512DQ__`, `__AVX512F__`, and `__AVX512VL__` are also defined. When `/arch:AVX10.1` is specified, `__AVX__`, `__AVX2__`, `__AVX512BW__`, `__AVX512CD__`, `__AVX512DQ__`, `__AVX512F__`, `__AVX512VL__` and `__AVX10_VER__` are also defined. - For more information, see [**`/arch`** (x86)](../build/reference/arch-x86.md). diff --git a/docs/preprocessor/warning.md b/docs/preprocessor/warning.md index da6d618984..8d6d994f0a 100644 --- a/docs/preprocessor/warning.md +++ b/docs/preprocessor/warning.md @@ -1,7 +1,7 @@ --- title: "warning pragma" description: "Learn more about the warning pragma in Microsoft C/C++" -ms.date: 01/22/2021 +ms.date: 4/30/2025 f1_keywords: ["warning_CPP", "vc-pragma.warning"] helpviewer_keywords: ["pragma, warning", "push pragma warning", "pop warning pragma", "warning pragma"] no-loc: ["pragma"] @@ -13,7 +13,7 @@ Enables selective modification of the behavior of compiler warning messages. ## Syntax > **`#pragma warning(`**\ ->  *`warning-specifier`* **`:`** *`warning-number-list`*\ +>  *`warning-specifier`* **`:`** *`warning-number-list`* [ **`,`** **`justification`** **`:`** *`string-literal`*]\ >  [**`;`** *`warning-specifier`* **`:`** *`warning-number-list`* ... ] **`)`**\ > **`#pragma warning( push`** [ **`,`** *n* ] **`)`**\ > **`#pragma warning( pop )`** @@ -24,30 +24,39 @@ The following warning-specifier parameters are available. | warning-specifier | Meaning | |--|--| -| `1`, `2`, `3`, `4` | Apply the given level to the specified warnings. Also turns on a specified warning that is off by default. | +| `1`, `2`, `3`, `4` | Apply the given level to the specified warnings. For example: `#pragma warning (3 : 5033)` turns off warning 5033 (normally a level 1 warning) unless the warning level is set to `/w3` or higher. Also can be used to turn on a specified warning that is off by default. | | `default` | Reset warning behavior to its default value. Also turns on a specified warning that is off by default. The warning will be generated at its default, documented, level.

For more information, see [Compiler warnings that are off by default](../preprocessor/compiler-warnings-that-are-off-by-default.md). | -| `disable` | Don't issue the specified warning messages. | +| `disable` | Don't issue the specified warning messages. The optional **`justification`** property is allowed. | | `error` | Report the specified warnings as errors. | | `once` | Display the specified message(s) only one time. | -| `suppress` | Pushes the current state of the pragma on the stack, disables the specified warning for the next line, and then pops the warning stack so that the pragma state is reset. | +| `suppress` | Pushes the current state of the pragma on the stack, disables the specified warning for the next line, and then pops the warning stack so that the pragma state is reset. The optional **`justification`** property is allowed. | The following code statement illustrates that a *`warning-number-list`* parameter can contain multiple warning numbers, and that multiple *`warning-specifier`* parameters can be specified in the same pragma directive. ```cpp -#pragma warning( disable : 4507 34; once : 4385; error : 164 ) +#pragma warning( disable : 4507 4034; once : 4385; error : 164 ) ``` +However, when the **`justification`** field is present, only one warning number can be specified. The following code statement illustrates the use of the **`justification`** field. + +```cpp +#pragma warning( disable : 4507, justification : "This warning is disabled" ) +``` + +The **`justification`** fields allows you to explain why a warning is being disable or +suppressed. The **`justification`** field is only supported for the **`disable`** and **`suppress`** *`warning-specifier`*. This value will appear in the SARIF output when the `/analyze:log:includesuppressed` option is specified. Its value is a UTF-8 encoded narrow string literal. + This directive is functionally equivalent to the following code: ```cpp // Disable warning messages 4507 and 4034. -#pragma warning( disable : 4507 34 ) +#pragma warning(disable : 4507 4034) // Issue warning C4385 only once. -#pragma warning( once : 4385 ) +#pragma warning(once : 4385) // Report warning C4164 as an error. -#pragma warning( error : 164 ) +#pragma warning(error : 164) ``` The compiler adds 4000 to any warning number that is between 0 and 999. @@ -58,15 +67,17 @@ Warning numbers in the range 4700-4999 are associated with code generation. For // pragma_warning.cpp // compile with: /W1 #pragma warning(disable:4700) -void Test() { +void Test() +{ int x; - int y = x; // no C4700 here - #pragma warning(default:4700) // C4700 enabled after Test ends + int y = x; // no C4700 here + #pragma warning(default:4700) // C4700 enabled after compiling Test() } -int main() { +int main() +{ int x; - int y = x; // C4700 + int y = x; // C4700 } ``` diff --git a/docs/sanitizers/asan-building.md b/docs/sanitizers/asan-building.md index 5ea53819c8..003492cbbb 100644 --- a/docs/sanitizers/asan-building.md +++ b/docs/sanitizers/asan-building.md @@ -7,9 +7,9 @@ helpviewer_keywords: ["ASan reference", "AddressSanitizer reference", "Address S --- # AddressSanitizer language, build, and debugging reference -The sections in this article describe the AddressSanitizer language specification, compiler options, and linker options. They also describe the options that control Visual Studio debugger integration specific to the AddressSanitizer. +This article describes the AddressSanitizer language specification, compiler options, linker options, and the options that control Visual Studio debugger integration specific to the AddressSanitizer. -For more information on the AddressSanitizer runtime, see the [runtime reference](./asan-runtime.md). It includes information on intercepted functions and how to hook custom allocators. For more information on saving crash dumps from AddressSanitizer failures, see the [crash dump reference](./asan-offline-crash-dumps.md). +For more information on the AddressSanitizer runtime, see the [runtime reference](asan-runtime.md). It includes information on intercepted functions and how to hook custom allocators. For more information on saving crash dumps from AddressSanitizer failures, see the [crash dump reference](asan-offline-crash-dumps.md). ## Language specification @@ -56,9 +56,9 @@ void test3() { ### `/fsanitize=address` compiler option -The [**`/fsanitize=address`**](../build/reference/fsanitize.md) compiler option instruments memory references in your code to catch memory safety errors at runtime. The instrumentation hooks loads, stores, scopes, `alloca`, and CRT functions. It can detect hidden bugs such as out-of-bounds, use-after-free, use-after-scope, and so on. For a nonexhaustive list of errors detected at runtime, see [AddressSanitizer error examples](./asan-error-examples.md). +The [**`/fsanitize=address`**](../build/reference/fsanitize.md) compiler option instruments memory references in your code to catch memory safety errors at runtime. The instrumentation hooks loads, stores, scopes, `alloca`, and CRT functions. It can detect hidden bugs such as out-of-bounds, use-after-free, use-after-scope, and so on. For a nonexhaustive list of errors detected at runtime, see [AddressSanitizer error examples](asan-error-examples.md). -**`/fsanitize=address`** is compatible with all existing C++ or C optimization levels (for example, **`/Od`**, **`/O1`**, **`/O2`**, **`/O2 /GL`**, and profile guided optimization). The code produced with this option works with static and dynamic CRTs (for example, **`/MD`**, **`/MDd`**, **`/MT`**, and **`/MTd`**). This compiler option can be used to create an .EXE or .DLL targeting x86 or x64. Debug information is required for optimal formatting of call stacks. +**`/fsanitize=address`** is compatible with all existing C++ or C optimization levels (for example, **`/Od`**, **`/O1`**, **`/O2`**, and **`/O2 /GL`**). The code produced with this option works with static and dynamic CRTs (for example, **`/MD`**, **`/MDd`**, **`/MT`**, and **`/MTd`**). This compiler option can be used to create an .EXE or .DLL targeting x86 or x64. Debug information is required for optimal formatting of call stacks. This compiler option isn't supported with profile guided optimization. For examples of code that demonstrates several kinds of error detection, see [AddressSanitizer error examples](asan-error-examples.md). @@ -106,6 +106,16 @@ The dual stack frame in the heap remains after the return from the function that Stack frames are allocated in the heap and remain after functions return. The runtime uses garbage collection to asynchronously free these fake call-frame objects, after a certain time interval. Addresses of locals get transferred to persistent frames in the heap. It's how the system can detect when any locals get used after the defining function returns. For more information, see the [algorithm for stack use after return](https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn) as documented by Google. +### ASan intrinsic compatibility library + +When building with ASan, the compiler replaces intrinsic functions (like `memset`) with function calls provided by the ASan runtime library (like `__asan_memset`) that complete the same operation but also provide memory safety checks. For user-mode ASan, the compiler and runtime are updated together because Visual Studio provides both. [Kernel-mode ASan (KASan)](/windows-hardware/drivers/devtest/kasan) is part of the Windows OS, so it updates on a different cadence than the compiler. To avoid issues with a new compiler using new intrinsics that the installed version of KASan doesn't support, link the compatibility library (`asan_compat.lib`) to avoid link-time issues. When using `asan_compat.lib`, the program behaves as though the unsupported ASan intrinsics aren't used. Linking with a newer runtime library that supports the new ASan intrinsics supersedes the versions provided by `asan_compat.lib`. This decision is made at link time, so it's imperative to link with the KASan library provided by the Windows SDK that matches the OS version you're targeting. + +The following options are supported in Visual Studio 2022 17.14 Preview 2 and later: +- To include this compatibility library as a default library, use the **`/fsanitize-address-asan-compat-lib`** compiler option. This option is automatically enabled when using **`/fsanitize=kernel-address`**. +- To opt-out of this compatibility library, use the **`/fno-sanitize-address-asan-compat-lib`** compiler option. + +Using **`/fsanitize-address-asan-compat-lib`** to link a newer compiler with an older user-mode ASan runtime isn't currently supported. + ## Linker ### `/INFERASANLIBS[:NO]` linker option @@ -141,7 +151,7 @@ Prior to Visual Studio 17.7 Preview 3, statically linked (**`/MT`** or **`/MTd`* ### `/fno-sanitize-address-vcasan-lib` compiler option -The **`/fsanitize=address`** option links in extra libraries for an improved Visual Studio debugging experience when an AddressSanitizer exception is thrown. These libraries are called **VCAsan**. The libraries enable Visual Studio to display AddressSanitizer errors on your source code. They also enable the executable to generate crash dumps when an AddressSanitizer error report is created. For more information, see [Visual Studio AddressSanitizer extended functionality library](./asan-debugger-integration.md). +The **`/fsanitize=address`** option links in extra libraries for an improved Visual Studio debugging experience when an AddressSanitizer exception is thrown. These libraries are called **VCAsan**. The libraries enable Visual Studio to display AddressSanitizer errors on your source code. They also enable the executable to generate crash dumps when an AddressSanitizer error report is created. For more information, see [Visual Studio AddressSanitizer extended functionality library](asan-debugger-integration.md). The library chosen depends on the compiler options, and is automatically linked in. @@ -152,7 +162,7 @@ The library chosen depends on the compiler options, and is automatically linked | **`/MTd`** | *`libvcasand.lib`* | | **`/MDd`** | *`vcasand.lib`* | -However, if you compile using **`/Zl`** (Omit default library name), you must manually specify the library. If you don't, you'll get an unresolved external symbol link error. Here are some typical examples: +However, if you compile using **`/Zl`** (Omit default library name), you must manually specify the library. If you don't, you get an unresolved external symbol link error. Here are some typical examples: ```Output error LNK2001: unresolved external symbol __you_must_link_with_VCAsan_lib @@ -169,10 +179,10 @@ To enable this behavior, run the command `set ASAN_VCASAN_DEBUGGING=1` before yo ## See also -[AddressSanitizer overview](./asan.md)\ -[AddressSanitizer known issues](./asan-known-issues.md)\ -[AddressSanitizer runtime reference](./asan-runtime.md)\ -[AddressSanitizer shadow bytes](./asan-shadow-bytes.md)\ -[AddressSanitizer cloud or distributed testing](./asan-offline-crash-dumps.md)\ -[AddressSanitizer debugger integration](./asan-debugger-integration.md)\ -[AddressSanitizer error examples](./asan-error-examples.md) +[AddressSanitizer overview](asan.md)\ +[AddressSanitizer known issues](asan-known-issues.md)\ +[AddressSanitizer runtime reference](asan-runtime.md)\ +[AddressSanitizer shadow bytes](asan-shadow-bytes.md)\ +[AddressSanitizer cloud or distributed testing](asan-offline-crash-dumps.md)\ +[AddressSanitizer debugger integration](asan-debugger-integration.md)\ +[AddressSanitizer error examples](asan-error-examples.md) diff --git a/docs/sanitizers/asan-continue-on-error.md b/docs/sanitizers/asan-continue-on-error.md index 0e5694dfc7..9d820f863e 100644 --- a/docs/sanitizers/asan-continue-on-error.md +++ b/docs/sanitizers/asan-continue-on-error.md @@ -20,7 +20,7 @@ It's a good practice to create a checked build of your C or C++ app with ASAN tu When your app finishes, you get a summary of the memory issues. With COE, you can compile and deploy an existing application into limited production to find memory safety issues. You can run the checked build for days to fully exercise the code, although the app will run slower due to the ASAN instrumentation. -You can use this feature to create a new shipping gate. If all your existing tests pass, but COE reports a memory safety error or a leak, don’t ship the new code or integrate it into a parent branch. +You can use this feature to create a new shipping gate. If all your existing tests pass, but COE reports a memory safety error or a leak, don't ship the new code or integrate it into a parent branch. Don't deploy a build with COE enabled into production! COE is intended to be used in testing and development environments only. You shouldn't use an ASAN enabled build in production because of the performance impact of the instrumentation added to detect memory errors, the risk of exposing the internal implementation if errors are reported, and to avoid increasing the surface area of possible security exploits by shipping the library functions that ASAN substitutes for memory allocation, freeing, and so on. @@ -146,7 +146,7 @@ This sorting prioritizes memory safety issues that may be the most concerning. F File: D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_malloc_win_thunk.cpp Unique call stacks: 1 File: C:\Users\xxx\Desktop\COE\doublefree.cpp Unique call stacks: 1 -`````` +``` Finally, the report contains a summary of where the memory errors occurred: @@ -196,7 +196,7 @@ Create the example: char buffer[10] = {0,1,2,3,4,5,6,7,8,9}; - void main() + int main() { char* inverted_buf= func(buffer, 10); } @@ -317,7 +317,7 @@ int foo_redundant(unsigned long arg_var) return ret; } -void main() +int main() { int cnt = 0; @@ -351,4 +351,4 @@ With the new ASAN runtime, no extra binaries need to be deployed with your app. [Example memory safety errors](asan.md#error-types)\ [-Zi compiler flag](../build/reference/z7-zi-zi-debug-information-format.md#zi)\ [-fsanitize=address compiler flag](../build/reference/fsanitize.md)\ -[Top 25 most dangerous software weaknesses](https://cwe.mitre.org/top25/archive/2021/2021_cwe_top25.html) \ No newline at end of file +[Top 25 most dangerous software weaknesses](https://cwe.mitre.org/top25/archive/2021/2021_cwe_top25.html) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index cbf822f6b8..6bcd8df0ea 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -1,18 +1,18 @@ --- -title: "AddressSanitizer known issues" +title: "AddressSanitizer known issues and limitations" description: "Technical description of the AddressSanitizer for Microsoft C/C++ known issues." -ms.date: 12/1/2023 +ms.date: 5/21/2025 helpviewer_keywords: ["AddressSanitizer known issues"] --- -# AddressSanitizer known issues +# AddressSanitizer known issues and limitations > [!NOTE] > Send us [feedback](https://aka.ms/vsfeedback/browsecpp) on what you'd like to see in future releases, and [report bugs](https://aka.ms/feedback/report?space=62) if you run into issues. ## Incompatible options and functionality -These options and functionality are incompatible with [`/fsanitize=address`](../build/reference/fsanitize.md) and should be disabled or avoided. +The following options and functionality are incompatible with [`/fsanitize=address`](../build/reference/fsanitize.md) and should be disabled or avoided. - The [`/RTC`](../build/reference/rtc-run-time-error-checks.md) options are incompatible with AddressSanitizer and should be disabled. - [Incremental linking](../build/reference/incremental-link-incrementally.md) is unsupported, and should be disabled. @@ -23,13 +23,12 @@ These options and functionality are incompatible with [`/fsanitize=address`](../ - [C++ AMP](../parallel/amp/cpp-amp-overview.md) is unsupported, and should be disabled. - [Universal Windows Platform](../cppcx/universal-windows-apps-cpp.md) (UWP) applications are unsupported. - [Special case list](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) files are unsupported. -- [MFC](../mfc/mfc-concepts.md) using the optional [`alloc_dealloc_mismatch`](error-alloc-dealloc-mismatch.md) runtime option is unsupported. ## Standard library support -The MSVC standard library (STL) is partially enlightened to understand the AddressSanitizer and provide other checks. For more information, see [container-overflow error](./error-container-overflow.md). +The MSVC standard library (STL) makes partial use of the AddressSanitizer and provides other code safety checks. For more information, see [container-overflow error](./error-container-overflow.md). -When annotations are disabled or in versions without support, AddressSanitizer exceptions raised in STL code do still identify true bugs. However, they aren't as precise as they could be. +When annotations are disabled, or in versions of the Standard Library that don't support them, AddressSanitizer exceptions raised in STL code still identify real bugs. However, they are more precise if annotations are enabled and you use a version of the Standard Library that supports them. This example demonstrates the lack of precision and the benefits of enabling annotations: @@ -55,30 +54,45 @@ int main() { } ``` -## Windows versions +## Overriding operator new and delete + +AddressSanitizer (ASAN) uses a custom version of `operator new` and `operator delete` to find allocation errors like [`alloc_dealloc_mismatch`](error-alloc-dealloc-mismatch.md). Running the linker with [`/INFERASANLIBS`](../build/reference/inferasanlibs.md) ensures that ASAN's `new`/`delete` override has low precedence, so that the linker chooses any `operator new` or `operator delete` overrides in other libraries over ASAN's custom versions. When this happens, ASAN may not be able to catch some errors that rely on its custom `operator new` and `operator delete`. + +[MFC](../mfc/mfc-concepts.md) includes custom overrides for `operator new` and `operator delete` and might miss errors like [`alloc_dealloc_mismatch`](error-alloc-dealloc-mismatch.md). -As there are dependencies with specific Windows versions, support is focused on Windows 10. MSVC AddressSanitizer was tested on 10.0.14393 (RS1), and 10.0.21323 (prerelease insider build). [Report a bug](https://aka.ms/feedback/report?space=62) if you run into issues. ## Memory usage -The AddressSanitizer runtime doesn't release memory back to the OS during execution. From the OS's point of view, it may look like there's a memory leak. This design decision is intentional, so as not to allocate all the required memory up front. +The AddressSanitizer runtime doesn't release memory back to the OS during execution. From the OS's point of view, it may look like there's a memory leak. This is intentional so that the memory isn't all allocated up front. ## AddressSanitizer runtime DLL locations -The *`clang_rt.asan*.dll`* runtime files are installed next to the compilers in *`%VSINSTALLDIR%\VC\Tools\MSVC\\bin\\\`*. These locations are on the path in debugging sessions, and in Visual Studio developer command prompts. These files are never placed in *`C:\Windows\System32`* or *`C:\Windows\SysWOW64`*. +The *`clang_rt.asan*.dll`* runtime files are installed next to the compilers in *`%VSINSTALLDIR%\VC\Tools\MSVC\\bin\\\`*. These locations are on the path in debugging sessions and in Visual Studio developer command prompts. These files are never placed in *`C:\Windows\System32`* or *`C:\Windows\SysWOW64`*. ## Custom property sheet support -The Property Manager window in the Visual Studio IDE allows you to add custom *`.props`* files to your projects. Even though the **Enable Address Sanitizer** property (``) is shown, the build doesn't honor it. That's because the custom *`.props`* files get included after *`Microsoft.cpp.props`*, which uses the `` value to set other properties. +The Visual Studio Property Manager window allows you to add custom *`.props`* files to your projects. Even though the **Enable Address Sanitizer** property (``) is shown, the build doesn't honor it. That's because the custom *`.props`* files are included after *`Microsoft.cpp.props`*, which uses the `` value to set other properties. + +As a workaround, create a *`Directory.Build.props`* file in the root of your project to define the `` property. For more information, see [Customize C++ builds](/visualstudio/msbuild/customize-your-build#customize-c-builds). + +## Thread local variables + +Thread local variables (global variables declared with `__declspec(thread)` or `thread_local`) aren't protected by AddressSanitizer. This limitation isn't specific to Windows or Microsoft Visual C++, but is a general limitation. + +## Issues with partially sanitized executables + +If all of the code in a process isn't compiled with `/fsanitize=address`, ASan may not be able to diagnose all memory safety errors. The most common example is when a DLL is compiled with ASan but is loaded into a process that contains code that wasn't compiled with ASan. In this case, ASan attempts to categorize allocations that took place prior to ASan initialization. Once those allocations are reallocated, ASan tries to own and monitor the lifetime of the memory. + +If all of the DLLs that were compiled with ASan are unloaded from the process before the process ends, there may be crashes due to dangling references to intercepted functions such as `memcmp`, `memcpy`, `memmove`, and so on. For the best results, compile all modules under test with `/fsanitize=address`, or do not unload modules compiled with ASan after they enter the process. -As a workaround, you can create a *`Directory.Build.props`* file in the root of your project to define the `` property. For more information, see [Customize C++ builds](/visualstudio/msbuild/customize-your-build#customize-c-builds). +Please report any bugs to our [Developer Community](https://aka.ms/feedback/report?space=62). ## See also -[AddressSanitizer overview](./asan.md)\ -[AddressSanitizer build and language reference](./asan-building.md)\ -[AddressSanitizer runtime reference](./asan-runtime.md)\ -[AddressSanitizer shadow bytes](./asan-shadow-bytes.md)\ -[AddressSanitizer cloud or distributed testing](./asan-offline-crash-dumps.md)\ -[AddressSanitizer debugger integration](./asan-debugger-integration.md)\ -[AddressSanitizer error examples](./asan-error-examples.md) +[AddressSanitizer overview](asan.md)\ +[AddressSanitizer build and language reference](asan-building.md)\ +[AddressSanitizer runtime reference](asan-runtime.md)\ +[AddressSanitizer shadow bytes](asan-shadow-bytes.md)\ +[AddressSanitizer cloud or distributed testing](asan-offline-crash-dumps.md)\ +[AddressSanitizer debugger integration](asan-debugger-integration.md)\ +[AddressSanitizer error examples](asan-error-examples.md) diff --git a/docs/sanitizers/asan-shadow-bytes.md b/docs/sanitizers/asan-shadow-bytes.md index 6d53b91270..9b6b747e24 100644 --- a/docs/sanitizers/asan-shadow-bytes.md +++ b/docs/sanitizers/asan-shadow-bytes.md @@ -7,7 +7,7 @@ helpviewer_keywords: ["Shadow bytes", "AddressSanitizer shadow bytes","Address S # AddressSanitizer shadow bytes -We briefly summarize the concept of shadow bytes and how they can be used by the runtime implementation of [`/fsanitize=address`](../build/reference/fsanitize.md). For further details, we refer you to the [seminal paper](https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf) and the [AddressSanitizer algorithm](https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm). +We briefly summarize the concept of shadow bytes and how they can be used by the runtime implementation of [`/fsanitize=address`](../build/reference/fsanitize.md). For further details, we refer you to the initial research [AddressSanitizer - Serebryany, et al](https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf) and the [current AddressSanitizer algorithm documentation](https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm). ## Core concept diff --git a/docs/sanitizers/asan.md b/docs/sanitizers/asan.md index ee0ead587b..2868186341 100644 --- a/docs/sanitizers/asan.md +++ b/docs/sanitizers/asan.md @@ -1,7 +1,7 @@ --- title: "AddressSanitizer" description: "Top-level description of the AddressSanitizer feature for Microsoft C/C++." -ms.date: 06/13/2023 +ms.date: 09/06/2024 f1_keywords: ["AddressSanitizer"] helpviewer_keywords: ["ASan", "AddressSanitizer", "Address Sanitizer", "compiling for AddressSanitizer"] --- @@ -77,14 +77,17 @@ Microsoft recommends you use AddressSanitizer in these three standard workflows: - [Azure OneFuzz](https://www.microsoft.com/security/blog/2020/09/15/microsoft-onefuzz-framework-open-source-developer-tool-fix-bugs/) - Local Machine -This article covers the information you require to enable the three workflows listed previously. The information is specific to the **platform-dependent** Windows 10 implementation of AddressSanitizer. This documentation supplements the excellent documentation from [Google, Apple, and GCC](#external-docs) already published. +This article covers the information you require to enable the three workflows listed previously. The information is specific to the **platform-dependent** Windows 10 (and later) implementation of AddressSanitizer. This documentation supplements the excellent documentation from [Google, Apple, and GCC](#external-docs) already published. > [!NOTE] -> Current support is limited to x86 and x64 on Windows 10. [Send us feedback](https://aka.ms/vsfeedback/browsecpp) on what you'd like to see in future releases. Your feedback helps us prioritize other sanitizers for the future, such as **`/fsanitize=thread`**, **`/fsanitize=leak`**, **`/fsanitize=memory`**, **`/fsanitize=undefined`**, or **`/fsanitize=hwaddress`**. You can [report bugs here](https://aka.ms/feedback/report?space=62) if you run into issues. +> Support is limited to x86 and x64 on Windows 10 and later. [Send us feedback](https://aka.ms/vsfeedback/browsecpp) on what you'd like to see in future releases. Your feedback helps us prioritize other sanitizers for the future, such as **`/fsanitize=thread`**, **`/fsanitize=leak`**, **`/fsanitize=memory`**, **`/fsanitize=undefined`**, or **`/fsanitize=hwaddress`**. You can [report bugs here](https://aka.ms/feedback/report?space=62) if you run into issues. ## Use AddressSanitizer from a developer command prompt -Use the **`/fsanitize=address`** compiler option in a [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts) to enable compiling for the AddressSanitizer runtime. The **`/fsanitize=address`** option is compatible with all existing C++ or C optimization levels (for example, `/Od`, `/O1`, `/O2`, `/O2 /GL`, and `PGO`). The option works with static and dynamic CRTs (for example, `/MD`, `/MDd`, `/MT`, and `/MTd`). It works whether you create an EXE or a DLL. Debug information is required for optimal formatting of call stacks. In the following example, `cl /fsanitize=address /Zi` is passed on the command line. +Use the **`/fsanitize=address`** compiler option in a [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts) to enable compiling for the AddressSanitizer runtime. The **`/fsanitize=address`** option is compatible with existing C++ or C optimization levels (for example, `/Od`, `/O1`, `/O2`, and `/O2 /GL`). The option works with static and dynamic CRTs (for example, `/MD`, `/MDd`, `/MT`, and `/MTd`). It works whether you create an EXE or a DLL. Debug information is required for optimal formatting of call stacks. In the following example, `cl /fsanitize=address /Zi` is passed on the command line. + +> [!NOTE] +> AddressSanitizer doesn't support Profile-guided optimization (PGO). AddressSanitizer shouldn't be used in production. The AddressSanitizer libraries (.lib files) are linked for you automatically. For more information, see [AddressSanitizer language, build, and debugging reference](asan-building.md). @@ -286,7 +289,7 @@ Extensive documentation already exists for these language and platform-dependent - [Apple](https://developer.apple.com/documentation/xcode/diagnosing_memory_thread_and_crash_issues_early) - [GCC](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html) -This seminal paper on the [AddressSanitizer](https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf) describes the implementation. +This seminal paper on the [AddressSanitizer (external)](https://www.usenix.org/system/files/conference/atc12/atc12-final39.pdf) describes the implementation. ## See also diff --git a/docs/sanitizers/error-alloc-dealloc-mismatch.md b/docs/sanitizers/error-alloc-dealloc-mismatch.md index 906017a981..22cf7f620f 100644 --- a/docs/sanitizers/error-alloc-dealloc-mismatch.md +++ b/docs/sanitizers/error-alloc-dealloc-mismatch.md @@ -1,7 +1,7 @@ --- title: "Error: alloc-dealloc-mismatch" -description: "Source examples and live debug screenshots for alloc-dealloc-mismatch errors." -ms.date: 03/02/2021 +description: "Learn about the alloc-dealloc-mismatch Address Sanitizer error." +ms.date: 05/28/2025 f1_keywords: ["alloc-dealloc-mismatch"] helpviewer_keywords: ["alloc-dealloc-mismatch error", "AddressSanitizer error alloc-dealloc-mismatch"] --- @@ -9,38 +9,42 @@ helpviewer_keywords: ["alloc-dealloc-mismatch error", "AddressSanitizer error al > Address Sanitizer Error: Mismatch between allocation and deallocation APIs -The `alloc`/`dealloc` mismatch functionality in AddressSanitizer is off by default for Windows. To enable it, run `set ASAN_OPTIONS=alloc_dealloc_mismatch=1` before running the program. This environment variable is checked at runtime to report errors on `malloc`/`delete`, `new`/`free`, and `new`/`delete[]`. +Enables runtime detection of mismatched memory operations that may lead to undefined behavior, such as: +- `malloc` must be paired with `free`, not `delete` or `delete[]`. +- `new` must be paired with `delete`, not `free` or `delete[]`. +- `new[]` must be paired with `delete[]`, not `delete` or `free`. + +In Windows, `alloc-dealloc-mismatch` error detection is off by default. To enable it, set the environment variable `set ASAN_OPTIONS=alloc_dealloc_mismatch=1` before running your program. ## Example ```cpp // example1.cpp -// alloc-dealloc-mismatch error +// Demonstrate alloc-dealloc-mismatch error #include #include -int main(int argc, char* argv[]) { - +int main(int argc, char* argv[]) +{ if (argc != 2) return -1; - switch (atoi(argv[1])) { - - case 1: - delete[](new int[10]); - break; - case 2: - delete (new int[10]); // Boom! - break; - default: - printf("arguments: 1: no error 2: runtime error\n"); - return -1; + switch (atoi(argv[1])) + { + case 1: + delete[](new int[10]); + break; + case 2: + delete (new int[10]); // Boom! + break; + default: + printf("arguments: 1: no error 2: runtime error\n"); + return -1; } - return 0; } ``` -To build and test this example, run these commands in a Visual Studio 2019 version 16.9 or later [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts): +In a Visual Studio 2019 version 16.9 or later [developer command prompt](../build/building-on-the-command-line.md#developer_command_prompt_shortcuts), run the following commands to see an exampe of `alloc_dealloc_mismatch`: ```cmd cl example1.cpp /fsanitize=address /Zi @@ -48,17 +52,17 @@ set ASAN_OPTIONS=alloc_dealloc_mismatch=1 devenv /debugexe example1.exe 2 ``` -### Resulting error +### Output -:::image type="content" source="media/alloc-dealloc-mismatch-example-1.png" alt-text="Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1."::: +:::image type="content" source="media/alloc-dealloc-mismatch-example-1.png" alt-text="Screenshot of debugger displaying alloc-dealloc-mismatch error in example 1." lightbox="media/alloc-dealloc-mismatch-example-1.png"::: ## See also -[AddressSanitizer overview](./asan.md)\ -[AddressSanitizer known issues](./asan-known-issues.md)\ -[AddressSanitizer build and language reference](./asan-building.md)\ -[AddressSanitizer runtime reference](./asan-runtime.md)\ -[AddressSanitizer shadow bytes](./asan-shadow-bytes.md)\ -[AddressSanitizer cloud or distributed testing](./asan-offline-crash-dumps.md)\ -[AddressSanitizer debugger integration](./asan-debugger-integration.md)\ -[AddressSanitizer error examples](./asan-error-examples.md) +[AddressSanitizer overview](asan.md)\ +[AddressSanitizer known issues](asan-known-issues.md)\ +[AddressSanitizer build and language reference](asan-building.md)\ +[AddressSanitizer runtime reference](asan-runtime.md)\ +[AddressSanitizer shadow bytes](asan-shadow-bytes.md)\ +[AddressSanitizer cloud or distributed testing](asan-offline-crash-dumps.md)\ +[AddressSanitizer debugger integration](asan-debugger-integration.md)\ +[AddressSanitizer error examples](asan-error-examples.md) diff --git a/docs/sanitizers/error-allocation-size-too-big.md b/docs/sanitizers/error-allocation-size-too-big.md index 9e5e7a02d2..80638c6880 100644 --- a/docs/sanitizers/error-allocation-size-too-big.md +++ b/docs/sanitizers/error-allocation-size-too-big.md @@ -1,6 +1,6 @@ --- title: "Error: allocation-size-too-big" -description: "Source examples and live debug screenshots for allocation-size-too-big errors." +description: "Learn about the allocation-size-too-big Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["allocation-size-too-big"] helpviewer_keywords: ["allocation-size-too-big error", "AddressSanitizer error allocation-size-too-big"] diff --git a/docs/sanitizers/error-calloc-overflow.md b/docs/sanitizers/error-calloc-overflow.md index 5c7ee45059..5b944307d8 100644 --- a/docs/sanitizers/error-calloc-overflow.md +++ b/docs/sanitizers/error-calloc-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: calloc-overflow" -description: "Source examples and live debug screenshots for calloc overflow errors." +description: "Learn about the calloc-overflow Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["calloc-overflow"] helpviewer_keywords: ["calloc-overflow error", "AddressSanitizer error calloc-overflow"] diff --git a/docs/sanitizers/error-container-overflow.md b/docs/sanitizers/error-container-overflow.md index b458180a05..b4c1e4c783 100644 --- a/docs/sanitizers/error-container-overflow.md +++ b/docs/sanitizers/error-container-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: container-overflow" -description: "Source examples and live debug screenshots for container overflow errors." +description: "Learn about the container-overflow Address Sanitizer error." ms.date: 06/30/2023 f1_keywords: ["container-overflow", "mismatch detected for 'annotate_vector'", "_DISABLE_VECTOR_ANNOTATION"] helpviewer_keywords: ["container-overflow error", "AddressSanitizer error container-overflow", "mismatch detected for 'annotate_vector'", "_DISABLE_VECTOR_ANNOTATION"] diff --git a/docs/sanitizers/error-double-free.md b/docs/sanitizers/error-double-free.md index c60b825c64..099c9706ec 100644 --- a/docs/sanitizers/error-double-free.md +++ b/docs/sanitizers/error-double-free.md @@ -1,6 +1,6 @@ --- title: "Error: double-free" -description: "Source examples and live debug screenshots for double free errors." +description: "Learn about the double-free Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["double-free"] helpviewer_keywords: ["double-free error", "AddressSanitizer error double-free"] diff --git a/docs/sanitizers/error-dynamic-stack-buffer-overflow.md b/docs/sanitizers/error-dynamic-stack-buffer-overflow.md index 980851d524..4b0da9350d 100644 --- a/docs/sanitizers/error-dynamic-stack-buffer-overflow.md +++ b/docs/sanitizers/error-dynamic-stack-buffer-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: dynamic-stack-buffer-overflow" -description: "Source examples and live debug screenshots for alloca errors." +description: "Learn about the dynamic-stack-buffer-overflow Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["dynamic-stack-buffer-overflow"] helpviewer_keywords: ["dynamic-stack-buffer-overflow error", "AddressSanitizer error dynamic-stack-buffer-overflow"] diff --git a/docs/sanitizers/error-global-buffer-overflow.md b/docs/sanitizers/error-global-buffer-overflow.md index 9c94be6f3f..1f7885ddf8 100644 --- a/docs/sanitizers/error-global-buffer-overflow.md +++ b/docs/sanitizers/error-global-buffer-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: global-buffer-overflow" -description: "Source examples and live debug screenshots for global variable overflow errors." +description: "Learn about the global-buffer-overflow Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["global-buffer-overflow"] helpviewer_keywords: ["global-buffer-overflow error", "AddressSanitizer error global-buffer-overflow"] diff --git a/docs/sanitizers/error-heap-buffer-overflow.md b/docs/sanitizers/error-heap-buffer-overflow.md index 10600d8807..497f9847db 100644 --- a/docs/sanitizers/error-heap-buffer-overflow.md +++ b/docs/sanitizers/error-heap-buffer-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: heap-buffer-overflow" -description: "Source examples and live debug screenshots for heap variable overflow errors." +description: "Learn about the heap-buffer-overflow Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["heap-buffer-overflow"] helpviewer_keywords: ["heap-buffer-overflow error", "AddressSanitizer error heap-buffer-overflow"] diff --git a/docs/sanitizers/error-heap-use-after-free.md b/docs/sanitizers/error-heap-use-after-free.md index dd02ecf33b..f0c827d5d2 100644 --- a/docs/sanitizers/error-heap-use-after-free.md +++ b/docs/sanitizers/error-heap-use-after-free.md @@ -1,6 +1,6 @@ --- title: "Error: heap-use-after-free" -description: "Source examples and live debug screenshots for heap use after free errors." +description: "Learn about the heap-use-after-free Address Sanitizer error." ms.date: 04/06/2023 f1_keywords: ["heap-use-after-free"] helpviewer_keywords: ["heap-use-after-free error", "AddressSanitizer error heap-use-after-free"] diff --git a/docs/sanitizers/error-invalid-allocation-alignment.md b/docs/sanitizers/error-invalid-allocation-alignment.md index 2197383c97..87b091b869 100644 --- a/docs/sanitizers/error-invalid-allocation-alignment.md +++ b/docs/sanitizers/error-invalid-allocation-alignment.md @@ -1,6 +1,6 @@ --- title: "Error: invalid-allocation-alignment" -description: "Source examples and live debug screenshots for invalid _aligned_malloc errors." +description: "Learn about the invalid-allocation-alignment Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["invalid-allocation-alignment"] helpviewer_keywords: ["invalid-allocation-alignment error", "AddressSanitizer error invalid-allocation-alignment"] diff --git a/docs/sanitizers/error-memcpy-param-overlap.md b/docs/sanitizers/error-memcpy-param-overlap.md index 27c4cd8582..49ded7146c 100644 --- a/docs/sanitizers/error-memcpy-param-overlap.md +++ b/docs/sanitizers/error-memcpy-param-overlap.md @@ -1,6 +1,6 @@ --- title: "Error: memcpy-param-overlap" -description: "Source examples and live debug screenshots for memcpy parameter overlap errors." +description: "Learn about the memcpy-param-overlap Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["memcpy-param-overlap"] helpviewer_keywords: ["memcpy-param-overlap error", "AddressSanitizer error memcpy-param-overlap"] diff --git a/docs/sanitizers/error-new-delete-type-mismatch.md b/docs/sanitizers/error-new-delete-type-mismatch.md index 5a72252cec..2c19b710af 100644 --- a/docs/sanitizers/error-new-delete-type-mismatch.md +++ b/docs/sanitizers/error-new-delete-type-mismatch.md @@ -1,6 +1,6 @@ --- title: "Error: new-delete-type-mismatch" -description: "Source examples and live debug screenshots for new delete type mismatch errors." +description: "Learn about the new-delete-type-mismatch Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["new-delete-type-mismatch"] helpviewer_keywords: ["new-delete-type-mismatch error", "AddressSanitizer error new-delete-type-mismatch"] diff --git a/docs/sanitizers/error-stack-buffer-overflow.md b/docs/sanitizers/error-stack-buffer-overflow.md index e11403ba25..c02011aaef 100644 --- a/docs/sanitizers/error-stack-buffer-overflow.md +++ b/docs/sanitizers/error-stack-buffer-overflow.md @@ -1,6 +1,6 @@ --- title: "Error: stack-buffer-overflow" -description: "Source examples and live debug screenshots for Stack buffer overflow errors." +description: "Learn about the stack-buffer-overflow Address Sanitizer error." ms.date: 09/29/2021 f1_keywords: ["stack-buffer-overflow"] helpviewer_keywords: ["stack-buffer-overflow error", "AddressSanitizer error stack-buffer-overflow"] diff --git a/docs/sanitizers/error-stack-buffer-underflow.md b/docs/sanitizers/error-stack-buffer-underflow.md index c540483abf..03d148c2e7 100644 --- a/docs/sanitizers/error-stack-buffer-underflow.md +++ b/docs/sanitizers/error-stack-buffer-underflow.md @@ -1,6 +1,6 @@ --- title: "Error: stack-buffer-underflow" -description: "Source examples and live debug screenshots for Stack buffer underflow errors." +description: "Learn about the stack-buffer-underflow Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["stack-buffer-underflow"] helpviewer_keywords: ["stack-buffer-underflow error", "AddressSanitizer error stack-buffer-underflow"] diff --git a/docs/sanitizers/error-stack-use-after-return.md b/docs/sanitizers/error-stack-use-after-return.md index 214f9d8ab5..5f6154e217 100644 --- a/docs/sanitizers/error-stack-use-after-return.md +++ b/docs/sanitizers/error-stack-use-after-return.md @@ -1,6 +1,6 @@ --- title: "Error: stack-use-after-return" -description: "Source examples and live debug screenshots for Stack Use After Return errors." +description: "Learn about the stack-use-after-return Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["stack-use-after-return"] helpviewer_keywords: ["stack-use-after-return error", "AddressSanitizer error stack-use-after-return"] diff --git a/docs/sanitizers/error-stack-use-after-scope.md b/docs/sanitizers/error-stack-use-after-scope.md index fa5a88daa9..fb2ff6df9c 100644 --- a/docs/sanitizers/error-stack-use-after-scope.md +++ b/docs/sanitizers/error-stack-use-after-scope.md @@ -1,6 +1,6 @@ --- title: "Error: stack-use-after-scope" -description: "Source examples and live debug screenshots for stack use after scope errors." +description: "Learn about the stack-use-after-scope Address Sanitizer error." ms.date: 02/05/2021 f1_keywords: ["stack-use-after-scope"] helpviewer_keywords: ["stack-use-after-scope error", "AddressSanitizer error stack-use-after-scope"] @@ -80,7 +80,7 @@ devenv /debugexe example2.exe struct IntHolder { explicit IntHolder(int* val = 0) : val_(val) { } ~IntHolder() { - printf("Value: %d\n", *val_); // Bom! + printf("Value: %d\n", *val_); // Boom! } void set(int* val) { val_ = val; } int* get() { return val_; } @@ -138,7 +138,7 @@ void temp_from_conversion() { a.print(); } -void main() { +int main() { explicit_temp(); temp_from_conversion(); } diff --git a/docs/sanitizers/error-strncat-param-overlap.md b/docs/sanitizers/error-strncat-param-overlap.md index 3e18395678..52c5f31142 100644 --- a/docs/sanitizers/error-strncat-param-overlap.md +++ b/docs/sanitizers/error-strncat-param-overlap.md @@ -1,6 +1,6 @@ --- title: "Error: strncat-param-overlap" -description: "Source examples and live debug screenshots for strcat parameter overlap errors." +description: "Learn about the strncat-param-overlap Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["strncat-param-overlap"] helpviewer_keywords: ["strncat-param-overlap error", "AddressSanitizer error strcat-param-overlap"] diff --git a/docs/sanitizers/error-use-after-poison.md b/docs/sanitizers/error-use-after-poison.md index 9ef09bd0dc..f6c58a8601 100644 --- a/docs/sanitizers/error-use-after-poison.md +++ b/docs/sanitizers/error-use-after-poison.md @@ -1,6 +1,6 @@ --- title: "Error: use-after-poison" -description: "Source examples and live debug screenshots for use after poison errors." +description: "Learn about the use-after-poison Address Sanitizer error." ms.date: 03/02/2021 f1_keywords: ["use-after-poison"] helpviewer_keywords: ["use-after-poison error", "AddressSanitizer error use-after-poison"] diff --git a/docs/sanitizers/index.yml b/docs/sanitizers/index.yml index f80ba43bed..8e8e85e21f 100644 --- a/docs/sanitizers/index.yml +++ b/docs/sanitizers/index.yml @@ -41,7 +41,7 @@ landingContent: url: ./asan-runtime.md - text: AddressSanitizer error examples url: ./asan-error-examples.md - - text: AddressSanitizer known issues + - text: AddressSanitizer known issues and limitations url: ./asan-known-issues.md # Card diff --git a/docs/sanitizers/toc.yml b/docs/sanitizers/toc.yml index 96ec14bf18..f46431207c 100644 --- a/docs/sanitizers/toc.yml +++ b/docs/sanitizers/toc.yml @@ -59,5 +59,5 @@ items: href: ../sanitizers/error-strncat-param-overlap.md - name: "use-after-poison error" href: ../sanitizers/error-use-after-poison.md - - name: "Known issues" + - name: "Known issues and limitations" href: ../sanitizers/asan-known-issues.md diff --git a/docs/security/security-best-practices-for-cpp.md b/docs/security/security-best-practices-for-cpp.md index 3774d17083..c895388f5f 100644 --- a/docs/security/security-best-practices-for-cpp.md +++ b/docs/security/security-best-practices-for-cpp.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Security Best Practices for C++" title: "Security Best Practices for C++" -ms.date: "05/08/2018" +description: "Learn more about: Security Best Practices for C++" +ms.date: 05/08/2018 f1_keywords: ["securitybestpracticesVC"] helpviewer_keywords: ["Visual C++, security", "security [C++]", "security [C++], best practices"] -ms.assetid: 86acaccf-cdb4-4517-bd58-553618e3ec42 --- # Security Best Practices for C++ @@ -14,22 +13,22 @@ This article contains information about security tools and practices. Using them These security features are built into the Microsoft C++ compiler and linker: -[`/guard` (Enable Control Flow Guard)](../build/reference/guard-enable-control-flow-guard.md)
+[`/guard` (Enable Control Flow Guard)](../build/reference/guard-enable-control-flow-guard.md)\ Causes the compiler to analyze control flow for indirect call targets at compile time, and then to insert code to verify the targets at runtime. -[`/GS` (Buffer Security Check)](../build/reference/gs-buffer-security-check.md)
+[`/GS` (Buffer Security Check)](../build/reference/gs-buffer-security-check.md)\ Instructs the compiler to insert overrun detection code into functions that are at risk of being exploited. When an overrun is detected, execution is stopped. By default, this option is on. -[`/SAFESEH` (Image has Safe Exception Handlers)](../build/reference/safeseh-image-has-safe-exception-handlers.md)
+[`/SAFESEH` (Image has Safe Exception Handlers)](../build/reference/safeseh-image-has-safe-exception-handlers.md)\ Instructs the linker to include in the output image a table that contains the address of each exception handler. At run time, the operating system uses this table to make sure that only legitimate exception handlers are executed. This helps prevent the execution of exception handlers that are introduced by a malicious attack at run time. By default, this option is off. -[`/NXCOMPAT`](../build/reference/nxcompat.md), [`/NXCOMPAT` (Compatible with Data Execution Prevention)](../build/reference/nxcompat-compatible-with-data-execution-prevention.md) +[`/NXCOMPAT`](../build/reference/nxcompat.md), [`/NXCOMPAT` (Compatible with Data Execution Prevention)](../build/reference/nxcompat-compatible-with-data-execution-prevention.md)\ These compiler and linker options enable Data Execution Prevention (DEP) compatibility. DEP guards the CPU against the execution of non-code pages. -[`/analyze` (Code Analysis)](../build/reference/analyze-code-analysis.md)
+[`/analyze` (Code Analysis)](../build/reference/analyze-code-analysis.md)\ This compiler option activates code analysis that reports potential security issues such as buffer overrun, un-initialized memory, null pointer dereferencing, and memory leaks. By default, this option is off. For more information, see [Code Analysis for C/C++ Overview](../code-quality/code-analysis-for-c-cpp-overview.md). -[`/DYNAMICBASE` (Use address space layout randomization)](../build/reference/dynamicbase-use-address-space-layout-randomization.md)
+[`/DYNAMICBASE` (Use address space layout randomization)](../build/reference/dynamicbase-use-address-space-layout-randomization.md)\ This linker option enables the building of an executable image that can be loaded at different locations in memory at the beginning of execution. This option also makes the stack location in memory much less predictable. ## Security-Enhanced CRT @@ -86,6 +85,6 @@ For information about how to indentify and mitigate against speculative executio ## See also -
-[Security](/dotnet/standard/security/index)
+\ +[Security in .NET](/dotnet/standard/security/index)\ [How User Account Control (UAC) Affects Your Application](how-user-account-control-uac-affects-your-application.md) diff --git a/docs/standard-library/array-operators.md b/docs/standard-library/array-operators.md index 866d09f22e..56925a09ca 100644 --- a/docs/standard-library/array-operators.md +++ b/docs/standard-library/array-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["array/std::array::operator!=", "array/std::array::operator<", "array/std::array::operator<=", "array/std::array::operator>", "array/std::array::operator>=", "array/std::array::operator=="] -ms.assetid: c8f46282-f179-4909-9a01-639cb8e18c27 --- # `` operators @@ -116,7 +115,7 @@ Right container to compare. ### Remarks -The template function overloads `operator<` to compare two objects of class template [array Class](../standard-library/array-class-stl.md). The function returns `lexicographical_compare(left.begin(), left.end(), right.begin())`. +The template function overloads `operator<` to compare two objects of class template [`array`](../standard-library/array-class-stl.md). The function returns `lexicographical_compare(left.begin(), left.end(), right.begin())`. ### Example @@ -262,7 +261,7 @@ Right container to compare. ### Remarks -The template function overloads `operator==` to compare two objects of class template [array Class](../standard-library/array-class-stl.md). The function returns `equal(left.begin(), left.end(), right.begin())`. +The template function overloads `operator==` to compare two objects of class template [`array`](../standard-library/array-class-stl.md). The function returns `equal(left.begin(), left.end(), right.begin())`. ### Example diff --git a/docs/standard-library/atomic-functions.md b/docs/standard-library/atomic-functions.md index a8a8db35d4..9dcd5b5bae 100644 --- a/docs/standard-library/atomic-functions.md +++ b/docs/standard-library/atomic-functions.md @@ -1,41 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "07/11/2018" +description: "Learn more about: functions" +ms.date: 07/11/2018 f1_keywords: ["atomic/std::atomic_compare_exchange_strong", "atomic/std::atomic_compare_exchange_strong_explicit", "atomic/std::atomic_compare_exchange_weak", "atomic/std::atomic_compare_exchange_weak_explicit", "atomic/std::atomic_exchange", "atomic/std::atomic_exchange_explicit", "atomic/std::atomic_fetch_add", "atomic/std::atomic_fetch_add_explicit", "atomic/std::atomic_fetch_and", "atomic/std::atomic_fetch_and_explicit", "atomic/std::atomic_fetch_or", "atomic/std::atomic_fetch_or_explicit", "atomic/std::atomic_fetch_sub", "atomic/std::atomic_fetch_sub_explicit", "atomic/std::atomic_fetch_xor", "atomic/std::atomic_fetch_xor_explicit", "atomic/std::atomic_flag_clear", "atomic/std::atomic_flag_clear_explicit", "atomic/std::atomic_flag_test_and_set", "atomic/std::atomic_flag_test_and_set_explicit", "atomic/std::atomic_init", "atomic/std::atomic_is_lock_free", "atomic/std::atomic_load", "atomic/std::atomic_load_explicit", "atomic/std::atomic_signal_fence", "atomic/std::atomic_store", "atomic/std::atomic_store_explicit", "atomic/std::atomic_thread_fence", "atomic/std::kill_dependency"] helpviewer_keywords: ["std::atomic_compare_exchange_strong [C++]", "std::atomic_compare_exchange_strong_explicit [C++]", "std::atomic_compare_exchange_weak [C++]", "std::atomic_compare_exchange_weak_explicit [C++]", "std::atomic_exchange [C++]", "std::atomic_exchange_explicit [C++]", "std::atomic_fetch_add [C++]", "std::atomic_fetch_add_explicit [C++]", "std::atomic_fetch_and [C++]", "std::atomic_fetch_and_explicit [C++]", "std::atomic_fetch_or [C++]", "std::atomic_fetch_or_explicit [C++]", "std::atomic_fetch_sub [C++]", "std::atomic_fetch_sub_explicit [C++]", "std::atomic_fetch_xor [C++]", "std::atomic_fetch_xor_explicit [C++]", "std::atomic_flag_clear [C++]", "std::atomic_flag_clear_explicit [C++]", "std::atomic_flag_test_and_set [C++]", "std::atomic_flag_test_and_set_explicit [C++]", "std::atomic_init [C++]", "std::atomic_is_lock_free [C++]", "std::atomic_load [C++]", "std::atomic_load_explicit [C++]", "std::atomic_signal_fence [C++]", "std::atomic_store [C++]", "std::atomic_store_explicit [C++]", "std::atomic_thread_fence [C++]", "std::kill_dependency [C++]"] --- # `` functions -[atomic_compare_exchange_strong](#atomic_compare_exchange_strong)\ -[atomic_compare_exchange_strong_explicit](#atomic_compare_exchange_strong_explicit)\ -[atomic_compare_exchange_weak](#atomic_compare_exchange_weak)\ -[atomic_compare_exchange_weak_explicit](#atomic_compare_exchange_weak_explicit)\ -[atomic_exchange](#atomic_exchange)\ -[atomic_exchange_explicit](#atomic_exchange_explicit)\ -[atomic_fetch_add](#atomic_fetch_add)\ -[atomic_fetch_add_explicit](#atomic_fetch_add_explicit)\ -[atomic_fetch_and](#atomic_fetch_and)\ -[atomic_fetch_and_explicit](#atomic_fetch_and_explicit)\ -[atomic_fetch_or](#atomic_fetch_or)\ -[atomic_fetch_or_explicit](#atomic_fetch_or_explicit)\ -[atomic_fetch_sub](#atomic_fetch_sub)\ -[atomic_fetch_sub_explicit](#atomic_fetch_sub_explicit)\ -[atomic_fetch_xor](#atomic_fetch_xor)\ -[atomic_fetch_xor_explicit](#atomic_fetch_xor_explicit)\ -[atomic_flag_clear](#atomic_flag_clear)\ -[atomic_flag_clear_explicit](#atomic_flag_clear_explicit)\ -[atomic_flag_test_and_set](#atomic_flag_test_and_set)\ -[atomic_flag_test_and_set_explicit](#atomic_flag_test_and_set_explicit)\ -[atomic_init](#atomic_init)\ -[atomic_is_lock_free](#atomic_is_lock_free)\ -[atomic_load](#atomic_load)\ -[atomic_load_explicit](#atomic_load_explicit)\ -[atomic_signal_fence](#atomic_signal_fence)\ -[atomic_store](#atomic_store)\ -[atomic_store_explicit](#atomic_store_explicit)\ -[atomic_thread_fence](#atomic_thread_fence)\ -[kill_dependency](#kill_dependency) +The `` header provides the following functions: ## `atomic_compare_exchange_strong` @@ -676,8 +648,8 @@ A [`memory_order`](../standard-library/atomic-enums.md#memory_order_enum). Sets the **`bool`** flag in an [`atomic_flag`](../standard-library/atomic-flag-structure.md) object to **`true`**, within the constraints of the [`memory_order.memory_order_seq_cst`](../standard-library/atomic-enums.md#memory_order_enum). ```cpp -inline bool atomic_flag_test_and_set(volatile atomic_flag* Flag,) noexcept; -inline bool atomic_flag_test_and_set(atomic_flag* Flag,) noexcept; +inline bool atomic_flag_test_and_set(volatile atomic_flag* Flag) noexcept; +inline bool atomic_flag_test_and_set(atomic_flag* Flag) noexcept; ``` ### Parameters diff --git a/docs/standard-library/auto-ptr-class.md b/docs/standard-library/auto-ptr-class.md index 1b22c6ef9b..69bdeb67bf 100644 --- a/docs/standard-library/auto-ptr-class.md +++ b/docs/standard-library/auto-ptr-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: auto_ptr Class" title: "auto_ptr Class" +description: "Learn more about: auto_ptr Class" ms.date: 11/1/2023 f1_keywords: ["memory/std::auto_ptr", "memory/std::auto_ptr::element_type", "memory/std::auto_ptr::get", "memory/std::auto_ptr::release", "memory/std::auto_ptr::reset"] helpviewer_keywords: ["std::auto_ptr [C++]", "std::auto_ptr [C++], element_type", "std::auto_ptr [C++], get", "std::auto_ptr [C++], release", "std::auto_ptr [C++], reset"] @@ -134,17 +134,17 @@ public: cout << "Constructing " << ( void* )this << endl; x = i; bIsConstructed = true; - }; + } ~Int( ) { cout << "Destructing " << ( void* )this << endl; bIsConstructed = false; - }; + } Int &operator++( ) { x++; return *this; - }; + } int x; private: bool bIsConstructed; @@ -211,11 +211,11 @@ public: { x = i; cout << "Constructing " << ( void* )this << " Value: " << x << endl; - }; + } ~Int( ) { cout << "Destructing " << ( void* )this << " Value: " << x << endl; - }; + } int x; @@ -377,7 +377,7 @@ public: int m_i; }; void f(auto_ptr arg) { -}; +} int main() { const auto_ptr ciap(new C(1)); @@ -433,10 +433,10 @@ public: { x = i; cout << "Constructing " << (void*)this << " Value: " << x << endl; - }; + } ~Int() { cout << "Destructing " << (void*)this << " Value: " << x << endl; - }; + } int x; @@ -493,11 +493,11 @@ public: { x = i; cout << "Constructing " << (void*)this << " Value: " << x << endl; - }; + } ~Int() { cout << "Destructing " << (void*)this << " Value: " << x << endl; - }; + } int x; }; diff --git a/docs/standard-library/bad-alloc-class.md b/docs/standard-library/bad-alloc-class.md index 9cd3cc8bd8..f18b4ca87e 100644 --- a/docs/standard-library/bad-alloc-class.md +++ b/docs/standard-library/bad-alloc-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: bad_alloc Class" title: "bad_alloc Class" +description: "Learn more about: bad_alloc Class" ms.date: "11/04/2016" f1_keywords: ["new/std::bad_alloc"] helpviewer_keywords: ["bad_alloc class"] -ms.assetid: 6429a8e6-5a49-4907-8d56-f4a4ec8131d0 --- # bad_alloc Class @@ -31,8 +30,8 @@ The value returned by `what` is an implementation-defined C string. None of the ```cpp // bad_alloc.cpp // compile with: /EHsc -#include -#include +#include +#include using namespace std; int main() { diff --git a/docs/standard-library/basic-fstream-class.md b/docs/standard-library/basic-fstream-class.md index 7ddc445a51..3a9f9883a8 100644 --- a/docs/standard-library/basic-fstream-class.md +++ b/docs/standard-library/basic-fstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_fstream Class" title: "basic_fstream Class" -ms.date: "11/04/2016" +description: "Learn more about: basic_fstream Class" +ms.date: 11/04/2016 f1_keywords: ["fstream/std::basic_fstream", "fstream/std::basic_fstream::close", "fstream/std::basic_fstream::is_open", "fstream/std::basic_fstream::open", "fstream/std::basic_fstream::rdbuf", "fstream/std::basic_fstream::swap"] helpviewer_keywords: ["std::basic_fstream [C++]", "std::basic_fstream [C++], close", "std::basic_fstream [C++], is_open", "std::basic_fstream [C++], open", "std::basic_fstream [C++], rdbuf", "std::basic_fstream [C++], swap"] -ms.assetid: 8473817e-42a4-430b-82b8-b476c86bcf8a --- # basic_fstream Class @@ -204,7 +203,7 @@ The default file opening protection, equivalent to the *shflag* parameter in [_f ### Remarks -The member function calls [rdbuf](#rdbuf) **->** [open](../standard-library/basic-filebuf-class.md#open)(_ *Filename*, `_Mode`). If that function returns a null pointer, the function calls [setstate](../standard-library/basic-ios-class.md#setstate)( `failbit`). +The member function calls [rdbuf](#rdbuf) **->** [open](../standard-library/basic-filebuf-class.md#open)(_ *Filename*, `_Mode`). If that function returns a null pointer, the function calls [setstate](../standard-library/basic-ios-class.md#setstate)(`failbit`). ### Example diff --git a/docs/standard-library/basic-istream-class.md b/docs/standard-library/basic-istream-class.md index f67eaa3dbf..a5ebefecce 100644 --- a/docs/standard-library/basic-istream-class.md +++ b/docs/standard-library/basic-istream-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: basic_istream Class" title: "basic_istream Class" +description: "Learn more about: basic_istream Class" ms.date: 06/10/2022 f1_keywords: ["istream/std::basic_istream", "istream/std::basic_istream::gcount", "istream/std::basic_istream::get", "istream/std::basic_istream::getline", "istream/std::basic_istream::", "istream/std::basic_istream::peek", "istream/std::basic_istream::putback", "istream/std::basic_istream::read", "istream/std::basic_istream::readsome", "istream/std::basic_istream::seekg", "istream/std::basic_istream::sentry", "istream/std::basic_istream::swap", "istream/std::basic_istream::sync", "istream/std::basic_istream::tellg", "istream/std::basic_istream::unget"] helpviewer_keywords: ["std::basic_istream [C++]", "std::basic_istream [C++], gcount", "std::basic_istream [C++], get", "std::basic_istream [C++], getline", "std::basic_istream [C++], OVERWRITE", "std::basic_istream [C++], peek", "std::basic_istream [C++], putback", "std::basic_istream [C++], read", "std::basic_istream [C++], readsome", "std::basic_istream [C++], seekg", "std::basic_istream [C++], sentry", "std::basic_istream [C++], swap", "std::basic_istream [C++], sync", "std::basic_istream [C++], tellg", "std::basic_istream [C++], unget"] @@ -410,7 +410,7 @@ Type 'abcdef': abcdef def ``` -## `basic\_istream::operator>>` +## `basic_istream::operator>>` Calls a function on the input stream or reads formatted data from the input stream. @@ -451,7 +451,7 @@ The stream (`*this`). ### Remarks -The `` header also defines several global extraction operators. For more information, see [`operator>> (\)`](../standard-library/istream-operators.md#op_gt_gt). +The `` header also defines several global extraction operators. For more information, see [`operator>> ()`](../standard-library/istream-operators.md#op_gt_gt). The first member function ensures that an expression of the form `istr >> ws` calls `ws(istr)`, and then returns `*this`. For more information, see [`ws`](../standard-library/istream-functions.md#ws). diff --git a/docs/standard-library/basic-istringstream-class.md b/docs/standard-library/basic-istringstream-class.md index 65784d3592..18872277c2 100644 --- a/docs/standard-library/basic-istringstream-class.md +++ b/docs/standard-library/basic-istringstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_istringstream Class" title: "basic_istringstream Class" +description: "Learn more about: basic_istringstream Class" ms.date: 06/10/2022 f1_keywords: ["sstream/std::basic_istringstream", "sstream/std::basic_istringstream::allocator_type", "sstream/std::basic_istringstream::rdbuf", "sstream/std::basic_istringstream::str", "sstream/std::basic_istringstream::swap"] helpviewer_keywords: ["std::basic_istringstream [C++]", "std::basic_istringstream [C++], allocator_type", "std::basic_istringstream [C++], rdbuf", "std::basic_istringstream [C++], str", "std::basic_istringstream [C++], swap"] -ms.assetid: 1d5bb4b5-793d-4833-98e5-14676c451915 ms.custom: devdivchpfy22 --- @@ -164,7 +163,7 @@ Returns an object of class [basic_string](../standard-library/basic-string-class ### Remarks -The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**( `_Newstr`). +The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**(`_Newstr`). ### Example diff --git a/docs/standard-library/basic-ostream-class.md b/docs/standard-library/basic-ostream-class.md index 6365780620..a2b1b7e652 100644 --- a/docs/standard-library/basic-ostream-class.md +++ b/docs/standard-library/basic-ostream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_ostream Class" title: "basic_ostream Class" -ms.date: "03/27/2019" +description: "Learn more about: basic_ostream Class" +ms.date: 03/27/2019 f1_keywords: ["ostream/std::basic_ostream", "ostream/std::basic_ostream::flush", "ostream/std::basic_ostream::put", "ostream/std::basic_ostream::seekp", "ostream/std::basic_ostream::sentry", "ostream/std::basic_ostream::swap", "ostream/std::basic_ostream::tellp", "ostream/std::basic_ostream::write"] helpviewer_keywords: ["std::basic_ostream [C++]", "std::basic_ostream [C++], flush", "std::basic_ostream [C++], put", "std::basic_ostream [C++], seekp", "std::basic_ostream [C++], sentry", "std::basic_ostream [C++], swap", "std::basic_ostream [C++], tellp", "std::basic_ostream [C++], write"] -ms.assetid: 5baadc65-b662-4fab-8c9f-94457c58cda1 --- # basic_ostream Class @@ -449,12 +448,15 @@ int main() The nested class describes an object whose declaration structures the formatted output functions and the unformatted output functions. -class sentry { - public: - explicit sentry(basic_ostream\& _Ostr); - operator bool() const; - ~sentry(); - }; +```cpp +class sentry +{ +public: + explicit sentry(basic_ostream& _Ostr); + operator bool() const; + ~sentry(); +}; +``` ### Remarks diff --git a/docs/standard-library/basic-ostringstream-class.md b/docs/standard-library/basic-ostringstream-class.md index 1b79c1a3d2..29ff6874a7 100644 --- a/docs/standard-library/basic-ostringstream-class.md +++ b/docs/standard-library/basic-ostringstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_ostringstream Class" title: "basic_ostringstream Class" +description: "Learn more about: basic_ostringstream Class" ms.date: 06/10/2022 f1_keywords: ["sstream/std::basic_ostringstream", "sstream/std::basic_ostringstream::allocator_type", "sstream/std::basic_ostringstream::rdbuf", "sstream/std::basic_ostringstream::str"] helpviewer_keywords: ["std::basic_ostringstream [C++]", "std::basic_ostringstream [C++], allocator_type", "std::basic_ostringstream [C++], rdbuf", "std::basic_ostringstream [C++], str"] -ms.assetid: aea699f7-350f-432a-acca-adbae7b483fb ms.custom: devdivchpfy22 --- @@ -133,7 +132,7 @@ Returns an object of class [basic_string](../standard-library/basic-string-class ### Remarks -The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**( `_Newstr`). +The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**(`_Newstr`). ### Example diff --git a/docs/standard-library/basic-streambuf-class.md b/docs/standard-library/basic-streambuf-class.md index e672081763..4a543f3fef 100644 --- a/docs/standard-library/basic-streambuf-class.md +++ b/docs/standard-library/basic-streambuf-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_streambuf Class" title: "basic_streambuf Class" +description: "Learn more about: basic_streambuf Class" ms.date: 06/10/2022 f1_keywords: ["streambuf/std::basic_streambuf", "streambuf/std::basic_streambuf::char_type", "streambuf/std::basic_streambuf::int_type", "streambuf/std::basic_streambuf::off_type", "streambuf/std::basic_streambuf::pos_type", "streambuf/std::basic_streambuf::traits_type", "streambuf/std::basic_streambuf::eback", "streambuf/std::basic_streambuf::egptr", "streambuf/std::basic_streambuf::epptr", "streambuf/std::basic_streambuf::gbump", "streambuf/std::basic_streambuf::getloc", "streambuf/std::basic_streambuf::gptr", "streambuf/std::basic_streambuf::imbue", "streambuf/std::basic_streambuf::in_avail", "streambuf/std::basic_streambuf::overflow", "streambuf/std::basic_streambuf::pbackfail", "streambuf/std::basic_streambuf::pbase", "streambuf/std::basic_streambuf::pbump", "streambuf/std::basic_streambuf::pptr", "streambuf/std::basic_streambuf::pubimbue", "streambuf/std::basic_streambuf::pubseekoff", "streambuf/std::basic_streambuf::pubseekpos", "streambuf/std::basic_streambuf::pubsetbuf", "streambuf/std::basic_streambuf::pubsync", "streambuf/std::basic_streambuf::sbumpc", "streambuf/std::basic_streambuf::seekoff", "streambuf/std::basic_streambuf::seekpos", "streambuf/std::basic_streambuf::setbuf", "streambuf/std::basic_streambuf::setg", "streambuf/std::basic_streambuf::setp", "streambuf/std::basic_streambuf::sgetc", "streambuf/std::basic_streambuf::sgetn", "streambuf/std::basic_streambuf::showmanyc", "streambuf/std::basic_streambuf::snextc", "streambuf/std::basic_streambuf::sputbackc", "streambuf/std::basic_streambuf::sputc", "streambuf/std::basic_streambuf::sputn", "streambuf/std::basic_streambuf::stossc", "streambuf/std::basic_streambuf::sungetc", "streambuf/std::basic_streambuf::swap", "streambuf/std::basic_streambuf::sync", "streambuf/std::basic_streambuf::uflow", "streambuf/std::basic_streambuf::underflow", "streambuf/std::basic_streambuf::xsgetn", "streambuf/std::basic_streambuf::xsputn"] helpviewer_keywords: ["std::basic_streambuf [C++]", "std::basic_streambuf [C++], char_type", "std::basic_streambuf [C++], int_type", "std::basic_streambuf [C++], off_type", "std::basic_streambuf [C++], pos_type", "std::basic_streambuf [C++], traits_type", "std::basic_streambuf [C++], eback", "std::basic_streambuf [C++], egptr", "std::basic_streambuf [C++], epptr", "std::basic_streambuf [C++], gbump", "std::basic_streambuf [C++], getloc", "std::basic_streambuf [C++], gptr", "std::basic_streambuf [C++], imbue", "std::basic_streambuf [C++], in_avail", "std::basic_streambuf [C++], overflow", "std::basic_streambuf [C++], pbackfail", "std::basic_streambuf [C++], pbase", "std::basic_streambuf [C++], pbump", "std::basic_streambuf [C++], pptr", "std::basic_streambuf [C++], pubimbue", "std::basic_streambuf [C++], pubseekoff", "std::basic_streambuf [C++], pubseekpos", "std::basic_streambuf [C++], pubsetbuf", "std::basic_streambuf [C++], pubsync", "std::basic_streambuf [C++], sbumpc", "std::basic_streambuf [C++], seekoff", "std::basic_streambuf [C++], seekpos", "std::basic_streambuf [C++], setbuf", "std::basic_streambuf [C++], setg", "std::basic_streambuf [C++], setp", "std::basic_streambuf [C++], sgetc", "std::basic_streambuf [C++], sgetn", "std::basic_streambuf [C++], showmanyc", "std::basic_streambuf [C++], snextc", "std::basic_streambuf [C++], sputbackc", "std::basic_streambuf [C++], sputc", "std::basic_streambuf [C++], sputn", "std::basic_streambuf [C++], stossc", "std::basic_streambuf [C++], sungetc", "std::basic_streambuf [C++], swap", "std::basic_streambuf [C++], sync", "std::basic_streambuf [C++], uflow", "std::basic_streambuf [C++], underflow", "std::basic_streambuf [C++], xsgetn", "std::basic_streambuf [C++], xsputn"] -ms.assetid: 136af6c3-13bf-4501-9288-b93da26efac7 ms.custom: devdivchpfy22 --- @@ -550,7 +549,7 @@ The size of the buffer. ### Return Value -Returns [setbuf](#setbuf)( `_Buffer`, `count`). +Returns [setbuf](#setbuf)(`_Buffer`, `count`). ## basic_streambuf::pubsync @@ -750,7 +749,7 @@ The current element. ### Remarks -If a read position is available, the member function returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)( `*`[gptr](#gptr)). Otherwise, it returns [underflow](#underflow). +If a read position is available, the member function returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)(`*`[gptr](#gptr)). Otherwise, it returns [underflow](#underflow). ### Example @@ -798,7 +797,7 @@ The number of elements read. For more information, see [streamsize](../standard- ### Remarks -The member function returns [xsgetn](#xsgetn)( `ptr`, `count`). +The member function returns [xsgetn](#xsgetn)(`ptr`, `count`). ### Example @@ -898,7 +897,7 @@ Returns the character or failure. ### Remarks -If a putback position is available and *_Ch* compares equal to the character stored in that position, the member function decrements the next pointer for the input buffer and returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)( `_Ch`). Otherwise, it returns [pbackfail](#pbackfail)( `_Ch`). +If a putback position is available and *_Ch* compares equal to the character stored in that position, the member function decrements the next pointer for the input buffer and returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)(`_Ch`). Otherwise, it returns [pbackfail](#pbackfail)(`_Ch`). ### Example @@ -946,7 +945,7 @@ Returns the character, if successful. ### Remarks -If a `write position` is available, the member function stores *_Ch* in the write position, increments the next pointer for the output buffer, and returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)( `_Ch`). Otherwise, it returns [overflow](#overflow)( `_Ch`). +If a `write position` is available, the member function stores *_Ch* in the write position, increments the next pointer for the output buffer, and returns **traits_type::**[to_int_type](../standard-library/char-traits-struct.md#to_int_type)(`_Ch`). Otherwise, it returns [overflow](#overflow)(`_Ch`). ### Example @@ -992,7 +991,7 @@ The number of characters inserted into the stream. ### Remarks -The member function returns [xsputn](#xsputn)( `ptr`, `count`). For more information, see the Remarks section of this member for more information. +The member function returns [xsputn](#xsputn)(`ptr`, `count`). For more information, see the Remarks section of this member for more information. ### Example @@ -1061,7 +1060,7 @@ Returns either the character or failure. ### Remarks -If a putback position is available, the member function decrements the next pointer for the input buffer and returns `traits_type::`[to_int_type](../standard-library/char-traits-struct.md#to_int_type)( `*`[gptr](#gptr)). However, it isn't always possible to determine the last character read so that it can be captured in the state of the current buffer. If this is true, then the function returns [pbackfail](#pbackfail). To avoid this situation, keep track of the character to put back and call `sputbackc(ch)`, which won't fail provided you don't call it at the beginning of the stream and you don't try to put back more than one character. +If a putback position is available, the member function decrements the next pointer for the input buffer and returns `traits_type::`[to_int_type](../standard-library/char-traits-struct.md#to_int_type)(`*`[gptr](#gptr)). However, it isn't always possible to determine the last character read so that it can be captured in the state of the current buffer. If this is true, then the function returns [pbackfail](#pbackfail). To avoid this situation, keep track of the character to put back and call `sputbackc(ch)`, which won't fail provided you don't call it at the beginning of the stream and you don't try to put back more than one character. ### Example diff --git a/docs/standard-library/basic-string-class.md b/docs/standard-library/basic-string-class.md index 43c1e29f5c..554d5ba8d8 100644 --- a/docs/standard-library/basic-string-class.md +++ b/docs/standard-library/basic-string-class.md @@ -61,7 +61,7 @@ The type that represents the stored allocator object that encapsulates details a |[`append`](#append)|Adds characters to the end of a string.| |[`assign`](#assign)|Assigns new character values to the contents of a string.| |[`at`](#at)|Returns a reference to the element at a specified location in the string.| -|[`back`](#back)|| +|[`back`](#back)|Returns a reference to the last element in the string.| |[`begin`](#begin)|Returns an iterator addressing the first element in the string.| |[`c_str`](#c_str)|Converts the contents of a string as a C-style, null-terminated, string.| |[`capacity`](#capacity)|Returns the largest number of elements that could be stored in a string without increasing the memory allocation of the string.| @@ -284,7 +284,7 @@ int main( ) cout << "The appended string str1d is: " << str1d << "." << endl; str1d += str3d; - cout << "The doubly appended strig str1 is: " + cout << "The doubly appended string str1 is: " << str1d << "." << endl << endl; // The fifth member function @@ -318,7 +318,7 @@ The appended string str1 is: Hello World. The string str2d is: Wide The appended string str1d is: Hello Wide . -The doubly appended strig str1 is: Hello Wide World . +The doubly appended string str1 is: Hello Wide World . The string str1 appended with exclamations is: Hello !!!! @@ -2959,12 +2959,10 @@ basic_string& insert( size_type count, value_type char_value); -iterator insert( - iterator iter); - iterator insert( iterator iter, - value_type char_value)l + value_type char_value); + template void insert( iterator iter, @@ -3352,7 +3350,7 @@ int main( ) cout << "The appended string str1d is: " << str1d << "." << endl; str1d += str3d; - cout << "The doubly appended strig str1 is: " + cout << "The doubly appended string str1 is: " << str1d << "." << endl << endl; } ``` @@ -3366,7 +3364,7 @@ Appending the C-string cstr1b to string str1 gives: Hello Out There. The string str2d is: Wide The appended string str1d is: Hello Wide . -The doubly appended strig str1 is: Hello Wide World. +The doubly appended string str1 is: Hello Wide World. ``` ## `basic_string::operator=` @@ -4203,7 +4201,7 @@ Specifies a new size for a string, appending or erasing elements as required. ```cpp void resize( - size_type count,); + size_type count); void resize( size_type count, diff --git a/docs/standard-library/basic-stringstream-class.md b/docs/standard-library/basic-stringstream-class.md index 998bc38cb2..6b834225d7 100644 --- a/docs/standard-library/basic-stringstream-class.md +++ b/docs/standard-library/basic-stringstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: basic_stringstream Class" title: "basic_stringstream Class" +description: "Learn more about: basic_stringstream Class" ms.date: 06/10/2022 f1_keywords: ["sstream/std::basic_stringstream", "sstream/std::basic_stringstream::allocator_type", "sstream/std::basic_stringstream::rdbuf", "sstream/std::basic_stringstream::str"] helpviewer_keywords: ["std::basic_stringstream [C++]", "std::basic_stringstream [C++], allocator_type", "std::basic_stringstream [C++], rdbuf", "std::basic_stringstream [C++], str"] -ms.assetid: 49629814-ca37-45c5-931b-4ff894e6ebd2 ms.custom: devdivchpfy22 --- @@ -87,7 +86,7 @@ An object of type `basic_string`. ### Remarks -The first constructor initializes the base class by calling [basic_iostream](../standard-library/basic-iostream-class.md)( **sb**), where `sb` is the stored object of class [basic_stringbuf](../standard-library/basic-stringbuf-class.md)< **Elem**, **Tr**, `Alloc`>. It also initializes `sb` by calling basic_stringbuf< **Elem**, **Tr**, `Alloc`>( `_Mode`). +The first constructor initializes the base class by calling [basic_iostream](../standard-library/basic-iostream-class.md)( **sb**), where `sb` is the stored object of class [basic_stringbuf](../standard-library/basic-stringbuf-class.md)< **Elem**, **Tr**, `Alloc`>. It also initializes `sb` by calling basic_stringbuf< **Elem**, **Tr**, `Alloc`>(`_Mode`). The second constructor initializes the base class by calling basic_iostream( **sb**). It also initializes `sb` by calling basic_stringbuf< **Elem**, **Tr**, `Alloc`>(_ *Str*, `_Mode`). @@ -129,7 +128,7 @@ Returns an object of class [basic_string](../standard-library/basic-string-class ### Remarks -The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**( `_Newstr`). +The first member function returns [rdbuf](#rdbuf) -> [str](../standard-library/basic-stringbuf-class.md#str). The second member function calls `rdbuf` -> **str**(`_Newstr`). ### Example diff --git a/docs/standard-library/bernoulli-distribution-class.md b/docs/standard-library/bernoulli-distribution-class.md index 0737a964d0..bd94744c71 100644 --- a/docs/standard-library/bernoulli-distribution-class.md +++ b/docs/standard-library/bernoulli-distribution-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: bernoulli_distribution Class" title: "bernoulli_distribution Class" -ms.date: "11/04/2016" +description: "Learn more about: bernoulli_distribution Class" +ms.date: 11/04/2016 f1_keywords: ["random/std::bernoulli_distribution", "random/std::bernoulli_distribution::reset", "random/std::bernoulli_distribution::p", "random/std::bernoulli_distribution::param", "random/std::bernoulli_distribution::min", "random/std::bernoulli_distribution::max", "random/std::bernoulli_distribution::operator()", "random/std::bernoulli_distribution::param_type", "random/std::bernoulli_distribution::param_type::p", "random/std::bernoulli_distribution::param_type::operator==", "random/std::bernoulli_distribution::param_type::operator!="] helpviewer_keywords: ["std::bernoulli_distribution [C++]", "std::bernoulli_distribution [C++], reset", "std::bernoulli_distribution [C++], p", "std::bernoulli_distribution [C++], param", "std::bernoulli_distribution [C++], min", "std::bernoulli_distribution [C++], max", "std::bernoulli_distribution [C++], param_type", "std::bernoulli_distribution [C++], param_type"] -ms.assetid: 586bcde1-95ca-411a-bf17-4aaf19482f34 --- # bernoulli_distribution Class @@ -14,30 +13,30 @@ Generates a Bernoulli distribution. ```cpp class bernoulli_distribution - { +{ public: - // types - typedef bool result_type; - struct param_type; - - // constructors and reset functions - explicit bernoulli_distribution(double p = 0.5); - explicit bernoulli_distribution(const param_type& parm); - void reset(); - - // generating functions - template - result_type operator()(URNG& gen); - template - result_type operator()(URNG& gen, const param_type& parm); - - // property functions - double p() const; - param_type param() const; - void param(const param_type& parm); - result_type min() const; - result_type max() const; - }; + // types + typedef bool result_type; + struct param_type; + + // constructors and reset functions + explicit bernoulli_distribution(double p = 0.5); + explicit bernoulli_distribution(const param_type& parm); + void reset(); + + // generating functions + template + result_type operator()(URNG& gen); + template + result_type operator()(URNG& gen, const param_type& parm); + + // property functions + double p() const; + param_type param() const; + void param(const param_type& parm); + result_type min() const; + result_type max() const; +}; ``` ### Parameters @@ -161,6 +160,7 @@ The second constructor constructs an object whose stored parameters are initiali Contains the parameters of the distribution. +```cpp struct param_type { typedef bernoulli_distribution distribution_type; param_type(double p = 0.5); @@ -169,6 +169,7 @@ struct param_type { bool operator==(const param_type& right) const; bool operator!=(const param_type& right) const; }; +``` ### Parameters diff --git a/docs/standard-library/bitset-class.md b/docs/standard-library/bitset-class.md index d5fbac7df4..a70a5b0f93 100644 --- a/docs/standard-library/bitset-class.md +++ b/docs/standard-library/bitset-class.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: bitset Class" title: "bitset Class" +description: "Learn more about: bitset Class" ms.date: 06/10/2022 f1_keywords: ["bitset/std::bitset", "bitset/std::bitset::element_type", "bitset/std::bitset::all", "bitset/std::bitset::any", "bitset/std::bitset::count", "bitset/std::bitset::flip", "bitset/std::bitset::none", "bitset/std::bitset::reset", "bitset/std::bitset::set", "bitset/std::bitset::size", "bitset/std::bitset::test", "bitset/std::bitset::to_string", "bitset/std::bitset::to_ullong", "bitset/std::bitset::to_ulong", "bitset/std::bitset::reference"] helpviewer_keywords: ["std::bitset [C++]", "std::bitset [C++], element_type", "std::bitset [C++], all", "std::bitset [C++], any", "std::bitset [C++], count", "std::bitset [C++], flip", "std::bitset [C++], none", "std::bitset [C++], reset", "std::bitset [C++], set", "std::bitset [C++], size", "std::bitset [C++], test", "std::bitset [C++], to_string", "std::bitset [C++], to_ullong", "std::bitset [C++], to_ulong", "std::bitset [C++], reference"] ms.custom: devdivchpfy22 - --- # `bitset` class diff --git a/docs/standard-library/char-traits-char-struct.md b/docs/standard-library/char-traits-char-struct.md index 22aa1ee35d..fbdc3d0c80 100644 --- a/docs/standard-library/char-traits-char-struct.md +++ b/docs/standard-library/char-traits-char-struct.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: char_traits Struct" title: "char_traits Struct" -ms.date: "11/04/2016" +description: "Learn more about: char_traits Struct" +ms.date: 11/04/2016 f1_keywords: ["iosfwd/std::char_traits", "char_traits"] helpviewer_keywords: ["char_traits class"] -ms.assetid: abd9373a-77db-4031-bf4b-f8ac15087581 --- # `char_traits` Struct @@ -23,4 +22,4 @@ Specialization allows the struct to take advantage of library functions that man ## Example -See the typedefs and member functions of the class template [char_traits Class](../standard-library/char-traits-struct.md) +See the typedefs and member functions of the class template [`char_traits`](../standard-library/char-traits-struct.md) diff --git a/docs/standard-library/char-traits-struct.md b/docs/standard-library/char-traits-struct.md index dcbd8702db..065c8cf7d2 100644 --- a/docs/standard-library/char-traits-struct.md +++ b/docs/standard-library/char-traits-struct.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: char_traits Struct" title: "char_traits Struct" -ms.date: "05/07/2019" +description: "Learn more about: char_traits Struct" +ms.date: 05/07/2019 f1_keywords: ["iosfwd/std::char_traits", "iosfwd/std::char_traits::char_type", "iosfwd/std::char_traits::int_type", "iosfwd/std::char_traits::off_type", "iosfwd/std::char_traits::pos_type", "iosfwd/std::char_traits::state_type", "iosfwd/std::char_traits::assign", "iosfwd/std::char_traits::compare", "iosfwd/std::char_traits::copy", "iosfwd/std::char_traits::_Copy_s", "iosfwd/std::char_traits::eof", "iosfwd/std::char_traits::eq", "iosfwd/std::char_traits::eq_int_type", "iosfwd/std::char_traits::find", "iosfwd/std::char_traits::length", "iosfwd/std::char_traits::lt", "iosfwd/std::char_traits::move", "iosfwd/std::char_traits::_Move_s", "iosfwd/std::char_traits::not_eof", "iosfwd/std::char_traits::to_char_type", "iosfwd/std::char_traits::to_int_type"] helpviewer_keywords: ["char_traits struct", "char_traits class"] -ms.assetid: 568e59f0-4521-4207-9223-9dcf6a16d620 --- # char_traits Struct @@ -1010,11 +1009,11 @@ A value of *_Ch* that cannot be represented as such yields an unspecified result The conversion operations [to_int_type](#to_int_type) and `to_char_type` are inverse to each other, so that: -`to_int_type` ( `to_char_type` ( *x* ) ) == *x* +`to_int_type`(`to_char_type`(*x*)) == *x* for any `int_type` *x* and -`to_char_type` ( `to_int_type` ( *x* ) ) == *x* +`to_char_type`(`to_int_type`(*x*)) == *x* for any `char_type` *x*. @@ -1114,11 +1113,11 @@ The `int_type` character corresponding to the `char_type` character. The conversion operations `to_int_type` and [to_char_type](#to_char_type) are inverse to each other, so that: -`to_int_type` ( `to_char_type` ( *x* ) ) == *x* +`to_int_type`(`to_char_type`(*x*)) == *x* for any `int_type` *x*, and -`to_char_type` ( `to_int_type` ( *x* ) ) == *x* +`to_char_type`(`to_int_type`(*x*)) == *x* for any `char_type` *x*. diff --git a/docs/standard-library/charconv-functions.md b/docs/standard-library/charconv-functions.md index 296364799d..8f601eef05 100644 --- a/docs/standard-library/charconv-functions.md +++ b/docs/standard-library/charconv-functions.md @@ -236,6 +236,6 @@ int main() ## See also -[\](charconv.md) -[The shortest decimal string that round-trips](https://www.exploringbinary.com/the-shortest-decimal-string-that-round-trips-examples/) +[\](charconv.md)\ +[The shortest decimal string that round-trips](https://www.exploringbinary.com/the-shortest-decimal-string-that-round-trips-examples/)\ [printf() format specifiers](..\c-runtime-library\format-specification-syntax-printf-and-wprintf-functions.md) diff --git a/docs/standard-library/chrono-functions.md b/docs/standard-library/chrono-functions.md index f18ca679fe..e1812b1d34 100644 --- a/docs/standard-library/chrono-functions.md +++ b/docs/standard-library/chrono-functions.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: 10/15/2021 f1_keywords: ["chrono/std::duration_cast", "chrono/std::time_point_cast", "chrono/std::chrono::clock_cast", "chrono/std::chrono::duration_cast", "chrono/std::chrono::time_point_cast", "chrono/std::chrono::from_stream", "chrono/std::chrono::abs", "chrono/std::chrono::floor", "chrono/std::chrono::ceil", "chrono/std::chrono::round", "chrono/std::chrono::is_am", "chrono/std::chrono::is_pm", "chrono/std::chrono::make12", "chrono/std::chrono::make24", "chrono/std::chrono::get_leap_second_info", "chrono/std::chrono::get_tzdb", "chrono/std::chrono::get_tzdb_list", "chrono/std::chrono::locate_zone", "chrono/std::chrono::current_zone", "chrono/std::chrono::reload_tzdb", "chrono/std::chrono::remote_version"] helpviewer_keywords: ["std::duration_cast function", "std::time_point_cast function", "std::chrono::clock_cast", "std::chrono::duration_cast function", "std::chrono::time_point_cast function", "std::chrono::from_stream function", "std::chrono::floor function", "std::chrono::ceil function", "std::chrono::round function", "std::chrono::is_am function", "std::chrono::is_pm function", "std::chrono::make12 function", "std::chrono::make24 function", "std::chrono::get_leap_second_info function", "std::chrono::get_tzdb function", "std::chrono::get_tzdb_list function", "std::chrono::locate_zone function", "std::chrono::current_zone function", "std::chrono::reload_tzdb function", "std::chrono::remote_version function"] @@ -563,7 +563,7 @@ int main() ### Remarks -**7)** If `%Z` is used and successfully parsed, that value will be assigned to `*abbrev `if `abbrev` is non-null. If `%z` (or a modified variant) is used and successfully parsed, that value will be assigned to `*offset` if `offset` is non-null. +**7)** If `%Z` is used and successfully parsed, that value will be assigned to `*abbrev` if `abbrev` is non-null. If `%z` (or a modified variant) is used and successfully parsed, that value will be assigned to `*offset` if `offset` is non-null. **12)** If `%Z` is used and successfully parsed, that value will be assigned to `*abbrev` if `abbrev` is non-null. If `%z` (or a modified variant) is used and successfully parsed, that value will be assigned to `*offset` if `offset` is non-null. @@ -674,7 +674,7 @@ In ISO 8601, weeks begin with Monday. The first week of the year must include Ja | `utc_time` | Z, z, c, x, X, D, F, g, G, j, U, V, W, Y, y, C, b, h, B, m, d, e, a, A, u, w, H, I, M, S, r, R, T, p | | [`weekday`](weekday-class.md) | a, A, u, w | | [`weekday_indexed`](weekdayindexed-class.md) | a, A, u, w | -| [`weekday_last`]() | a, A, u, w | +| [`weekday_last`](weekdaylast-class.md) | a, A, u, w | | [`year`](year-class.md) | Y, y, C | | `year_month` | Y, y, B, g, G, h, C, b, m | | `year_month_day` | D, F, g, G, j, U, V, W, Y, y, C, b, h, B, m, d, e, a, A, u, w | @@ -704,7 +704,7 @@ The source `utc_time` to get the `leap_second_info` for. ### Return value -Returns a `leap_second_info` whose member `is_leap_second` is **`true`** if *`ut`* is during a positive leap second insertion; otherwise, **`false`**. The `elapsed` member holds the sum of leap seconds between the epoch date `1970-01-01`and *`ut`*. If `is_leap_second` is **`true`**, the leap second referred to by *`ut`* is included in the `elapsed` sum. +Returns a `leap_second_info` whose member `is_leap_second` is **`true`** if *`ut`* is during a positive leap second insertion; otherwise, **`false`**. The `elapsed` member holds the sum of leap seconds between the epoch date `1970-01-01` and *`ut`*. If `is_leap_second` is **`true`**, the leap second referred to by *`ut`* is included in the `elapsed` sum. ## `get_tzdb` @@ -987,4 +987,4 @@ Unless `ToDuration` is a specialization of [`duration`](../standard-library/dura [`chrono` operators](./chrono-operators.md)\ [`duration` class](./duration-class.md)\ [`time_point` class](./time-point-class.md)\ -[`time_zone` class](./time-zone-class.md) \ No newline at end of file +[`time_zone` class](./time-zone-class.md) diff --git a/docs/standard-library/chrono-operators.md b/docs/standard-library/chrono-operators.md index b585b8ad91..64931b7607 100644 --- a/docs/standard-library/chrono-operators.md +++ b/docs/standard-library/chrono-operators.md @@ -668,7 +668,7 @@ The right object to compare. 1\) Returns **`true`** if the number of ticks for the type common to *`Left`* and *`Right`* are equal. Otherwise, returns **`false`**.\ 2\) Returns **`true`** if *`Left`* and *`Right`* represent the same point in time. Otherwise, returns **`false`**.\ 3-17\) Returns **`true`** if *`Left`* and *`Right`* have the same value. Otherwise, returns **`false`**.\ -18\) Returns **`true`** if `Left.name() == Right.name()`. Otherwise, returns `*false*`.\ +18\) Returns **`true`** if `Left.name() == Right.name()`. Otherwise, returns **`false`**.\ 19\) Returns **`true`** if `Left.get_time_zone() == _Right.get_time_zone() && Left.get_sys_time() == Right.get_sys_time();` ## `operator>` diff --git a/docs/standard-library/chrono.md b/docs/standard-library/chrono.md index 5127822f11..82bc6ae824 100644 --- a/docs/standard-library/chrono.md +++ b/docs/standard-library/chrono.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: " title: "" +description: "Learn more about: " ms.date: 05/31/2022 f1_keywords: ["", "chrono/std::chrono::nanoseconds", "chrono/std::chrono::minutes", "chrono/std::chrono::seconds", "chrono/std::chrono::hours", "chrono/std::chrono::milliseconds", "chrono/std::chrono::microseconds"] --- @@ -170,7 +170,7 @@ For more information about ratio types that are used in the following typedefs, | `tai_seconds` | A synonym for `tai_time`. A count of seconds, represented by a `time_point` that is associated with a [`tai_clock`](tai-clock-class.md). | | `tai_time` | A synonym for `time_point`. You provide the `Duration`, for example, `tai_time tt;`. Represents a `time_point` for a [`tai_clock`](tai-clock-class.md). | | `utc_seconds` | A synonym for `utc_time;` | -| `utc_time` | A synonym for `time_point`. You provide the `Duration`, for example, `utc_time ut;`. Represents a `time_point`for a [`utc_clock`](utc-clock-class.md). | +| `utc_time` | A synonym for `time_point`. You provide the `Duration`, for example, `utc_time ut;`. Represents a `time_point` for a [`utc_clock`](utc-clock-class.md). | ## Type traits diff --git a/docs/standard-library/clock-time-conversion-struct.md b/docs/standard-library/clock-time-conversion-struct.md index 4f5ff0e47e..865849283d 100644 --- a/docs/standard-library/clock-time-conversion-struct.md +++ b/docs/standard-library/clock-time-conversion-struct.md @@ -1,6 +1,6 @@ --- -description: "Learn more about clock_conversion trait" title: "clock_conversion struct" +description: "Learn more about clock_conversion trait" ms.date: 10/12/2021 f1_keywords: ["chrono/std::chrono::clock_time_conversion"] helpviewer_keywords: ["std::chrono [C++], clock_time_conversion"] @@ -44,7 +44,7 @@ The traits provide the following conversions: 2-4\) Identity conversions. Returns the same clock you pass in.\ 5-6\) Converting between `sys_time` and `utc_time` calls `utc_clock::to_sys` or `utc_clock::from_sys` depending on the direction of the conversion.\ 7-8\) Converting between `sys_time` and the specified clock, when the specified clock supports `to_sys` and `from_sys`, results in a call to `Clock::to_sys` or `Clock::from_sys`, depending on the direction of the conversion.\ -9-10\) Converting between `utc_time`and the specified clock, when the specified clock supports `from_utc` and `to_sys`, results in a call to `Clock::to_utc` or `Clock::from_utc`, depending on the direction of the conversion. +9-10\) Converting between `utc_time` and the specified clock, when the specified clock supports `from_utc` and `to_sys`, results in a call to `Clock::to_utc` or `Clock::from_utc`, depending on the direction of the conversion. ## Members @@ -101,7 +101,7 @@ The `time_point` to convert. 1-3\) Identity conversions. No conversion. Returns `t` without any changes.\ 4\) Returns `utc_clock::to_sys(t)`.\ -5\) Returns` utc_clock::from_sys(t)`. +5\) Returns `utc_clock::from_sys(t)`. ### Deduction guides diff --git a/docs/standard-library/codecvt-class.md b/docs/standard-library/codecvt-class.md index 72eeb2d1cb..43d007c8bb 100644 --- a/docs/standard-library/codecvt-class.md +++ b/docs/standard-library/codecvt-class.md @@ -4,7 +4,6 @@ description: "describes the Microsoft C runtime `codecvt` class API" ms.date: "11/09/2020" f1_keywords: ["xlocale/std::codecvt", "xlocale/std::codecvt::extern_type", "xlocale/std::codecvt::intern_type", "xlocale/std::codecvt::state_type", "xlocale/std::codecvt::always_noconv", "xlocale/std::codecvt::do_always_noconv", "xlocale/std::codecvt::do_encoding", "xlocale/std::codecvt::do_in", "xlocale/std::codecvt::do_length", "xlocale/std::codecvt::do_max_length", "xlocale/std::codecvt::do_out", "xlocale/std::codecvt::do_unshift", "xlocale/std::codecvt::encoding", "xlocale/std::codecvt::in", "xlocale/std::codecvt::length", "xlocale/std::codecvt::max_length", "xlocale/std::codecvt::out", "xlocale/std::codecvt::unshift"] helpviewer_keywords: ["std::codecvt [C++]", "std::codecvt [C++], extern_type", "std::codecvt [C++], intern_type", "std::codecvt [C++], state_type", "std::codecvt [C++], always_noconv", "std::codecvt [C++], do_always_noconv", "std::codecvt [C++], do_encoding", "std::codecvt [C++], do_in", "std::codecvt [C++], do_length", "std::codecvt [C++], do_max_length", "std::codecvt [C++], do_out", "std::codecvt [C++], do_unshift", "std::codecvt [C++], encoding", "std::codecvt [C++], in", "std::codecvt [C++], length", "std::codecvt [C++], max_length", "std::codecvt [C++], out", "std::codecvt [C++], unshift"] -ms.assetid: 37d3efa1-2b7f-42b6-b04f-7a972c8c2c86 --- # `codecvt` Class @@ -228,7 +227,7 @@ virtual result do_in( const Byte*& next1, CharType* first2, CharType* last2, - CharType*& next2,) const; + CharType*& next2) const; ``` ### Parameters @@ -517,7 +516,7 @@ result in( const Byte*& next1, CharType* first2, CharType* last2, - CharType*& next2,) const; + CharType*& next2) const; ``` ### Parameters diff --git a/docs/standard-library/collate-byname-class.md b/docs/standard-library/collate-byname-class.md index 3c79d0aaad..c63a9c2526 100644 --- a/docs/standard-library/collate-byname-class.md +++ b/docs/standard-library/collate-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: collate_byname Class" title: "collate_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: collate_byname Class" +ms.date: 11/04/2016 f1_keywords: ["locale/std::collate_byname"] helpviewer_keywords: ["collate_byname class"] -ms.assetid: 3dc380df-867c-4763-b60e-ba62a8e63ca7 --- # collate_byname Class @@ -40,7 +39,7 @@ An initial reference count. ## Remarks -The class template describes an object that can serve as a [locale facet](../standard-library/locale-class.md#facet_class) of type [collate](../standard-library/collate-class.md#collate)\. Its behavior is determined by the [named](../standard-library/locale-class.md#name) locale *_Locname*. Each constructor initializes its base object with [collate](../standard-library/collate-class.md#collate)\( `_Refs`). +The class template describes an object that can serve as a [locale facet](../standard-library/locale-class.md#facet_class) of type [collate](../standard-library/collate-class.md#collate)\. Its behavior is determined by the [named](../standard-library/locale-class.md#name) locale *_Locname*. Each constructor initializes its base object with [collate](../standard-library/collate-class.md#collate)\(`_Refs`). ## Requirements diff --git a/docs/standard-library/collate-class.md b/docs/standard-library/collate-class.md index fd516200e4..b391fc83bc 100644 --- a/docs/standard-library/collate-class.md +++ b/docs/standard-library/collate-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: collate Class" title: "collate Class" -ms.date: "11/04/2016" +description: "Learn more about: collate Class" +ms.date: 11/04/2016 f1_keywords: ["locale/std::collate", "locale/std::collate::char_type", "locale/std::collate::string_type", "locale/std::collate::compare", "locale/std::collate::do_compare", "locale/std::collate::do_hash", "locale/std::collate::do_transform", "locale/std::collate::hash", "locale/std::collate::transform"] helpviewer_keywords: ["std::collate [C++]", "std::collate [C++], char_type", "std::collate [C++], string_type", "std::collate [C++], compare", "std::collate [C++], do_compare", "std::collate [C++], do_hash", "std::collate [C++], do_transform", "std::collate [C++], hash", "std::collate [C++], transform"] -ms.assetid: 92168798-9628-4a2e-be6e-fa62dcd4d6a6 --- # collate Class @@ -142,7 +141,7 @@ The member function returns: The first sequence compares less if it has the smaller element in the earliest unequal pair in the sequences, or, if no unequal pairs exist, but the first sequence is shorter. -The member function returns [do_compare](#do_compare)( `first1`, `last1`, `first2`, `last2`). +The member function returns [do_compare](#do_compare)(`first1`, `last1`, `first2`, `last2`). ### Example @@ -290,7 +289,7 @@ A hash value of type **`long`** for the sequence. ### Remarks -The member function returns [do_hash](#do_hash)( `first`, `last`). +The member function returns [do_hash](#do_hash)(`first`, `last`). A hash value can be useful, for example, in distributing sequences pseudo-randomly across an array of lists. diff --git a/docs/standard-library/condition-variable-enums.md b/docs/standard-library/condition-variable-enums.md index 2f2e3e650b..23501c7ec3 100644 --- a/docs/standard-library/condition-variable-enums.md +++ b/docs/standard-library/condition-variable-enums.md @@ -1,17 +1,21 @@ --- -description: "Learn more about: enums" title: " enums" -ms.date: "11/04/2016" +description: "Learn more about: enums" +ms.date: 11/04/2016 f1_keywords: ["condition_variable/std::cv_status"] -ms.assetid: f261ad79-e25b-4afa-9f8a-909ce697e0d8 --- # `` enums -## cv_status +The `` header provides the following enums: + +## `cv_status` -Supplies symbolic names for the return values of the methods of class template [condition_variable](../standard-library/condition-variable-class.md). +Supplies symbolic names for the return values of the methods of class template [`condition_variable`](condition-variable-class.md). -class cv_status { - no_timeout - timeout +```cpp +enum class cv_status +{ + no_timeout, + timeout }; +``` diff --git a/docs/standard-library/cpp-standard-library-header-files.md b/docs/standard-library/cpp-standard-library-header-files.md index 42ef673a99..a0eaf3e463 100644 --- a/docs/standard-library/cpp-standard-library-header-files.md +++ b/docs/standard-library/cpp-standard-library-header-files.md @@ -1,9 +1,8 @@ --- title: "C++ standard library header files" description: "C++ standard library header files, categorized" -ms.date: "08/31/2020" +ms.date: 08/31/2020 helpviewer_keywords: ["header files, C++ Standard Library", "C++ Standard Library, header files"] -ms.assetid: e7bf497a-0f63-48d0-9b54-cb0eef4073c4 --- # C++ standard library header files @@ -15,26 +14,26 @@ Header files for the C++ standard library and extensions, by category. | Category | Headers | | - | - | -| [Algorithms](./algorithms.md) | [``](algorithm.md), [``](cstdlib.md), [``](numeric.md) | +| [Algorithms](algorithms.md) | [``](algorithm.md), [``](cstdlib.md), [``](numeric.md) | | Atomic operations | [``](atomic.md)11 | | C library wrappers | [``](cassert.md), [``](ccomplex.md)11 a b, [``](cctype.md), [``](cerrno.md), [``](cfenv.md)11, [``](cfloat.md), [``](cinttypes.md)11, [``](ciso646.md)b, [``](climits.md), [``](clocale.md), [``](cmath.md), [``](csetjmp.md), [``](csignal.md), [``](cstdalign.md)11 a b, [``](cstdarg.md), [``](cstdbool.md)11 a b, [``](cstddef.md), [``](cstdint.md)11, [``](cstdio.md), [``](cstdlib.md), [``](cstring.md), [``](ctgmath.md)11 a b, [``](ctime.md), [``](cuchar.md)11, [``](cwchar.md), [``](cwctype.md) | | Concepts | ``20 | -| [Containers](./stl-containers.md) | | +| [Containers](stl-containers.md) | | | Sequence containers | [``](array.md)11, [``](deque.md), [``](forward-list.md)11, [``](list.md), [``](vector.md) | | Ordered associative containers| [``](map.md), [``](set.md) | | Unordered associative containers | [``](unordered-map.md)11, [``](unordered-set.md)11 | | Container adaptors | [``](queue.md), [``](stack.md) | | Container views | [``](span.md)20 | | [Errors and exception handling](../cpp/errors-and-exception-handling-modern-cpp.md) | [``](cassert.md), [``](exception.md), [``](stdexcept.md), [``](system-error.md)11 | -| General utilities | ``17, [``](bit.md)20, [``](bitset.md), [``](cstdlib.md), ``17, [``](functional.md), [``](memory.md), ``17, ``17, [``](ratio.md)11, [``](scoped-allocator.md)11, [``](tuple.md)11, [``](type-traits.md)11, [``](typeindex.md)11, [``](utility.md), ``17 | +| General utilities | [``](any.md)17, [``](bit.md)20, [``](bitset.md), [``](cstdlib.md), [``](execution.md)17, [``](functional.md), [``](memory.md), [``](memory-resource.md)17, [``](optional.md)17, [``](ratio.md)11, [``](scoped-allocator.md)11, [``](tuple.md)11, [``](type-traits.md)11, [``](typeindex.md)11, [``](utility.md), [``](variant.md)17 | | [I/O and formatting](../text/string-and-i-o-formatting-modern-cpp.md) | [``](cinttypes.md)11, [``](cstdio.md), [``](filesystem.md)17, [``](fstream.md), [``](iomanip.md), [``](ios.md), [``](iosfwd.md), [``](iostream.md), [``](istream.md), [``](ostream.md), [``](sstream.md), [``](streambuf.md), [``](strstream.md)c, ``20 | | Iterators | [``](iterator.md) | | Language support | [``](cfloat.md), [``](climits.md), [``](codecvt.md)11 a, ``20, ``20, ``20, [``](csetjmp.md), [``](csignal.md), [``](cstdarg.md), [``](cstddef.md), [``](cstdint.md)11, [``](cstdlib.md), [``](exception.md), [``](initializer-list.md)11, [``](limits.md), [``](new.md), [``](typeinfo.md), ``20 | | Localization | [``](clocale.md), [``](codecvt.md)11 a, [``](cvt-wbuffer.md), [``](cvt-wstring.md), [``](locale.md) | -| Math and numerics | ``20, [``](cfenv.md)11, [``](cmath.md), [``](complex.md), [``](cstdlib.md), [``](limits.md), [``](numeric.md), [``](random.md)11, [``](ratio.md)11, [``](valarray.md) | -| [Memory management](../cpp/smart-pointers-modern-cpp.md) | [``](allocators-header.md), [``](memory.md), ``17, [``](new.md), [``](scoped-allocator.md)11 | +| Math and numerics | [``](bit.md)20, [``](cfenv.md)11, [``](cmath.md), [``](complex.md), [``](cstdlib.md), [``](limits.md), [``](numeric.md), [``](random.md)11, [``](ratio.md)11, [``](valarray.md) | +| [Memory management](../cpp/smart-pointers-modern-cpp.md) | [``](allocators-header.md), [``](memory.md), [``](memory-resource.md)17, [``](new.md), [``](scoped-allocator.md)11 | | Multithreading | [``](atomic.md)11, [``](condition-variable.md)11, [``](future.md)11, [``](mutex.md)11, [``](shared-mutex.md)14, [``](thread.md)11 | -| Ranges | ``20 | +| Ranges | [``](ranges.md)20 | | Regular expressions | [``](regex.md)11 | | Strings and character data | [``](charconv.md)17, [``](cctype.md), [``](cstdlib.md), [``](cstring.md), [``](cuchar.md)11, [``](cwchar.md), [``](cwctype.md), [``](regex.md)11, [``](string.md), [``](string-view.md)17 | | Time | [``](chrono.md)11, [``](ctime.md) | @@ -53,9 +52,9 @@ Header files for the C++ standard library and extensions, by category. |Category|Headers| |-|-| -|[Algorithms](./algorithms.md)|[``](algorithm.md)| +|[Algorithms](algorithms.md)|[``](algorithm.md)| |C library wrappers|[``](cassert.md), [``](cctype.md), [``](cerrno.md), [``](cfenv.md), [``](cfloat.md), [``](cinttypes.md), [``](ciso646.md), [``](climits.md), [``](clocale.md), [``](cmath.md), [``](csetjmp.md), [``](csignal.md), [``](cstdarg.md), [``](cstdbool.md), [``](cstddef.md), [``](cstdint.md), [``](cstdio.md), [``](cstdlib.md), [``](cstring.md), [``](ctgmath.md), [``](ctime.md), [``](cwchar.md), [``](cwctype.md)| -|[Containers](./stl-containers.md)|| +|[Containers](stl-containers.md)|| |Sequence containers|[``](array.md), [``](deque.md), [``](forward-list.md), [``](list.md), [``](vector.md)| |Ordered associative containers| [``](map.md), [``](set.md)| |Unordered associative containers|[``](unordered-map.md), [``](unordered-set.md)| diff --git a/docs/standard-library/cpp-standard-library-reference.md b/docs/standard-library/cpp-standard-library-reference.md index acc476cecf..6ae574d37e 100644 --- a/docs/standard-library/cpp-standard-library-reference.md +++ b/docs/standard-library/cpp-standard-library-reference.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: C++ Standard Library Reference (STL)" title: "C++ Standard Library Reference" -ms.date: "3/5/2021" +description: "Learn more about: C++ Standard Library Reference (STL)" +ms.date: 3/5/2021 helpviewer_keywords: ["C++ Standard Library, reference", "C++ Standard Library", "template libraries", "libraries, Standard C++", "Microsoft standard template library, reference", "Microsoft STL, reference"] --- @@ -18,11 +18,11 @@ From a historical perspective, "STL" originally referred to the Standard Templat ## In this section -[C++ Standard Library overview](../standard-library/cpp-standard-library-overview.md) +[C++ Standard Library overview](cpp-standard-library-overview.md)\ Provides an overview of the Microsoft implementation of the C++ Standard Library. -[`iostream` programming](../standard-library/iostream-programming.md) +[`iostream` programming](iostream-programming.md)\ Provides an overview of `iostream` programming. -[Header files reference](../standard-library/cpp-standard-library-header-files.md) +[Header files reference](cpp-standard-library-header-files.md)\ Provides links to reference topics about the C++ Standard Library header files, with code examples. diff --git a/docs/standard-library/ctype-byname-class.md b/docs/standard-library/ctype-byname-class.md index f8c4a59667..b959d0f601 100644 --- a/docs/standard-library/ctype-byname-class.md +++ b/docs/standard-library/ctype-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: ctype_byname Class" title: "ctype_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: ctype_byname Class" +ms.date: 11/04/2016 f1_keywords: ["xlocale/std::ctype_byname"] helpviewer_keywords: ["ctype_byname class"] -ms.assetid: a5cec021-a1f8-425f-8757-08e6f064b604 --- # ctype_byname Class @@ -33,7 +32,7 @@ protected: ## Remarks -Its behavior is determined by the named locale `_Locname`. Each constructor initializes its base object with [ctype](../standard-library/ctype-class.md)\( `_Refs`) or the equivalent for base class `ctype`. +Its behavior is determined by the named locale `_Locname`. Each constructor initializes its base object with [ctype](../standard-library/ctype-class.md)\(`_Refs`) or the equivalent for base class `ctype`. ## Requirements diff --git a/docs/standard-library/ctype-char-class.md b/docs/standard-library/ctype-char-class.md index 32beff1c35..d56cfcc811 100644 --- a/docs/standard-library/ctype-char-class.md +++ b/docs/standard-library/ctype-char-class.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: ctype Class" title: "ctype Class" -ms.date: "11/04/2016" +description: "Learn more about: ctype Class" +ms.date: 11/04/2016 f1_keywords: ["ctype", "locale/std::ctype"] helpviewer_keywords: ["ctype class"] -ms.assetid: ee30acb4-a743-405e-b3d4-13602092da84 --- # `ctype` Class -The class is an explicit specialization of class template `ctype\` to type **`char`**, describing an object that can serve as a locale facet to characterize various properties of a character of type **`char`**. +The class is an explicit specialization of class template `ctype` to type **`char`**, describing an object that can serve as a locale facet to characterize various properties of a character of type **`char`**. ## Syntax diff --git a/docs/standard-library/ctype-class.md b/docs/standard-library/ctype-class.md index 3a43c74acf..1836e4e654 100644 --- a/docs/standard-library/ctype-class.md +++ b/docs/standard-library/ctype-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: ctype Class" title: "ctype Class" -ms.date: "11/04/2016" +description: "Learn more about: ctype Class" +ms.date: 11/04/2016 f1_keywords: ["xlocale/std::ctype", "xlocale/std::ctype::char_type", "xlocale/std::ctype::do_is", "xlocale/std::ctype::do_narrow", "xlocale/std::ctype::do_scan_is", "xlocale/std::ctype::do_scan_not", "xlocale/std::ctype::do_tolower", "xlocale/std::ctype::do_toupper", "xlocale/std::ctype::do_widen", "xlocale/std::ctype::is", "xlocale/std::ctype::narrow", "xlocale/std::ctype::scan_is", "xlocale/std::ctype::scan_not", "xlocale/std::ctype::tolower", "xlocale/std::ctype::toupper", "xlocale/std::ctype::widen"] helpviewer_keywords: ["std::ctype [C++]", "std::ctype [C++], char_type", "std::ctype [C++], do_is", "std::ctype [C++], do_narrow", "std::ctype [C++], do_scan_is", "std::ctype [C++], do_scan_not", "std::ctype [C++], do_tolower", "std::ctype [C++], do_toupper", "std::ctype [C++], do_widen", "std::ctype [C++], is", "std::ctype [C++], narrow", "std::ctype [C++], scan_is", "std::ctype [C++], scan_not", "std::ctype [C++], tolower", "std::ctype [C++], toupper", "std::ctype [C++], widen"] -ms.assetid: 3627154c-49d9-47b5-b28f-5bbedee38e3b --- # ctype Class @@ -118,7 +117,7 @@ The possible values for the *_Refs* parameter and their significance are: No direct examples are possible, because the destructor is protected. -The constructor initializes its `locale::facet` base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)( `_Refs`). +The constructor initializes its `locale::facet` base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)(`_Refs`). ## ctype::do_is @@ -207,7 +206,7 @@ The second protected member function returns a pointer to the destination range ### Remarks -The second protected member template function stores in `dest`[ `I`] the value `do_narrow`( `first` [ `I`], `default`), for `I` in the interval [0, `last` - `first`). +The second protected member template function stores in `dest`[ `I`] the value `do_narrow`(`first` [ `I`], `default`), for `I` in the interval [0, `last` - `first`). ### Example @@ -241,7 +240,7 @@ A pointer to the first character in a range that does match a specified mask. If ### Remarks -The protected member function returns the smallest pointer `ptr` in the range [ `first`, `last`) for which [do_is](#do_is)( `maskVal`, \* `ptr`) is true. +The protected member function returns the smallest pointer `ptr` in the range [ `first`, `last`) for which [do_is](#do_is)(`maskVal`, \* `ptr`) is true. ### Example @@ -275,7 +274,7 @@ A pointer to the first character in a range that doesn't match a specified mask. ### Remarks -The protected member function returns the smallest pointer `ptr` in the range [ `first`, `last`) for which [do_is](#do_is)( `maskVal`, \* `ptr`) is false. +The protected member function returns the smallest pointer `ptr` in the range [ `first`, `last`) for which [do_is](#do_is)(`maskVal`, \* `ptr`) is false. ### Example @@ -310,7 +309,7 @@ The first protected member function returns the lowercase form of the parameter ### Remarks -The second protected member template function replaces each element `first` [ `I`], for `I` in the interval [0, `last` - `first`), with `do_tolower`( `first` [ `I`]). +The second protected member template function replaces each element `first` [ `I`], for `I` in the interval [0, `last` - `first`), with `do_tolower`(`first` [ `I`]). ### Example @@ -345,7 +344,7 @@ The first protected member function returns the uppercase form of the parameter ### Remarks -The second protected member template function replaces each element `first` [ `I`], for `I` in the interval [0, `last` - `first`), with `do_toupper`( `first` [ `I`]). +The second protected member template function replaces each element `first` [ `I`], for `I` in the interval [0, `last` - `first`), with `do_toupper`(`first` [ `I`]). ### Example @@ -386,7 +385,7 @@ The second protected member function returns a pointer to the destination range ### Remarks -The second protected member template function stores in `dest`[ `I`] the value `do_widen`( `first`[ `I`]), for `I` in the interval [0, `last` - `first`). +The second protected member template function stores in `dest`[ `I`] the value `do_widen`(`first`[ `I`]), for `I` in the interval [0, `last` - `first`). ### Example @@ -466,7 +465,7 @@ int main() { cout << string[i] << ": " << (maskarray[i] & ctype_base::alpha "alpha" : "not alpha") - << endl;; + << endl; }; } ``` @@ -734,7 +733,7 @@ The second member function returns *last*. ### Remarks -The first member function returns [do_toupper](#do_toupper)(`ch`). The second member function returns [do_toupper](#do_toupper)( `first`, `last`). +The first member function returns [do_toupper](#do_toupper)(`ch`). The second member function returns [do_toupper](#do_toupper)(`first`, `last`). ### Example diff --git a/docs/standard-library/cvt-wbuffer.md b/docs/standard-library/cvt-wbuffer.md index 58d5cc7cc3..09f8a4bcb6 100644 --- a/docs/standard-library/cvt-wbuffer.md +++ b/docs/standard-library/cvt-wbuffer.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: " title: "" -ms.date: "11/04/2016" +description: "Learn more about: " +ms.date: 11/04/2016 f1_keywords: ["stdext.cvt.", "stdext::cvt::", ""] helpviewer_keywords: ["cvt/wbuffer header"] -ms.assetid: 6e6eb44c-1bc4-4d8c-a4bd-b39c753ce725 --- # `` -The header `` in previous versions of Visual Studio defined the class template [wbuffer_convert Class](../standard-library/wbuffer-convert-class.md) in the stdext::cvt namespace. The header is maintained for backward compatibility. New code should use the version of the class that is defined in [\](../standard-library/locale.md) in the `std` namespace +The header `` in previous versions of Visual Studio defined the class template [`wbuffer_convert`](../standard-library/wbuffer-convert-class.md) in the stdext::cvt namespace. The header is maintained for backward compatibility. New code should use the version of the class that is defined in [\](../standard-library/locale.md) in the `std` namespace ## Syntax diff --git a/docs/standard-library/cvt-wstring.md b/docs/standard-library/cvt-wstring.md index 3ce22b8c32..c2ca25ac7e 100644 --- a/docs/standard-library/cvt-wstring.md +++ b/docs/standard-library/cvt-wstring.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: " title: "" -ms.date: "11/04/2016" +description: "Learn more about: " +ms.date: 11/04/2016 f1_keywords: ["stdext.cvt.", "", "stdext::cvt::"] helpviewer_keywords: ["cvt/wstring header"] -ms.assetid: d78b04bb-9ac0-4adb-8ffe-3aefb9b14c2d --- # `` -The header `` in previous versions of Visual Studio defined the class template [wstring_convert Class](../standard-library/wstring-convert-class.md) in the stdext::cvt namespace. The header is maintained for backward compatibility. New code should use the version of the class that is defined in [\](../standard-library/locale.md) in the `std` namespace +The header `` in previous versions of Visual Studio defined the class template [`wstring_convert`](wstring-convert-class.md) in the `stdext::cvt` namespace. The header is maintained for backward compatibility. New code should use the version of the class that is defined in [``](locale.md) in the `std` namespace. ## Syntax @@ -16,8 +15,6 @@ The header `` in previous versions of Visual Studio defined the cla #include ``` -## Requirements - ## See also [Header Files Reference](../standard-library/cpp-standard-library-header-files.md) diff --git a/docs/standard-library/day-class.md b/docs/standard-library/day-class.md index 411f71aeac..5501b49af9 100644 --- a/docs/standard-library/day-class.md +++ b/docs/standard-library/day-class.md @@ -1,8 +1,8 @@ --- -description: "Learn more about: day Class" title: "day class" +description: "Learn more about: day Class" ms.date: 09/07/2021 -f1_keywords: ["chrono/std::chrono::day", "chrono/std::chrono::day::ok", "chrono/std::chrono::day:operator++", "chrono/std::chrono::day::operator--", "chrono/std::chrono::day::operator unsigned"] +f1_keywords: ["chrono/std::chrono::day", "chrono/std::chrono::day::ok", "chrono/std::chrono::day::operator++", "chrono/std::chrono::day::operator--", "chrono/std::chrono::day::operator unsigned"] helpviewer_keywords: ["std::chrono [C++], day"] dev_langs: ["C++"] --- @@ -270,4 +270,4 @@ int main() [`month_day_last` class](month-day-last-class.md)\ [`year_month_day`](year-month-day-class.md)\ [`year_month_day_last`](year-month-day-last-class.md)\ -[Header Files Reference](../standard-library/cpp-standard-library-header-files.md) \ No newline at end of file +[Header Files Reference](../standard-library/cpp-standard-library-header-files.md) diff --git a/docs/standard-library/deque-class.md b/docs/standard-library/deque-class.md index ab5e723a02..8e82314f40 100644 --- a/docs/standard-library/deque-class.md +++ b/docs/standard-library/deque-class.md @@ -11,9 +11,9 @@ Arranges elements of a given type in a linear arrangement and, like a vector, en ## Syntax -```unstlib -template > -class deque +```cpp +template > +class deque; ``` ### Parameters @@ -720,7 +720,7 @@ None of the constructors perform any interim reallocations. ### Example ```cpp -/ compile with: /EHsc +// compile with: /EHsc #include #include #include @@ -1634,7 +1634,7 @@ int main( ) Provides a pointer to an element in a [`deque`](../standard-library/deque-class.md). -```unstlib +```cpp typedef typename Allocator::pointer pointer; ``` diff --git a/docs/standard-library/deque-functions.md b/docs/standard-library/deque-functions.md index db96fab993..ed6244dc98 100644 --- a/docs/standard-library/deque-functions.md +++ b/docs/standard-library/deque-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: "11/04/2016" f1_keywords: ["deque/std::swap"] -ms.assetid: 1d14be53-b0b7-4f66-90cc-65bdeac563fd --- # `` functions @@ -14,7 +13,7 @@ Exchanges the elements of two deques. ```cpp void swap( deque& left, - deque& right,); + deque& right); ``` ### Parameters diff --git a/docs/standard-library/error-condition-class.md b/docs/standard-library/error-condition-class.md index 71767a0471..41b06861bb 100644 --- a/docs/standard-library/error-condition-class.md +++ b/docs/standard-library/error-condition-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: error_condition Class" title: "error_condition Class" -ms.date: "11/04/2016" +description: "Learn more about: error_condition Class" +ms.date: 11/04/2016 f1_keywords: ["system_error/std::error_condition", "system_error/std::error_condition::value_type", "system_error/std::error_condition::assign", "system_error/std::error_condition::category", "system_error/std::error_condition::clear", "system_error/std::error_condition::message", "system_error/std::error_condition::operator bool"] helpviewer_keywords: ["std::error_condition", "std::error_condition::value_type", "std::error_condition::assign", "std::error_condition::category", "std::error_condition::clear", "std::error_condition::message"] -ms.assetid: 6690f481-97c9-4554-a0ff-851dc96b7a06 --- # error_condition Class @@ -160,7 +159,7 @@ bool operator==(const error_condition& right) const; #### Parameters *right*\ -The ojbect to be tested for equality. +The object to be tested for equality. #### Return Value diff --git a/docs/standard-library/exception-typedefs.md b/docs/standard-library/exception-typedefs.md index 2385a80355..f25b44b6dd 100644 --- a/docs/standard-library/exception-typedefs.md +++ b/docs/standard-library/exception-typedefs.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["exception/std::exception_ptr", "exception/std::terminate_handler", "exception/std::unexpected_handler"] -ms.assetid: 2a338480-35e2-46f7-b223-52d4e84a5768 --- # `` typedefs @@ -25,11 +24,11 @@ When you declare an `exception_ptr` variable, the variable is not associated wit Use the `current_exception` or `make_exception_ptr` function to assign an exception to an `exception_ptr` object. When you assign an exception to an `exception_ptr` variable, the variable's exception reference field points to a copy of the exception. If there is insufficient memory to copy the exception, the exception reference field points to a copy of a [std::bad_alloc](../standard-library/bad-alloc-class.md) exception. If the `current_exception` or `make_exception_ptr` function cannot copy the exception for any other reason, the function calls the `terminate` CRT function to exit the current process. -Despite its name, an `exception_ptr` object is not itself a pointer. It does not obey pointer semantics and cannot be used with the pointer member access ( `->`) or indirection (*) operators. The `exception_ptr` object has no public data members or member functions. +Despite its name, an `exception_ptr` object is not itself a pointer. It does not obey pointer semantics and cannot be used with the pointer member access (`->`) or indirection (*) operators. The `exception_ptr` object has no public data members or member functions. **Comparisons:** -You can use the equal ( `==`) and not-equal ( `!=`) operators to compare two `exception_ptr` objects. The operators do not compare the binary value (bit pattern) of the `EXCEPTION_RECORD` structures that represent the exceptions. Instead, the operators compare the addresses in the exception reference field of the `exception_ptr` objects. Consequently, a null `exception_ptr` and the NULL value compare as equal. +You can use the equal (`==`) and not-equal (`!=`) operators to compare two `exception_ptr` objects. The operators do not compare the binary value (bit pattern) of the `EXCEPTION_RECORD` structures that represent the exceptions. Instead, the operators compare the addresses in the exception reference field of the `exception_ptr` objects. Consequently, a null `exception_ptr` and the NULL value compare as equal. ## terminate_handler diff --git a/docs/standard-library/execution.md b/docs/standard-library/execution.md index 9a4bb00cef..ced783fe12 100644 --- a/docs/standard-library/execution.md +++ b/docs/standard-library/execution.md @@ -1,7 +1,7 @@ --- description: "Learn more about: " title: "" -ms.date: "08/17/2021" +ms.date: 09/11/2024 f1_keywords: ["", "execution/std::execution", "std::execution"] helpviewer_keywords: ["execution header"] --- @@ -22,24 +22,30 @@ namespace std::execution { } ``` -### Classes and Structs +### Classes and structs |Name|Description| |-|-| |[`is_execution_policy` Struct](is-execution-policy-struct.md)|Detects execution policies to exclude certain function signatures from otherwise ambiguous overload resolution participation.| -|[`parallel_policy` Class](parallel-policy-class.md)|Used as a unique type to disambiguate parallel algorithm overloading. Indicates that a parallel algorithm's execution may be parallelized.| -|[`parallel_unsequenced_policy` Class](parallel-unsequenced-policy-class.md)|Used as a unique type to disambiguate parallel algorithm overloading. Indicates that a parallel algorithm's execution may be parallelized and vectorized.| -|[`sequenced_policy` Class](sequenced-policy-class.md)|Used as a unique type to disambiguate parallel algorithm overloading. Specifies that a parallel algorithm's execution may not be parallelized.| +|[`parallel_policy` class](parallel-policy-class.md)|Used to disambiguate parallel algorithm overloading. Indicates that a parallel algorithm's execution may be parallelized.| +|[`parallel_unsequenced_policy` class](parallel-unsequenced-policy-class.md)|Used as a unique type to disambiguate parallel algorithm overloading. Indicates that a parallel algorithm's execution may be parallelized and vectorized.| +|[`sequenced_policy` class](sequenced-policy-class.md)|Used as a unique type to disambiguate parallel algorithm overloading. Specifies that a parallel algorithm's execution may not be parallelized.| -### Microsoft Specific - -When `parallel_policy` or `parallel_unsequenced_policy` cause the algorithm to be parallelized, the parallel execution uses Windows Thread Pool; see [Thread Pools](/windows/win32/procthread/thread-pools). The number of concurrent threads is limited to the thread pool default (currently 500). The number of threads concurrently executing on hardware is currently limited by the number of logical processors in the current process's processor group, so it is effectively limited to 64; see [Processor Groups](/windows/win32/procthread/processor-groups). The maximum number of chunks for data partitioning is also currently based on the number of logical processors in the current process's processor group. +### Microsoft specific + +Parallel algorithms execute on an unspecified number of threads and divide the work into an unspecified number of data partitioning "chunks." The Windows thread pool manages the number of threads. The implementation tries to make use of the available logical processors, which corresponds to the number of hardware threads that can execute simultaneously. + +Specifying `parallel_policy` or `parallel_unsequenced_policy` causes standard library algorithms to run in parallel using the Windows Thread Pool. The number of concurrent threads, and thus the number of "chunks" for data partitioning, is limited to 500 threads because that's the default number of thread pool threads. For more information, see [Thread Pools](/windows/win32/procthread/thread-pools). + +Before Windows 11 and Windows Server 2022, applications were limited by default to a single processor group having at most 64 logical processors. This limited the number of concurrently executing threads to 64. For more information, see [Processor Groups](/windows/win32/procthread/processor-groups). + +Starting with Windows 11 and Windows Server 2022, processes and their threads have processor affinities that by default span all processors in the system and across multiple groups on machines with more than 64 processors. The limit on the number of concurrent threads is now the total number of logical processors in the system. ## Requirements -**Header:** \ +**Header:** `` -**Namespace:** std +**Namespace:** `std` ## See also diff --git a/docs/standard-library/filesystem-functions.md b/docs/standard-library/filesystem-functions.md index eef418109a..2c642f3180 100644 --- a/docs/standard-library/filesystem-functions.md +++ b/docs/standard-library/filesystem-functions.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: "03/27/2019" f1_keywords: ["FILESYSTEM/std::experimental::filesystem::absolute", "FILESYSTEM/std::experimental::filesystem::canonical", "FILESYSTEM/std::experimental::filesystem::copy", "FILESYSTEM/std::experimental::filesystem::copy_file", "FILESYSTEM/std::experimental::filesystem::copy_symlink", "FILESYSTEM/std::experimental::filesystem::create_directories", "FILESYSTEM/std::experimental::filesystem::create_directory", "FILESYSTEM/std::experimental::filesystem::create_directory_symlink", "FILESYSTEM/std::experimental::filesystem::create_hard_link", "FILESYSTEM/std::experimental::filesystem::create_symlink", "FILESYSTEM/std::experimental::filesystem::current_path", "FILESYSTEM/std::experimental::filesystem::equivalent", "FILESYSTEM/std::experimental::filesystem::exists", "FILESYSTEM/std::experimental::filesystem::file_size", "FILESYSTEM/std::experimental::filesystem::hard_link_count", "FILESYSTEM/std::experimental::filesystem::hash_value", "FILESYSTEM/std::experimental::filesystem::is_block_file", "FILESYSTEM/std::experimental::filesystem::is_character_file", "FILESYSTEM/std::experimental::filesystem::is_directory", "FILESYSTEM/std::experimental::filesystem::is_empty", "FILESYSTEM/std::experimental::filesystem::is_fifo", "FILESYSTEM/std::experimental::filesystem::is_other", "FILESYSTEM/std::experimental::filesystem::is_regular_file", "FILESYSTEM/std::experimental::filesystem::is_socket", "FILESYSTEM/std::experimental::filesystem::is_symlink", "FILESYSTEM/std::experimental::filesystem::last_write_time", "FILESYSTEM/std::experimental::filesystem::permissions", "FILESYSTEM/std::experimental::filesystem::read_symlink", "FILESYSTEM/std::experimental::filesystem::remove", "FILESYSTEM/std::experimental::filesystem::remove_all", "FILESYSTEM/std::experimental::filesystem::rename", "FILESYSTEM/std::experimental::filesystem::resize_file", "FILESYSTEM/std::experimental::filesystem::space", "FILESYSTEM/std::experimental::filesystem::status", "FILESYSTEM/std::experimental::filesystem::status_known", "FILESYSTEM/std::experimental::filesystem::swap", "FILESYSTEM/std::experimental::filesystem::symlink_status", "FILESYSTEM/std::experimental::filesystem::system_complete", "FILESYSTEM/std::experimental::filesystem::temp_directory_path", "FILESYSTEM/std::experimental::filesystem::u8path"] helpviewer_keywords: ["std::experimental::filesystem::absolute", "std::experimental::filesystem::canonical", "std::experimental::filesystem::copy", "std::experimental::filesystem::copy_file", "std::experimental::filesystem::copy_symlink", "std::experimental::filesystem::create_directories", "std::experimental::filesystem::create_directory", "std::experimental::filesystem::create_directory_symlink", "std::experimental::filesystem::create_hard_link", "std::experimental::filesystem::create_symlink", "std::experimental::filesystem::current_path", "std::experimental::filesystem::equivalent", "std::experimental::filesystem::exists", "std::experimental::filesystem::file_size", "std::experimental::filesystem::hard_link_count", "std::experimental::filesystem::hash_value", "std::experimental::filesystem::is_block_file", "std::experimental::filesystem::is_character_file", "std::experimental::filesystem::is_directory", "std::experimental::filesystem::is_empty", "std::experimental::filesystem::is_fifo", "std::experimental::filesystem::is_other", "std::experimental::filesystem::is_regular_file", "std::experimental::filesystem::is_socket", "std::experimental::filesystem::is_symlink", "std::experimental::filesystem::last_write_time", "std::experimental::filesystem::permissions", "std::experimental::filesystem::read_symlink", "std::experimental::filesystem::remove", "std::experimental::filesystem::remove_all", "std::experimental::filesystem::rename", "std::experimental::filesystem::resize_file", "std::experimental::filesystem::space", "std::experimental::filesystem::status", "std::experimental::filesystem::status_known", "std::experimental::filesystem::swap", "std::experimental::filesystem::symlink_status", "std::experimental::filesystem::system_complete", "std::experimental::filesystem::temp_directory_path", "std::experimental::filesystem::u8path"] @@ -129,7 +129,7 @@ The functions all possibly copy the file at *from* to *to* under control of *`op If `exists(to) && !(opts & (copy_options::skip_existing | copy_options::overwrite_existing | copy_options::update_existing))`, then report as an error that the file already exists. -Otherwise, if `!exists(to) || opts & copy_options::overwrite_existing || opts & copy_options::update_existing&& last_write_time(to) < last_write_time(from) || !(opts & (copy_options::skip_existing | copy_options::overwrite_existing | copy_options:update_existing))`, then attempt to copy the contents and attributes of the file *from* to the file *to*. Report as an error if the copy attempt fails. +Otherwise, if `!exists(to) || opts & copy_options::overwrite_existing || opts & copy_options::update_existing&& last_write_time(to) < last_write_time(from) || !(opts & (copy_options::skip_existing | copy_options::overwrite_existing | copy_options::update_existing))`, then attempt to copy the contents and attributes of the file *from* to the file *to*. Report as an error if the copy attempt fails. The functions return **`true`** if the copy is attempted and succeeds, otherwise **`false`**. diff --git a/docs/standard-library/forward-list-class.md b/docs/standard-library/forward-list-class.md index ecca392abd..5e8e0a35bd 100644 --- a/docs/standard-library/forward-list-class.md +++ b/docs/standard-library/forward-list-class.md @@ -7,7 +7,7 @@ helpviewer_keywords: ["std::forward_list", "std::forward_list::allocator_type", ms.custom: devdivchpfy22 --- -# forward_list Class +# `forward_list` Class Describes an object that controls a varying-length sequence of elements. The sequence is stored as a singly-linked list of nodes, each containing a member of type `Type`. @@ -21,22 +21,22 @@ class forward_list ### Parameters -Type*\ -The element data type to be stored in the forward_list. +*`Type`*\ +The element data type to be stored in the `forward_list`. -*Allocator*\ -The stored allocator object that encapsulates details about the forward_list allocation and deallocation of memory. This parameter is optional. The default value is allocator<`Type`>. +*`Allocator`*\ +The stored allocator object that encapsulates details about the `forward_list` allocation and deallocation of memory. This parameter is optional. The default value is allocator<`Type`>. ## Remarks -A `forward_list` object allocates and frees storage for the sequence it controls through a stored object of class *Allocator* that is based on [allocator Class](../standard-library/allocator-class.md) (commonly known as `std::allocator)`. For more information, see [Allocators](../standard-library/allocators.md). An allocator object must have the same external interface as an object of type `allocator`. +A `forward_list` object allocates and frees storage for the sequence it controls through a stored object of class *`Allocator`* that is based on [`allocator` Class](../standard-library/allocator-class.md) (commonly known as `std::allocator`). For more information, see [Allocators](../standard-library/allocators.md). An allocator object must have the same external interface as an object of type `allocator`. > [!NOTE] > The stored allocator object is not copied when the container object is assigned. Iterators, pointers and references might become invalid when elements of their controlled sequence are erased through `forward_list`. Insertions and splices performed on the controlled sequence through `forward_list` don't invalidate iterators. -Additions to the controlled sequence might occur by calls to [forward_list::insert_after](#insert_after), which is the only member function that calls the constructor `Type(const T&)`. `forward_list` might also call move constructors. If such an expression throws an exception, the container object inserts no new elements and rethrows the exception. Thus, an object of type `forward_list` is left in a known state when such exceptions occur. +Additions to the controlled sequence might occur by calls to [`forward_list::insert_after`](#insert_after), which is the only member function that calls the constructor `Type(const T&)`. `forward_list` might also call move constructors. If such an expression throws an exception, the container object inserts no new elements and rethrows the exception. Thus, an object of type `forward_list` is left in a known state when such exceptions occur. ## Members @@ -44,62 +44,62 @@ Additions to the controlled sequence might occur by calls to [forward_list::inse |Name|Description| |-|-| -|[forward_list](#forward_list)|Constructs an object of type `forward_list`.| +|[`forward_list`](#forward_list)|Constructs an object of type `forward_list`.| ### Typedefs |Name|Description| |-|-| -|[allocator_type](#allocator_type)|A type that represents the allocator class for a forward list object.| -|[const_iterator](#const_iterator)|A type that provides a constant iterator for the forward list.| -|[const_pointer](#const_pointer)|A type that provides a pointer to a **`const`** element in a forward list.| -|[const_reference](#const_reference)|A type that provides a constant reference to an element in the forward list.| -|[difference_type](#difference_type)|A signed integer type that can be used to represent the number of elements of a forward list in a range between elements pointed to by iterators.| -|[iterator](#iterator)|A type that provides an iterator for the forward list.| -|[pointer](#pointer)|A type that provides a pointer to an element in the forward list.| -|[reference](#reference)|A type that provides a reference to an element in the forward list.| -|[size_type](#size_type)|A type that represents the unsigned distance between two elements.| -|[value_type](#value_type)|A type that represents the type of element stored in a forward list.| +|[`allocator_type`](#allocator_type)|A type that represents the allocator class for a forward list object.| +|[`const_iterator`](#const_iterator)|A type that provides a constant iterator for the forward list.| +|[`const_pointer`](#const_pointer)|A type that provides a pointer to a **`const`** element in a forward list.| +|[`const_reference`](#const_reference)|A type that provides a constant reference to an element in the forward list.| +|[`difference_type`](#difference_type)|A signed integer type that can be used to represent the number of elements of a forward list in a range between elements pointed to by iterators.| +|[`iterator`](#iterator)|A type that provides an iterator for the forward list.| +|[`pointer`](#pointer)|A type that provides a pointer to an element in the forward list.| +|[`reference`](#reference)|A type that provides a reference to an element in the forward list.| +|[`size_type`](#size_type)|A type that represents the unsigned distance between two elements.| +|[`value_type`](#value_type)|A type that represents the type of element stored in a forward list.| ### Functions |Name|Description| |-|-| -|[assign](#assign)|Erases elements from a forward list and copies a new set of elements to a target forward list.| -|[before_begin](#before_begin)|Returns an iterator addressing the position before the first element in a forward list.| -|[begin](#begin)|Returns an iterator addressing the first element in a forward list.| -|[cbefore_begin](#cbefore_begin)|Returns a const iterator addressing the position before the first element in a forward list.| -|[cbegin](#cbegin)|Returns a const iterator addressing the first element in a forward list.| -|[cend](#cend)|Returns a const iterator that addresses the location succeeding the last element in a forward list.| -|[clear](#clear)|Erases all the elements of a forward list.| -|[emplace_after](#emplace_after)|Move constructs a new element after a specified position.| -|[emplace_front](#emplace_front)|Adds an element constructed in place to the beginning of the list.| -|[empty](#empty)|Tests whether a forward list is empty.| -|[end](#end)|Returns an iterator that addresses the location succeeding the last element in a forward list.| -|[erase_after](#erase_after)|Removes elements from the forward list after a specified position.| -|[front](#front)|Returns a reference to the first element in a forward list.| -|[get_allocator](#get_allocator)|Returns a copy of the allocator object used to construct a forward list.| -|[insert_after](#insert_after)|Adds elements to the forward list after a specified position.| -|[max_size](#max_size)|Returns the maximum length of a forward list.| -|[merge](#merge)|Removes the elements from the argument list, inserts them into the target forward list, and orders the new, combined set of elements in ascending order or in some other specified order.| -|[pop_front](#pop_front)|Deletes the element at the beginning of a forward list.| -|[push_front](#push_front)|Adds an element to the beginning of a forward list.| -|[remove](#remove)|Erases elements in a forward list that matches a specified value.| -|[remove_if](#remove_if)|Erases elements from a forward list for which a specified predicate is satisfied.| -|[resize](#resize)|Specifies a new size for a forward list.| -|[reverse](#reverse)|Reverses the order in which the elements occur in a forward list.| -|[sort](#sort)|Arranges the elements in ascending order or with an order specified by a predicate.| -|[splice_after](#splice_after)|Restitches links between nodes.| -|[swap](#swap)|Exchanges the elements of two forward lists.| -|[unique](#unique)|Removes adjacent elements that pass a specified test.| +|[`assign`](#assign)|Erases elements from a forward list and copies a new set of elements to a target forward list.| +|[`before_begin`](#before_begin)|Returns an iterator addressing the position before the first element in a forward list.| +|[`begin`](#begin)|Returns an iterator addressing the first element in a forward list.| +|[`cbefore_begin`](#cbefore_begin)|Returns a const iterator addressing the position before the first element in a forward list.| +|[`cbegin`](#cbegin)|Returns a const iterator addressing the first element in a forward list.| +|[`cend`](#cend)|Returns a const iterator that addresses the location succeeding the last element in a forward list.| +|[`clear`](#clear)|Erases all the elements of a forward list.| +|[`emplace_after`](#emplace_after)|Move constructs a new element after a specified position.| +|[`emplace_front`](#emplace_front)|Adds an element constructed in place to the beginning of the list.| +|[`empty`](#empty)|Tests whether a forward list is empty.| +|[`end`](#end)|Returns an iterator that addresses the location succeeding the last element in a forward list.| +|[`erase_after`](#erase_after)|Removes elements from the forward list after a specified position.| +|[`front`](#front)|Returns a reference to the first element in a forward list.| +|[`get_allocator`](#get_allocator)|Returns a copy of the allocator object used to construct a forward list.| +|[`insert_after`](#insert_after)|Adds elements to the forward list after a specified position.| +|[`max_size`](#max_size)|Returns the maximum length of a forward list.| +|[`merge`](#merge)|Removes the elements from the argument list, inserts them into the target forward list, and orders the new, combined set of elements in ascending order or in some other specified order.| +|[`pop_front`](#pop_front)|Deletes the element at the beginning of a forward list.| +|[`push_front`](#push_front)|Adds an element to the beginning of a forward list.| +|[`remove`](#remove)|Erases elements in a forward list that matches a specified value.| +|[`remove_if`](#remove_if)|Erases elements from a forward list for which a specified predicate is satisfied.| +|[`resize`](#resize)|Specifies a new size for a forward list.| +|[`reverse`](#reverse)|Reverses the order in which the elements occur in a forward list.| +|[`sort`](#sort)|Arranges the elements in ascending order or with an order specified by a predicate.| +|[`splice_after`](#splice_after)|Restitches links between nodes.| +|[`swap`](#swap)|Exchanges the elements of two forward lists.| +|[`unique`](#unique)|Removes adjacent elements that pass a specified test.| ### Operators |Name|Description| |-|-| -|[operator=](#op_eq)|Replaces the elements of the forward list with a copy of another forward list.| +|[`operator=`](#op_eq)|Replaces the elements of the forward list with a copy of another forward list.| -## allocator_type +## `allocator_type` A type that represents the allocator class for a forward list object. @@ -109,9 +109,9 @@ typedef Allocator allocator_type; ### Remarks -`allocator_type` is a synonym for the template parameter Allocator. +`allocator_type` is a synonym for the template parameter `Allocator`. -## assign +## `assign` Erases elements from a forward list and copies a new set of elements to a target forward list. @@ -129,33 +129,33 @@ void assign(InputIterator First, InputIterator Last); ### Parameters -*first*\ +*`first`*\ The beginning of the replacement range. -*last*\ +*`last`*\ The end of the replacement range. -*count*\ +*`count`*\ The number of elements to assign. -*val*\ +*`val`*\ The value to assign each element. -*Type*\ +*`Type`*\ The type of the value. -*IList*\ -The initializer_list to copy. +*`IList`*\ +The `initializer_list` to copy. ### Remarks -If the forward_list is an integer type, the first member function behaves the same as `assign((size_type)First, (Type)Last)`. Otherwise, the first member function replaces the sequence controlled by **`*this`** with the sequence [ `First, Last)`, which must not overlap the initial controlled sequence. +If the `forward_list` is an integer type, the first member function behaves the same as `assign((size_type)First, (Type)Last)`. Otherwise, the first member function replaces the sequence controlled by **`*this`** with the sequence [ `First, Last)`, which must not overlap the initial controlled sequence. The second member function replaces the sequence controlled by **`*this`** with a repetition of `Count` elements of value `Val`. -The third member function copies the elements of the initializer_list into the forward_list. +The third member function copies the elements of the `initializer_list` into the `forward_list`. -## before_begin +## `before_begin` Returns an iterator addressing the position before the first element in a forward list. @@ -170,7 +170,7 @@ A forward iterator that points just before the first element of the sequence (or ### Remarks -## begin +## `begin` Returns an iterator addressing the first element in a forward list. @@ -185,7 +185,7 @@ A forward iterator that points at the first element of the sequence (or just bey ### Remarks -## cbefore_begin +## `cbefore_begin` Returns a const iterator addressing the position before the first element in a forward list. @@ -199,7 +199,7 @@ A forward iterator that points just before the first element of the sequence (or ### Remarks -## cbegin +## `cbegin` Returns a **`const`** iterator that addresses the first element in the range. @@ -215,7 +215,7 @@ A **`const`** forward-access iterator that points at the first element of the ra With the return value of `cbegin`, the elements in the range can't be modified. -You can use this member function in place of the `begin()` member function to guarantee that the return value is `const_iterator`. Typically, it's used with the [auto](../cpp/auto-cpp.md) type deduction keyword, as shown in the following example. In the example, consider `Container` to be a modifiable (non- **`const`**) container of any kind that supports `begin()` and `cbegin()`. +You can use this member function in place of the `begin()` member function to guarantee that the return value is `const_iterator`. Typically, it's used with the [`auto`](../cpp/auto-cpp.md) type deduction keyword, as shown in the following example. In the example, consider `Container` to be a modifiable (non- **`const`**) container of any kind that supports `begin()` and `cbegin()`. ```cpp auto i1 = Container.begin(); @@ -224,7 +224,7 @@ auto i2 = Container.cbegin(); // i2 is Container::const_iterator ``` -## cend +## `cend` Returns a **`const`** iterator that addresses the location just beyond the last element in a range. @@ -240,7 +240,7 @@ A forward-access iterator that points just beyond the end of the range. `cend` is used to test whether an iterator has passed the end of its range. -You can use this member function in place of the `end()` member function to guarantee that the return value is `const_iterator`. Typically, it's used with the [auto](../cpp/auto-cpp.md) type deduction keyword, as shown in the following example. In the example, consider `Container` to be a modifiable (non- **`const`**) container of any kind that supports `end()` and `cend()`. +You can use this member function in place of the `end()` member function to guarantee that the return value is `const_iterator`. Typically, it's used with the [`auto`](../cpp/auto-cpp.md) type deduction keyword, as shown in the following example. In the example, consider `Container` to be a modifiable (non- **`const`**) container of any kind that supports `end()` and `cend()`. ```cpp auto i1 = Container.end(); @@ -252,7 +252,7 @@ auto i2 = Container.cend(); The value returned by `cend` shouldn't be dereferenced. -## clear +## `clear` Erases all the elements of a forward list. @@ -264,7 +264,7 @@ void clear(); This member function calls `erase_after(before_begin(), end())`. -## const_iterator +## `const_iterator` A type that provides a constant iterator for the forward list. @@ -276,7 +276,7 @@ typedef implementation-defined const_iterator; `const_iterator` describes an object that can serve as a constant forward iterator for the controlled sequence. It's described here as a synonym for an implementation-defined type. -## const_pointer +## `const_pointer` A type that provides a pointer to a **`const`** element in a forward list. @@ -287,7 +287,7 @@ typedef typename Allocator::const_pointer ### Remarks -## const_reference +## `const_reference` A type that provides a constant reference to an element in the forward list. @@ -297,7 +297,7 @@ typedef typename Allocator::const_reference const_reference; ### Remarks -## difference_type +## `difference_type` A signed integer type that can be used to represent the number of elements of a forward list in a range between elements pointed to by iterators. @@ -309,7 +309,7 @@ typedef typename Allocator::difference_type difference_type; `difference_type` describes an object that can represent the difference between the addresses of any two elements in the controlled sequence. -## emplace_after +## `emplace_after` Move constructs a new element after a specified position. @@ -320,10 +320,10 @@ iterator emplace_after(const_iterator Where, Type&& val); ### Parameters -*Where*\ +*`Where`*\ The position in the target forward list where the new element is constructed. -*val*\ +*`val`*\ The constructor argument. ### Return Value @@ -332,9 +332,9 @@ An iterator that designates the newly inserted element. ### Remarks -This member function inserts an element with the constructor arguments *val* just after the element pointed to by *Where* in the controlled sequence. Its behavior is otherwise the same as [forward_list::insert_after](#insert_after). +This member function inserts an element with the constructor arguments *`val`* just after the element pointed to by *`Where`* in the controlled sequence. Its behavior is otherwise the same as [`forward_list::insert_after`](#insert_after). -## emplace_front +## `emplace_front` Adds an element constructed in place to the beginning of the list. @@ -345,16 +345,16 @@ template ### Parameters -*val*\ +*`val`*\ The element added to the beginning of the forward list. ### Remarks -This member function inserts an element with the constructor arguments `_ val` at the end of the controlled sequence. +This member function inserts an element with the constructor arguments `val` at the beginning of the controlled sequence. If an exception is thrown, the container is left unaltered and the exception is rethrown. -## empty +## `empty` Tests whether a forward list is empty. @@ -366,7 +366,7 @@ bool empty() const; **`true`** if the forward list is empty; otherwise, **`false`**. -## end +## `end` Returns an iterator that addresses the location succeeding the last element in a forward list. @@ -379,7 +379,7 @@ iterator end(); A forward iterator that points just beyond the end of the sequence. -## erase_after +## `erase_after` Removes elements from the forward list after a specified position. @@ -390,22 +390,22 @@ iterator erase_after(const_iterator first, const_iterator last); ### Parameters -*Where*\ +*`Where`*\ The position in the target forward list where the element is erased. -*first*\ +*`first`*\ The beginning of the range to erase. -*last*\ +*`last`*\ The end of the range to erase. ### Return Value -An iterator that designates the first element remaining beyond any elements removed, or [forward_list::end](#end) if no such element exists. +An iterator that designates the first element remaining beyond any elements removed, or [`forward_list::end`](#end) if no such element exists. ### Remarks -The first member function removes the element of the controlled sequence just after *Where*. +The first member function removes the element of the controlled sequence just after *`Where`*. The second member function removes the elements of the controlled sequence in the range `( first, last)` (neither end point is included). @@ -413,7 +413,7 @@ Erasing `N` elements causes `N` destructor calls. [Reallocation](../standard-lib The member functions never throw an exception. -## forward_list +## `forward_list` Constructs an object of type `forward_list`. @@ -436,36 +436,36 @@ forward_list(InputIterator First, InputIterator Last, const Allocator& Al); ### Parameters -*Al*\ +*`Al`*\ The allocator class to use with this object. -*Count*\ +*`Count`*\ The number of elements in the list constructed. -*Val*\ +*`Val`*\ The value of the elements in the list constructed. -*Right*\ +*`Right`*\ The list of which the constructed list is to be a copy. -*First*\ +*`First`*\ The position of the first element in the range of elements to be copied. -*Last*\ +*`Last`*\ The position of the first element beyond the range of elements to be copied. -*IList*\ -The initializer_list to copy. +*`IList`*\ +The `initializer_list` to copy. ### Remarks -All constructors store an [allocator](../standard-library/allocator-class.md) and initialize the controlled sequence. The allocator object is the argument *Al*, if present. For the copy constructor, it's `right.get_allocator()`. Otherwise, it's `Allocator()`. +All constructors store an [`allocator`](../standard-library/allocator-class.md) and initialize the controlled sequence. The allocator object is the argument *`Al`*, if present. For the copy constructor, it's `right.get_allocator()`. Otherwise, it's `Allocator()`. The first two constructors specify an empty initial controlled sequence. -The third constructor specifies a repetition of *Count* elements of value `Type()`. +The third constructor specifies a repetition of *`Count`* elements of value `Type()`. -The fourth and fifth constructors specify a repetition of *Count* elements of value *Val*. +The fourth and fifth constructors specify a repetition of *`Count`* elements of value *`Val`*. The sixth constructor specifies a copy of the sequence controlled by *Right*. If `InputIterator` is an integer type, the next two constructors specify a repetition of `(size_type)First` elements of value `(Type)Last`. Otherwise, the next two constructors specify the sequence `[First, Last)`. @@ -473,7 +473,7 @@ The ninth and tenth constructors are the same as the sixth, but with an [rvalue] The last constructor specifies the initial controlled sequence with an object of class `initializer_list`. -## front +## `front` Returns a reference to the first element in a forward list. @@ -486,7 +486,7 @@ const_reference front() const; A reference to the first element of the controlled sequence, which must be non-empty. -## get_allocator +## `get_allocator` Returns a copy of the allocator object used to construct a forward list. @@ -496,9 +496,9 @@ allocator_type get_allocator() const; ### Return Value -The stored [allocator](../standard-library/allocator-class.md) object. +The stored [`allocator`](../standard-library/allocator-class.md) object. -## insert_after +## `insert_after` Adds elements to the forward list after a specified position. @@ -513,23 +513,23 @@ template ### Parameters -*Where*\ +*`Where`*\ The position in the target forward list where the first element is inserted. -*Count*\ +*`Count`*\ The number of elements to insert. -*First*\ +*`First`*\ The beginning of the insertion range. -*Last*\ +*`Last`*\ The end of the insertion range. -*Val*\ +*`Val`*\ The element added to the forward list. -*IList*\ -The initializer_list to insert. +*`IList`*\ +The `initializer_list` to insert. ### Return Value @@ -537,11 +537,11 @@ An iterator that designates the newly inserted element (first and last member fu ### Remarks -Each of the member functions inserts—just after the element pointed to by *Where* in the controlled sequence—a sequence that' specified by the remaining operands. +Each of the member functions inserts—just after the element pointed to by *`Where`* in the controlled sequence—a sequence that' specified by the remaining operands. -The first member function inserts an element that has value *Val* and returns an iterator that designates the newly inserted element. +The first member function inserts an element that has value *`Val`* and returns an iterator that designates the newly inserted element. -The second member function inserts a repetition of *Count* elements of value *Val*. +The second member function inserts a repetition of *`Count`* elements of value *`Val`*. If `InputIterator` is an integer type, the third member function behaves the same as `insert(it, (size_type)First, (Type)Last)`. Otherwise, it inserts the sequence `[First, Last)`, which must not overlap the initial controlled sequence. @@ -553,7 +553,7 @@ Inserting `N` elements causes `N` constructor calls. [Reallocation](../standard- If an exception is thrown during the insertion of one or more elements, the container is left unaltered and the exception is rethrown. -## iterator +## `iterator` A type that provides an iterator for the forward list. @@ -565,7 +565,7 @@ typedef implementation-defined iterator; `iterator` describes an object that can serve as a forward iterator for the controlled sequence. It's described here as a synonym for an implementation-defined type. -## max_size +## `max_size` Returns the maximum length of a forward list. @@ -579,7 +579,7 @@ The length of the longest sequence that the object can control. ### Remarks -## merge +## `merge` Combines two sorted sequences into a single sorted sequence in linear time. Removes the elements from the argument list, and inserts them into this `forward_list`. The two lists should be sorted by the same compare function object before the call to `merge`. The combined list will be sorted by that compare function object. @@ -591,10 +591,10 @@ template ### Parameters -*right*\ +*`right`*\ The forward list to merge from. -*comp*\ +*`comp`*\ The compare function object that is used to sort elements. ### Remarks @@ -603,11 +603,11 @@ The compare function object that is used to sort elements. For the iterators `Pi` and `Pj` designating elements at positions `i` and `j`, the first member function imposes the order `!(*Pj < *Pi)` whenever `i < j`. (The elements are sorted in `ascending` order.) The second member function imposes the order `! comp(*Pj, *Pi)` whenever `i < j`. -No pairs of elements in the original controlled sequence are reversed in the resulting controlled sequence. If a pair of elements in the resulting controlled sequence compares equal ( `!(*Pi < *Pj) && !(*Pj < *Pi)`), an element from the original controlled sequence appears before an element from the sequence controlled by `right`. +No pairs of elements in the original controlled sequence are reversed in the resulting controlled sequence. If a pair of elements in the resulting controlled sequence compares equal (`!(*Pi < *Pj) && !(*Pj < *Pi)`), an element from the original controlled sequence appears before an element from the sequence controlled by `right`. An exception occurs only if `comp` throws an exception. In that case, the controlled sequence is left in unspecified order and the exception is rethrown. -## operator= +## `operator=` Replaces the elements of the forward list with a copy of another forward list. @@ -619,21 +619,21 @@ forward_list& operator=(forward_list&& right); ### Parameters -*right*\ +*`right`*\ The forward list being copied into the forward list. -*IList*\ +*`IList`*\ A brace-enclosed initializer list, which behaves just like a sequence of elements of type `Type`. ### Remarks -The first member operator replaces the controlled sequence with a copy of the sequence controlled by *right*. +The first member operator replaces the controlled sequence with a copy of the sequence controlled by *`right`*. The second member operator replaces the controlled sequence from an object of class `initializer_list`. The third member operator is the same as the first, but with an [rvalue](../cpp/rvalue-reference-declarator-amp-amp.md) reference. -## pointer +## `pointer` A type that provides a pointer to an element in the forward list. @@ -641,7 +641,7 @@ A type that provides a pointer to an element in the forward list. typedef typename Allocator::pointer pointer; ``` -## pop_front +## `pop_front` Deletes the element at the beginning of a forward list. @@ -655,7 +655,7 @@ The first element of the forward list must be non-empty. The member function never throws an exception. -## push_front +## `push_front` Adds an element to the beginning of a forward list. @@ -666,14 +666,14 @@ void push_front(Type&& val); ### Parameters -*val*\ +*`val`*\ The element added to the beginning of the forward list. ### Remarks If an exception is thrown, the container is left unaltered and the exception is rethrown. -## reference +## `reference` A type that provides a reference to an element in the forward list. @@ -681,7 +681,7 @@ A type that provides a reference to an element in the forward list. typedef typename Allocator::reference reference; ``` -## remove +## `remove` Erases elements in a forward list that matches a specified value. @@ -691,7 +691,7 @@ void remove(const Type& val); ### Parameters -*val*\ +*`val`*\ The value which, if held by an element, will result in that element's removal from the list. ### Remarks @@ -700,7 +700,7 @@ The member function removes from the controlled sequence all elements, designate The member function never throws an exception. -## remove_if +## `remove_if` Erases elements from a forward list for which a specified predicate is satisfied. @@ -711,16 +711,16 @@ template ### Parameters -*pred*\ +*`pred`*\ The unary predicate which, if satisfied by an element, results in the deletion of that element from the list. ### Remarks The member function removes from the controlled sequence all elements, designated by the iterator `P`, for which `pred(*P)` is true. -An exception occurs only if *pred* throws an exception. In that case, the controlled sequence is left in an unspecified state and the exception is rethrown. +An exception occurs only if *`pred`* throws an exception. In that case, the controlled sequence is left in an unspecified state and the exception is rethrown. -## resize +## `resize` Specifies a new size for a forward list. @@ -731,17 +731,17 @@ void resize(size_type _Newsize, const Type& val); ### Parameters -*_Newsize*\ +*`_Newsize`*\ The number of elements in the resized forward list. -*val*\ +*`val`*\ The value to use for padding. ### Remarks -The member functions both ensure that the number of elements in the list henceforth is *_Newsize*. If it must make the controlled sequence longer, the first member function appends elements with value `Type()`, while the second member function appends elements with value *val*. To make the controlled sequence shorter, both member functions effectively call `erase_after(begin() + _Newsize - 1, end())`. +The member functions both ensure that the number of elements in the list henceforth is *`_Newsize`*. If it must make the controlled sequence longer, the first member function appends elements with value `Type()`, while the second member function appends elements with value *`val`*. To make the controlled sequence shorter, both member functions effectively call `erase_after(begin() + _Newsize - 1, end())`. -## reverse +## `reverse` Reverses the order in which the elements occur in a forward list. @@ -749,7 +749,7 @@ Reverses the order in which the elements occur in a forward list. void reverse(); ``` -## size_type +## `size_type` A type that represents the unsigned distance between two elements. @@ -761,7 +761,7 @@ typedef typename Allocator::size_type size_type; The unsigned integer type describes an object that can represent the length of any controlled sequence. -## sort +## `sort` Arranges the elements in ascending order or with an order specified by a predicate. @@ -773,7 +773,7 @@ void sort(Predicate pred); ### Parameters -*pred*\ +*`pred`*\ The ordering predicate. ### Remarks @@ -782,11 +782,11 @@ Both member functions order the elements in the controlled sequence by a predica For the iterators `Pi` and `Pj` designating elements at positions `i` and `j`, the first member function imposes the order `!(*Pj < *Pi)` whenever `i < j`. (The elements are sorted in `ascending` order.) The member template function imposes the order `! pred(*Pj, *Pi)` whenever `i < j`. No ordered pairs of elements in the original controlled sequence are reversed in the resulting controlled sequence. (The sort is stable.) -An exception occurs only if *pred* throws an exception. In that case, the controlled sequence is left in unspecified order and the exception is rethrown. +An exception occurs only if *`pred`* throws an exception. In that case, the controlled sequence is left in unspecified order and the exception is rethrown. -## splice_after +## `splice_after` -Removes elements from a source forward_list and inserts them into a destination forward_list. +Removes elements from a source `forward_list` and inserts them into a destination `forward_list`. ```cpp // insert the entire source forward_list @@ -813,30 +813,30 @@ void splice_after( ### Parameters -*Where*\ -The position in the destination forward_list after which to insert. +*`Where`*\ +The position in the destination `forward_list` after which to insert. -*Source*\ -The source forward_list that is to be inserted into the destination forward_list. +*`Source`*\ +The source `forward_list` that is to be inserted into the destination `forward_list`. -*Iter*\ -The element to be inserted from the source forward_list. +*`Iter`*\ +The element to be inserted from the source `forward_list`. -*First*\ -The first element in the range to be inserted from source forward_list. +*`First`*\ +The first element in the range to be inserted from source `forward_list`. -*Last*\ -The first position beyond the range to be inserted from the source forward_list. +*`Last`*\ +The first position beyond the range to be inserted from the source `forward_list`. ### Remarks -The first pair of member functions inserts the sequence controlled by *Source* just after the element in the controlled sequence pointed to by *Where*. It also removes all elements from *Source*. (`&Source` must not equal **`this`**.) +The first pair of member functions inserts the sequence controlled by *`Source`* just after the element in the controlled sequence pointed to by *`Where`*. It also removes all elements from *`Source`*. (`&Source` must not equal **`this`**.) -The second pair of member functions removes the element just after *Iter* in the sequence controlled by *Source* and inserts it just after the element in the controlled sequence pointed to by *Where*. (If `Where == Iter || Where == ++Iter`, no change occurs.) +The second pair of member functions removes the element just after *`Iter`* in the sequence controlled by *`Source`* and inserts it just after the element in the controlled sequence pointed to by *`Where`*. (If `Where == Iter || Where == ++Iter`, no change occurs.) -The third pair of member functions (ranged splice) inserts the subrange designated by `(First, Last)` from the sequence controlled by *Source* just after the element in the controlled sequence pointed to by *Where*. It also removes the original subrange from the sequence controlled by *Source*. (If `&Source == this`, the range `(First, Last)` must not include the element pointed to by *Where*.) +The third pair of member functions (ranged splice) inserts the subrange designated by `(First, Last)` from the sequence controlled by *`Source`* just after the element in the controlled sequence pointed to by *`Where`*. It also removes the original subrange from the sequence controlled by *`Source`*. (If `&Source == this`, the range `(First, Last)` must not include the element pointed to by *`Where`*.) -If the ranged splice inserts `N` elements, and `&Source != this`, an object of class [iterator](#iterator) is incremented `N` times. +If the ranged splice inserts `N` elements, and `&Source != this`, an object of class [`iterator`](#iterator) is incremented `N` times. No iterators, pointers, or references that designate spliced elements become invalid. @@ -913,7 +913,7 @@ int main() Beginning state of lists:c1 = (10) (11)c2 = (20) (21) (22)c3 = (30) (31)c4 = (40) (41) (42) (43)After splicing c1 into c2:c1 =c2 = (20) (21) (10) (11) (22)After splicing the first element of c3 into c2:c3 = (30)c2 = (20) (21) (31) (10) (11) (22)After splicing a range of c4 into c2:c4 = (40) (41)c2 = (20) (21) (42) (43) (31) (10) (11) (22) ``` -## swap +## `swap` Exchanges the elements of two forward lists. @@ -923,14 +923,14 @@ void swap(forward_list& right); ### Parameters -*right*\ +*`right`*\ The forward list providing the elements to be exchanged. ### Remarks -The member function swaps the controlled sequences between **`*this`** and *right*. If `get_allocator() == right.get_allocator()`, it does so in constant time, it throws no exceptions, and it invalidates no references, pointers, or iterators that designate elements in the two controlled sequences. Otherwise, it performs element assignments and constructor calls proportional to the number of elements in the two controlled sequences. +The member function swaps the controlled sequences between **`*this`** and *`right`*. If `get_allocator() == right.get_allocator()`, it does so in constant time, it throws no exceptions, and it invalidates no references, pointers, or iterators that designate elements in the two controlled sequences. Otherwise, it performs element assignments and constructor calls proportional to the number of elements in the two controlled sequences. -## unique +## `unique` Eliminates all but the first element from every consecutive group of equal elements. @@ -942,7 +942,7 @@ void unique(BinaryPredicate comp); ### Parameters -*comp*\ +*`comp`*\ The binary predicate used to compare successive elements. ### Remarks @@ -955,7 +955,7 @@ For a controlled sequence of length `N` (> 0), the predicate `comp(*Pi, *Pj)` is An exception occurs only if `comp` throws an exception. In that case, the controlled sequence is left in an unspecified state and the exception is rethrown. -## value_type +## `value_type` A type that represents the type of element stored in a forward list. diff --git a/docs/standard-library/forward-list-operators.md b/docs/standard-library/forward-list-operators.md index 333f3280e6..f221e37576 100644 --- a/docs/standard-library/forward-list-operators.md +++ b/docs/standard-library/forward-list-operators.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" -f1_keywords: ["forward_list/std::operator!=", "forward_list/std::operator==", "forward_list/std::operator>", "forward_list/std::operator>=;", "forward_list/std::operator<", "forward_list/std::operator<="] -ms.assetid: 57492e09-3836-4dbc-9ae5-78ecf506c190 -helpviewer_keywords: ["std::operator!= (forward_list)", "std::operator== (forward_list)", "std::operator> (forward_list)", "std::operator>=; (forward_list)", "std::operator< (forward_list)", "std::operator<= (forward_list)"] +description: "Learn more about: operators" +ms.date: 11/04/2016 +f1_keywords: ["forward_list/std::operator!=", "forward_list/std::operator==", "forward_list/std::operator>", "forward_list/std::operator>=;", "forward_list/std::operator<", "forward_list/std::operator<="] +helpviewer_keywords: ["std::operator!= (forward_list)", "std::operator== (forward_list)", "std::operator> (forward_list)", "std::operator>=; (forward_list)", "std::operator< (forward_list)", "std::operator<= (forward_list)"] --- # `` operators diff --git a/docs/standard-library/fstream-typedefs.md b/docs/standard-library/fstream-typedefs.md index 0676590e45..4006ded8a5 100644 --- a/docs/standard-library/fstream-typedefs.md +++ b/docs/standard-library/fstream-typedefs.md @@ -1,20 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["fstream/std::filebuf", "fstream/std::fstream", "fstream/std::ifstream", "fstream/std::ofstream", "fstream/std::wfilebuf", "fstream/std::wfstream", "fstream/std::wifstream", "fstream/std::wofstream"] -ms.assetid: 8dddef2d-7f17-42a6-ba08-6f6f20597d23 --- # `` typedefs -[`filebuf`](#filebuf)\ -[`fstream`](#fstream)\ -[`ifstream`](#ifstream)\ -[`ofstream`](#ofstream)\ -[`wfilebuf`](#wfilebuf)\ -[`wfstream`](#wfstream)\ -[`wifstream`](#wifstream)\ -[`wofstream`](#wofstream) +The `` header provides the following typedefs: ## `filebuf` diff --git a/docs/standard-library/future-enums.md b/docs/standard-library/future-enums.md index 087f829180..565311c064 100644 --- a/docs/standard-library/future-enums.md +++ b/docs/standard-library/future-enums.md @@ -1,19 +1,16 @@ --- -description: "Learn more about: enums" title: " enums" -ms.date: "11/04/2016" +description: "Learn more about: enums" +ms.date: 11/04/2016 f1_keywords: ["future/std::future_errc", "future/std::future_status", "future/std::launch"] -ms.assetid: 8c675645-db47-4cab-bc0e-7b87f8a302df --- # `` enums -[future_errc](#future_errc)\ -[future_status](#future_status)\ -[launch](#launch) +The `` header provides the following enums: -## future_errc Enumeration +## `future_errc` enumeration -Supplies symbolic names for all of the errors that are reported by the [future_error](../standard-library/future-error-class.md) class. +Supplies symbolic names for all of the errors that are reported by the [`future_error`](../standard-library/future-error-class.md) class. ```cpp class future_errc { @@ -24,7 +21,7 @@ class future_errc { }; ``` -## future_status Enumeration +## `future_status` enumeration Supplies symbolic names for the reasons that a timed wait function can return. @@ -36,9 +33,9 @@ enum future_status{ }; ``` -## launch Enumeration +## `launch` enumeration -Represents a bitmask type that describes the possible modes for the template function [async](../standard-library/future-functions.md#async). +Represents a bitmask type that describes the possible modes for the template function [`async`](../standard-library/future-functions.md#async). ```cpp class launch{ @@ -49,4 +46,4 @@ class launch{ ## See also -[\](../standard-library/future.md) +[\](future.md) diff --git a/docs/standard-library/future-functions.md b/docs/standard-library/future-functions.md index c40c313f2d..24e91bd0bf 100644 --- a/docs/standard-library/future-functions.md +++ b/docs/standard-library/future-functions.md @@ -1,17 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "08/17/2021" +description: "Learn more about: functions" +ms.date: 09/11/2024 f1_keywords: ["future/std::async", "future/std::future_category", "future/std::make_error_code", "future/std::make_error_condition", "future/std::swap"] helpviewer_keywords: ["std::async [C++]", "std::future_category [C++]", "std::make_error_code [C++]", "std::make_error_condition [C++]", "std::swap [C++]"] --- # `` functions -[`async`](#async)\ -[`future_category`](#future_category)\ -[`make_error_code`](#make_error_code)\ -[`make_error_condition`](#make_error_condition)\ -[`swap`](#swap)| +The `` header provides the following functions: ## `async` @@ -29,7 +25,7 @@ future::type> ### Parameters -*policy*\ +*`policy`*\ A [`launch`](../standard-library/future-enums.md#launch) value. ### Remarks @@ -48,24 +44,28 @@ The second function returns a `future` object whose *associated asynchronous Unless `decay::type` is a type other than launch, the second function doesn't participate in overload resolution. -The C++ standard states that if policy is launch::async, the function creates a new thread. However the Microsoft implementation is currently non-conforming. It obtains its threads from the Windows ThreadPool, which in some cases may provide a recycled thread rather than a new one. This means that the `launch::async` policy is implemented as `launch::async|launch::deferred`. Another implication of the ThreadPool-based implementation is that there's no guarantee that thread-local variables will be destroyed when the thread completes. If the thread is recycled and provided to a new call to `async`, the old variables will still exist. We recommend that you don't use thread-local variables with `async`. +The C++ standard states that if the policy is `launch::async`, the function behaves as if it invokes the callable object in a new thread. This means that while it typically results in creating a new thread, the implementation may use other mechanisms to achieve equivalent behavior. However, the Microsoft implementation currently doesn't conform strictly to this behavior. It obtains threads from the Windows ThreadPool, which may provide a recycled thread rather than a new one. This means that the `launch::async` policy is effectively implemented as `launch::async|launch::deferred`. Another implication of the ThreadPool-based implementation is that there's no guarantee that thread-local variables are destroyed when the thread completes. If the thread is recycled and provided to a new call to `async`, the old variables still exist. We recommend that you avoid using thread-local variables with `async`. -If *policy* is `launch::deferred`, the function marks its associated asynchronous state as holding a *deferred function* and returns. The first call to any non-timed function that waits for the associated asynchronous state to be ready in effect calls the deferred function by evaluating `INVOKE(dfn, dargs..., Ty)`. +If *`policy`* is `launch::deferred`, the function marks its associated asynchronous state as holding a *deferred function* and returns. The first call to any nontimed function that waits for the associated asynchronous state to be ready in effect calls the deferred function by evaluating `INVOKE(dfn, dargs..., Ty)`. -In all cases, the associated asynchronous state of the `future` object isn't set to *ready* until the evaluation of `INVOKE(dfn, dargs..., Ty)` completes, either by throwing an exception or by returning normally. The result of the associated asynchronous state is an exception if one was thrown, or any value that's returned by the evaluation. +In all cases, the associated asynchronous state of the `future` object isn't set to *ready* until the evaluation of `INVOKE(dfn, dargs..., Ty)` completes, either by throwing an exception or by returning normally. The result of the associated asynchronous state is an exception if one was thrown, or the value the evaluation returns. > [!NOTE] > For a `future`—or the last [`shared_future`](../standard-library/shared-future-class.md)—that's attached to a task started with `std::async`, the destructor blocks if the task has not completed; that is, it blocks if this thread did not yet call `.get()` or `.wait()` and the task is still running. If a `future` obtained from `std::async` is moved outside the local scope, other code that uses it must be aware that its destructor may block for the shared state to become ready. The pseudo-function `INVOKE` is defined in [``](../standard-library/functional.md). -### Microsoft Specific +**Microsoft specific** + +When the passed function is executed asynchronously, it executes on the Windows Thread Pool. For more information, see [Thread Pools](/windows/win32/procthread/thread-pools). The number of concurrent threads is limited to the thread pool default, which is 500 threads. + +Before Windows 11 and Windows Server 2022, applications were limited by default to a single processor group having at most 64 logical processors. This limited the number of concurrently executing threads to 64. For more information, see [Processor Groups](/windows/win32/procthread/processor-groups). -When the passed function is executed asynchronously, it's executed on Windows Thread Pool; see [Thread Pools](/windows/win32/procthread/thread-pools). The number of concurrent threads is limited to the thread pool default (currently 500). The number of threads concurrently executing on hardware is currently limited by the number of logical processor in the process's processor group, so it's effectively limited to 64; see [Processor Groups](/windows/win32/procthread/processor-groups). +Starting with Windows 11 and Windows Server 2022, processes and their threads have processor affinities that by default span all processors in the system and across multiple groups on machines with more than 64 processors. The limit on the number of concurrent threads is now the total number of logical processors in the system. ## `future_category` -Returns a reference to the [error_category](../standard-library/error-category-class.md) object that characterizes errors that are associated with `future` objects. +Returns a reference to the [`error_category`](../standard-library/error-category-class.md) object that characterizes errors that are associated with `future` objects. ```cpp const error_category& future_category() noexcept; @@ -82,7 +82,7 @@ inline error_code make_error_code(future_errc Errno) noexcept; ### Parameters *`Errno`*\ -A [future_errc](../standard-library/future-enums.md#future_errc) value that identifies the reported error. +A [`future_errc`](../standard-library/future-enums.md#future_errc) value that identifies the reported error. ### Return Value @@ -90,7 +90,7 @@ A [future_errc](../standard-library/future-enums.md#future_errc) value that iden ## `make_error_condition` -Creates an [error_condition](../standard-library/error-condition-class.md) together with the [error_category](../standard-library/error-category-class.md) object that characterizes [future](../standard-library/future-class.md) errors. +Creates an [`error_condition`](../standard-library/error-condition-class.md) together with the [`error_category`](../standard-library/error-category-class.md) object that characterizes [`future`](../standard-library/future-class.md) errors. ```cpp inline error_condition make_error_condition(future_errc Errno) noexcept; @@ -99,7 +99,7 @@ inline error_condition make_error_condition(future_errc Errno) noexcept; ### Parameters *`Errno`*\ -A [future_errc](../standard-library/future-enums.md#future_errc) value that identifies the reported error. +A [`future_errc`](../standard-library/future-enums.md#future_errc) value that identifies the reported error. ### Return Value diff --git a/docs/standard-library/hash-map-class.md b/docs/standard-library/hash-map-class.md index adb3a1e83e..61f681bca0 100644 --- a/docs/standard-library/hash-map-class.md +++ b/docs/standard-library/hash-map-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: hash_map Class" title: "hash_map Class" -ms.date: "11/04/2016" +description: "Learn more about: hash_map Class" +ms.date: 11/04/2016 f1_keywords: ["hash_map/stdext::hash_map", "hash_map/stdext::hash_map::allocator_type", "hash_map/stdext::hash_map::const_iterator", "hash_map/stdext::hash_map::const_pointer", "hash_map/stdext::hash_map::const_reference", "hash_map/stdext::hash_map::const_reverse_iterator", "hash_map/stdext::hash_map::difference_type", "hash_map/stdext::hash_map::iterator", "hash_map/stdext::hash_map::key_compare", "hash_map/stdext::hash_map::key_type", "hash_map/stdext::hash_map::mapped_type", "hash_map/stdext::hash_map::pointer", "hash_map/stdext::hash_map::reference", "hash_map/stdext::hash_map::reverse_iterator", "hash_map/stdext::hash_map::size_type", "hash_map/stdext::hash_map::value_type", "hash_map/stdext::hash_map::at", "hash_map/stdext::hash_map::begin", "hash_map/stdext::hash_map::cbegin", "hash_map/stdext::hash_map::cend", "hash_map/stdext::hash_map::clear", "hash_map/stdext::hash_map::count", "hash_map/stdext::hash_map::crbegin", "hash_map/stdext::hash_map::crend", "hash_map/stdext::hash_map::emplace", "hash_map/stdext::hash_map::emplace_hint", "hash_map/stdext::hash_map::empty", "hash_map/stdext::hash_map::end", "hash_map/stdext::hash_map::equal_range", "hash_map/stdext::hash_map::erase", "hash_map/stdext::hash_map::find", "hash_map/stdext::hash_map::get_allocator", "hash_map/stdext::hash_map::insert", "hash_map/stdext::hash_map::key_comp", "hash_map/stdext::hash_map::lower_bound", "hash_map/stdext::hash_map::max_size", "hash_map/stdext::hash_map::rbegin", "hash_map/stdext::hash_map::rend", "hash_map/stdext::hash_map::size", "hash_map/stdext::hash_map::swap", "hash_map/stdext::hash_map::upper_bound", "hash_map/stdext::hash_map::value_comp"] helpviewer_keywords: ["stdext::hash_map", "stdext::hash_map::allocator_type", "stdext::hash_map::const_iterator", "stdext::hash_map::const_pointer", "stdext::hash_map::const_reference", "stdext::hash_map::const_reverse_iterator", "stdext::hash_map::difference_type", "stdext::hash_map::iterator", "stdext::hash_map::key_compare", "stdext::hash_map::key_type", "stdext::hash_map::mapped_type", "stdext::hash_map::pointer", "stdext::hash_map::reference", "stdext::hash_map::reverse_iterator", "stdext::hash_map::size_type", "stdext::hash_map::value_type", "stdext::hash_map::at", "stdext::hash_map::begin", "stdext::hash_map::cbegin", "stdext::hash_map::cend", "stdext::hash_map::clear", "stdext::hash_map::count", "stdext::hash_map::crbegin", "stdext::hash_map::crend", "stdext::hash_map::emplace", "stdext::hash_map::emplace_hint", "stdext::hash_map::empty", "stdext::hash_map::end", "stdext::hash_map::equal_range", "stdext::hash_map::erase", "stdext::hash_map::find", "stdext::hash_map::get_allocator", "stdext::hash_map::insert", "stdext::hash_map::key_comp", "stdext::hash_map::lower_bound", "stdext::hash_map::max_size", "stdext::hash_map::rbegin", "stdext::hash_map::rend", "stdext::hash_map::size", "stdext::hash_map::swap", "stdext::hash_map::upper_bound", "stdext::hash_map::value_comp"] --- @@ -58,7 +58,7 @@ The choice of container type should be based in general on the type of searching The `hash_map` should be the associative container of choice when the conditions associating the values with their keys are satisfied by the application. A model for this type of structure is an ordered list of uniquely occurring keywords with associated string values providing, say, definitions. If, instead, the words had more than one correct definition, so that keys weren't unique, then a `hash_multimap` would be the container of choice. If, on the other hand, just the list of words were being stored, then a `hash_set` would be the correct container. If multiple occurrences of the words were allowed, then a `hash_multiset` would be the appropriate container structure. -The `hash_map` orders the sequence it controls by calling a stored hash *`Traits`* object of class [`value_compare`](../standard-library/value-compare-class.md). This stored object may be accessed by calling the member function [`key_comp`](#key_comp). Such a function object must behave the same as an object of class `hash_compare>`. Specifically, for all values *`Key`* of type *`Key`*, the call `Traits`( `Key` ) yields a distribution of values of type `size_t`. For more information, see [`hash_compare`](../standard-library/hash-compare-class.md). +The `hash_map` orders the sequence it controls by calling a stored hash *`Traits`* object of class [`value_compare`](../standard-library/value-compare-class.md). This stored object may be accessed by calling the member function [`key_comp`](#key_comp). Such a function object must behave the same as an object of class `hash_compare>`. Specifically, for all values *`Key`* of type *`Key`*, the call `Traits`(`Key`) yields a distribution of values of type `size_t`. For more information, see [`hash_compare`](../standard-library/hash-compare-class.md). In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they're equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate f(x y) is a function object that has two argument objects `x` and `y` and a return value of **`true`** or **`false`**. An ordering imposed on a `hash_map` is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects `x` and `y` are defined to be equivalent when both f(x, y) and f(y, x) are `false`. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. @@ -516,7 +516,7 @@ The data value of the first element in the hash_map is 10. A type that provides a bidirectional iterator that can read any **`const`** element in the `hash_map`. ```cpp -typedef list::const_reverse)iterator const_reverse_iterator; +typedef list::const_reverse_iterator const_reverse_iterator; ``` ### Remarks @@ -817,8 +817,8 @@ The [`hash_map::value_type`](#value_type) of an element is a pair, so that the v ```cpp // hash_map_emplace.cpp // compile with: /EHsc -#include -#include +#include +#include #include int main() @@ -878,8 +878,8 @@ Insertion can occur in amortized constant time, instead of logarithmic time, if ```cpp // hash_map_emplace_hint.cpp // compile with: /EHsc -#include -#include +#include +#include #include int main() @@ -1526,7 +1526,7 @@ The position just beyond the last element to be copied from a `hash_map`. The first `insert` member function returns a pair whose `bool` component returns `true` if an insertion was made and `false` if the `hash_map` already contained an element whose key had an equivalent value in the ordering, and whose iterator component returns the address where a new element was inserted or where the element was already located. -To access the iterator component of a pair `pr` returned by this member function, use `pr.first`, and to dereference it, use `(pr.first)`. To access the **`bool`** component of a pair `pr` returned by this member function, use `pr.second`, and to dereference it, use `\(pr.second)`. +To access the iterator component of a pair `pr` returned by this member function, use `pr.first`, and to dereference it, use `(pr.first)`. To access the **`bool`** component of a pair `pr` returned by this member function, use `pr.second`, and to dereference it, use `(pr.second)`. The second `insert` member function, the hint version, returns an iterator that points to the position where the new element was inserted into the `hash_map`. @@ -1545,8 +1545,8 @@ The third member function inserts the sequence of element values into a `hash_ma ```cpp // hash_map_insert.cpp // compile with: /EHsc -#include -#include +#include +#include #include int main() diff --git a/docs/standard-library/hash-map-functions.md b/docs/standard-library/hash-map-functions.md index 8cfca3016b..023610dd7e 100644 --- a/docs/standard-library/hash-map-functions.md +++ b/docs/standard-library/hash-map-functions.md @@ -1,16 +1,14 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["hash_map/std::swap", "hash_map/std::swap (hash_map)"] -ms.assetid: 28748cd0-71f7-41b9-b068-579183645fba --- # `` functions -[swap](#swap)\ -[swap (hash_map)](#swap_hash_map) +The `` header provides the following functions: -## swap (hash_map) +## `swap` (`hash_map`) > [!NOTE] > This API is obsolete. The alternative is [unordered_map Class](../standard-library/unordered-map-class.md). @@ -19,23 +17,23 @@ Exchanges the elements of two hash_maps. ```cpp void swap( - hash_map & left, + hash_map & left, hash_map & right); ``` ### Parameters -*right*\ -The hash_map whose elements are to be exchanged with those of the map *left*. +*`right`*\ +The hash_map whose elements are to be exchanged with those of the map *`left`*. -*left*\ -The hash_map whose elements are to be exchanged with those of the map *right*. +*`left`*\ +The hash_map whose elements are to be exchanged with those of the map *`right`*. ### Remarks -The template function is an algorithm specialized on the container class hash_map to execute the member function `left.`[swap](../standard-library/basic-ios-class.md#swap)*(right*). This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **template \ void swap(T&, T&)**, in the algorithm header file works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. +The template function is an algorithm specialized on the container class hash_map to execute the member function `left.`[`swap`](../standard-library/basic-ios-class.md#swap)(`right`). This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **`template void swap(T&, T&)`**, in the algorithm header file works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. -## swap +## `swap` > [!NOTE] > This API is obsolete. The alternative is [unordered_multimap Class](../standard-library/unordered-multimap-class.md). @@ -44,22 +42,22 @@ Exchanges the elements of two hash_multimaps. ```cpp void swap( - hash_multimap & left, + hash_multimap & left, hash_multimap & right); ``` ### Parameters -*right*\ -The hash_multimap whose elements are to be exchanged with those of the map *left*. +*`right`*\ +The `hash_multimap` whose elements are to be exchanged with those of the map *`left`*. -*left*\ -The hash_multimap whose elements are to be exchanged with those of the map *right*. +*`left`*\ +The `hash_multimap` whose elements are to be exchanged with those of the map *`right`*. ### Remarks -The template function is an algorithm specialized on the container class hash_multimap to execute the member function `left.`[swap](../standard-library/hash-multimap-class.md#swap)*(right*`)`. This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **template \ void swap(T&, T&)**, in the algorithm header file works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. +The template function is an algorithm specialized on the container class hash_multimap to execute the member function `left.`[`swap`](../standard-library/hash-multimap-class.md#swap)(`right`). This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **`template void swap(T&, T&)`**, in the algorithm header file works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. ## See also -[](../standard-library/hash-map.md) +[``](../standard-library/hash-map.md) diff --git a/docs/standard-library/hash-map-operators.md b/docs/standard-library/hash-map-operators.md index 4367ddecbe..1fc15813e1 100644 --- a/docs/standard-library/hash-map-operators.md +++ b/docs/standard-library/hash-map-operators.md @@ -1,16 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["hash_map/std::operator!=", "hash_map/std::operator=="] -ms.assetid: 24b9bb9e-e983-4060-bce5-2c7c8161ee61 --- # `` operators -[operator!=](#op_neq)\ -[operator!= (multimap)](#op_neq_mm)\ -[operator==](#op_eq_eq)\ -[operator== (multimap)](#op_eq_eq_mm) +The `` header provides the following operators: ## operator!= diff --git a/docs/standard-library/hash-multimap-class.md b/docs/standard-library/hash-multimap-class.md index ca2f5e5b1f..3884eb36cf 100644 --- a/docs/standard-library/hash-multimap-class.md +++ b/docs/standard-library/hash-multimap-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: hash_multimap Class" title: "hash_multimap Class" -ms.date: "10/18/2018" +description: "Learn more about: hash_multimap Class" +ms.date: 10/18/2018 f1_keywords: ["hash_map/stdext::hash_multimap", "hash_map/stdext::hash_multimap::allocator_type", "hash_map/stdext::hash_multimap::const_iterator", "hash_map/stdext::hash_multimap::const_pointer", "hash_map/stdext::hash_multimap::const_reference", "hash_map/stdext::hash_multimap::const_reverse_iterator", "hash_map/stdext::hash_multimap::difference_type", "hash_map/stdext::hash_multimap::iterator", "hash_map/stdext::hash_multimap::key_compare", "hash_map/stdext::hash_multimap::key_type", "hash_map/stdext::hash_multimap::mapped_type", "hash_map/stdext::hash_multimap::pointer", "hash_map/stdext::hash_multimap::reference", "hash_map/stdext::hash_multimap::reverse_iterator", "hash_map/stdext::hash_multimap::size_type", "hash_map/stdext::hash_multimap::value_type", "hash_map/stdext::hash_multimap::begin", "hash_map/stdext::hash_multimap::cbegin", "hash_map/stdext::hash_multimap::cend", "hash_map/stdext::hash_multimap::clear", "hash_map/stdext::hash_multimap::count", "hash_map/stdext::hash_multimap::crbegin", "hash_map/stdext::hash_multimap::crend", "hash_map/stdext::hash_multimap::emplace", "hash_map/stdext::hash_multimap::emplace_hint", "hash_map/stdext::hash_multimap::empty", "hash_map/stdext::hash_multimap::end", "hash_map/stdext::hash_multimap::equal_range", "hash_map/stdext::hash_multimap::erase", "hash_map/stdext::hash_multimap::find", "hash_map/stdext::hash_multimap::get_allocator", "hash_map/stdext::hash_multimap::insert", "hash_map/stdext::hash_multimap::key_comp", "hash_map/stdext::hash_multimap::lower_bound", "hash_map/stdext::hash_multimap::max_size", "hash_map/stdext::hash_multimap::rbegin", "hash_map/stdext::hash_multimap::rend", "hash_map/stdext::hash_multimap::size", "hash_map/stdext::hash_multimap::swap", "hash_map/stdext::hash_multimap::upper_bound", "hash_map/stdext::hash_multimap::value_comp"] helpviewer_keywords: ["stdext::hash_multimap", "stdext::hash_multimap::allocator_type", "stdext::hash_multimap::const_iterator", "stdext::hash_multimap::const_pointer", "stdext::hash_multimap::const_reference", "stdext::hash_multimap::const_reverse_iterator", "stdext::hash_multimap::difference_type", "stdext::hash_multimap::iterator", "stdext::hash_multimap::key_compare", "stdext::hash_multimap::key_type", "stdext::hash_multimap::mapped_type", "stdext::hash_multimap::pointer", "stdext::hash_multimap::reference", "stdext::hash_multimap::reverse_iterator", "stdext::hash_multimap::size_type", "stdext::hash_multimap::value_type", "stdext::hash_multimap::begin", "stdext::hash_multimap::cbegin", "stdext::hash_multimap::cend", "stdext::hash_multimap::clear", "stdext::hash_multimap::count", "stdext::hash_multimap::crbegin", "stdext::hash_multimap::crend", "stdext::hash_multimap::emplace", "stdext::hash_multimap::emplace_hint", "stdext::hash_multimap::empty", "stdext::hash_multimap::end", "stdext::hash_multimap::equal_range", "stdext::hash_multimap::erase", "stdext::hash_multimap::find", "stdext::hash_multimap::get_allocator", "stdext::hash_multimap::insert", "stdext::hash_multimap::key_comp", "stdext::hash_multimap::lower_bound", "stdext::hash_multimap::max_size", "stdext::hash_multimap::rbegin", "stdext::hash_multimap::rend", "stdext::hash_multimap::size", "stdext::hash_multimap::swap", "stdext::hash_multimap::upper_bound", "stdext::hash_multimap::value_comp"] -ms.assetid: f41a6db9-67aa-43a3-a3c5-dbfe9ec3ae7d --- # hash_multimap Class @@ -776,8 +775,8 @@ The [hash_multimap::value_type](#value_type) of an element is a pair, so that th ```cpp // hash_multimap_emplace.cpp // compile with: /EHsc -#include -#include +#include +#include #include int main() @@ -837,8 +836,8 @@ Insertion can occur in amortized constant time, instead of logarithmic time, if ```cpp // hash_multimap_emplace_hint.cpp // compile with: /EHsc -#include -#include +#include +#include #include int main() @@ -1005,7 +1004,7 @@ The argument key to be compared with the sort key of an element from the hash_mu A pair of iterators such that the first is the [lower_bound](#lower_bound) of the key and the second is the [upper_bound](#upper_bound) of the key. -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first** and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second** and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first** and to dereference the lower bound iterator, use \*(`pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second** and to dereference the upper bound iterator, use \*(`pr`. **second**). ### Remarks diff --git a/docs/standard-library/hash-multiset-class.md b/docs/standard-library/hash-multiset-class.md index 4c18f9e9e5..7b40ba2623 100644 --- a/docs/standard-library/hash-multiset-class.md +++ b/docs/standard-library/hash-multiset-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: hash_multiset Class" title: "hash_multiset Class" -ms.date: "11/04/2016" +description: "Learn more about: hash_multiset Class" +ms.date: 11/04/2016 f1_keywords: ["hash_set/stdext::hash_multiset", "hash_set/stdext::hash_multiset::allocator_type", "hash_set/stdext::hash_multiset::const_iterator", "hash_set/stdext::hash_multiset::const_pointer", "hash_set/stdext::hash_multiset::const_reference", "hash_set/stdext::hash_multiset::const_reverse_iterator", "hash_set/stdext::hash_multiset::difference_type", "hash_set/stdext::hash_multiset::iterator", "hash_set/stdext::hash_multiset::key_compare", "hash_set/stdext::hash_multiset::key_type", "hash_set/stdext::hash_multiset::pointer", "hash_set/stdext::hash_multiset::reference", "hash_set/stdext::hash_multiset::reverse_iterator", "hash_set/stdext::hash_multiset::size_type", "hash_set/stdext::hash_multiset::value_compare", "hash_set/stdext::hash_multiset::value_type", "hash_set/stdext::hash_multiset::begin", "hash_set/stdext::hash_multiset::cbegin", "hash_set/stdext::hash_multiset::cend", "hash_set/stdext::hash_multiset::clear", "hash_set/stdext::hash_multiset::count", "hash_set/stdext::hash_multiset::crbegin", "hash_set/stdext::hash_multiset::crend", "hash_set/stdext::hash_multiset::emplace", "hash_set/stdext::hash_multiset::emplace_hint", "hash_set/stdext::hash_multiset::empty", "hash_set/stdext::hash_multiset::end", "hash_set/stdext::hash_multiset::equal_range", "hash_set/stdext::hash_multiset::erase", "hash_set/stdext::hash_multiset::find", "hash_set/stdext::hash_multiset::get_allocator", "hash_set/stdext::hash_multiset::insert", "hash_set/stdext::hash_multiset::key_comp", "hash_set/stdext::hash_multiset::lower_bound", "hash_set/stdext::hash_multiset::max_size", "hash_set/stdext::hash_multiset::rbegin", "hash_set/stdext::hash_multiset::rend", "hash_set/stdext::hash_multiset::size", "hash_set/stdext::hash_multiset::swap", "hash_set/stdext::hash_multiset::upper_bound", "hash_set/stdext::hash_multiset::value_comp"] helpviewer_keywords: ["stdext::hash_multiset", "stdext::hash_multiset::allocator_type", "stdext::hash_multiset::const_iterator", "stdext::hash_multiset::const_pointer", "stdext::hash_multiset::const_reference", "stdext::hash_multiset::const_reverse_iterator", "stdext::hash_multiset::difference_type", "stdext::hash_multiset::iterator", "stdext::hash_multiset::key_compare", "stdext::hash_multiset::key_type", "stdext::hash_multiset::pointer", "stdext::hash_multiset::reference", "stdext::hash_multiset::reverse_iterator", "stdext::hash_multiset::size_type", "stdext::hash_multiset::value_compare", "stdext::hash_multiset::value_type", "stdext::hash_multiset::begin", "stdext::hash_multiset::cbegin", "stdext::hash_multiset::cend", "stdext::hash_multiset::clear", "stdext::hash_multiset::count", "stdext::hash_multiset::crbegin", "stdext::hash_multiset::crend", "stdext::hash_multiset::emplace", "stdext::hash_multiset::emplace_hint", "stdext::hash_multiset::empty", "stdext::hash_multiset::end", "stdext::hash_multiset::equal_range", "stdext::hash_multiset::erase", "stdext::hash_multiset::find", "stdext::hash_multiset::get_allocator", "stdext::hash_multiset::insert", "stdext::hash_multiset::key_comp", "stdext::hash_multiset::lower_bound", "stdext::hash_multiset::max_size", "stdext::hash_multiset::rbegin", "stdext::hash_multiset::rend", "stdext::hash_multiset::size", "stdext::hash_multiset::swap", "stdext::hash_multiset::upper_bound", "stdext::hash_multiset::value_comp"] -ms.assetid: 0580397a-a76e-40ad-aea2-5c6f3a9d0a21 --- # hash_multiset Class @@ -931,7 +930,7 @@ The argument key to be compared with the sort key of an element from the hash_mu A pair of iterators where the first is the [lower_bound](#lower_bound) of the key and the second is the [upper_bound](#upper_bound) of the key. -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first** and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second** and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first** and to dereference the lower bound iterator, use \*(`pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second** and to dereference the upper bound iterator, use \*(`pr`. **second**). ### Example @@ -1295,11 +1294,11 @@ hash_multiset( hash_multiset( hash_multiset&& Right -}; +); hash_multiset (initializer_list IList); hash_multiset( - initializer_list IList, const Compare& Comp): + initializer_list IList, const Compare& Comp): hash_multiset( initializer_list IList, const Compare& Comp, const Allocator& Al); diff --git a/docs/standard-library/hash-set-class.md b/docs/standard-library/hash-set-class.md index 703cd2f9c4..89d2607646 100644 --- a/docs/standard-library/hash-set-class.md +++ b/docs/standard-library/hash-set-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: hash_set Class" title: "hash_set Class" -ms.date: "11/04/2016" +description: "Learn more about: hash_set Class" +ms.date: 11/04/2016 f1_keywords: ["hash_set/stdext::hash_set", "hash_set/stdext::hash_set::allocator_type", "hash_set/stdext::hash_set::const_iterator", "hash_set/stdext::hash_set::const_pointer", "hash_set/stdext::hash_set::const_reference", "hash_set/stdext::hash_set::const_reverse_iterator", "hash_set/stdext::hash_set::difference_type", "hash_set/stdext::hash_set::iterator", "hash_set/stdext::hash_set::key_compare", "hash_set/stdext::hash_set::key_type", "hash_set/stdext::hash_set::pointer", "hash_set/stdext::hash_set::reference", "hash_set/stdext::hash_set::reverse_iterator", "hash_set/stdext::hash_set::size_type", "hash_set/stdext::hash_set::value_compare", "hash_set/stdext::hash_set::value_type", "hash_set/stdext::hash_set::begin", "hash_set/stdext::hash_set::cbegin", "hash_set/stdext::hash_set::cend", "hash_set/stdext::hash_set::clear", "hash_set/stdext::hash_set::count", "hash_set/stdext::hash_set::crbegin", "hash_set/stdext::hash_set::crend", "hash_set/stdext::hash_set::emplace", "hash_set/stdext::hash_set::emplace_hint", "hash_set/stdext::hash_set::empty", "hash_set/stdext::hash_set::end", "hash_set/stdext::hash_set::equal_range", "hash_set/stdext::hash_set::erase", "hash_set/stdext::hash_set::find", "hash_set/stdext::hash_set::get_allocator", "hash_set/stdext::hash_set::insert", "hash_set/stdext::hash_set::key_comp", "hash_set/stdext::hash_set::lower_bound", "hash_set/stdext::hash_set::max_size", "hash_set/stdext::hash_set::rbegin", "hash_set/stdext::hash_set::rend", "hash_set/stdext::hash_set::size", "hash_set/stdext::hash_set::swap", "hash_set/stdext::hash_set::upper_bound", "hash_set/stdext::hash_set::value_comp"] helpviewer_keywords: ["stdext::hash_set", "stdext::hash_set::allocator_type", "stdext::hash_set::const_iterator", "stdext::hash_set::const_pointer", "stdext::hash_set::const_reference", "stdext::hash_set::const_reverse_iterator", "stdext::hash_set::difference_type", "stdext::hash_set::iterator", "stdext::hash_set::key_compare", "stdext::hash_set::key_type", "stdext::hash_set::pointer", "stdext::hash_set::reference", "stdext::hash_set::reverse_iterator", "stdext::hash_set::size_type", "stdext::hash_set::value_compare", "stdext::hash_set::value_type", "stdext::hash_set::begin", "stdext::hash_set::cbegin", "stdext::hash_set::cend", "stdext::hash_set::clear", "stdext::hash_set::count", "stdext::hash_set::crbegin", "stdext::hash_set::crend", "stdext::hash_set::emplace", "stdext::hash_set::emplace_hint", "stdext::hash_set::empty", "stdext::hash_set::end", "stdext::hash_set::equal_range", "stdext::hash_set::erase", "stdext::hash_set::find", "stdext::hash_set::get_allocator", "stdext::hash_set::insert", "stdext::hash_set::key_comp", "stdext::hash_set::lower_bound", "stdext::hash_set::max_size", "stdext::hash_set::rbegin", "stdext::hash_set::rend", "stdext::hash_set::size", "stdext::hash_set::swap", "stdext::hash_set::upper_bound", "stdext::hash_set::value_comp"] -ms.assetid: c765c06e-cbb6-48c2-93ca-d15468eb28d7 --- # hash_set Class @@ -939,7 +938,7 @@ The argument key to be compared with the sort key of an element from the hash_se A pair of iterators where the first is the [lower_bound](../standard-library/set-class.md#lower_bound) of the key and the second is the [upper_bound](../standard-library/set-class.md#upper_bound) of the key. -To access the first iterator of a pair pr returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair pr returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*(`pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*(`pr`. **second**). ### Remarks @@ -1355,7 +1354,7 @@ All constructors initialize their hash_sets. All constructors store a function object of type `Traits` that is used to establish an order among the keys of the `hash_set` and that can later be returned by calling [hash_set::key_comp](#key_comp). For more information on `Traits` see the [hash_set Class](../standard-library/hash-set-class.md) topic. -The first constructor creates an empty initial `hash_set` The second specifies the type of comparison function ( `Comp`) to be used in establishing the order of the elements, and the third explicitly specifies the allocator type ( `Al`) to be used. The key word **`explicit`** suppresses certain kinds of automatic type conversion. +The first constructor creates an empty initial `hash_set` The second specifies the type of comparison function (`Comp`) to be used in establishing the order of the elements, and the third explicitly specifies the allocator type (`Al`) to be used. The key word **`explicit`** suppresses certain kinds of automatic type conversion. The fourth and fifth constructors specify a copy of the `hash_set` `Right`. diff --git a/docs/standard-library/hash-set-functions.md b/docs/standard-library/hash-set-functions.md index 2dd96536c7..43faa5b306 100644 --- a/docs/standard-library/hash-set-functions.md +++ b/docs/standard-library/hash-set-functions.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["hash_set/std::swap", "hash_set/std::swap (hash_multiset)"] -ms.assetid: 557a0162-3728-4537-97dc-f9f6cc7ece94 --- # `` functions -[swap](#swap)\ -[swap (hash_multiset)](#swap_hash_multiset) +The `` header provides the following functions: ## swap diff --git a/docs/standard-library/hash-set-operators.md b/docs/standard-library/hash-set-operators.md index dc6d86cb06..3ed14584a2 100644 --- a/docs/standard-library/hash-set-operators.md +++ b/docs/standard-library/hash-set-operators.md @@ -1,16 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "03/27/2019" +description: "Learn more about: operators" +ms.date: 03/27/2019 f1_keywords: ["hash_set/std::operator!=", "hash_set/std::operator=="] -ms.assetid: 403d8e4e-0b3f-43fb-bc5a-8100c4f331c5 --- # `` operators -[operator!=](#op_neq)\ -[operator!= (hash_multiset)](#op_neq_hash_multiset)\ -[operator==](#op_eq_eq)\ -[operator== (hash_multiset)](#op_eq_eq_hash_multiset) +The `` header provides the following operators: ## operator!= diff --git a/docs/standard-library/in-place-t-struct.md b/docs/standard-library/in-place-t-struct.md index 4e2312570f..b7c4cecc59 100644 --- a/docs/standard-library/in-place-t-struct.md +++ b/docs/standard-library/in-place-t-struct.md @@ -1,32 +1,108 @@ --- -description: "Learn more about: in_place_t Struct" -title: "in_place_t Struct" -ms.date: "11/04/2016" -f1_keywords: ["utility", "utility/std::in_place_t"] -helpviewer_keywords: ["utility struct"] +description: "Learn more about: in_place_t, in_place_type_t, in_place_index_t" +title: "in_place_t, in_place_type_t, in_place_index_t" +ms.date: 11/14/2024 +f1_keywords: ["utility/utility", "utility/std::in_place_t", "utility/utility", "utility/std::in_place_type_t", "utility", "utility/std::in_place_index_t"] +helpviewer_keywords: ["utility struct", "utility struct", "utility::in_place_type_t struct", "utility struct", "utility::in_place_index_t struct"] --- -# in_place_t Struct +# `in_place_t`, `in_place_type_t`, `in_place_index_t` struct + +Introduced in C++17. + +The `in_place_t`, `in_place_type_t`, and `in_place_index_t` tag types are used to select the overloaded constructor that creates the object in place in the desired way. For the types that use these tag types, they can also help avoid temporary copy or move operations. ## Syntax ```cpp -struct in_place_t { +struct in_place_t +{ explicit in_place_t() = default; }; inline constexpr in_place_t in_place{}; template - struct in_place_type_t { - explicit in_place_type_t() = default; - }; +struct in_place_type_t +{ + explicit in_place_type_t() = default; +}; -template inline constexpr in_place_type_t in_place_type{}; +template +constexpr in_place_type_t in_place_type{}; template - struct in_place_index_t { - explicit in_place_index_t() = default; - }; +struct in_place_index_t +{ + explicit in_place_index_t() = default; +}; -template inline constexpr in_place_index_t in_place_index{}; +template +constexpr in_place_index_t in_place_index{}; ``` + +## Parameters + +*`I`*\ +The index where the object is created in place. + +*`T`*\ +The type of object to create. + +## Remarks + +- `in_place_t` indicates in-place construction of an object. Used to create objects in place inside a `std::optional`. +- `in_place_type_t` indicates in-place construction of an object of a specific type. It's useful with `std::any` because `std::any` can hold any kind of type, so we need to specify the type it holds. +- `in_place_index_t` indicates in-place construction of an object at a specific index. Use with `std::variant` to specify the index where the object is created. + +The following class types use these structs in their constructors: `expected`, [`optional`](optional-class.md), [`single_view`](single-view-class.md), [`any`](any-class.md) or [`variant`](variant-class.md). + +## Example + +```cpp +#include +#include +#include +#include + +// compile with /std:c++17 + +struct MyStruct +{ + double value; + MyStruct(double v0, double v1 = 0) : value(v0 + v1) {} +}; + +int main() +{ + // Construct a MyStruct directly inside opt + std::optional opt(std::in_place, 29.0, 13.0); + + // Construct a MyStruct object inside an any object + std::any a(std::in_place_type, 3.14); + + // Construct a MyStruct object inside a vector at index 0 + std::variant v(std::in_place_index<0>, 2.718); + + if (opt) + { + std::cout << opt->value << ", "; + } + + std::cout << std::any_cast(a).value << ", " + << std::get<0>(v).value; + + return 0; +} +``` + +```output +42, 3.14, 2.718 +``` + +## Requirements + +**Header:** `` + +**Namespace:** `std` + +**Compiler Option:** [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) or later. \ No newline at end of file diff --git a/docs/standard-library/insert-iterator-class.md b/docs/standard-library/insert-iterator-class.md index 73196c2637..6932e17a30 100644 --- a/docs/standard-library/insert-iterator-class.md +++ b/docs/standard-library/insert-iterator-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: insert_iterator Class" title: "insert_iterator Class" +description: "Learn more about: insert_iterator Class" ms.date: 06/15/2022 f1_keywords: ["iterator/std::insert_iterator", "iterator/std::insert_iterator::container_type", "iterator/std::insert_iterator::reference"] helpviewer_keywords: ["std::insert_iterator [C++]", "std::insert_iterator [C++], container_type", "std::insert_iterator [C++], reference"] -ms.assetid: d5d86405-872e-4e3b-9e68-c69a2b7e8221 ms.custom: devdivchpfy22 --- @@ -293,7 +292,7 @@ Inserts a value into the container and returns the iterator updated to point to ```cpp insert_iterator& operator=( - typename Container::const_reference val,); + typename Container::const_reference val); insert_iterator& operator=( typename Container::value_type&& val); diff --git a/docs/standard-library/integer-sequence-class.md b/docs/standard-library/integer-sequence-class.md index 70820fc909..acd72f0396 100644 --- a/docs/standard-library/integer-sequence-class.md +++ b/docs/standard-library/integer-sequence-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: integer_sequence Class" title: "integer_sequence Class" +description: "Learn more about: integer_sequence Class" ms.date: "11/04/2016" f1_keywords: ["type_traits/std::index_sequence", "type_traits/std::make_index_sequence", "type_traits/std::integer_sequence", "type_traits/std::make_integer_sequence", "type_traits/std::index_sequence_for"] helpviewer_keywords: ["std::index_sequence", "std::make_index_sequence", "std::integer_sequence", "std::make_integer_sequence", "std::index_sequence_for"] -ms.assetid: 2cfdddee-819d-478e-bb78-c8a9c2696803 --- # integer_sequence Class @@ -40,7 +39,7 @@ A parameter pack that is passed directly to a function can be unpacked without a The following example is based on the original proposal [N3658](https://wg21.link/n3658). It shows how to use an `integer_sequence` to create a `std::tuple` from a `std::array`, and how to use an `integer_sequence` to get at the tuple members. -In the `a2t` function, an `index_sequence` is an alias of `integer_sequence` based on the `size_t` integral type. `make_index_sequence` is an alias that at compile time creates a zero-based `index_sequence` with the same number of elements as the array that is passed in by the caller. `a2t` passes the `index_sequence` by value to `a2t_` , where the expression `a[I]...` unpacks `I`, and then the elements are being fed to `make_tuple` which consumes them as individual arguments. For example, if the sequence contains three elements, then `make_tuple` is called as make_tuple(a[0], a[1], a[2]). The array elements themselves can of course be any type. +In the `a2t` function, an `index_sequence` is an alias of `integer_sequence` based on the `size_t` integral type. `make_index_sequence` is an alias that at compile time creates a zero-based `index_sequence` with the same number of elements as the array that is passed in by the caller. `a2t` passes the `index_sequence` by value to `a2t_`, where the expression `a[I]...` unpacks `I`, and then the elements are being fed to `make_tuple` which consumes them as individual arguments. For example, if the sequence contains three elements, then `make_tuple` is called as make_tuple(a[0], a[1], a[2]). The array elements themselves can of course be any type. The apply function accepts a [std::tuple](../standard-library/tuple-class.md), and produces an `integer_sequence` by using the `tuple_size` helper class. Note that [std::decay_t](../standard-library/decay-class.md) is necessary because [tuple_size](../standard-library/tuple-size-class-tuple.md) does not work with reference types. The `apply_` function unpacks the tuple members and forwards them as separate arguments to a function call. In this example the function is a simple lambda expression that prints out the values. diff --git a/docs/standard-library/iomanip-functions.md b/docs/standard-library/iomanip-functions.md index 3c821d8b77..64bf5ddc61 100644 --- a/docs/standard-library/iomanip-functions.md +++ b/docs/standard-library/iomanip-functions.md @@ -1,23 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: 11/19/2021 f1_keywords: ["iomanip/std::get_money", "iomanip/std::get_time", "iomanip/std::put_money", "iomanip/std::put_time", "iomanip/std::quoted", "iomanip/std::resetiosflags", "iomanip/std::setbase", "iomanip/std::setfill", "iomanip/std::setiosflags", "iomanip/std::setprecision", "iomanip/std::setw"] helpviewer_keywords: ["std::get_money [C++]", "std::get_time [C++]", "std::put_money [C++]", "std::put_time [C++]", "std::quoted [C++]", "std::resetiosflags [C++]", "std::setbase [C++]", "std::setfill [C++]", "std::setiosflags [C++]", "std::setprecision [C++]", "std::setw [C++]"] --- # `` functions -[`get_money`](#iomanip_get_money)\ -[`get_time`](#iomanip_get_time)\ -[`put_money`](#iomanip_put_money)\ -[`put_time`](#iomanip_put_time)\ -[`quoted`](#quoted)\ -[`resetiosflags`](#resetiosflags)\ -[`setbase`](#setbase)\ -[`setfill`](#setfill)\ -[`setiosflags`](#setiosflags)\ -[`setprecision`](#setprecision)\ -[`setw`](#setw) +The `` header provides the following functions: ## `get_money` @@ -648,4 +638,4 @@ l5 = 65536 ## See also -[``](../standard-library/iomanip.md) \ No newline at end of file +[``](../standard-library/iomanip.md) diff --git a/docs/standard-library/ios-functions.md b/docs/standard-library/ios-functions.md index 3f8e2af70c..458210579a 100644 --- a/docs/standard-library/ios-functions.md +++ b/docs/standard-library/ios-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["xiosbase/std::defaultfloat", "xiosbase/std::boolalpha", "xiosbase/std::dec", "ios/std::fixed", "ios/std::hex", "ios/std::internal", "ios/std::left", "ios/std::noboolalpha", "ios/std::noshowbase", "ios/std::noshowpoint", "ios/std::noshowpos", "ios/std::noskipws", "ios/std::nounitbuf", "ios/std::nouppercase", "ios/std::oct", "ios/std::right", "ios/std::scientific", "ios/std::showbase", "ios/std::showpoint", "ios/std::showpos", "ios/std::skipws", "ios/std::unitbuf", "ios/std::uppercase"] -ms.assetid: 1382d53f-e531-4b41-adf6-6a1543512e51 helpviewer_keywords: ["std::defaultfloat [C++]", "std::boolalpha [C++]", "std::dec [C++]", "std::fixed [C++]", "std::hex [C++]", "std::hexfloat [C++]", "std::io_errc [C++]", "std::internal [C++]", "std::iostream_category [C++]", "std::is_error_code_enum [C++]", "std::left [C++]", "std::make_error_code [C++]", "std::make_error_condition [C++]", "std::noboolalpha [C++]", "std::noshowbase [C++]", "std::noshowpoint [C++]", "std::noshowpos [C++]", "std::noskipws [C++]", "std::nounitbuf [C++]", "std::nouppercase [C++]", "std::oct [C++]", "std::right [C++]", "std::scientific [C++]", "std::showbase [C++]", "std::showpoint [C++]", "std::showpos [C++]", "std::skipws [C++]", "std::unitbuf [C++]", "std::uppercase [C++]"] --- # `` functions @@ -29,7 +28,7 @@ A reference to the object from which *str* is derived. By default, variables of type **`bool`** are displayed as 1 or 0. -`boolalpha` effectively calls `str.`[setf](../standard-library/ios-base-class.md#setf)( `ios_base::boolalpha`), and then returns *str*. +`boolalpha` effectively calls `str.`[setf](../standard-library/ios-base-class.md#setf)(`ios_base::boolalpha`), and then returns *str*. [noboolalpha](../standard-library/ios-functions.md#noboolalpha) reverses the effect of `boolalpha`. @@ -81,7 +80,7 @@ A reference to the object from which *str* is derived. By default, integer variables are displayed in base 10. -`dec` effectively calls `str.`[setf](../standard-library/ios-base-class.md#setf)( `ios_base::dec`, `ios_base::basefield`), and then returns *str*. +`dec` effectively calls `str.`[setf](../standard-library/ios-base-class.md#setf)(`ios_base::dec`, `ios_base::basefield`), and then returns *str*. ### Example @@ -151,7 +150,7 @@ A reference to the object from which *str* is derived. `fixed` is the default display notation for floating-point numbers. [scientific](../standard-library/ios-functions.md#scientific) causes floating-point numbers to be displayed using scientific notation. -The manipulator effectively calls *str*.[setf](../standard-library/ios-base-class.md#setf)( `ios_base::fixed`, `ios_base::floatfield` ), and then returns *str*. +The manipulator effectively calls *str*.[setf](../standard-library/ios-base-class.md#setf)(`ios_base::fixed`, `ios_base::floatfield`), and then returns *str*. ### Example @@ -199,7 +198,7 @@ A reference to the object from which *str* is derived. By default, integer variables are displayed in base 10 notation. [dec](../standard-library/ios-functions.md#dec) and [oct](../standard-library/ios-functions.md#oct) also change the way integer variables appear. -The manipulator effectively calls `str`**.**[setf](../standard-library/ios-base-class.md#setf)( `ios_base::hex`, `ios_base::basefield`), and then returns *str*. +The manipulator effectively calls `str`**.**[setf](../standard-library/ios-base-class.md#setf)(`ios_base::hex`, `ios_base::basefield`), and then returns *str*. ### Example diff --git a/docs/standard-library/iota-view-class.md b/docs/standard-library/iota-view-class.md index c54f71c12d..ecc936307c 100644 --- a/docs/standard-library/iota-view-class.md +++ b/docs/standard-library/iota-view-class.md @@ -67,7 +67,7 @@ This view is typically used to iterate over a series of values. For example: ```cpp for (int i : iota_view{1, 10}) // iterate over a view of the integers 1 through 9 { - std::cout << i << ’ ’; // 1 2 3 4 5 6 7 8 9 + std::cout << i << ' '; // 1 2 3 4 5 6 7 8 9 } ``` diff --git a/docs/standard-library/is-error-code-enum-class.md b/docs/standard-library/is-error-code-enum-class.md index 320d487d28..68b900c9dd 100644 --- a/docs/standard-library/is-error-code-enum-class.md +++ b/docs/standard-library/is-error-code-enum-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: is_error_code_enum Class" title: "is_error_code_enum Class" +description: "Learn more about: is_error_code_enum Class" ms.date: "11/04/2016" f1_keywords: ["system_error/std::is_error_code_enum"] helpviewer_keywords: ["is_error_code_enum class"] -ms.assetid: cee5be2d-7c20-4cec-a352-1ab8b7d32601 --- # is_error_code_enum Class @@ -13,8 +12,8 @@ Represents a type predicate that tests for the [error_code](../standard-library/ ## Syntax ```cpp -template <_Enum> - class is_error_code_enum; +template +struct is_error_code_enum; ``` ## Remarks diff --git a/docs/standard-library/is-error-condition-enum-class.md b/docs/standard-library/is-error-condition-enum-class.md index cf277036fe..f5599c93e1 100644 --- a/docs/standard-library/is-error-condition-enum-class.md +++ b/docs/standard-library/is-error-condition-enum-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: is_error_condition_enum Class" title: "is_error_condition_enum Class" +description: "Learn more about: is_error_condition_enum Class" ms.date: "11/04/2016" f1_keywords: ["system_error/std::is_error_condition_enum"] helpviewer_keywords: ["is_error_condition_enum class"] -ms.assetid: 752bb87a-c61c-4304-9254-5aaf228b59c0 --- # is_error_condition_enum Class @@ -13,8 +12,8 @@ Represents a type predicate that tests for the [error_condition](../standard-lib ## Syntax ```cpp -template <_Enum> - class is_error_condition_enum; +template +struct is_error_condition_enum; ``` ## Remarks diff --git a/docs/standard-library/istream-functions.md b/docs/standard-library/istream-functions.md index 5393a82b01..8c6d33665e 100644 --- a/docs/standard-library/istream-functions.md +++ b/docs/standard-library/istream-functions.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["istream/std::swap", "istream/std::ws"] -ms.assetid: 0301ea0d-4ded-4841-83dd-4253b55b3188 --- # `` functions -[swap](#istream_swap)\ -[ws](#ws) +The `` header provides the following functions: ## swap diff --git a/docs/standard-library/istream-iterator-class.md b/docs/standard-library/istream-iterator-class.md index 7e0a116ca6..4961861016 100644 --- a/docs/standard-library/istream-iterator-class.md +++ b/docs/standard-library/istream-iterator-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: istream_iterator Class" title: "istream_iterator Class" +description: "Learn more about: istream_iterator Class" ms.date: 06/15/2022 f1_keywords: ["iterator/std::istream_iterator", "iterator/std::istream_iterator::char_type", "iterator/std::istream_iterator::istream_type", "iterator/std::istream_iterator::traits_type"] helpviewer_keywords: ["std::istream_iterator [C++]", "std::istream_iterator [C++], char_type", "std::istream_iterator [C++], istream_type", "std::istream_iterator [C++], traits_type"] -ms.assetid: fb52a8cd-7f71-48d1-b73e-4b064e2a8d16 ms.custom: devdivchpfy22 --- @@ -160,7 +159,7 @@ int main( ) istream_iterator intvecRead ( cin ); // Default constructor will test equal to end of stream - // for delimiting source range of vecor + // for delimiting source range of vector copy ( intvecRead , istream_iterator( ) , vec.begin ( ) ); cin.clear ( ); diff --git a/docs/standard-library/istream-typedefs.md b/docs/standard-library/istream-typedefs.md index 2fb9ef751e..9d43bdeaa1 100644 --- a/docs/standard-library/istream-typedefs.md +++ b/docs/standard-library/istream-typedefs.md @@ -1,16 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["istream/std::iostream", "istream/std::istream", "istream/std::wiostream", "istream/std::wistream"] -ms.assetid: 55bc1f84-53a7-46ca-a36f-ac6ef75d0374 --- # `` typedefs -[iostream](#iostream)\ -[istream](#istream)\ -[wiostream](#wiostream)\ -[wistream](#wistream) +The `` header provides the following typedefs: ## iostream diff --git a/docs/standard-library/iterator-concepts.md b/docs/standard-library/iterator-concepts.md index b26c47b97a..027dd4b630 100644 --- a/docs/standard-library/iterator-concepts.md +++ b/docs/standard-library/iterator-concepts.md @@ -1,6 +1,6 @@ --- -description: "Learn more about iterator concepts." title: "Iterator concepts" +description: "Learn more about iterator concepts." ms.date: 12/16/2022 f1_keywords: ["ranges/std::ranges::range", "ranges/std::ranges::bidirectional_iterator", "ranges/std::ranges::borrowed_iterator", "ranges/std::ranges::common_iterator", "ranges/std::ranges::contiguous_iterator", "ranges/std::ranges::forward_iterator", "ranges/std::ranges::input_iterator", "ranges/std::ranges::output_iterator", "ranges/std::ranges::random_access_iterator", "ranges/std::ranges::simple_view", "ranges/std::ranges::sized_iterator", "ranges/std::ranges::view", "ranges/std::ranges::viewable_iterator"] helpviewer_keywords: ["std::ranges [C++], ranges::range", "std::ranges [C++], ranges::bidirectional_iterator", "std::ranges [C++], ranges::borrowed_iterator", "std::ranges [C++], ranges::common_iterator", "std::ranges [C++], ranges::contiguous_iterator", "std::ranges [C++], ranges::forward_iterator", "std::ranges [C++], ranges::input_iterator", "std::ranges [C++], ranges::output_iterator", "std::ranges [C++], ranges::random_access_iterator", "std::ranges [C++], ranges::simple_view", "std::ranges [C++], ranges::sized_iterator", "std::ranges [C++], ranges::view", "std::ranges [C++], ranges::viewable_iterator"] @@ -70,7 +70,7 @@ In the following table, "Example types" refers to collections/iterators that sat | [`forward_iterator`](#forward_iterator)C++20 | Specifies an iterator that can read (and possibly write) multiple times. | Forward | Read/write | yes | `vector`, `list` | | [`bidirectional_iterator`](#bidirectional_iterator)C++20 | Specifies an iterator that you can read and write both forwards and backwards. | Forward or backward | Read/write | yes | `list`, `set`, `multiset`, `map`, and `multimap`. | | [`random_access_iterator`](#random_access_iterator)C++20 | Specifies an iterator that you can read and write by index. | Forward or backward | Read/write | yes | `vector`, `array`, `deque` | -| [`contiguous_iterator`](#contiguous_iterator)C++20 | Specifies an iterator whose elements are sequential in memory, are the same size, and can be accessed using pointer arithmetic. | Forward or backward | Read/write | yes | `array`, `vector` `string`.| +| [`contiguous_iterator`](#contiguous_iterator)C++20 | Specifies an iterator whose elements are sequential in memory, are the same size, and can be accessed using pointer arithmetic. | Forward or backward | Read/write | yes | `array`, `vector`, `string`.| Other iterator concepts include: diff --git a/docs/standard-library/iterator-functions.md b/docs/standard-library/iterator-functions.md index c9046156cd..99b7df088f 100644 --- a/docs/standard-library/iterator-functions.md +++ b/docs/standard-library/iterator-functions.md @@ -386,7 +386,7 @@ The sentinel follows the last element in a reversed view of the container. :::image type="content" source="media/crbegin-crend-sentinel.png" alt-text="Picture of a vector containing the elements 10, 20, and 30. There's an imaginary box before the leftmost element (the leftmost element contains the number 10) that represents the sentinel. It's labeled crend(). The first element in the vector contains the number 10, and is labeled 'last element'. The rightmost element in the vector contains 30 and is labeled crbegin()."::: -### `crend`example +### `crend` example ```cpp #include @@ -1096,7 +1096,7 @@ A reverse iterator to the sentinel at the end of the container. The sentinel fol :::image type="content" source="media/rbegin-rend-sentinel.png" alt-text="Picture of a vector containing the elements 10, 20, and 30. There's an imaginary box before the leftmost element (the leftmost element contains the number 10) that represents the sentinel. It's labeled rend(). The first element in the vector contains the number 10, and is labeled 'last element'. The rightmost element in the vector contains 30 and is labeled rbegin()."::: -### `rend`example +### `rend` example ```cpp #include diff --git a/docs/standard-library/lazy-split-view-class.md b/docs/standard-library/lazy-split-view-class.md index c910a9bb5e..1736de4824 100644 --- a/docs/standard-library/lazy-split-view-class.md +++ b/docs/standard-library/lazy-split-view-class.md @@ -236,6 +236,6 @@ The sentinel that follows the last element in the view: ## See also [``](ranges.md)\ -[`lazy_split` range adaptor](range-adaptors.md#lazy_split) +[`lazy_split` range adaptor](range-adaptors.md#lazy_split)\ [`split_view` class](split-view-class.md)\ [view classes](view-classes.md) diff --git a/docs/standard-library/leap-second-info-struct.md b/docs/standard-library/leap-second-info-struct.md index 3f2508e219..fe7095c841 100644 --- a/docs/standard-library/leap-second-info-struct.md +++ b/docs/standard-library/leap-second-info-struct.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: leap_second_info struct" title: "leap_second_info struct" +description: "Learn more about: leap_second_info struct" ms.date: 05/31/2022 f1_keywords: ["chrono/std::chrono::leap_second_info", "chrono/std::chrono::leap_second_info::is_leap_second", "chrono/std::chrono::leap_second_info::elapsed"] helpviewer_keywords: ["std::chrono [C++], leap_second_info struct", "std::chrono::leap_second_info::date function", "std::chrono::leap_second_info::value function"] @@ -20,7 +20,7 @@ struct leap_second_info; // C++20 | Name | Description | |--|--| | `is_leap_second` | The `is_leap_second` member is **`true`** only if the specified time point occurs during the insertion of a positive leap second. | -| `elapsed` | The `elapsed` member holds the sum of all the leap seconds between the epoch date (the starting date from which the clock measures time) `1970-01-01`and the specified time. If `is_leap_second` is **`true`**, the leap second referred to by the specified time is included in the `elapsed` sum. | +| `elapsed` | The `elapsed` member holds the sum of all the leap seconds between the epoch date (the starting date from which the clock measures time) `1970-01-01` and the specified time. If `is_leap_second` is **`true`**, the leap second referred to by the specified time is included in the `elapsed` sum. | ## Requirements diff --git a/docs/standard-library/limits-enums.md b/docs/standard-library/limits-enums.md index b94c4afc32..791135fc34 100644 --- a/docs/standard-library/limits-enums.md +++ b/docs/standard-library/limits-enums.md @@ -1,21 +1,24 @@ --- -description: "Learn more about: enums" title: " enums" -ms.date: "11/04/2016" +description: "Learn more about: enums" +ms.date: 11/04/2016 f1_keywords: ["limits/std::float_denorm_style", "limits/std::float_round_style"] -ms.assetid: c86680a2-ba97-4ed9-8c20-a448857d7dc5 --- # `` enums -## float_denorm_style +The `` header provides the following enums: + +## `float_denorm_style` The enumeration describes the various methods that an implementation can choose for representing a denormalized floating-point value — one too small to represent as a normalized value: ```cpp -enum float_denorm_style { +enum float_denorm_style +{ denorm_indeterminate = -1, denorm_absent = 0, - denorm_present = 1 }; + denorm_present = 1 +}; ``` ### Return Value @@ -23,26 +26,26 @@ enum float_denorm_style { The enumeration returns: - `denorm_indeterminate` if the presence or absence of denormalized forms cannot be determined at translation time. - - `denorm_absent` if denormalized forms are absent. - - `denorm_present` if denormalized forms are present. ### Example -See [numeric_limits::has_denorm](../standard-library/numeric-limits-class.md#has_denorm) for an example in which the values of this enumeration may be accessed. +See [`numeric_limits::has_denorm`](numeric-limits-class.md#has_denorm) for an example in which the values of this enumeration may be accessed. -## float_round_style +## `float_round_style` The enumeration describes the various methods that an implementation can choose for rounding a floating-point value to an integer value. ```cpp -enum float_round_style { +enum float_round_style +{ round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, - round_toward_neg_infinity = 3 }; + round_toward_neg_infinity = 3 +}; ``` ### Return Value @@ -50,15 +53,11 @@ enum float_round_style { The enumeration returns: - `round_indeterminate` if the rounding method cannot be determined. - - `round_toward_zero` if the round toward zero. - - `round_to_nearest` if the round to nearest integer. - - `round_toward_infinity` if the round away from zero. - - `round_toward_neg_infinity` if the round to more negative integer. ### Example -See [numeric_limits::round_style](../standard-library/numeric-limits-class.md#round_style) for an example in which the values of this enumeration may be accessed. +See [`numeric_limits::round_style`](numeric-limits-class.md#round_style) for an example in which the values of this enumeration may be accessed. diff --git a/docs/standard-library/local_t.md b/docs/standard-library/local_t.md index e856ae1976..b4d78f004b 100644 --- a/docs/standard-library/local_t.md +++ b/docs/standard-library/local_t.md @@ -1,8 +1,8 @@ --- -description: "Learn more about: local_t struct" title: "local_t struct" +description: "Learn more about: local_t struct" ms.date: 09/02/2021 -f1_keywords: ["chrono/std::chrono::local_t", chrono/std::chrono::local_t:local_time", "chrono/std::chrono::local_days", "chrono/std::chrono::local_seconds"] +f1_keywords: ["chrono/std::chrono::local_t", chrono/std::chrono::local_time", "chrono/std::chrono::local_days", "chrono/std::chrono::local_seconds"] helpviewer_keywords: ["std::chrono [C++], local_t"] dev_langs: ["C++"] --- @@ -34,7 +34,7 @@ As an example of how `local_t` is used, consider the declaration `local_days ld{ |Name|Description| |----------|-----------------| -|`local_days`|A synonym for l`local_time`. Defined in `std::chrono`.| +|`local_days`|A synonym for `local_time`. Defined in `std::chrono`.| |`local_seconds`|A synonym for `local_time`. Defined in `std::chrono`.| |`local_time`|A synonym for `template using local_time = time_point`. Useful for representing a `time_point` for a local time. You specify the `Duration`. Defined in `std::chrono`.| diff --git a/docs/standard-library/locale-functions.md b/docs/standard-library/locale-functions.md index cf168fad5d..98ff04ced7 100644 --- a/docs/standard-library/locale-functions.md +++ b/docs/standard-library/locale-functions.md @@ -1,28 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["locale/std::has_facet", "locale/std::isalnum", "locale/std::isalpha", "locale/std::iscntrl", "locale/std::isdigit", "locale/std::isgraph", "locale/std::islower", "locale/std::isprint", "locale/std::ispunct", "locale/std::isspace", "locale/std::isupper", "locale/std::isxdigit", "locale/std::tolower", "locale/std::toupper", "locale/std::use_facet"] -ms.assetid: b06c1ceb-33a7-48d3-8d4b-2714bbb27f14 helpviewer_keywords: ["std::has_facet [C++]", "std::isalnum [C++]", "std::isalpha [C++]", "std::iscntrl [C++]", "std::isdigit [C++]", "std::isgraph [C++]", "std::islower [C++]", "std::isprint [C++]", "std::ispunct [C++]", "std::isspace [C++]", "std::isupper [C++]", "std::isxdigit [C++]", "std::tolower [C++]", "std::toupper [C++]", "std::use_facet [C++]"] --- # `` functions -[has_facet](#has_facet)\ -[isalnum](#isalnum)\ -[isalpha](#isalpha)\ -[iscntrl](#iscntrl)\ -[isdigit](#isdigit)\ -[isgraph](#isgraph)\ -[islower](#islower)\ -[isprint](#isprint)\ -[ispunct](#ispunct)\ -[isspace](#isspace)\ -[isupper](#isupper)\ -[isxdigit](#isxdigit)\ -[tolower](#tolower)\ -[toupper](#toupper)\ -[use_facet](#use_facet) +The `` header provides the following functions: ## has_facet @@ -157,7 +142,7 @@ The locale containing the alphabetic element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **alpha**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **alpha**, `Ch`). ### Example @@ -222,7 +207,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **cntrl**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **cntrl**, `Ch`). ### Example @@ -287,7 +272,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **digit**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **digit**, `Ch`). ### Example @@ -352,7 +337,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **graph**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **graph**, `Ch`). ### Example @@ -417,7 +402,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **lower**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **lower**, `Ch`). ### Example @@ -482,7 +467,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **print**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **print**, `Ch`). ### Example @@ -546,7 +531,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)`<`[ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **punct**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)`<`[ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **punct**, `Ch`). ### Example @@ -611,7 +596,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **space**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **space**, `Ch`). ### Example @@ -676,7 +661,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **upper**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **upper**, `Ch`). ### Example @@ -741,7 +726,7 @@ The locale containing the element to be tested. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **xdigit**, `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [is](../standard-library/ctype-class.md#is)( **ctype**\< **CharType**>:: **xdigit**, `Ch`). Hexadecimal digits use base 16 to represent numbers, using the numbers 0 through 9 plus case-insensitive letters A through F to represent the decimal numbers 0 through 15. @@ -808,7 +793,7 @@ The character converted to lower case. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [tolower](../standard-library/ctype-class.md#tolower)( `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [tolower](../standard-library/ctype-class.md#tolower)(`Ch`). ### Example @@ -857,7 +842,7 @@ The character converted to upper case. ### Remarks -The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >( `Loc`). [toupper](../standard-library/ctype-class.md#toupper)( `Ch`). +The template function returns [use_facet](../standard-library/locale-functions.md#use_facet)< [ctype](../standard-library/ctype-class.md)\< **CharType**> >(`Loc`). [toupper](../standard-library/ctype-class.md#toupper)(`Ch`). ### Example diff --git a/docs/standard-library/logical-or-struct.md b/docs/standard-library/logical-or-struct.md index 52d4190245..47d9f120cb 100644 --- a/docs/standard-library/logical-or-struct.md +++ b/docs/standard-library/logical-or-struct.md @@ -1,14 +1,13 @@ --- -description: "Learn more about: logical_or Struct" title: "logical_or Struct" -ms.date: "11/04/2016" +description: "Learn more about: logical_or Struct" +ms.date: 11/04/2016 f1_keywords: ["functional/std::logical_or"] helpviewer_keywords: ["logical_or class", "logical_or struct"] -ms.assetid: ec8143f8-5755-4e7b-8025-507fb6bf6911 --- # logical_or Struct -A predefined function object that performs the logical disjunction operation ( `operator||`) on its arguments. +A predefined function object that performs the logical disjunction operation (`operator||`) on its arguments. ## Syntax diff --git a/docs/standard-library/map-class.md b/docs/standard-library/map-class.md index 264d13d1e0..c630e1c415 100644 --- a/docs/standard-library/map-class.md +++ b/docs/standard-library/map-class.md @@ -1,7 +1,7 @@ --- title: "map Class" description: "API reference for the C++ Standard Template Library (STL) `map` class, which is used for the storage and retrieval of data from a collection in which each element is a pair that has both a data value and a sort key." -ms.date: "9/10/2020" +ms.date: 9/10/2020 f1_keywords: ["map/std::map", "map/std::map::allocator_type", "map/std::map::const_iterator", "map/std::map::const_pointer", "map/std::map::const_reference", "map/std::map::const_reverse_iterator", "map/std::map::difference_type", "map/std::map::iterator", "map/std::map::key_compare", "map/std::map::key_type", "map/std::map::mapped_type", "map/std::map::pointer", "map/std::map::reference", "map/std::map::reverse_iterator", "map/std::map::size_type", "map/std::map::value_type", "map/std::map::at", "map/std::map::begin", "map/std::map::cbegin", "map/std::map::cend", "map/std::map::clear", "map/std::map::count", "map/std::map::contains", "map/std::map::crbegin", "map/std::map::crend", "map/std::map::emplace", "map/std::map::emplace_hint", "map/std::map::empty", "map/std::map::end", "map/std::map::equal_range", "map/std::map::erase", "map/std::map::find", "map/std::map::get_allocator", "map/std::map::insert", "map/std::map::key_comp", "map/std::map::lower_bound", "map/std::map::max_size", "map/std::map::rbegin", "map/std::map::rend", "map/std::map::size", "map/std::map::swap", "map/std::map::upper_bound", "map/std::map::value_comp"] helpviewer_keywords: ["std::map [C++]", "std::map [C++], allocator_type", "std::map [C++], const_iterator", "std::map [C++], const_pointer", "std::map [C++], const_reference", "std::map [C++], const_reverse_iterator", "std::map [C++], difference_type", "std::map [C++], iterator", "std::map [C++], key_compare", "std::map [C++], key_type", "std::map [C++], mapped_type", "std::map [C++], pointer", "std::map [C++], reference", "std::map [C++], reverse_iterator", "std::map [C++], size_type", "std::map [C++], value_type", "std::map [C++], at", "std::map [C++], begin", "std::map [C++], cbegin", "std::map [C++], cend", "std::map [C++], clear", "std::map [C++], count", "std::map [C++], contains", "std::map [C++], crbegin", "std::map [C++], crend", "std::map [C++], emplace", "std::map [C++], emplace_hint", "std::map [C++], empty", "std::map [C++], end", "std::map [C++], equal_range", "std::map [C++], erase", "std::map [C++], find", "std::map [C++], get_allocator", "std::map [C++], insert", "std::map [C++], key_comp", "std::map [C++], lower_bound", "std::map [C++], max_size", "std::map [C++], rbegin", "std::map [C++], rend", "std::map [C++], size", "std::map [C++], swap", "std::map [C++], upper_bound", "std::map [C++], value_comp"] --- @@ -32,7 +32,7 @@ The element data type to be stored in the `map`. *`Traits`*\ The type that provides a function object that can compare two element values as sort keys to determine their relative order in the `map`. This argument is optional and the binary predicate `less` is the default value. -In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. *`Allocator`*\ The type that represents the stored allocator object that encapsulates details about the map's allocation and deallocation of memory. This argument is optional and the default value is `allocator >`. @@ -64,7 +64,7 @@ The map orders the elements it controls by calling a stored function object of t > [!NOTE] > The comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate f(x,y) is a function object that has two argument objects x and y, and a return value of **`true`** or **`false`**. An ordering imposed on a set is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive, and if equivalence is transitive, where two objects x and y are defined to be equivalent when both f(x,y) and f(y,x) are **`false`**. If the stronger condition of equality between keys replaces that of equivalence, the ordering becomes total (in the sense that all the elements are ordered with regard to one other), and the keys matched will be indiscernible from one other. > -> In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +> In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ## Members @@ -552,7 +552,7 @@ The element's key value to look for. `contains()` is new in C++20. To use it, specify the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option. -`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](./stl-containers.md#heterogeneous-lookup-in-associative-containers-c14) for more information. +`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ### Example @@ -991,7 +991,7 @@ The argument key value to be compared with the sort key of an element from the m ### Return Value -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*(`pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*(`pr`. **second**). ### Example diff --git a/docs/standard-library/map-functions.md b/docs/standard-library/map-functions.md index 29e85f2cf3..6567b76e85 100644 --- a/docs/standard-library/map-functions.md +++ b/docs/standard-library/map-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["map/std::swap (map)", "map/std::swap (multimap)"] -ms.assetid: 7cb3d1a5-7add-4726-a73f-61927eafd466 --- # `` functions @@ -14,8 +13,8 @@ Exchanges the elements of two maps. ```cpp template void swap( - map& left, - map& right); + map& left, + map& right); ``` ### Parameters @@ -28,7 +27,7 @@ The map whose elements are to be exchanged with those of the map *right*. ### Remarks -The template function is an algorithm specialized on the container class map to execute the member function `left`.[swap](../standard-library/map-class.md#swap)( `right`). This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **`template`** \< **class T**> **void swap**( **T&**, **T&**), in the algorithm class works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. +The template function is an algorithm specialized on the container class map to execute the member function `left`.[swap](../standard-library/map-class.md#swap)(`right`). This is an instance of the partial ordering of function templates by the compiler. When template functions are overloaded in such a way that the match of the template with the function call is not unique, then the compiler will select the most specialized version of the template function. The general version of the template function, **`template`** \< **class T**> **void swap**( **T&**, **T&**), in the algorithm class works by assignment and is a slow operation. The specialized version in each container is much faster as it can work with the internal representation of the container class. ### Example @@ -41,8 +40,8 @@ Exchanges the elements of two multimaps. ```cpp template void swap( - multimap& left, - multimap& right); + multimap& left, + multimap& right); ``` ### Parameters diff --git a/docs/standard-library/memory-functions.md b/docs/standard-library/memory-functions.md index 7476c9e8b9..5163c789b0 100644 --- a/docs/standard-library/memory-functions.md +++ b/docs/standard-library/memory-functions.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "08/05/2019" +description: "Learn more about: functions" +ms.date: 08/05/2019 f1_keywords: ["memory/std::addressof", "memory/std::align", "memory/std::allocate_shared", "memory/std::const_pointer_cast", "memory/std::declare_no_pointers", "memory/std::declare_reachable", "memory/std::dynamic_pointer_cast", "memory/std::get_deleter", "memory/std::get_pointer_safety", "memory/std::get_temporary_buffer", "xmemory/std::get_temporary_buffer", "memory/std::make_shared", "memory/std::make_unique", "memory/std::owner_less", "memory/std::reinterpret_pointer_cast", "memory/std::return_temporary_buffer", "xmemory/std::return_temporary_buffer", "memory/std::static_pointer_cast", "memory/std::swap", "memory/std::undeclare_no_pointers", "memory/std::undeclare_reachable", "memory/std::uninitialized_copy", "memory/std::uninitialized_copy_n", "memory/std::uninitialized_fill", "memory/std::uninitialized_fill_n"] -ms.assetid: 3e1898c2-44b7-4626-87ce-84962e4c6f1a helpviewer_keywords: ["std::addressof [C++]", "std::align [C++]", "std::allocate_shared [C++]", "std::const_pointer_cast [C++]", "std::declare_no_pointers [C++]", "std::declare_reachable [C++]", "std::default_delete [C++]", "std::dynamic_pointer_cast [C++]", "std::get_deleter [C++]", "std::get_pointer_safety [C++]", "std::get_temporary_buffer [C++]", "std::make_shared [C++]", "std::make_unique [C++]", "std::owner_less [C++]", "std::return_temporary_buffer [C++]", "std::static_pointer_cast [C++]", "std::swap [C++]", "std::undeclare_no_pointers [C++]", "std::undeclare_reachable [C++]", "std::uninitialized_copy [C++]", "std::uninitialized_copy_n [C++]", "std::uninitialized_fill [C++]", "std::uninitialized_fill_n [C++]", "std::addressof [C++]", "std::align [C++]", "std::allocate_shared [C++]", "std::const_pointer_cast [C++]", "std::declare_no_pointers [C++]", "std::declare_reachable [C++]", "std::default_delete [C++]", "std::dynamic_pointer_cast [C++]", "std::get_deleter [C++]", "std::get_pointer_safety [C++]", "std::get_temporary_buffer [C++]", "std::make_shared [C++]", "std::make_unique [C++]", "std::owner_less [C++]", "std::return_temporary_buffer [C++]", "std::static_pointer_cast [C++]", "std::undeclare_no_pointers [C++]", "std::undeclare_reachable [C++]", "std::uninitialized_copy [C++]", "std::uninitialized_copy_n [C++]", "std::uninitialized_fill [C++]", "std::uninitialized_fill_n [C++]"] --- # `` functions +The `` header provides the following functions: + ## `addressof` Gets the true address of an object. @@ -768,6 +769,7 @@ struct owner_less> template struct owner_less> +{ bool operator()( const weak_ptr& left, const weak_ptr& right) const noexcept; diff --git a/docs/standard-library/memory-operators.md b/docs/standard-library/memory-operators.md index 0ae10aa886..6fb628d3e2 100644 --- a/docs/standard-library/memory-operators.md +++ b/docs/standard-library/memory-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["memory/std::operator!=", "memory/std::operator>", "memory/std::operator>=", "memory/std::operator<", "memory/std::operator<=", "memory/std::operator<<", "memory/std::operator=="] -ms.assetid: 257e3ba9-c4c2-4ae8-9b11-b156ba9c28de --- # `` operators @@ -127,7 +126,7 @@ bool operator==( template bool operator==( - const shared_ptr& left;, + const shared_ptr& left, const shared_ptr& right); ``` @@ -330,7 +329,7 @@ Tests for one object being greater than a second object. template bool operator>( const unique_ptr& left, - const unique_ptr& right); template bool operator>( diff --git a/docs/standard-library/messages-byname-class.md b/docs/standard-library/messages-byname-class.md index cf22a906dd..fe6b2c1f59 100644 --- a/docs/standard-library/messages-byname-class.md +++ b/docs/standard-library/messages-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: messages_byname Class" title: "messages_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: messages_byname Class" +ms.date: 11/04/2016 f1_keywords: ["xlocmes/std::messages_byname"] helpviewer_keywords: ["messages_byname class"] -ms.assetid: c6c64841-3e80-43c8-b54c-fed41833ad6b --- # messages_byname Class @@ -40,7 +39,7 @@ An initial reference count. ## Remarks -Its behavior is determined by the named locale *_Locname*. Each constructor initializes its base object with [messages](../standard-library/messages-class.md#messages)\( `_Refs`). +Its behavior is determined by the named locale *_Locname*. Each constructor initializes its base object with [messages](../standard-library/messages-class.md#messages)\(`_Refs`). ## Requirements diff --git a/docs/standard-library/messages-class.md b/docs/standard-library/messages-class.md index 7468f6fb3c..4797d927f9 100644 --- a/docs/standard-library/messages-class.md +++ b/docs/standard-library/messages-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: messages Class" title: "messages Class" -ms.date: "11/04/2016" +description: "Learn more about: messages Class" +ms.date: 11/04/2016 f1_keywords: ["xlocmes/std::messages", "xlocmes/std::messages::char_type", "xlocmes/std::messages::string_type", "xlocmes/std::messages::close", "xlocmes/std::messages::do_close", "xlocmes/std::messages::do_get", "xlocmes/std::messages::do_open", "xlocmes/std::messages::get", "xlocmes/std::messages::open"] helpviewer_keywords: ["std::messages [C++]", "std::messages [C++], char_type", "std::messages [C++], string_type", "std::messages [C++], close", "std::messages [C++], do_close", "std::messages [C++], do_get", "std::messages [C++], do_open", "std::messages [C++], get", "std::messages [C++], open"] -ms.assetid: c4c71f40-4f24-48ab-9f7c-daccd8d5bd83 --- # messages Class @@ -214,7 +213,7 @@ It returns a copy of *_Dfault* on failure. Otherwise, it returns a copy of the s ### Remarks -The member function returns [do_get](#do_get)( `_Catval`, `_Set`, `_Message`, `_Dfault`). +The member function returns [do_get](#do_get)(`_Catval`, `_Set`, `_Message`, `_Dfault`). ## messages::messages @@ -249,7 +248,7 @@ The possible values for the *_Refs* parameter and their significance are: No direct examples are possible, because the destructor is protected. -The constructor initializes its base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)( `_Refs`). +The constructor initializes its base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)(`_Refs`). ## messages::open @@ -275,7 +274,7 @@ It returns a value that compares less than zero on failure. Otherwise, the retur ### Remarks -The member function returns [do_open](#do_open)( `_Catname`, `_Loc`). +The member function returns [do_open](#do_open)(`_Catname`, `_Loc`). ## messages::string_type diff --git a/docs/standard-library/money-get-class.md b/docs/standard-library/money-get-class.md index 3adbf050df..275a645404 100644 --- a/docs/standard-library/money-get-class.md +++ b/docs/standard-library/money-get-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: money_get Class" title: "money_get Class" -ms.date: "11/04/2016" +description: "Learn more about: money_get Class" +ms.date: 11/04/2016 f1_keywords: ["xlocmon/std::money_get", "xlocmon/std::money_get::char_type", "xlocmon/std::money_get::iter_type", "xlocmon/std::money_get::string_type", "xlocmon/std::money_get::do_get", "xlocmon/std::money_get::get"] helpviewer_keywords: ["std::money_get [C++]", "std::money_get [C++], char_type", "std::money_get [C++], iter_type", "std::money_get [C++], string_type", "std::money_get [C++], do_get", "std::money_get [C++], get"] -ms.assetid: 692d3374-3fe7-4b46-8aeb-f8d91ed66b2e --- # money_get Class @@ -112,7 +111,7 @@ An input iterator addressing the first element beyond the monetary input field. ### Remarks -The first virtual protected member function tries to match sequential elements beginning at first in the sequence [ `first`, `last`) until it has recognized a complete, nonempty monetary input field. If successful, it converts this field to a sequence of one or more decimal digits, optionally preceded by a minus sign ( `-`), to represent the amount and stores the result in the [string_type](#string_type) object *val*. It returns an iterator designating the first element beyond the monetary input field. Otherwise, the function stores an empty sequence in *val* and sets `ios_base::failbit` in *State*. It returns an iterator designating the first element beyond any prefix of a valid monetary input field. In either case, if the return value equals `last`, the function sets `ios_base::eofbit` in `State`. +The first virtual protected member function tries to match sequential elements beginning at first in the sequence [ `first`, `last`) until it has recognized a complete, nonempty monetary input field. If successful, it converts this field to a sequence of one or more decimal digits, optionally preceded by a minus sign (`-`), to represent the amount and stores the result in the [string_type](#string_type) object *val*. It returns an iterator designating the first element beyond the monetary input field. Otherwise, the function stores an empty sequence in *val* and sets `ios_base::failbit` in *State*. It returns an iterator designating the first element beyond any prefix of a valid monetary input field. In either case, if the return value equals `last`, the function sets `ios_base::eofbit` in `State`. The second virtual protected member function behaves the same as the first, except that if successful it converts the optionally signed digit sequence to a value of type **`long double`** and stores that value in *val*. @@ -242,7 +241,7 @@ int main( ) else cout << "money_get(" << psz2.str( ) << ", intl = 0) = " << fVal/100.0 << endl; -}; +} ``` ## money_get::iter_type diff --git a/docs/standard-library/money-put-class.md b/docs/standard-library/money-put-class.md index b613399484..af0388fc0b 100644 --- a/docs/standard-library/money-put-class.md +++ b/docs/standard-library/money-put-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: money_put Class" title: "money_put Class" -ms.date: "11/01/2018" +description: "Learn more about: money_put Class" +ms.date: 11/01/2018 f1_keywords: ["xlocmon/std::money_put", "xlocmon/std::money_put::char_type", "xlocmon/std::money_put::iter_type", "xlocmon/std::money_put::string_type", "xlocmon/std::money_put::do_put", "xlocmon/std::money_put::put"] helpviewer_keywords: ["std::money_put [C++]", "std::money_put [C++], char_type", "std::money_put [C++], iter_type", "std::money_put [C++], string_type", "std::money_put [C++], do_put", "std::money_put [C++], put"] -ms.assetid: f439fd56-c9b1-414c-95e1-66c918c6eee6 --- # money_put Class @@ -189,7 +188,7 @@ The possible values for the *_Refs* parameter and their significance are: No direct examples are possible, because the destructor is protected. -The constructor initializes its base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)( `_Refs`). +The constructor initializes its base object with **locale::**[facet](../standard-library/locale-class.md#facet_class)(`_Refs`). ## money_put::put @@ -234,7 +233,7 @@ An output iterator the addresses the position one beyond the last element produc ### Remarks -Both member functions return [do_put](#do_put)( `next`, `_Intl`, `_Iosbase`, `_Fill`, `val`). +Both member functions return [do_put](#do_put)(`next`, `_Intl`, `_Iosbase`, `_Fill`, `val`). ### Example diff --git a/docs/standard-library/moneypunct-byname-class.md b/docs/standard-library/moneypunct-byname-class.md index 701923e297..9fb1ed976d 100644 --- a/docs/standard-library/moneypunct-byname-class.md +++ b/docs/standard-library/moneypunct-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: moneypunct_byname Class" title: "moneypunct_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: moneypunct_byname Class" +ms.date: 11/04/2016 f1_keywords: ["xlocmon/std::moneypunct_byname"] helpviewer_keywords: ["moneypunct_byname class"] -ms.assetid: e8a544d2-6aee-420d-b513-deb385c9b416 --- # moneypunct_byname Class @@ -33,7 +32,7 @@ protected: ## Remarks -Its behavior is determined by the named locale `_Locname`. Each constructor initializes its base object with [moneypunct](../standard-library/moneypunct-class.md#moneypunct)\( `_Refs`). +Its behavior is determined by the named locale `_Locname`. Each constructor initializes its base object with [moneypunct](../standard-library/moneypunct-class.md#moneypunct)\(`_Refs`). ## Requirements diff --git a/docs/standard-library/moneypunct-class.md b/docs/standard-library/moneypunct-class.md index 04d7631261..2e5d396250 100644 --- a/docs/standard-library/moneypunct-class.md +++ b/docs/standard-library/moneypunct-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: moneypunct Class" title: "moneypunct Class" -ms.date: "11/04/2016" +description: "Learn more about: moneypunct Class" +ms.date: 11/04/2016 f1_keywords: ["xlocmon/std::moneypunct", "xlocmon/std::moneypunct::char_type", "xlocmon/std::moneypunct::string_type", "xlocmon/std::moneypunct::curr_symbol", "xlocmon/std::moneypunct::decimal_point", "xlocmon/std::moneypunct::do_curr_symbol", "xlocmon/std::moneypunct::do_decimal_point", "xlocmon/std::moneypunct::do_frac_digits", "xlocmon/std::moneypunct::do_grouping", "xlocmon/std::moneypunct::do_neg_format", "xlocmon/std::moneypunct::do_negative_sign", "xlocmon/std::moneypunct::do_pos_format", "xlocmon/std::moneypunct::do_positive_sign", "xlocmon/std::moneypunct::do_thousands_sep", "xlocmon/std::moneypunct::frac_digits", "xlocmon/std::moneypunct::grouping", "xlocmon/std::moneypunct::neg_format", "xlocmon/std::moneypunct::negative_sign", "xlocmon/std::moneypunct::pos_format", "xlocmon/std::moneypunct::positive_sign", "xlocmon/std::moneypunct::thousands_sep"] helpviewer_keywords: ["std::moneypunct [C++]", "std::moneypunct [C++], char_type", "std::moneypunct [C++], string_type", "std::moneypunct [C++], curr_symbol", "std::moneypunct [C++], decimal_point", "std::moneypunct [C++], do_curr_symbol", "std::moneypunct [C++], do_decimal_point", "std::moneypunct [C++], do_frac_digits", "std::moneypunct [C++], do_grouping", "std::moneypunct [C++], do_neg_format", "std::moneypunct [C++], do_negative_sign", "std::moneypunct [C++], do_pos_format", "std::moneypunct [C++], do_positive_sign", "std::moneypunct [C++], do_thousands_sep", "std::moneypunct [C++], frac_digits", "std::moneypunct [C++], grouping", "std::moneypunct [C++], neg_format", "std::moneypunct [C++], negative_sign", "std::moneypunct [C++], pos_format", "std::moneypunct [C++], positive_sign", "std::moneypunct [C++], thousands_sep"] -ms.assetid: cf2650da-3e6f-491c-95d5-23e57f582ee6 --- # moneypunct Class @@ -119,7 +118,7 @@ int main( ) const moneypunct < char, false> &mpunct2 = use_facet < moneypunct < char, false> >(loc); cout << loc.name( ) << " domestic currency symbol "<< mpunct2.curr_symbol( ) << endl; -}; +} ``` ## moneypunct::decimal_point @@ -593,7 +592,7 @@ int main( ) use_facet >(loc2); cout << loc2.name( ) << " domestic negative sign: " << mpunct4.negative_sign( ) << endl; -}; +} ``` ```Output @@ -703,7 +702,7 @@ int main( ) use_facet >(loc2); cout << loc2.name( ) << " domestic positive sign:" << mpunct4.positive_sign( ) << endl; -}; +} ``` ```Output diff --git a/docs/standard-library/month-day-last-class.md b/docs/standard-library/month-day-last-class.md index bf074911f6..7b7780dfbe 100644 --- a/docs/standard-library/month-day-last-class.md +++ b/docs/standard-library/month-day-last-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: month_day_last Class" title: "month_day_last class" +description: "Learn more about: month_day_last Class" ms.date: "06/28/2021" f1_keywords: ["chrono/std::chrono::month_day_last", "chrono/std::chrono::month_day_last::month", "chrono/std::chrono::month_day_last::ok"] helpviewer_keywords: ["std::chrono [C++], month_day_last"] @@ -111,5 +111,5 @@ constexpr bool ok() const noexcept; [`month_day_last` class](month-day-last-class.md)\ [`month_weekday` class](month-weekday-class.md)\ [`month_weekday_last` class](month-weekday-last-class.md)\ -[`operator/`](chrono-operators.md#op_/) -[Header Files Reference](cpp-standard-library-header-files.md) \ No newline at end of file +[`operator/`](chrono-operators.md#op_/)\ +[Header Files Reference](cpp-standard-library-header-files.md) diff --git a/docs/standard-library/month-weekday-last-class.md b/docs/standard-library/month-weekday-last-class.md index f217ddc754..34770527f7 100644 --- a/docs/standard-library/month-weekday-last-class.md +++ b/docs/standard-library/month-weekday-last-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: month_weekday_last Class" title: "month_weekday_last class" +description: "Learn more about: month_weekday_last Class" ms.date: "6/28/2021" f1_keywords: ["chrono/std::chrono::month_weekday_last", "chrono/std::chrono::month_weekday_last::ok", "std::chrono::month_weekday_last::month_weekday_last", "chrono/std::chrono::month_weekday_last::ok", "chrono/std::chrono::month_weekday_last::month"] helpviewer_keywords: ["std::chrono [C++], month_weekday_last"] @@ -59,7 +59,7 @@ constexpr month_weekday_last(const month& m, const weekday_last& wdl) noexcept; The `month` value for the created `month_weekday_last` class. *`wdl`*\ -The` weekday_last` value for the created `month_weekday_last` class. +The `weekday_last` value for the created `month_weekday_last` class. ## Remarks: Constructor diff --git a/docs/standard-library/multimap-class.md b/docs/standard-library/multimap-class.md index 5266e0c702..fd24a711eb 100644 --- a/docs/standard-library/multimap-class.md +++ b/docs/standard-library/multimap-class.md @@ -30,7 +30,7 @@ The element data type to be stored in the multimap. *`Traits`*\ The type that provides a function object that can compare two element values as sort keys to determine their relative order in the multimap. The binary predicate `less` is the default value. -In C++14 you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. For more information, see [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#heterogeneous-lookup-in-associative-containers-c14) +In C++14 you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. For more information, see [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) *`Allocator`*\ The type that represents the stored allocator object that encapsulates details about the map's allocation and deallocation of memory. This argument is optional and the default value is `allocator >`. @@ -59,7 +59,7 @@ The `multimap` should be the associative container of choice when the conditions The `multimap` orders the sequence it controls by calling a stored function object of type [`key_compare`](#key_compare). This stored object is a comparison function that may be accessed by calling the member function [`key_comp`](#key_comp). In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they are equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate `f(x,y)` is a function object that has two argument objects `x` and `y` and a return value of `true` or `false`. An ordering imposed on a set is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects `x` and `y` are defined to be equivalent when both `f(x,y)` and `f(y,x)` are `false`. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. -In C++14 you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14 you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ## Members @@ -430,7 +430,7 @@ The element's key value to look for. `contains()` is new in C++20. To use it, specify the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option. -`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](./stl-containers.md#heterogeneous-lookup-in-associative-containers-c14) for more information. +`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ### Example diff --git a/docs/standard-library/multiset-class.md b/docs/standard-library/multiset-class.md index 1cf0fcb40b..0fbaa07850 100644 --- a/docs/standard-library/multiset-class.md +++ b/docs/standard-library/multiset-class.md @@ -1,7 +1,7 @@ --- title: "multiset Class" description: "API reference for the C++ Standard Template Library (STL) `multiset` class, which is used for the storage and retrieval of data from a collection in which the values of the elements contained need not be unique and in which they serve as the key values according to which the data is automatically ordered." -ms.date: "9/9/2020" +ms.date: 9/9/2020 f1_keywords: ["set/std::multiset", "set/std::multiset::allocator_type", "set/std::multiset::const_iterator", "set/std::multiset::const_pointer", "set/std::multiset::const_reference", "set/std::multiset::const_reverse_iterator", "set/std::multiset::difference_type", "set/std::multiset::iterator", "set/std::multiset::key_compare", "set/std::multiset::key_type", "set/std::multiset::pointer", "set/std::multiset::reference", "set/std::multiset::reverse_iterator", "set/std::multiset::size_type", "set/std::multiset::value_compare", "set/std::multiset::value_type", "set/std::multiset::begin", "set/std::multiset::cbegin", "set/std::multiset::cend", "set/std::multiset::clear", "set/std::multiset::contains", "set/std::multiset::count", "set/std::multiset::crbegin", "set/std::multiset::crend", "set/std::multiset::emplace", "set/std::multiset::emplace_hint", "set/std::multiset::empty", "set/std::multiset::end", "set/std::multiset::equal_range", "set/std::multiset::erase", "set/std::multiset::find", "set/std::multiset::get_allocator", "set/std::multiset::insert", "set/std::multiset::key_comp", "set/std::multiset::lower_bound", "set/std::multiset::max_size", "set/std::multiset::rbegin", "set/std::multiset::rend", "set/std::multiset::size", "set/std::multiset::swap", "set/std::multiset::upper_bound", "set/std::multiset::value_comp"] helpviewer_keywords: ["std::multiset [C++]", "std::multiset [C++], allocator_type", "std::multiset [C++], const_iterator", "std::multiset [C++], const_pointer", "std::multiset [C++], const_reference", "std::multiset [C++], const_reverse_iterator", "std::multiset [C++], difference_type", "std::multiset [C++], iterator", "std::multiset [C++], key_compare", "std::multiset [C++], key_type", "std::multiset [C++], pointer", "std::multiset [C++], reference", "std::multiset [C++], reverse_iterator", "std::multiset [C++], size_type", "std::multiset [C++], value_compare", "std::multiset [C++], value_type", "std::multiset [C++], begin", "std::multiset [C++], cbegin", "std::multiset [C++], cend", "std::multiset [C++], clear", "std::multiset [C++], contains", "std::multiset [C++], count", "std::multiset [C++], crbegin", "std::multiset [C++], crend", "std::multiset [C++], emplace", "std::multiset [C++], emplace_hint", "std::multiset [C++], empty", "std::multiset [C++], end", "std::multiset [C++], equal_range", "std::multiset [C++], erase", "std::multiset [C++], find", "std::multiset [C++], get_allocator", "std::multiset [C++], insert", "std::multiset [C++], key_comp", "std::multiset [C++], lower_bound", "std::multiset [C++], max_size", "std::multiset [C++], rbegin", "std::multiset [C++], rend", "std::multiset [C++], size", "std::multiset [C++], swap", "std::multiset [C++], upper_bound", "std::multiset [C++], value_comp"] --- @@ -24,7 +24,7 @@ The element data type to be stored in the `multiset`. *`Compare`*\ The type that provides a function object that can compare two element values as sort keys to determine their relative order in the `multiset`. The binary predicate **less**\ is the default value. -In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. *`Allocator`*\ The type that represents the stored allocator object that encapsulates details about the `multiset`'s allocation and deallocation of memory. The default value is `allocator`. @@ -53,7 +53,7 @@ The `multiset` should be the associative container of choice when the conditions The `multiset` orders the sequence it controls by calling a stored function object of type *`Compare`*. This stored object is a comparison function that may be accessed by calling the member function [`key_comp`](#key_comp). In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they're equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate *f*(*x*, *y*) is a function object that has two argument objects *x* and *y* and a return value of **`true`** or **`false`**. An ordering imposed on a set is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects x and y are defined to be equivalent when both *f*(*x,y*) and *f*(*y,x*) are false. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. -In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ### Constructors @@ -399,7 +399,7 @@ The element's key value to look for. `contains()` is new in C++20. To use it, specify the [/std:c++20](../build/reference/std-specify-language-standard-version.md) or later compiler option. -`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](./stl-containers.md#heterogeneous-lookup-in-associative-containers-c14) for more information. +`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ### Example @@ -836,7 +836,7 @@ The argument key to be compared with the sort key of an element from the `multis A pair of iterators such that the first is the [`lower_bound`](#lower_bound) of the key and the second is the [`upper_bound`](#upper_bound) of the key. -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **`first`**, and to dereference the lower bound iterator, use \*( `pr`. **`first`**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **`second`**, and to dereference the upper bound iterator, use \*( `pr`. **`second`**). +To access the first iterator of a pair `pr` returned by the member function, use `pr`. **`first`**, and to dereference the lower bound iterator, use \*(`pr`. **`first`**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **`second`**, and to dereference the upper bound iterator, use \*(`pr`. **`second`**). ### Example @@ -953,7 +953,7 @@ The key value to be matched by the sort key of an element from the `multiset` be ### Return Value -An iterator that refers to the location of an element with a specified key, or the location succeeding the last element in the `multiset` ( `multiset::end()`) if no match is found for the key. +An iterator that refers to the location of an element with a specified key, or the location succeeding the last element in the `multiset`(`multiset::end()`) if no match is found for the key. ### Remarks @@ -1294,7 +1294,7 @@ The stored object defines the member function: which returns true if *x* strictly precedes *y* in the sort order. -Both [`key_compare`](#key_compare) and [`value_compare`](#value_compare) are synonyms for the template parameter ``Compare``. Both types are provided for the classes set and multiset, where they're identical, for compatibility with the classes map and multimap, where they're distinct. +Both [`key_compare`](#key_compare) and [`value_compare`](#value_compare) are synonyms for the template parameter `Compare`. Both types are provided for the classes set and multiset, where they're identical, for compatibility with the classes map and multimap, where they're distinct. ### Example @@ -1381,7 +1381,7 @@ For more information on `Key`, see the Remarks section of the [`multiset` Class] ### Example -See the example for [`value_type`](#value_type) for an example of how to declare and use ``key_type``. +See the example for [`value_type`](#value_type) for an example of how to declare and use `key_type`. ## `multiset::lower_bound` diff --git a/docs/standard-library/negative-binomial-distribution-class.md b/docs/standard-library/negative-binomial-distribution-class.md index f38c2b5169..ce20bc942e 100644 --- a/docs/standard-library/negative-binomial-distribution-class.md +++ b/docs/standard-library/negative-binomial-distribution-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: negative_binomial_distribution Class" title: "negative_binomial_distribution Class" -ms.date: "11/04/2016" +description: "Learn more about: negative_binomial_distribution Class" +ms.date: 11/04/2016 f1_keywords: ["random/std::negative_binomial_distribution", "random/std::negative_binomial_distribution::reset", "random/std::negative_binomial_distribution::k", "random/std::negative_binomial_distribution::p", "random/std::negative_binomial_distribution::param", "random/std::negative_binomial_distribution::min", "random/std::negative_binomial_distribution::max", "random/std::negative_binomial_distribution::operator()", "random/std::negative_binomial_distribution::param_type", "random/std::negative_binomial_distribution::param_type::k", "random/std::negative_binomial_distribution::param_type::p", "random/std::negative_binomial_distribution::param_type::operator==", "random/std::negative_binomial_distribution::param_type::operator!="] helpviewer_keywords: ["std::negative_binomial_distribution [C++]", "std::negative_binomial_distribution [C++], reset", "std::negative_binomial_distribution [C++], k", "std::negative_binomial_distribution [C++], p", "std::negative_binomial_distribution [C++], param", "std::negative_binomial_distribution [C++], min", "std::negative_binomial_distribution [C++], max", "std::negative_binomial_distribution [C++], param_type", "std::negative_binomial_distribution [C++], param_type"] -ms.assetid: 7f5f0967-7fdd-4578-99d4-88f292b4fe9c --- # negative_binomial_distribution Class @@ -224,15 +223,18 @@ The second constructor constructs an object whose stored parameters are initiali Stores the parameters of the distribution. -struct param_type { - typedef negative_binomial_distribution`<`result_type> distribution_type; - param_type(result_type k = 1, double p = 0.5); - result_type k() const; - double p() const; +```cpp +struct param_type +{ + typedef negative_binomial_distribution distribution_type; + param_type(result_type k = 1, double p = 0.5); + result_type k() const; + double p() const; - bool operator==(const param_type& right) const; - bool operator!=(const param_type& right) const; - }; + bool operator==(const param_type& right) const; + bool operator!=(const param_type& right) const; +}; +``` ### Parameters diff --git a/docs/standard-library/new-functions.md b/docs/standard-library/new-functions.md index 7bcc74e888..4a7901ce9d 100644 --- a/docs/standard-library/new-functions.md +++ b/docs/standard-library/new-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: "11/04/2016" f1_keywords: ["new/std::get_new_handler", "new/std::nothrow", "new/std::set_new_handler"] -ms.assetid: e250f06a-b025-4509-ae7a-5356d56aad7d --- # `` functions @@ -93,8 +92,8 @@ The function stores *`Pnew`* in a static [`new` handler](../standard-library/new ```cpp // new_set_new_handler.cpp // compile with: /EHsc -#include -#include +#include +#include using namespace std; void __cdecl newhandler( ) diff --git a/docs/standard-library/new-operators.md b/docs/standard-library/new-operators.md index 0df7cbc071..49e1184de8 100644 --- a/docs/standard-library/new-operators.md +++ b/docs/standard-library/new-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators and enums" title: " operators and enums" +description: "Learn more about: operators and enums" ms.date: 05/21/2022 f1_keywords: ["new/std::operator delete", "new/std::operator new"] -ms.assetid: d1af4b56-9a95-4c65-ab01-bf43e982c7bd --- # `` operators and enums @@ -130,8 +129,8 @@ For information on throwing or non-throwing behavior of `new`, see [The `new` an ```cpp // new_op_new.cpp // compile with: /EHsc -#include -#include +#include +#include using namespace std; diff --git a/docs/standard-library/num-put-class.md b/docs/standard-library/num-put-class.md index 2fecf24e5f..1a9729edc9 100644 --- a/docs/standard-library/num-put-class.md +++ b/docs/standard-library/num-put-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: num_put Class" title: "num_put Class" -ms.date: "11/04/2016" +description: "Learn more about: num_put Class" +ms.date: 11/04/2016 f1_keywords: ["xlocnum/std::num_put", "locale/std::num_put::char_type", "locale/std::num_put::iter_type", "locale/std::num_put::do_put", "locale/std::num_put::put"] helpviewer_keywords: ["std::num_put [C++]", "std::num_put [C++], char_type", "std::num_put [C++], iter_type", "std::num_put [C++], do_put", "std::num_put [C++], put"] -ms.assetid: 36c5bffc-8283-4201-8ed4-78c4d81f8a17 --- # num_put Class @@ -384,7 +383,7 @@ An output iterator the addresses the position one beyond the last element produc ### Remarks -All member functions return [do_put](#do_put)( `next`, `_Iosbase`, `_Fill`, `val`). +All member functions return [do_put](#do_put)(`next`, `_Iosbase`, `_Fill`, `val`). ### Example diff --git a/docs/standard-library/numpunct-byname-class.md b/docs/standard-library/numpunct-byname-class.md index 7ab66566f4..5d4feb1798 100644 --- a/docs/standard-library/numpunct-byname-class.md +++ b/docs/standard-library/numpunct-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: numpunct_byname Class" title: "numpunct_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: numpunct_byname Class" +ms.date: 11/04/2016 f1_keywords: ["xlocnum/std::numpunct_byname"] helpviewer_keywords: ["numpunct_byname class"] -ms.assetid: 18412924-e085-4771-b5e9-7a200cbdd7c0 --- # numpunct_byname Class @@ -32,7 +31,7 @@ protected: ## Remarks -Its behavior is determined by the [named](../standard-library/locale-class.md#name) locale `_Locname`. The constructor initializes its base object with [numpunct](../standard-library/numpunct-class.md#numpunct)\( `_Refs`). +Its behavior is determined by the [named](../standard-library/locale-class.md#name) locale `_Locname`. The constructor initializes its base object with [numpunct](../standard-library/numpunct-class.md#numpunct)\(`_Refs`). ## Requirements diff --git a/docs/standard-library/numpunct-class.md b/docs/standard-library/numpunct-class.md index d56d1c0b9b..a0c85da261 100644 --- a/docs/standard-library/numpunct-class.md +++ b/docs/standard-library/numpunct-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: numpunct Class" title: "numpunct Class" -ms.date: "11/04/2016" +description: "Learn more about: numpunct Class" +ms.date: 11/04/2016 f1_keywords: ["xlocnum/std::numpunct", "xlocnum/std::numpunct::char_type", "xlocnum/std::numpunct::string_type", "xlocnum/std::numpunct::decimal_point", "xlocnum/std::numpunct::do_decimal_point", "xlocnum/std::numpunct::do_falsename", "xlocnum/std::numpunct::do_grouping", "xlocnum/std::numpunct::do_thousands_sep", "xlocnum/std::numpunct::do_truename", "xlocnum/std::numpunct::falsename", "xlocnum/std::numpunct::grouping", "xlocnum/std::numpunct::thousands_sep", "xlocnum/std::numpunct::truename"] helpviewer_keywords: ["std::numpunct [C++]", "std::numpunct [C++], char_type", "std::numpunct [C++], string_type", "std::numpunct [C++], decimal_point", "std::numpunct [C++], do_decimal_point", "std::numpunct [C++], do_falsename", "std::numpunct [C++], do_grouping", "std::numpunct [C++], do_thousands_sep", "std::numpunct [C++], do_truename", "std::numpunct [C++], falsename", "std::numpunct [C++], grouping", "std::numpunct [C++], thousands_sep", "std::numpunct [C++], truename"] -ms.assetid: 73fb93cc-ac11-4c98-987c-bfa6267df596 --- # numpunct Class @@ -107,7 +106,7 @@ int main( ) npunct.decimal_point( ) << endl; cout << loc.name( ) << " thousands separator " << npunct.thousands_sep( ) << endl; -}; +} ``` ```Output @@ -378,7 +377,7 @@ int main( ) npunct.decimal_point( ) << endl; cout << loc.name( ) << " thousands separator " << npunct.thousands_sep( ) << endl; -}; +} ``` ```Output diff --git a/docs/standard-library/optional-class.md b/docs/standard-library/optional-class.md index 91889ce7f7..4df0c70b5a 100644 --- a/docs/standard-library/optional-class.md +++ b/docs/standard-library/optional-class.md @@ -1,7 +1,7 @@ --- description: "Learn more about: optional Class" title: "optional Class" -ms.date: "11/04/2016" +ms.date: 11/14/2024 f1_keywords: ["optional/std::optional", "optional/std::optional::has_value", "optional/std::optional::reset", "optional/std::optional::value", "optional/std::optional::value_or"] helpviewer_keywords: ["optional/std::optional", "optional/std::optional::has_value", "optional/std::optional::reset", "optional/std::optional::value", "optional/std::optional::value_or"] --- @@ -11,7 +11,7 @@ The class template `optional` describes an object that may or may not contain When an instance of `optional` contains a value, the contained value is allocated within the storage of the `optional` object, in a region suitably aligned for type `T`. When an `optional` is converted to **`bool`**, the result is **`true`** if the object contains a value; otherwise, it's **`false`**. -The contained object type `T` must not be [in_place_t](in-place-t-struct.md) or [nullopt_t](nullopt-t-structure.md). `T` must be *destructible*, that is, its destructor must reclaim all owned resources, and may throw no exceptions. +The contained object type `T` must not be [`in_place_t`](in-place-t-struct.md) or [`nullopt_t`](nullopt-t-structure.md). `T` must be *destructible*, that is, its destructor must reclaim all owned resources, and may throw no exceptions. The `optional` class is new in C++17. @@ -123,7 +123,7 @@ If *rhs* contains a value, direct initializes the contained value as if using `s ## ~optional destructor -Destroys any non-trivially destructible contained value, if one is present, by invoking its destructor. +Destroys the contained value, if one is present. ```cpp ~optional(); diff --git a/docs/standard-library/optional-operators.md b/docs/standard-library/optional-operators.md index 839624fd2d..99a367665f 100644 --- a/docs/standard-library/optional-operators.md +++ b/docs/standard-library/optional-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" -f1_keywords: ["optional/std::operator!=", "optional/std::operator==", "optional/std::operator>", "optional/std::operator>=;", "optional/std::operator<", "optional/std::operator<="] -ms.assetid: 57492e09-3836-4dbc-9ae5-78ecf506c190 +description: "Learn more about: operators" +ms.date: 11/04/2016 +f1_keywords: ["optional/std::operator!=", "optional/std::operator==", "optional/std::operator>", "optional/std::operator>=;", "optional/std::operator<", "optional/std::operator<="] helpviewer_keywords: ["std::operator!= (optional)", "std::operator== (optional)", "std::operator> (optional)", "std::operator>= (optional)", "std::operator< (optional)", "std::`operator<=` (optional)"] --- # `` operators diff --git a/docs/standard-library/ostream-operators.md b/docs/standard-library/ostream-operators.md index 6b1d575283..566531288c 100644 --- a/docs/standard-library/ostream-operators.md +++ b/docs/standard-library/ostream-operators.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["ostream/std::operator<<"] -ms.assetid: 9282a62e-a3d1-4371-a284-fbc9515bb9a2 --- # `` operators -[`operator<<`](#op_lt_lt) +The `` header provides the following operators: ## `operator<<` diff --git a/docs/standard-library/ostream-typedefs.md b/docs/standard-library/ostream-typedefs.md index fd4844f2c2..7ace186c98 100644 --- a/docs/standard-library/ostream-typedefs.md +++ b/docs/standard-library/ostream-typedefs.md @@ -1,18 +1,16 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["iosfwd/std::ostream", "iosfwd/std::wostream"] -ms.assetid: 2ec4dc52-a01f-4654-bd65-dd5288777c48 --- # `` typedefs -[ostream](#ostream)\ -[wostream](#wostream) +The `` header provides the following typedefs: -## ostream +## `ostream` -Creates a type from basic_ostream that is specialized on **`char`** and `char_traits` specialized on **`char`**. +Creates a type from `basic_ostream` that is specialized on **`char`** and `char_traits` specialized on **`char`**. ```cpp typedef basic_ostream> ostream; @@ -20,7 +18,7 @@ typedef basic_ostream> ostream; ### Remarks -The type is a synonym for class template [basic_ostream](../standard-library/basic-ostream-class.md), specialized for elements of type **`char`** with default character traits. +The type is a synonym for class template [`basic_ostream`](../standard-library/basic-ostream-class.md), specialized for elements of type **`char`** with default character traits. ## wostream @@ -32,7 +30,7 @@ typedef basic_ostream> wostream; ### Remarks -The type is a synonym for class template [basic_ostream](../standard-library/basic-ostream-class.md), specialized for elements of type **`wchar_t`** with default character traits. +The type is a synonym for class template [`basic_ostream`](../standard-library/basic-ostream-class.md), specialized for elements of type **`wchar_t`** with default character traits. ## See also diff --git a/docs/standard-library/ostrstream-class.md b/docs/standard-library/ostrstream-class.md index c9b7a0acaf..567245feb6 100644 --- a/docs/standard-library/ostrstream-class.md +++ b/docs/standard-library/ostrstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: ostrstream Class" title: "ostrstream Class" -ms.date: "11/04/2016" +description: "Learn more about: ostrstream Class" +ms.date: 11/04/2016 f1_keywords: ["strstream/std::ostrstream::freeze", "strstream/std::ostrstream::pcount", "strstream/std::ostrstream::rdbuf", "strstream/std::ostrstream::str"] helpviewer_keywords: ["std::ostrstream [C++], freeze", "std::ostrstream [C++], pcount", "std::ostrstream [C++], rdbuf", "std::ostrstream [C++], str"] -ms.assetid: e2e34679-b266-4728-a8e1-8eda5d400e46 --- # ostrstream Class @@ -94,7 +93,7 @@ Both constructors initialize the base class by calling [ostream](../standard-lib - If `_Mode` & **ios_base::app**== 0, then `ptr` must designate the first element of an array of `count` elements, and the constructor calls `strstreambuf`(`ptr`, `count`, `ptr`). -- Otherwise, `ptr` must designate the first element of an array of count elements that contains a C string whose first element is designated by `ptr`, and the constructor calls `strstreambuf`(`ptr`, `count`, `ptr` + `strlen`( `ptr`) ). +- Otherwise, `ptr` must designate the first element of an array of count elements that contains a C string whose first element is designated by `ptr`, and the constructor calls `strstreambuf`(`ptr`, `count`, `ptr` + `strlen`(`ptr`)). ## ostrstream::pcount diff --git a/docs/standard-library/output-file-stream-member-functions.md b/docs/standard-library/output-file-stream-member-functions.md index f01b65202b..6c7902a624 100644 --- a/docs/standard-library/output-file-stream-member-functions.md +++ b/docs/standard-library/output-file-stream-member-functions.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Output File Stream Member Functions" title: "Output File Stream Member Functions" -ms.date: "08/25/2021" +description: "Learn more about: Output File Stream Member Functions" +ms.date: 08/25/2021 helpviewer_keywords: ["output streams [C++], member functions"] --- # Output File Stream Member Functions @@ -12,7 +12,7 @@ Output stream member functions have three types: those that are equivalent to ma To use an output file stream ([`ofstream`](../standard-library/basic-ofstream-class.md)), you must associate that stream with a specific disk file in the constructor or the `open` function. If you use the `open` function, you can reuse the same stream object with a series of files. In either case, the arguments describing the file are the same. -When you open the file associated with an output stream, you generally specify an `open_mode` flag. You can combine these flags, which are defined as enumerators in the `ios` class, with the bitwise OR ( `|` ) operator. See [`ios_base::openmode`](../standard-library/ios-base-class.md#openmode) for a list of the enumerators. +When you open the file associated with an output stream, you generally specify an `open_mode` flag. You can combine these flags, which are defined as enumerators in the `ios` class, with the bitwise OR (`|`) operator. See [`ios_base::openmode`](../standard-library/ios-base-class.md#openmode) for a list of the enumerators. Three common output stream situations involve mode options: @@ -102,7 +102,7 @@ Use these member functions to test for errors while writing to a stream: |[`good`](basic-ios-class.md#good)|Returns **`true`** if there's no error condition (unrecoverable or otherwise) and the end-of-file flag isn't set.| |[`eof`](basic-ios-class.md#eof)|Returns **`true`** on the end-of-file condition.| |[`clear`](basic-ios-class.md#clear)|Sets the internal error state. If called with the default arguments, it clears all error bits.| -|[`rdstate`](basic-ios-class.md#rdstate|Returns the current error state.| +|[`rdstate`](basic-ios-class.md#rdstate)|Returns the current error state.| The **`!`** operator is overloaded to perform the same function as the `fail` function. Thus the expression: diff --git a/docs/standard-library/queue-operators.md b/docs/standard-library/queue-operators.md index 51f688e876..9f4929c4a9 100644 --- a/docs/standard-library/queue-operators.md +++ b/docs/standard-library/queue-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators" title: " operators" +description: "Learn more about: operators" ms.date: "11/04/2016" f1_keywords: ["queue/std::operator!=", "queue/std::operator>", "queue/std::operator>=", "queue/std::operator<", "queue/std::operator<=", "queue/std::operator=="] -ms.assetid: 7c435b48-175c-45b0-88eb-24561044019c helpviewer_keywords: ["std::operator!= (queue)", "std::operator> (queue)", "std::operator>= (queue)", "std::operator< (queue)", "std::operator<= (queue)", "std::operator== (queue)"] --- # `` operators @@ -13,7 +12,7 @@ helpviewer_keywords: ["std::operator!= (queue)", "std::operator> (queue)", "std: Tests if the queue object on the left side of the operator is not equal to the queue object on the right side. ```cpp -bool operator!=(const queue & left, const queue & right,); +bool operator!=(const queue & left, const queue & right); ``` ### Parameters @@ -80,7 +79,7 @@ The queues q1 and q3 are equal. Tests if the queue object on the left side of the operator is less than the queue object on the right side. ```cpp -bool operator<(const queue & left, const queue & right,); +bool operator<(const queue & left, const queue & right); ``` ### Parameters @@ -143,7 +142,7 @@ The queue q1 is not less than the queue q3. Tests if the queue object on the left side of the operator is less than or equal to the queue object on the right side. ```cpp -bool operator<=(const queue & left, const queue & right,); +bool operator<=(const queue & left, const queue & right); ``` ### Parameters @@ -208,7 +207,7 @@ The queue q1 is less than or equal to the queue q3. Tests if the queue object on the left side of the operator is equal to queue object on the right side. ```cpp -bool operator==(const queue & left, const queue & right,); +bool operator==(const queue & left, const queue & right); ``` ### Parameters @@ -274,7 +273,7 @@ The queues q1 and q3 are equal. Tests if the queue object on the left side of the operator is greater than the queue object on the right side. ```cpp -bool operator>(const queue & left, const queue & right,); +bool operator>(const queue & left, const queue & right); ``` ### Parameters @@ -340,7 +339,7 @@ The queue q1 is greater than the queue q3. Tests if the queue object on the left side of the operator is greater than or equal to the queue object on the right side. ```cpp -bool operator>=(const queue & left, const queue & right,); +bool operator>=(const queue & left, const queue & right); ``` ### Parameters diff --git a/docs/standard-library/range-adaptors.md b/docs/standard-library/range-adaptors.md index 2b80c881af..7fca2c03e4 100644 --- a/docs/standard-library/range-adaptors.md +++ b/docs/standard-library/range-adaptors.md @@ -1,6 +1,6 @@ --- -description: "Learn more about range adaptors, which create views on ranges." title: "Range adaptors" +description: "Learn more about range adaptors, which create views on ranges." ms.date: 11/3/2022 f1_keywords: ["ranges/std::all", "ranges/std::all_t", "ranges/std::common", "ranges/std::counted", "ranges/std::drop", "ranges/std::drop_while", "ranges/std::elements", "ranges/std::empty", "ranges/std::filter", "ranges/std::iota", "ranges/std::istream", "ranges/std::join", "ranges/std::keys", "ranges/std::lazy_split", "ranges/std::reverse", "ranges/std::single", "ranges/std::split", "ranges/std::subrange", "ranges/std::take", "ranges/std::take_while", "ranges/std::transform", "ranges/std::values"] helpviewer_keywords: ["std::ranges [C++], all", "std::ranges [C++], all_t", "std::ranges [C++], common", "std::ranges [C++], counted", "std::ranges [C++], drop", "std::ranges [C++], drop_while", "std::ranges [C++], elements", "std::ranges [C++], empty", "std::ranges [C++], filter", "std::ranges [C++], iota", "std::ranges [C++], istream", "std::ranges [C++], join", "std::ranges [C++], keys", "std::ranges [C++], lazy_split", "std::ranges [C++], reverse", "std::ranges [C++], single", "std::ranges [C++], split", "std::ranges [C++], subrange", "std::ranges [C++], take", "std::ranges [C++], take_while", "std::ranges [C++], transform", "std::ranges [C++], values"] @@ -913,7 +913,7 @@ A [`lazy_split_view`](lazy-split-view-class.md) that contains one or more subran The delimiter isn't part of the result. For example, if you split the range `1,2,3` on the value `2`, you get two subranges: `1` and `3`. -A related adaptor is [`split`](#split). The primary differences between [`split_view](split-view-class.md) and `lazy_split_view` are: +A related adaptor is [`split`](#split). The primary differences between [`split_view`](split-view-class.md) and `lazy_split_view` are: | View | Can split a `const` range | Range iterator | |--|--|--| @@ -1389,7 +1389,7 @@ int main() Create a [`values_view`](values-view-class.md) that consists of the second index into each tuple-like value in a collection. This is useful for making a view of the values in an associative container. For example, given a range of `std::tuple` values, create a view that consists of all the `int` elements from each tuple. ```cpp -template +template constexpr ranges::view auto values(R&& rg); ``` diff --git a/docs/standard-library/range-functions.md b/docs/standard-library/range-functions.md index c24faade65..359201dcd0 100644 --- a/docs/standard-library/range-functions.md +++ b/docs/standard-library/range-functions.md @@ -289,7 +289,7 @@ The sentinel at the end of what `cbegin()` returns. The sentinel follows the las `ranges::crend()` works on all bidirectional ranges, whereas `std::crend()` may not. -### `crend`example +### `crend` example ```cpp // requires /std:c++20 or later diff --git a/docs/standard-library/raw-storage-iterator-class.md b/docs/standard-library/raw-storage-iterator-class.md index 3e8ce70473..0e625fb1ed 100644 --- a/docs/standard-library/raw-storage-iterator-class.md +++ b/docs/standard-library/raw-storage-iterator-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: raw_storage_iterator Class" title: "raw_storage_iterator Class" +description: "Learn more about: raw_storage_iterator Class" ms.date: 06/17/2022 f1_keywords: ["memory/std::raw_storage_iterator", "memory/std::raw_storage_iterator::element_type", "memory/std::raw_storage_iterator::iter_type"] helpviewer_keywords: ["std::raw_storage_iterator [C++]", "std::raw_storage_iterator [C++], element_type", "std::raw_storage_iterator [C++], iter_type"] -ms.assetid: 6f033f15-f48e-452a-a326-647ea2cf346f ms.custom: devdivchpfy22 --- # raw_storage_iterator Class @@ -114,7 +113,7 @@ public: cout << "Constructing " << i << endl; x = i; bIsConstructed = true; - }; + } Int &operator=(int i) { @@ -123,7 +122,7 @@ public: cout << "Copying " << i << endl; x = i; return *this; - }; + } int x; @@ -190,14 +189,14 @@ public: cout << "Constructing " << i << endl; x = i; bIsConstructed = true; - }; + } Int &operator=( int i ) { if ( !bIsConstructed ) cout << "Not constructed.\n"; cout << "Copying " << i << endl; x = i; return *this; - }; + } int x; private: bool bIsConstructed; @@ -264,7 +263,7 @@ int main( void ) *it = 2 * i; }; - for ( int i = 0; i < 5; i++ ) cout << "array " << i << " = " << pInt[i] << endl;; + for ( int i = 0; i < 5; i++ ) cout << "array " << i << " = " << pInt[i] << endl; delete[] pInt; } @@ -310,13 +309,13 @@ public: cout << "Constructing " << i << endl; x = i; bIsConstructed = true; - }; + } Int &operator=( int i ) { if (!bIsConstructed) cout << "Error! I'm not constructed!\n"; cout << "Copying " << i << endl; x = i; return *this; - }; + } int x; bool bIsConstructed; }; @@ -335,7 +334,7 @@ int main( void ) std::copy( l.begin( ), l.end( ), pInt ); // C4996 for (unsigned int i = 0; i < l.size( ); i++) - cout << "array " << i << " = " << pInt[i].x << endl;; + cout << "array " << i << " = " << pInt[i].x << endl; memset (pInt, 0, sizeof(Int)*l.size( )); // hack: make sure bIsConstructed is false diff --git a/docs/standard-library/regex-operators.md b/docs/standard-library/regex-operators.md index 093cb93bd7..f062a76a49 100644 --- a/docs/standard-library/regex-operators.md +++ b/docs/standard-library/regex-operators.md @@ -1,19 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["regex/std::operator!=", "regex/std::operator>", "regex/std::operator>=", "regex/std::operator<", "regex/std::operator<=", "regex/std::operator==", "regex/std::operator<<"] -ms.assetid: ec623e65-c186-491f-aa18-6b12b47e1127 --- # `` operators -[operator!=](#op_neq)\ -[`operator>`](#op_gt)\ -[`operator>=`](#op_gt_eq)\ -[`operator<`](#op_lt)\ -[`operator<<`](#op_lt_lt)\ -[`operator<=`](#op_lt_eq)\ -[operator==](#op_eq_eq) +The `` header provides the following operators: ## operator!= diff --git a/docs/standard-library/regex-traits-class.md b/docs/standard-library/regex-traits-class.md index 512a4b7093..95fd141c40 100644 --- a/docs/standard-library/regex-traits-class.md +++ b/docs/standard-library/regex-traits-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: regex_traits Class" title: "regex_traits Class" -ms.date: "09/10/2018" +description: "Learn more about: regex_traits Class" +ms.date: 09/10/2018 f1_keywords: ["regex/std::regex_traits", "regex/std::regex_traits::char_type", "regex/std::regex_traits::size_type", "regex/std::regex_traits::string_type", "regex/std::regex_traits::locale_type", "regex/std::regex_traits::char_class_type", "regex/std::regex_traits::length", "regex/std::regex_traits::translate", "regex/std::regex_traits::translate_nocase", "regex/std::regex_traits::transform", "regex/std::regex_traits::transform_primary", "regex/std::regex_traits::lookup_classname", "regex/std::regex_traits::lookup_collatename", "regex/std::regex_traits::isctype", "regex/std::regex_traits::value", "regex/std::regex_traits::imbue", "regex/std::regex_traits::getloc"] helpviewer_keywords: ["std::regex_traits [C++]", "std::regex_traits [C++], char_type", "std::regex_traits [C++], size_type", "std::regex_traits [C++], string_type", "std::regex_traits [C++], locale_type", "std::regex_traits [C++], char_class_type", "std::regex_traits [C++], length", "std::regex_traits [C++], translate", "std::regex_traits [C++], translate_nocase", "std::regex_traits [C++], transform", "std::regex_traits [C++], transform_primary", "std::regex_traits [C++], lookup_classname", "std::regex_traits [C++], lookup_collatename", "std::regex_traits [C++], isctype", "std::regex_traits [C++], value", "std::regex_traits [C++], imbue", "std::regex_traits [C++], getloc"] -ms.assetid: bc5a5eed-32fc-4eb7-913d-71c42e729e81 --- # regex_traits Class @@ -24,7 +23,7 @@ The character element type to describe. ## Remarks -The class template describes various regular expression traits for type *Elem*. The class template [basic_regex Class](../standard-library/basic-regex-class.md) uses this information to manipulate elements of type *Elem*. +The class template describes various regular expression traits for type *Elem*. The class template [`basic_regex`](../standard-library/basic-regex-class.md) uses this information to manipulate elements of type *Elem*. Each `regex_traits` object holds an object of type `regex_traits::locale` which is used by some of its member functions. The default locale is a copy of `regex_traits::locale()`. The member function `imbue` replaces the locale object, and the member function `getloc` returns a copy of the locale object. diff --git a/docs/standard-library/regex-typedefs.md b/docs/standard-library/regex-typedefs.md index d9d1058fe1..4c7f083ccd 100644 --- a/docs/standard-library/regex-typedefs.md +++ b/docs/standard-library/regex-typedefs.md @@ -1,30 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["regex/std::cmatch", "regex/std::cregex_iterator", "regex/std::cregex_token_iterator", "regex/std::csub_match", "regex/std::regex", "regex/std::smatch", "regex/std::sregex_iterator", "regex/std::sregex_token_iterator", "regex/std::ssub_match", "regex/std::wcmatch", "regex/std::wcregex_iterator", "regex/std::wcregex_token_iterator", "regex/std::wcsub_match", "regex/std::wregex", "regex/std::wsmatch", "regex/std::wsregex_iterator", "regex/std::wsregex_token_iterator", "regex/std::wssub_match"] -ms.assetid: e6a69067-106c-4a24-9e08-7c867a3a2260 --- # `` typedefs -[cmatch](#cmatch)\ -[cregex_iterator](#cregex_iterator)\ -[cregex_token_iterator](#cregex_token_iterator)\ -[csub_match](#csub_match)\ -[regex](#regex)\ -[smatch](#smatch)\ -[sregex_iterator](#sregex_iterator)\ -[sregex_token_iterator](#sregex_token_iterator)\ -[ssub_match](#ssub_match)\ -[wcmatch](#wcmatch)\ -[wcregex_iterator](#wcregex_iterator)\ -[wcregex_token_iterator](#wcregex_token_iterator)\ -[wcsub_match](#wcsub_match)\ -[wregex](#wregex)\ -[wsmatch](#wsmatch)\ -[wsregex_iterator](#wsregex_iterator)\ -[wsregex_token_iterator](#wsregex_token_iterator)\ -[wssub_match](#wssub_match) +The `` header provides the following typedefs: ## cmatch Typedef @@ -36,7 +18,7 @@ typedef match_results cmatch; ### Remarks -The type describes a specialization of class template [match_results Class](../standard-library/match-results-class.md) for iterators of type `const char*`. +The type describes a specialization of class template [`match_results`](../standard-library/match-results-class.md) for iterators of type `const char*`. ## cregex_iterator Typedef @@ -48,7 +30,7 @@ typedef regex_iterator cregex_iterator; ### Remarks -The type describes a specialization of class template [regex_iterator Class](../standard-library/regex-iterator-class.md) for iterators of type `const char*`. +The type describes a specialization of class template [`regex_iterator`](../standard-library/regex-iterator-class.md) for iterators of type `const char*`. ## cregex_token_iterator Typedef @@ -60,7 +42,7 @@ typedef regex_token_iterator cregex_token_iterator; ### Remarks -The type describes a specialization of class template [regex_token_iterator Class](../standard-library/regex-token-iterator-class.md) for iterators of type `const char*`. +The type describes a specialization of class template [`regex_token_iterator`](../standard-library/regex-token-iterator-class.md) for iterators of type `const char*`. ## csub_match Typedef @@ -72,7 +54,7 @@ typedef sub_match csub_match; ### Remarks -The type describes a specialization of class template [sub_match Class](../standard-library/sub-match-class.md) for iterators of type `const char*`. +The type describes a specialization of class template [`sub_match`](../standard-library/sub-match-class.md) for iterators of type `const char*`. ## regex Typedef @@ -84,7 +66,7 @@ typedef basic_regex regex; ### Remarks -The type describes a specialization of class template [basic_regex Class](../standard-library/basic-regex-class.md) for elements of type **`char`**. +The type describes a specialization of class template [`basic_regex`](../standard-library/basic-regex-class.md) for elements of type **`char`**. > [!NOTE] > High-bit characters will have unpredictable results with `regex`. Values outside the range of 0 to 127 may result in undefined behavior. @@ -99,7 +81,7 @@ typedef match_results smatch; ### Remarks -The type describes a specialization of class template [match_results Class](../standard-library/match-results-class.md) for iterators of type `string::const_iterator`. +The type describes a specialization of class template [`match_results`](../standard-library/match-results-class.md) for iterators of type `string::const_iterator`. ## sregex_iterator Typedef @@ -111,7 +93,7 @@ typedef regex_iterator sregex_iterator; ### Remarks -The type describes a specialization of class template [regex_iterator Class](../standard-library/regex-iterator-class.md) for iterators of type `string::const_iterator`. +The type describes a specialization of class template [`regex_iterator`](../standard-library/regex-iterator-class.md) for iterators of type `string::const_iterator`. ## sregex_token_iterator Typedef @@ -123,7 +105,7 @@ typedef regex_token_iterator sregex_token_iterator; ### Remarks -The type describes a specialization of class template [regex_token_iterator Class](../standard-library/regex-token-iterator-class.md) for iterators of type `string::const_iterator`. +The type describes a specialization of class template [`regex_token_iterator`](../standard-library/regex-token-iterator-class.md) for iterators of type `string::const_iterator`. ## ssub_match Typedef @@ -135,7 +117,7 @@ typedef sub_match ssub_match; ### Remarks -The type describes a specialization of class template [sub_match Class](../standard-library/sub-match-class.md) for iterators of type `string::const_iterator`. +The type describes a specialization of class template [`sub_match`](../standard-library/sub-match-class.md) for iterators of type `string::const_iterator`. ## wcmatch Typedef @@ -147,7 +129,7 @@ typedef match_results wcmatch; ### Remarks -The type describes a specialization of class template [match_results Class](../standard-library/match-results-class.md) for iterators of type `const wchar_t*`. +The type describes a specialization of class template [`match_results`](../standard-library/match-results-class.md) for iterators of type `const wchar_t*`. ## wcregex_iterator Typedef @@ -159,7 +141,7 @@ typedef regex_iterator wcregex_iterator; ### Remarks -The type describes a specialization of class template [regex_iterator Class](../standard-library/regex-iterator-class.md) for iterators of type `const wchar_t*`. +The type describes a specialization of class template [`regex_iterator`](../standard-library/regex-iterator-class.md) for iterators of type `const wchar_t*`. ## wcregex_token_iterator Typedef @@ -171,7 +153,7 @@ typedef regex_token_iterator wcregex_token_iterator; ### Remarks -The type describes a specialization of class template [regex_token_iterator Class](../standard-library/regex-token-iterator-class.md) for iterators of type `const wchar_t*`. +The type describes a specialization of class template [`regex_token_iterator`](../standard-library/regex-token-iterator-class.md) for iterators of type `const wchar_t*`. ## wcsub_match Typedef @@ -183,7 +165,7 @@ typedef sub_match wcsub_match; ### Remarks -The type describes a specialization of class template [sub_match Class](../standard-library/sub-match-class.md) for iterators of type `const wchar_t*`. +The type describes a specialization of class template [`sub_match`](../standard-library/sub-match-class.md) for iterators of type `const wchar_t*`. ## wregex Typedef @@ -195,7 +177,7 @@ typedef basic_regex wregex; ### Remarks -The type describes a specialization of class template [basic_regex Class](../standard-library/basic-regex-class.md) for elements of type **`wchar_t`**. +The type describes a specialization of class template [`basic_regex`](../standard-library/basic-regex-class.md) for elements of type **`wchar_t`**. ## wsmatch Typedef @@ -207,7 +189,7 @@ typedef match_results wsmatch; ### Remarks -The type describes a specialization of class template [match_results Class](../standard-library/match-results-class.md) for iterators of type `wstring::const_iterator`. +The type describes a specialization of class template [`match_results`](../standard-library/match-results-class.md) for iterators of type `wstring::const_iterator`. ## wsregex_iterator Typedef @@ -219,7 +201,7 @@ typedef regex_iterator wsregex_iterator; ### Remarks -The type describes a specialization of class template [regex_iterator Class](../standard-library/regex-iterator-class.md) for iterators of type `wstring::const_iterator`. +The type describes a specialization of class template [`regex_iterator`](../standard-library/regex-iterator-class.md) for iterators of type `wstring::const_iterator`. ## wsregex_token_iterator Typedef @@ -231,7 +213,7 @@ typedef regex_token_iterator wsregex_token_iterator; ### Remarks -The type describes a specialization of class template [regex_token_iterator Class](../standard-library/regex-token-iterator-class.md) for iterators of type `wstring::const_iterator`. +The type describes a specialization of class template [`regex_token_iterator`](../standard-library/regex-token-iterator-class.md) for iterators of type `wstring::const_iterator`. ## wssub_match Typedef @@ -243,7 +225,7 @@ typedef sub_match wssub_match; ### Remarks -The type describes a specialization of class template [sub_match Class](../standard-library/sub-match-class.md) for iterators of type `wstring::const_iterator`. +The type describes a specialization of class template [`sub_match`](../standard-library/sub-match-class.md) for iterators of type `wstring::const_iterator`. ## See also diff --git a/docs/standard-library/regex.md b/docs/standard-library/regex.md index 290bf331a6..afa6499a17 100644 --- a/docs/standard-library/regex.md +++ b/docs/standard-library/regex.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: " title: "" -ms.date: "11/04/2016" +description: "Learn more about: " +ms.date: 11/04/2016 f1_keywords: [""] helpviewer_keywords: ["regex header"] --- @@ -17,9 +17,9 @@ Defines a class template to parse [Regular Expressions (C++)](../standard-librar ## Remarks -To create a regular expression object, use the class template [`basic_regex` Class](../standard-library/basic-regex-class.md) or one of its specializations, [`regex`](../standard-library/regex-typedefs.md#regex) and [`wregex`](../standard-library/regex-typedefs.md#wregex), together with the syntax flags of type [`regex_constants::syntax_option_type`](../standard-library/regex-constants-class.md#syntax_option_type). +To create a regular expression object, use the class template [`basic_regex`](../standard-library/basic-regex-class.md) or one of its specializations, [`regex`](../standard-library/regex-typedefs.md#regex) and [`wregex`](../standard-library/regex-typedefs.md#wregex), together with the syntax flags of type [`regex_constants::syntax_option_type`](../standard-library/regex-constants-class.md#syntax_option_type). -To search text for matches to a regular expression object, use the template functions [`regex_match`](../standard-library/regex-functions.md#regex_match) and [`regex_search`](../standard-library/regex-functions.md#regex_search), together with the match flags of type [`regex_constants::match_flag_type`](../standard-library/regex-constants-class.md#match_flag_type). These functions return results by using the class template [`match_results` Class](../standard-library/match-results-class.md) and its specializations, [`cmatch`](../standard-library/regex-typedefs.md#cmatch), [`wcmatch`](../standard-library/regex-typedefs.md#wcmatch), [`smatch`](../standard-library/regex-typedefs.md#smatch), and [`wsmatch`](../standard-library/regex-typedefs.md#wsmatch), together with the class template [`sub_match` Class](../standard-library/sub-match-class.md) and its specializations, [`csub_match`](../standard-library/regex-typedefs.md#csub_match), [`wcsub_match`](../standard-library/regex-typedefs.md#wcsub_match), [`ssub_match`](../standard-library/regex-typedefs.md#ssub_match), and [`wssub_match`](../standard-library/regex-typedefs.md#wssub_match). +To search text for matches to a regular expression object, use the template functions [`regex_match`](../standard-library/regex-functions.md#regex_match) and [`regex_search`](../standard-library/regex-functions.md#regex_search), together with the match flags of type [`regex_constants::match_flag_type`](../standard-library/regex-constants-class.md#match_flag_type). These functions return results by using the class template [`match_results`](../standard-library/match-results-class.md) and its specializations, [`cmatch`](../standard-library/regex-typedefs.md#cmatch), [`wcmatch`](../standard-library/regex-typedefs.md#wcmatch), [`smatch`](../standard-library/regex-typedefs.md#smatch), and [`wsmatch`](../standard-library/regex-typedefs.md#wsmatch), together with the class template [`sub_match`](../standard-library/sub-match-class.md) and its specializations, [`csub_match`](../standard-library/regex-typedefs.md#csub_match), [`wcsub_match`](../standard-library/regex-typedefs.md#wcsub_match), [`ssub_match`](../standard-library/regex-typedefs.md#ssub_match), and [`wssub_match`](../standard-library/regex-typedefs.md#wssub_match). To replace text that matches a regular expression object, use the template function [`regex_replace`](../standard-library/regex-functions.md#regex_replace), together with the match flags of type [`regex_constants::match_flag_type`](../standard-library/regex-constants-class.md#match_flag_type). @@ -81,7 +81,7 @@ To modify the details of the grammar of regular expressions, write a class that |[`operator==`](../standard-library/regex-operators.md#op_eq_eq)|Comparison of various objects, equal.| |[`operator!=`](../standard-library/regex-operators.md#op_neq)|Comparison of various objects, not equal.| |[`operator<`](../standard-library/regex-operators.md#op_lt)|Comparison of various objects, less than.| -|[`operator\<=`](../standard-library/regex-operators.md#op_gt_eq)|Comparison of various objects, less than or equal.| +|[`operator<=`](../standard-library/regex-operators.md#op_gt_eq)|Comparison of various objects, less than or equal.| |[`operator>`](../standard-library/regex-operators.md#op_gt)|Comparison of various objects, greater than.| |[`operator>=`](../standard-library/regex-operators.md#op_gt_eq)|Comparison of various objects, greater than or equal.| |[`operator<<`](../standard-library/regex-operators.md#op_lt_lt)|Inserts a `sub_match` in a stream.| diff --git a/docs/standard-library/scoped-allocator-adaptor-class.md b/docs/standard-library/scoped-allocator-adaptor-class.md index 4694600e24..b2b7ae1f19 100644 --- a/docs/standard-library/scoped-allocator-adaptor-class.md +++ b/docs/standard-library/scoped-allocator-adaptor-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: scoped_allocator_adaptor Class" title: "scoped_allocator_adaptor Class" +description: "Learn more about: scoped_allocator_adaptor Class" ms.date: 06/20/2022 f1_keywords: ["scoped_allocator/std::scoped_allocator_adaptor", "scoped_allocator/std::scoped_allocator_adaptor::rebind Struct", "scoped_allocator/std::scoped_allocator_adaptor::allocate", "scoped_allocator/std::scoped_allocator_adaptor::construct", "scoped_allocator/std::scoped_allocator_adaptor::deallocate", "scoped_allocator/std::scoped_allocator_adaptor::destroy", "scoped_allocator/std::scoped_allocator_adaptor::inner_allocator", "scoped_allocator/std::scoped_allocator_adaptor::max_size", "scoped_allocator/std::scoped_allocator_adaptor::outer_allocator", "scoped_allocator/std::scoped_allocator_adaptor::select_on_container_copy_construction"] helpviewer_keywords: ["std::scoped_allocator_adaptor", "std::scoped_allocator_adaptor::allocate", "std::scoped_allocator_adaptor::construct", "std::scoped_allocator_adaptor::deallocate", "std::scoped_allocator_adaptor::destroy", "std::scoped_allocator_adaptor::inner_allocator", "std::scoped_allocator_adaptor::max_size", "std::scoped_allocator_adaptor::outer_allocator", "std::scoped_allocator_adaptor::select_on_container_copy_construction"] -ms.assetid: 0d9b06a1-9a4a-4669-9470-8805cae48e89 ms.custom: devdivchpfy22 --- @@ -68,7 +67,7 @@ Three types are defined for the sake of exposition: |Name|Description| |----------|-----------------| -|[scoped_allocator_adaptor::rebind Struct](#rebind_struct)|Defines the type `Outer::rebind\::other` as a synonym for `scoped_allocator_adaptor\`.| +|[scoped_allocator_adaptor::rebind Struct](#rebind_struct)|Defines the type `Outer::rebind::other` as a synonym for `scoped_allocator_adaptor`.| ### Methods @@ -240,14 +239,14 @@ size_type max_size(); `Outer_traits::max_size(outer_allocator())` -## scoped_allocator_adaptor::operator= +## scoped_allocator_adaptor::operator= ```cpp scoped_allocator_adaptor& operator=(const scoped_allocator_adaptor&) = default; scoped_allocator_adaptor& operator=(scoped_allocator_adaptor&&) = default; ``` -## scoped_allocator_adaptor::operator== +## scoped_allocator_adaptor::operator== ```cpp template @@ -255,7 +254,7 @@ bool operator==(const scoped_allocator_adaptor& a, const scoped_allocator_adaptor& b) noexcept; ``` -## scoped_allocator_adaptor::operator!= +## scoped_allocator_adaptor::operator!= ```cpp template @@ -263,7 +262,7 @@ bool operator!=(const scoped_allocator_adaptor& a, const scoped_allocator_adaptor& b) noexcept; ``` -## scoped_allocator_adaptor::outer_allocator +## scoped_allocator_adaptor::outer_allocator Retrieves a reference to the stored object of type `outer_allocator_type`. @@ -278,7 +277,7 @@ A reference to the stored object of type `outer_allocator_type`. ## scoped_allocator_adaptor::rebind Struct -Defines the type `Outer::rebind\::other` as a synonym for `scoped_allocator_adaptor\`. +Defines the type `Outer::rebind::other` as a synonym for `scoped_allocator_adaptor`. struct rebind{ typedef Other_traits::rebind\ diff --git a/docs/standard-library/scoped-allocator-operators.md b/docs/standard-library/scoped-allocator-operators.md index 9798211db1..9e8b9098d2 100644 --- a/docs/standard-library/scoped-allocator-operators.md +++ b/docs/standard-library/scoped-allocator-operators.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["scoped_allocator/std::operator!=", "scoped_allocator/std::operator=="] -ms.assetid: 4dfe0805-cc6e-479f-887f-a1c164f73837 --- # `` operators -[operator!=](#op_neq)\ -[operator==](#op_eq_eq) +The `` header provides the following operators: ## operator!= diff --git a/docs/standard-library/set-class.md b/docs/standard-library/set-class.md index 044b150c34..17de564011 100644 --- a/docs/standard-library/set-class.md +++ b/docs/standard-library/set-class.md @@ -1,10 +1,9 @@ --- title: "set Class" description: "API reference for the C++ Standard Library container class `set`, which is used to store and retrieve data from a collection." -ms.date: "9/9/2020" +ms.date: 9/9/2020 f1_keywords: ["set/std::set", "set/std::set::allocator_type", "set/std::set::const_iterator", "set/std::set::const_pointer", "set/std::set::const_reference", "set/std::set::const_reverse_iterator", "set/std::set::difference_type", "set/std::set::iterator", "set/std::set::key_compare", "set/std::set::key_type", "set/std::set::pointer", "set/std::set::reference", "set/std::set::reverse_iterator", "set/std::set::size_type", "set/std::set::value_compare", "set/std::set::value_type", "set/std::set::begin", "set/std::set::cbegin", "set/std::set::cend", "set/std::set::clear", "set/std::set::contains", "set/std::set::count", "set/std::set::crbegin", "set/std::set::crend", "set/std::set::emplace", "set/std::set::emplace_hint", "set/std::set::empty", "set/std::set::end", "set/std::set::equal_range", "set/std::set::erase", "set/std::set::find", "set/std::set::get_allocator", "set/std::set::insert", "set/std::set::key_comp", "set/std::set::lower_bound", "set/std::set::max_size", "set/std::set::rbegin", "set/std::set::rend", "set/std::set::size", "set/std::set::swap", "set/std::set::upper_bound", "set/std::set::value_comp"] helpviewer_keywords: ["std::set [C++]", "std::set [C++], allocator_type", "std::set [C++], const_iterator", "std::set [C++], const_pointer", "std::set [C++], const_reference", "std::set [C++], const_reverse_iterator", "std::set [C++], difference_type", "std::set [C++], iterator", "std::set [C++], key_compare", "std::set [C++], key_type", "std::set [C++], pointer", "std::set [C++], reference", "std::set [C++], reverse_iterator", "std::set [C++], size_type", "std::set [C++], value_compare", "std::set [C++], value_type", "std::set [C++], begin", "std::set [C++], cbegin", "std::set [C++], cend", "std::set [C++], clear", "std::set [C++], contains", "std::set [C++], count", "std::set [C++], crbegin", "std::set [C++], crend", "std::set [C++], emplace", "std::set [C++], emplace_hint", "std::set [C++], empty", "std::set [C++], end", "std::set [C++], equal_range", "std::set [C++], erase", "std::set [C++], find", "std::set [C++], get_allocator", "std::set [C++], insert", "std::set [C++], key_comp", "std::set [C++], lower_bound", "std::set [C++], max_size", "std::set [C++], rbegin", "std::set [C++], rend", "std::set [C++], size", "std::set [C++], swap", "std::set [C++], upper_bound", "std::set [C++], value_comp"] -ms.assetid: 8991f9aa-5509-4440-adc1-371512d32018 --- # `set` Class @@ -27,7 +26,7 @@ The element data type to be stored in the set. *`Traits`*\ The type that provides a function object that can compare two element values as sort keys to determine their relative order in the set. This argument is optional, and the binary predicate `less ` is the default value. -In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. *`Allocator`*\ The type that represents the stored allocator object that encapsulates details about the set's allocation and deallocation of memory. This argument is optional, and the default value is `allocator`. @@ -52,7 +51,7 @@ The set should be the associative container of choice when the conditions associ The set orders the sequence it controls by calling a stored function object of type [`key_compare`](#key_compare). This stored object is a comparison function that may be accessed by calling the member function [`key_comp`](#key_comp). In general, the elements need to be merely less than comparable to establish this order so that, given any two elements, it may be determined either that they're equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense. A binary predicate *f*(*x,y*) is a function object that has two argument objects *x* and *y* and a return value of **`true`** or **`false`**. An ordering imposed on a set is a strict weak ordering if the binary predicate is irreflexive, antisymmetric, and transitive and if equivalence is transitive, where two objects *x* and *y* are defined to be equivalent when both *f* *x,y*) and *f*(*y,x*) are false. If the stronger condition of equality between keys replaces that of equivalence, then the ordering becomes total (in the sense that all the elements are ordered with respect to each other) and the keys matched will be indiscernible from each other. -In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](../standard-library/stl-containers.md#sequence_containers) for more information. +In C++14, you can enable heterogeneous lookup by specifying the `std::less<>` or `std::greater<>` predicate that has no type parameters. See [Heterogeneous Lookup in Associative Containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. The iterator provided by the set class is a bidirectional iterator, but the class member functions [`insert`](#insert) and [`set`](#set) have versions that take as template parameters a weaker input iterator, whose functionality requirements are more minimal than those guaranteed by the class of bidirectional iterators. The different iterator concepts form a family related by refinements in their functionality. Each iterator concept has its own set of requirements, and the algorithms that work with them must limit their assumptions to the requirements provided by that type of iterator. It may be assumed that an input iterator may be dereferenced to refer to some object and that it may be incremented to the next iterator in the sequence. This is a minimal set of functionality, but it's enough to be able to talk meaningfully about a range of iterators [ `First`, `Last`) in the context of the class's member functions. @@ -400,7 +399,7 @@ The element's key value to look for. `contains()` is new in C++20. To use it, specify the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option. -`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](./stl-containers.md#heterogeneous-lookup-in-associative-containers-c14) for more information. +`template bool contains(const K& key) const` only participates in overload resolution if `key_compare` is transparent. See [Heterogeneous lookup in associative containers](stl-containers.md#heterogeneous-lookup-in-associative-containers) for more information. ### Example @@ -886,7 +885,7 @@ The argument key to be compared with the sort key of an element from the set bei A pair of iterators where the first is the [`lower_bound`](#lower_bound) of the key and the second is the [`upper_bound`](#upper_bound) of the key. -To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*( `pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*( `pr`. **second**). +To access the first iterator of a pair `pr` returned by the member function, use `pr`. **first**, and to dereference the lower bound iterator, use \*(`pr`. **first**). To access the second iterator of a pair `pr` returned by the member function, use `pr`. **second**, and to dereference the upper bound iterator, use \*(`pr`. **second**). ### Example diff --git a/docs/standard-library/set-functions.md b/docs/standard-library/set-functions.md index 028b7771bc..76fb181cf4 100644 --- a/docs/standard-library/set-functions.md +++ b/docs/standard-library/set-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["set/std::swap (map)", "set/std::swap (multiset)"] -ms.assetid: d1277d14-8502-46c0-b820-bcda820f9406 --- # `` functions @@ -63,4 +62,4 @@ in the algorithm class works by assignment and is a slow operation. The speciali ### Example -See the code example for the member class [multiset::swap](../standard-library/multiset-class.md#swap)for an example of the use of the template version of `swap`. +See the code example for the member class [multiset::swap](../standard-library/multiset-class.md#swap) for an example of the use of the template version of `swap`. diff --git a/docs/standard-library/span-functions.md b/docs/standard-library/span-functions.md index 456d5c7133..4c92144c44 100644 --- a/docs/standard-library/span-functions.md +++ b/docs/standard-library/span-functions.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: "05/28/2020" f1_keywords: ["span/std::span::as_bytes", "span/std::as_writable_bytes"] helpviewer_keywords: ["std::span [C++], as_writable_bytes", "std::as_bytes [C++]"] @@ -47,7 +47,7 @@ A `span` to the first item stored in the span where `S` is `{rein using namespace std; -void main() +int main() { int a[] = { 0,1,2 }; span mySpan(a); @@ -87,7 +87,7 @@ A `span` to the first item stored in the span where `S` is `{reinterpre using namespace std; -void main() +int main() { int a[] = { 0,1,2 }; span mySpan(a); diff --git a/docs/standard-library/sstream-functions.md b/docs/standard-library/sstream-functions.md index 80c3aab153..4c47dc0b0f 100644 --- a/docs/standard-library/sstream-functions.md +++ b/docs/standard-library/sstream-functions.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["sstream/std::swap"] -ms.assetid: bc9607e8-7c6b-44ef-949b-19e917b450ad --- # `` functions -[swap](#sstream_swap) +The `` header provides the following functions: ## swap diff --git a/docs/standard-library/sstream-typedefs.md b/docs/standard-library/sstream-typedefs.md index fb824672c7..0a392e94bb 100644 --- a/docs/standard-library/sstream-typedefs.md +++ b/docs/standard-library/sstream-typedefs.md @@ -1,19 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["iosfwd/std::istringstream", "iosfwd/std::ostringstream", "iosfwd/std::stringbuf", "iosfwd/std::stringstream", "iosfwd/std::wistringstream", "iosfwd/std::wostringstream", "iosfwd/std::wstringbuf", "iosfwd/std::wstringstream"] --- # `` typedefs -[`istringstream`](#istringstream)\ -[`ostringstream`](#ostringstream)\ -[`stringbuf`](#stringbuf)\ -[`stringstream`](#stringstream)\ -[`wistringstream`](#wistringstream)\ -[`wostringstream`](#wostringstream)\ -[`wstringbuf`](#wstringbuf)\ -[`wstringstream`](#wstringstream) +The `` header provides the following typedefs: ## `istringstream` diff --git a/docs/standard-library/stack-operators.md b/docs/standard-library/stack-operators.md index a8b308ae8a..9722dbc4ea 100644 --- a/docs/standard-library/stack-operators.md +++ b/docs/standard-library/stack-operators.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: operators" title: " operators" +description: "Learn more about: operators" ms.date: "11/04/2016" f1_keywords: ["stack/std::operator!=", "stack/std::operator>", "stack/std::operator>=", "stack/std::operator<", "stack/std::operator<=", "stack/std::operator=="] -ms.assetid: 9c1fc282-2f61-4727-9e80-84ea5d4934a2 helpviewer_keywords: ["std::operator!= (stack)", "std::operator> (stack)", "std::operator>= (stack)", "std::operator< (stack)", "std::operator<= (stack)", "std::operator== (stack)"] --- # `` operators @@ -13,7 +12,7 @@ helpviewer_keywords: ["std::operator!= (stack)", "std::operator> (stack)", "std: Tests if the stack object on the left side of the operator is not equal to stack object on the right side. ```cpp -bool operator!=(const stack & left, const stack & right,); +bool operator!=(const stack & left, const stack & right); ``` ### Parameters diff --git a/docs/standard-library/steady-clock-struct.md b/docs/standard-library/steady-clock-struct.md index bcb5ea47f5..27c5ae83a4 100644 --- a/docs/standard-library/steady-clock-struct.md +++ b/docs/standard-library/steady-clock-struct.md @@ -1,8 +1,8 @@ --- -description: "Learn more about: steady_clock struct" title: "steady_clock struct" +description: "Learn more about: steady_clock struct" ms.date: 04/14/2022 -f1_keywords: ["chrono/std::chrono::steady_clock", "chrono/std::chrono::steady_clock::now", "chrono/std::chrono::steady_clock:is_steady"] +f1_keywords: ["chrono/std::chrono::steady_clock", "chrono/std::chrono::steady_clock::now", "chrono/std::chrono::steady_clock::is_steady"] helpviewer_keywords: ["std::chrono [C++], steady_clock"] dev_langs: ["C++"] --- @@ -102,4 +102,4 @@ Elapsed nanoseconds: 1007266700 ns [`system_clock` struct](system-clock-structure.md)\ [`tai_clock` class](tai-clock-class.md)\ [`utc_clock` class](utc-clock-class.md)\ -[Header Files Reference](cpp-standard-library-header-files.md) \ No newline at end of file +[Header Files Reference](cpp-standard-library-header-files.md) diff --git a/docs/standard-library/stl-containers.md b/docs/standard-library/stl-containers.md index ffdac90c0c..0b8ce54931 100644 --- a/docs/standard-library/stl-containers.md +++ b/docs/standard-library/stl-containers.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: C++ Standard Library Containers" title: "C++ Standard Library Containers" -ms.date: "11/04/2016" +description: "Learn more about: C++ Standard Library Containers" +ms.date: 11/04/2016 helpviewer_keywords: ["C++ Standard Library, class template containers", "containers, C++ Standard Library"] -ms.assetid: 8e915ca1-19ba-4f0d-93c8-e2c3bfd638eb --- # C++ Standard Library Containers @@ -39,7 +38,7 @@ Both `map` and `set` only allow one instance of a key or element to be inserted Ordered maps and sets support bi-directional iterators, and their unordered counterparts support forward iterators. For more information, see [Iterators](../standard-library/iterators.md). -### Heterogeneous Lookup in Associative Containers (C++14) +### Heterogeneous Lookup in Associative Containers (C++14) The ordered associative containers (map, multimap, set, and multiset) now support heterogeneous lookup, which means that you're no longer required to pass the exact same object type as the key or element in member functions such as `find()` and `lower_bound()`. Instead, you can pass any type for which an overloaded `operator<` is defined that enables comparison to the key type. diff --git a/docs/standard-library/streambuf-typedefs.md b/docs/standard-library/streambuf-typedefs.md index 842403c4f0..ab98660169 100644 --- a/docs/standard-library/streambuf-typedefs.md +++ b/docs/standard-library/streambuf-typedefs.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["iosfwd/std::streambuf", "iosfwd/std::wstreambuf"] -ms.assetid: 2678e18f-f0f0-4995-bc53-f1bc7dfc4ec6 --- # `` typedefs -[streambuf](#streambuf)\ -[wstreambuf](#wstreambuf) +The `` header provides the following typedefs: ## streambuf diff --git a/docs/standard-library/string-functions.md b/docs/standard-library/string-functions.md index ec9262a46f..4639cb1764 100644 --- a/docs/standard-library/string-functions.md +++ b/docs/standard-library/string-functions.md @@ -1,25 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["string/std::getline", "string/std::stod", "string/std::stof", "string/std::stoi", "string/std::stol", "string/std::stold", "string/std::stoll", "string/std::stoul", "string/std::stoull", "string/std::swap", "string/std::to_string", "string/std::to_wstring"] -ms.assetid: 1a4ffd11-dce5-4cc6-a043-b95de034c7c4 helpviewer_keywords: ["std::getline [C++]", "std::stod [C++]", "std::stof [C++]", "std::stoi [C++]", "std::stol [C++]", "std::stold [C++]", "std::stoll [C++]", "std::stoul [C++]", "std::stoull [C++]", "std::swap [C++]", "std::to_string [C++]", "std::to_wstring [C++]"] --- # `` functions -[`getline`](#getline)\ -[`stod`](#stod)\ -[`stof`](#stof)\ -[`stoi`](#stoi)\ -[`stol`](#stol)\ -[`stold`](#stold)\ -[`stoll`](#stoll)\ -[`stoul`](#stoul)\ -[`stoull`](#stoull)\ -[`swap`](#swap)\ -[`to_string`](#to_string)\ -[`to_wstring`](#to_wstring) +The `` header provides the following functions: ## `getline` @@ -144,8 +132,7 @@ double stod( double stod( const wstring& str, - size_t* idx = 0 -; + size_t* idx = 0); ``` ### Parameters diff --git a/docs/standard-library/string-operators.md b/docs/standard-library/string-operators.md index 337f916ab3..692a728f2d 100644 --- a/docs/standard-library/string-operators.md +++ b/docs/standard-library/string-operators.md @@ -1,22 +1,13 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["string/std::operator!=", "string/std::operator>", "string/std::operator>>", "string/std::operator>=", "string/std::operator<", "string/std::operator<<", "string/std::operator<=", "string/std::operator+", "string/std::operator=="] -ms.assetid: 33ce8f05-06c7-45d3-a0cb-bcd27cf93910 helpviewer_keywords: ["std::operator!= (string)", "std::operator> (string)", "std::operator>> (string)", "std::operator>= (string)", "std::operator< (string)", "std::operator<< (string)", "std::operator<= (string), std::operator== (string)"] --- # `` operators -[operator!=](#op_neq)\ -[`operator>`](#op_gt)\ -[`operator>>`](#op_gt_gt)\ -[`operator>=`](#op_gt_eq)\ -[`operator<`](#op_lt)\ -[`operator<<`](#op_lt_lt)\ -[`operator<=`](#op_lt_eq)\ -[operator+](#op_add)\ -[operator==](#op_eq_eq) +The `` header provides the following operators: ## operator+ @@ -98,7 +89,7 @@ The string that is the concatenation of the input strings. ### Remarks -The functions each overload `operator+` to concatenate two objects of class template [basic_string Class](../standard-library/basic-string-class.md). All effectively return `basic_string< CharType, Traits, Allocator>(Left).append(right)`. For more information, see [append](../standard-library/basic-string-class.md#append). +The functions each overload `operator+` to concatenate two objects of class template [`basic_string`](../standard-library/basic-string-class.md). All effectively return `basic_string< CharType, Traits, Allocator>(Left).append(right)`. For more information, see [append](../standard-library/basic-string-class.md#append). ### Example @@ -801,7 +792,7 @@ The template function overloads **operator>>** to replace the sequence controlle After the function extracts `_Istr`. [max_size](../standard-library/basic-string-class.md#max_size) elements. -- After the function extracts an element *ch* for which [use_facet](../standard-library/basic-filebuf-class.md#open)< **ctype**\< **CharType**> >( `getloc`). **is**( **ctype**\< **CharType**>:: **space**, *ch*) is true, in which case the character is put back. +- After the function extracts an element *ch* for which [use_facet](../standard-library/basic-filebuf-class.md#open)< **ctype**\< **CharType**> >(`getloc`). **is**( **ctype**\< **CharType**>:: **space**, *ch*) is true, in which case the character is put back. If the function extracts no elements, it calls [setstate](../standard-library/basic-ios-class.md#setstate)(`ios_base::failbit`). In any case, it calls **istr**. **width**(0) and returns \* **`this`**. diff --git a/docs/standard-library/string-typedefs.md b/docs/standard-library/string-typedefs.md index 8f4f7bfa12..23ba6e7b50 100644 --- a/docs/standard-library/string-typedefs.md +++ b/docs/standard-library/string-typedefs.md @@ -1,16 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["string/std::string", "string/std::u16string", "string/std::u32string", "string/std::wstring"] -ms.assetid: fdca01e9-f2f1-4b59-abda-0093d760b3cc --- # `` typedefs -[`string`](#string)\ -[`u16string`](#u16string)\ -[`u32string`](#u32string)\ -[`wstring`](#wstring) +The `` header provides the following typedefs: ## `string` diff --git a/docs/standard-library/string-view-typedefs.md b/docs/standard-library/string-view-typedefs.md index 618b7ffee3..083d68db24 100644 --- a/docs/standard-library/string-view-typedefs.md +++ b/docs/standard-library/string-view-typedefs.md @@ -1,15 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "04/19/2019" +description: "Learn more about: typedefs" +ms.date: 04/19/2019 f1_keywords: ["xstring/std::string_view", "xstring/std::u16string_view", "xstring/std::u32string_view", "xstring/std::wstring_view"] --- # `` typedefs -[string_view](#string_view)\ -[u16string_view](#u16string_view)\ -[u32string_view](#u32string_view)\ -[wstring_view](#wstring_view) +The `` header provides the following typedefs: ## string_view diff --git a/docs/standard-library/string-view.md b/docs/standard-library/string-view.md index 48ef23cc2a..7582ab417c 100644 --- a/docs/standard-library/string-view.md +++ b/docs/standard-library/string-view.md @@ -1,7 +1,7 @@ --- title: "" description: "Overview of `basic_string_view`, which refers to a constant contiguous sequence of char-like objects." -ms.date: "9/4/2020" +ms.date: 9/4/2020 helpviewer_keywords: ["string_view header"] --- # `` @@ -37,7 +37,7 @@ The `` operators can compare `string_view` objects to objects of an |[`operator==`](../standard-library/string-view-operators.md#op_eq_eq)|Tests if the object on the left side of the operator is equal to the object on the right side.| |[`operator<`](../standard-library/string-view-operators.md#op_lt)|Tests if the object on the left side of the operator is less than to the object on the right side.| |[`operator<=`](../standard-library/string-view-operators.md#op_lt_eq)|Tests if the object on the left side of the operator is less than or equal to the object on the right side.| -|[`operator<\<`](../standard-library/string-view-operators.md#op_lt_lt)|A template function that inserts a `string_view` into an output stream.| +|[`operator<<`](../standard-library/string-view-operators.md#op_lt_lt)|A template function that inserts a `string_view` into an output stream.| |[`operator>`](../standard-library/string-view-operators.md#op_gt)|Tests if the object on the left side of the operator is greater than to the object on the right side.| |[`operator>=`](../standard-library/string-view-operators.md#op_gt_eq)|Tests if the object on the left side of the operator is greater than or equal to the object on the right side.| diff --git a/docs/standard-library/strstream-class.md b/docs/standard-library/strstream-class.md index 3efda849d7..0a4c9c3d6b 100644 --- a/docs/standard-library/strstream-class.md +++ b/docs/standard-library/strstream-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: strstream Class" title: "strstream Class" -ms.date: "11/04/2016" +description: "Learn more about: strstream Class" +ms.date: 11/04/2016 f1_keywords: ["strstream/std::strstream::freeze", "strstream/std::strstream::pcount", "strstream/std::strstream::rdbuf", "strstream/std::strstream::str"] helpviewer_keywords: ["std::strstream [C++], freeze", "std::strstream [C++], pcount", "std::strstream [C++], rdbuf", "std::strstream [C++], str"] -ms.assetid: 63f3be31-9e36-42b1-9715-a474a5997e2a --- # strstream Class @@ -152,9 +151,9 @@ The buffer. Both constructors initialize the base class by calling [streambuf](../standard-library/streambuf-typedefs.md#streambuf)( **sb**), where `sb` is the stored object of class [strstreambuf](../standard-library/strstreambuf-class.md). The first constructor also initializes `sb` by calling [strstreambuf](../standard-library/strstreambuf-class.md#strstreambuf). The second constructor initializes the base class one of two ways: -- If `_Mode` & **ios_base::app**== 0, then *ptr* must designate the first element of an array of `count` elements, and the constructor calls `strstreambuf`( `ptr`, `count`, `ptr`). +- If `_Mode` & **ios_base::app**== 0, then *ptr* must designate the first element of an array of `count` elements, and the constructor calls `strstreambuf`(`ptr`, `count`, `ptr`). -- Otherwise, *ptr* must designate the first element of an array of count elements that contains a C string whose first element is designated by *ptr*, and the constructor calls `strstreambuf`( `ptr`, `count`, `ptr` + `strlen`( `ptr`) ). +- Otherwise, *ptr* must designate the first element of an array of count elements that contains a C string whose first element is designated by *ptr*, and the constructor calls `strstreambuf`(`ptr`, `count`, `ptr` + `strlen`(`ptr`)). ## See also diff --git a/docs/standard-library/subrange-class.md b/docs/standard-library/subrange-class.md index 52de035e0a..7f269483d0 100644 --- a/docs/standard-library/subrange-class.md +++ b/docs/standard-library/subrange-class.md @@ -111,7 +111,7 @@ For information about template parameter types, see [Template parameters](#templ ### Return value -A `subrange`instance. +A `subrange` instance. ### Remarks diff --git a/docs/standard-library/system-error-functions.md b/docs/standard-library/system-error-functions.md index af053fb4cb..6de6c2d6a2 100644 --- a/docs/standard-library/system-error-functions.md +++ b/docs/standard-library/system-error-functions.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: functions" title: " functions" +description: "Learn more about: functions" ms.date: "03/15/2019" f1_keywords: ["system_error/std::generic_category", "system_error/std::make_error_code", "system_error/std::make_error_condition", "system_error/std::system_category"] -ms.assetid: 57d6f15f-f0b7-4e2f-80fe-31d3c320ee33 helpviewer_keywords: ["std::generic_category", "std::make_error_code", "std::make_error_condition", "std::system_category"] --- # `` functions @@ -18,20 +17,24 @@ const error_category& generic_category() noexcept; ### Remarks -The `generic_category` object is an implementation of [error_category](../standard-library/error-category-class.md). +The `generic_category` object is an implementation of [error_category](error-category-class.md). ## is_error_code_enum_v +A helper variable template for the [`is_error_code_enum`](is-error-code-enum-class.md) value. + ```cpp template - inline constexpr bool is_error_code_enum_v = is_error_code_enum::value; +constexpr bool is_error_code_enum_v = is_error_code_enum::value; ``` ## is_error_condition_enum_v +A helper variable template for the [`is_error_condition_enum`](is-error-condition-enum-class.md) value. + ```cpp template - inline constexpr bool is_error_condition_enum_v = is_error_condition_enum::value; +constexpr bool is_error_condition_enum_v = is_error_condition_enum::value; ``` ## make_error_code @@ -51,8 +54,6 @@ The `std::errc` enumeration value to store in the error code object. The error code object. -### Remarks - ## make_error_condition Creates an error condition object. @@ -64,17 +65,15 @@ error_condition make_error_condition(std::errc error) noexcept; ### Parameters *error*\ -The `std::errc` enumeration value to store in the error code object. +The `std::errc` enumeration value to store in the error condition object. ### Return Value The error condition object. -### Remarks - ## system_category -Represents the category for errors caused by low-level system overflows. +Represents the category for operating system errors. ```cpp const error_category& system_category() noexcept; @@ -82,4 +81,4 @@ const error_category& system_category() noexcept; ### Remarks -The `system_category` object is an implementation of [error_category](../standard-library/error-category-class.md). +The `system_category` object is an implementation of [error_category](error-category-class.md). diff --git a/docs/standard-library/system-error-operators.md b/docs/standard-library/system-error-operators.md index ad43985bc5..58a4e804c3 100644 --- a/docs/standard-library/system-error-operators.md +++ b/docs/standard-library/system-error-operators.md @@ -1,13 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: "3/17/2025" f1_keywords: ["system_error/std::operator!=", "system_error/std::operator=="] -ms.assetid: c14edefb-bd8a-4e90-88d3-c59c98e6f73c --- # `` operators -## operator== +## `operator==` Tests if the object on the left side of the operator is equal to the object on the right side. @@ -24,11 +23,11 @@ bool operator==(const error_condition& left, ### Parameters -*left*\ -The object to be tested for equality. +*`left`*\ +The object to test for equality. -*right*\ -The object to be tested for equality. +*`right`*\ +The object to test for equality. ### Return Value @@ -38,7 +37,7 @@ The object to be tested for equality. This function returns `left.category() == right.category() && left.value() == right.value()`. -## operator!= +## `operator!=` Tests if the object on the left side of the operator is not equal to the object on the right side. @@ -51,15 +50,15 @@ bool operator!=(const error_condition& left, const error_condition& right); ### Parameters -*left*\ -The object to be tested for inequality. +*`left`*\ +The object to test for inequality. -*right*\ -The object to be tested for inequality. +*`right`*\ +The object to test for inequality. ### Return Value -**`true`** if the object passed in *left* is not equal to the object passed in *right*; otherwise **`false`**. +**`true`** if the object passed in *left* is not equal to the object passed in *`right`*; otherwise **`false`**. ### Remarks @@ -95,15 +94,15 @@ inline bool operator<( ### Parameters -*left*\ -The object to be compared. +*`left`*\ +The object to compare. -*right*\ -The object to be compared. +*`right`*\ +The object to compare. ### Return Value -**`true`** if the object passed in *left* is less than the object passed in *right*; Otherwise, **`false`**. +**`true`** if the object passed in *`left`* is less than the object passed in *`right`*; Otherwise, **`false`**. ### Remarks @@ -111,7 +110,42 @@ This function tests the error order. ## `operator<<` +Inserts an [`error_code`](error-code-class.md) object into the output stream. + ```cpp template - basic_ostream& operator<<(basic_ostream& os, const error_code& ec); +basic_ostream& operator<<(basic_ostream& os, const error_code& ec); +``` + +### Parameters + +*`os`*\ +The target output stream. + +*`ec`*\ +The `error_code` object to output. + +### Return Value + +A reference to the modified output stream. + +### Remarks + +This operator does the equivalent of `os << ec.category().name() << ':' << ec.value()`. + +### Example + +```cpp +#include +#include + +int main() +{ + std::error_code ec(1234, std::generic_category()); + std::cout << ec; +} +``` + +```Output +generic:1234 ``` diff --git a/docs/standard-library/thread-class.md b/docs/standard-library/thread-class.md index 91c7a8bd6f..e16b853338 100644 --- a/docs/standard-library/thread-class.md +++ b/docs/standard-library/thread-class.md @@ -1,7 +1,7 @@ --- description: "Learn more about: thread Class" title: "thread Class" -ms.date: 06/20/2022 +ms.date: 09/11/2024 f1_keywords: ["thread/std::thread", "thread/std::thread::id Class", "thread/std::thread::thread", "thread/std::thread::detach", "thread/std::thread::get_id", "thread/std::thread::hardware_concurrency", "thread/std::thread::join", "thread/std::thread::joinable", "thread/std::thread::native_handle", "thread/std::thread::swap"] helpviewer_keywords: ["std::thread [C++]", "std::thread [C++], thread", "std::thread [C++], detach", "std::thread [C++], get_id", "std::thread [C++], hardware_concurrency", "std::thread [C++], join", "std::thread [C++], joinable", "std::thread [C++], native_handle", "std::thread [C++], swap"] ms.custom: devdivchpfy22 @@ -73,9 +73,9 @@ void detach(); After a call to `detach`, subsequent calls to [`get_id`](#get_id) return [`id`](#id_class). -If the thread that's associated with the calling object isn't joinable, the function throws a [`system_error`](../standard-library/system-error-class.md) that has an error code of `invalid_argument`. +If the thread associated with the calling object isn't joinable, the function throws a [`system_error`](../standard-library/system-error-class.md) that has an error code of `invalid_argument`. -If the thread that's associated with the calling object is invalid, the function throws a `system_error` that has an error code of `no_such_process`. +If the thread associated with the calling object is invalid, the function throws a `system_error` that has an error code of `no_such_process`. ## `get_id` @@ -85,9 +85,9 @@ Returns a unique identifier for the associated thread. id get_id() const noexcept; ``` -### Return Value +### Return value -A [`id`](#id_class) object that uniquely identifies the associated thread, or `id()` if no thread is associated with the object. +An [`id`](#id_class) object that uniquely identifies the associated thread, or `id()` if no thread is associated with the object. ## `hardware_concurrency` @@ -97,15 +97,17 @@ Static method that returns an estimate of the number of hardware thread contexts static unsigned int hardware_concurrency() noexcept; ``` -### Return Value +### Return value An estimate of the number of hardware thread contexts. If the value can't be computed or isn't well defined, this method returns 0. -### Microsoft Specific +**Microsoft specific** -`hardware_concurrency` is currently defined to return the number of logical processors, which corresponds to the number of hardware threads that can execute simultaneously. It takes into account the number of physical processors, the number of cores in each physical processor, and simultaneous multithreading on each single core. - -However, on systems with more than 64 logical processors this number is capped by the number of logical processors in a single group; see [Processor Groups](/windows/win32/procthread/processor-groups). +`hardware_concurrency` returns the number of logical processors, which corresponds to the number of hardware threads that can execute simultaneously. It takes into account the number of physical processors, the number of cores in each physical processor, and simultaneous multithreading on each single core. + +Before Windows 11 and Windows Server 2022, applications were limited by default to a single processor group, having at most 64 logical processors. This limited the number of concurrently executing threads to 64. For more information, see [Processor Groups](/windows/win32/procthread/processor-groups). + +Starting with Windows 11 and Windows Server 2022, processes and their threads have processor affinities that by default span all processors in the system and across multiple groups on machines with more than 64 processors. The limit on the number of concurrent threads is now the total number of logical processors in the system. ## `id` class @@ -125,7 +127,7 @@ All default-constructed `thread::id` objects compare equal. ## `join` -Blocks until the thread of execution that's associated with the calling object completes. +Blocks until the thread of execution associated with the calling object completes. ```cpp void join(); @@ -143,7 +145,7 @@ Specifies whether the associated thread is joinable. bool joinable() const noexcept; ``` -### Return Value +### Return value **`true`** if the associated thread is joinable; otherwise, **`false`**. @@ -159,9 +161,9 @@ Returns the implementation-specific type that represents the thread handle. The native_handle_type native_handle(); ``` -### Return Value +### Return value -`native_handle_type` is defined as a Win32 `HANDLE` that's cast as `void *`. +`native_handle_type` is defined as a Win32 `HANDLE` cast as `void *`. ## `thread::operator=` @@ -176,7 +178,7 @@ thread& operator=(thread&& Other) noexcept; *`Other`*\ A `thread` object. -### Return Value +### Return value `*this` @@ -214,7 +216,7 @@ thread(thread&& Other) noexcept; ### Parameters *`F`*\ -An application-defined function to be executed by the thread. +An application-defined function to execute on the thread. *`A`*\ A list of arguments to be passed to *`F`*. @@ -224,9 +226,9 @@ An existing `thread` object. ### Remarks -The first constructor constructs an object that's not associated with a thread of execution. The value that's returned by a call to `get_id` for the constructed object is `thread::id()`. +The first constructor constructs an object that's not associated with a thread of execution. The value returned by `get_id` for the constructed object is `thread::id()`. -The second constructor constructs an object that's associated with a new thread of execution and executes the pseudo-function `INVOKE` that's defined in [``](../standard-library/functional.md). If not enough resources are available to start a new thread, the function throws a [`system_error`](../standard-library/system-error-class.md) object that has an error code of `resource_unavailable_try_again`. If the call to *`F`* terminates with an uncaught exception, [`terminate`](../standard-library/exception-functions.md#terminate) is called. +The second constructor constructs an object that's associated with a new thread of execution. It executes the pseudo-function `INVOKE` defined in [``](../standard-library/functional.md). If not enough resources are available to start a new thread, the function throws a [`system_error`](../standard-library/system-error-class.md) object that has an error code of `resource_unavailable_try_again`. If the call to *`F`* terminates with an uncaught exception, [`terminate`](../standard-library/exception-functions.md#terminate) is called. The call to *`F`* must not cause the thread to exit prematurely, such as by calling `ExitThread` or `_endthreadex`. The third constructor constructs an object that's associated with the thread that's associated with `Other`. `Other` is then set to a default-constructed state. diff --git a/docs/standard-library/thread-operators.md b/docs/standard-library/thread-operators.md index ad1f33155d..485cbf10b5 100644 --- a/docs/standard-library/thread-operators.md +++ b/docs/standard-library/thread-operators.md @@ -1,20 +1,13 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["thread/std::operator!=", "thread/std::operator>", "thread/std::operator>=", "thread/std::operator<", "thread/std::operator<<", "thread/std::operator<=", "thread/std::operator=="] -ms.assetid: e6bb6c0f-64f9-4cb2-9ff2-05b88a6ba7ac helpviewer_keywords: ["std::operator!= (thread)", "std::operator> (thread)", "std::operator>= (thread)", "std::operator< (thread)", "std::operator<< (thread)", "std::operator<= (thread)", "std::operator== (thread)"] --- # `` operators -[operator!=](#op_neq)\ -[`operator>`](#op_gt)\ -[`operator>=`](#op_gt_eq)\ -[`operator<`](#op_lt)\ -[`operator<<`](#op_lt_lt)\ -[`operator<=`](#op_lt_eq)\ -[operator==](#op_eq_eq) +The `` header provides the following operators: ## `operator>=` diff --git a/docs/standard-library/time-get-byname-class.md b/docs/standard-library/time-get-byname-class.md index 25750ba601..abd437c52b 100644 --- a/docs/standard-library/time-get-byname-class.md +++ b/docs/standard-library/time-get-byname-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: time_get_byname Class" title: "time_get_byname Class" -ms.date: "11/04/2016" +description: "Learn more about: time_get_byname Class" +ms.date: 11/04/2016 f1_keywords: ["xloctime/std::time_get_byname"] helpviewer_keywords: ["time_get_byname class"] -ms.assetid: 6e54153e-da40-4bb9-a942-1a6ce57b30c9 --- # time_get_byname Class @@ -41,7 +40,7 @@ An initial reference count. ## Requirements -Its behavior is determined by the named locale *_Locname*. Each constructor initializes its base object with [time_get](../standard-library/time-get-class.md#time_get)\( `_Refs`). +Its behavior is determined by the named locale *_Locname*. Each constructor initializes its base object with [time_get](../standard-library/time-get-class.md#time_get)\(`_Refs`). **Header:** \ diff --git a/docs/standard-library/time-put-class.md b/docs/standard-library/time-put-class.md index 60255f4f25..7792d1448d 100644 --- a/docs/standard-library/time-put-class.md +++ b/docs/standard-library/time-put-class.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: time_put Class" title: "time_put Class" -ms.date: "11/04/2016" +description: "Learn more about: time_put Class" +ms.date: 11/04/2016 f1_keywords: ["xloctime/std::time_put", "locale/std::time_put::char_type", "locale/std::time_put::iter_type", "locale/std::time_put::do_put", "locale/std::time_put::put"] helpviewer_keywords: ["std::time_put [C++]", "std::time_put [C++], char_type", "std::time_put [C++], iter_type", "std::time_put [C++], do_put", "std::time_put [C++], put"] -ms.assetid: df79493e-3331-48d2-97c3-ac3a745f0791 --- # time_put Class @@ -176,7 +175,7 @@ An iterator to the first position after the last element inserted. ### Remarks -The first member function returns [do_put](#do_put)(`next`, `_Iosbase`, `_Fill`, `_Pt`, `_Fmt`, `_Mod`). The second member function copies to \* `next` ++ any element in the interval [ `first`, `last`) other than a percent (%). For a percent followed by a character *C* in the interval [ `first`, `last`), the function instead evaluates `next` = `do_put`( `next`, `_Iosbase`, `_Fill`, `_Pt`, *C*, 0) and skips past *C*. If, however, *C* is a qualifier character from the set EOQ#, followed by a character `C2` in the interval [ `first`, `last`), the function instead evaluates `next` = `do_put`( `next`, `_Iosbase`, `_Fill`, `_Pt`, `C2`, *C*) and skips past `C2`. +The first member function returns [do_put](#do_put)(`next`, `_Iosbase`, `_Fill`, `_Pt`, `_Fmt`, `_Mod`). The second member function copies to \* `next` ++ any element in the interval [ `first`, `last`) other than a percent (%). For a percent followed by a character *C* in the interval [ `first`, `last`), the function instead evaluates `next` = `do_put`(`next`, `_Iosbase`, `_Fill`, `_Pt`, *C*, 0) and skips past *C*. If, however, *C* is a qualifier character from the set EOQ#, followed by a character `C2` in the interval [ `first`, `last`), the function instead evaluates `next` = `do_put`(`next`, `_Iosbase`, `_Fill`, `_Pt`, `C2`, *C*) and skips past `C2`. ### Example diff --git a/docs/standard-library/toc.yml b/docs/standard-library/toc.yml index 12935fdd96..da06070882 100644 --- a/docs/standard-library/toc.yml +++ b/docs/standard-library/toc.yml @@ -797,6 +797,8 @@ items: href: recursive-mutex-class.md - name: recursive_timed_mutex class href: recursive-timed-mutex-class.md + - name: scoped_lock class + href: scoped-lock-class.md - name: timed_mutex class href: timed-mutex-class.md - name: try_to_lock_t struct @@ -1447,6 +1449,8 @@ items: href: utility-operators.md - name: identity struct href: identity-structure.md + - name: in_place_t, in_place_type_t, in_place_index_t struct + href: in-place-t-struct.md - name: pair struct href: pair-structure.md - name: diff --git a/docs/standard-library/treat-as-floating-point-structure.md b/docs/standard-library/treat-as-floating-point-structure.md index 7389b8620f..4dbd2818c3 100644 --- a/docs/standard-library/treat-as-floating-point-structure.md +++ b/docs/standard-library/treat-as-floating-point-structure.md @@ -1,11 +1,10 @@ --- -description: "Learn more about: treat_as_floating_point structure" title: "treat_as_floating_point Structure" +description: "Learn more about: treat_as_floating_point structure" ms.date: 07/16/2021 f1_keywords: ["chrono/std::chrono::treat_as_floating_point"] helpviewer_keywords: ["std::chrono [C++], treat_as_floating_point"] dev_langs: ["C++"] - --- # `treat_as_floating_point` structure diff --git a/docs/standard-library/tuple-size-class-tuple.md b/docs/standard-library/tuple-size-class-tuple.md index e5ed361621..43ca9b50ea 100644 --- a/docs/standard-library/tuple-size-class-tuple.md +++ b/docs/standard-library/tuple-size-class-tuple.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: tuple_size class;" -title: "tuple_size class;" +title: "tuple_size class" +description: "Learn more about: tuple_size class" ms.date: 06/29/2022 f1_keywords: ["tuple_size", "std::tuple_size", "utility/std::tuple_size"] helpviewer_keywords: ["std::tuple_size"] -ms.assetid: 73852fc5-eb68-41f1-8379-465cedc2314a --- # `tuple_size` class diff --git a/docs/standard-library/type-traits-functions.md b/docs/standard-library/type-traits-functions.md index 4bf7fc0c66..1cf5eab06c 100644 --- a/docs/standard-library/type-traits-functions.md +++ b/docs/standard-library/type-traits-functions.md @@ -1,26 +1,12 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" -ms.assetid: dce4492f-f3e4-4d5e-bdb4-5875321254ec +description: "Learn more about: functions" +ms.date: 11/04/2016 helpviewer_keywords: ["std::is_assignable", "std::is_copy_assignable", "std::is_copy_constructible", "std::is_default_constructible", "std::is_move_assignable", "std::is_move_constructible", "std::is_nothrow_move_assignable", "std::is_trivially_copy_assignable", "std::is_trivially_move_assignable", "std::is_trivially_move_constructible"] --- # `` functions -[is_assignable](#is_assignable)\ -[is_copy_assignable](#is_copy_assignable)\ -[is_copy_constructible](#is_copy_constructible)\ -[is_default_constructible](#is_default_constructible)\ -[is_move_assignable](#is_move_assignable)\ -[is_move_constructible](#is_move_constructible)\ -[is_nothrow_move_assignable](#is_nothrow_move_assignable)\ -[is_nothrow_swappable](#is_nothrow_swappable)\ -[is_nothrow_swappable_with](#is_nothrow_swappable_with)\ -[is_swappable](#is_swappable)\ -[is_swappable_with](#is_swappable_with)\ -[is_trivially_copy_assignable](#is_trivially_copy_assignable)\ -[is_trivially_move_assignable](#is_trivially_move_assignable)\ -[is_trivially_move_constructible](#is_trivially_move_constructible) +The `` header provides the following functions: ## is_assignable diff --git a/docs/standard-library/type-traits-typedefs.md b/docs/standard-library/type-traits-typedefs.md index b1df31e15f..95eaa6fc7b 100644 --- a/docs/standard-library/type-traits-typedefs.md +++ b/docs/standard-library/type-traits-typedefs.md @@ -1,14 +1,12 @@ --- -description: "Learn more about: typedefs" title: " typedefs" -ms.date: "11/04/2016" +description: "Learn more about: typedefs" +ms.date: 11/04/2016 f1_keywords: ["type_traits/std::false_type", "xtr1common/std::false_type", "type_traits/std::true_type", "xtr1common/std::true_type"] -ms.assetid: 8ac040ca-ed2d-4570-adc9-cb5626530053 --- # `` typedefs -[false_type](#false_type)\ -[true_type](#true_type) +The `` header provides the following typedefs: ## false_type Typedef diff --git a/docs/standard-library/unordered-map-class.md b/docs/standard-library/unordered-map-class.md index 90f5e8ac49..6c477c968a 100644 --- a/docs/standard-library/unordered-map-class.md +++ b/docs/standard-library/unordered-map-class.md @@ -4,7 +4,6 @@ description: "API reference for the C++ Standard Library container class `unorde ms.date: 06/20/2022 f1_keywords: ["unordered_map/std::unordered_map", "unordered_map/std::unordered_map::allocator_type", "unordered_map/std::unordered_map::const_iterator", "unordered_map/std::unordered_map::const_local_iterator", "unordered_map/std::unordered_map::const_pointer", "unordered_map/std::unordered_map::const_reference", "unordered_map/std::unordered_map::difference_type", "unordered_map/std::unordered_map::hasher", "unordered_map/std::unordered_map::iterator", "unordered_map/std::unordered_map::key_equal", "unordered_map/std::unordered_map::key_type", "unordered_map/std::unordered_map::local_iterator", "unordered_map/std::unordered_map::mapped_type", "unordered_map/std::unordered_map::pointer", "unordered_map/std::unordered_map::reference", "unordered_map/std::unordered_map::size_type", "unordered_map/std::unordered_map::value_type", "unordered_map/std::unordered_map::at", "unordered_map/std::unordered_map::begin", "unordered_map/std::unordered_map::bucket", "unordered_map/std::unordered_map::bucket_count", "unordered_map/std::unordered_map::bucket_size", "unordered_map/std::unordered_map::cbegin", "unordered_map/std::unordered_map::cend", "unordered_map/std::unordered_map::clear", "unordered_map/std::unordered_map::contains", "unordered_map/std::unordered_map::count", "unordered_map/std::unordered_map::emplace", "unordered_map/std::unordered_map::emplace_hint", "unordered_map/std::unordered_map::empty", "unordered_map/std::unordered_map::end", "unordered_map/std::unordered_map::equal_range", "unordered_map/std::unordered_map::erase", "unordered_map/std::unordered_map::find", "unordered_map/std::unordered_map::get_allocator", "unordered_map/std::unordered_map::hash", "unordered_map/std::unordered_map::insert", "unordered_map/std::unordered_map::key_eq", "unordered_map/std::unordered_map::load_factor", "unordered_map/std::unordered_map::max_bucket_count", "unordered_map/std::unordered_map::max_load_factor", "unordered_map/std::unordered_map::max_size", "unordered_map/std::unordered_map::rehash", "unordered_map/std::unordered_map::size", "unordered_map/std::unordered_map::swap", "unordered_map/std::unordered_map::unordered_map", "unordered_map/std::unordered_map::hash_function"] helpviewer_keywords: ["std::unordered_map", "std::unordered_map::allocator_type", "std::unordered_map::const_iterator", "std::unordered_map::const_local_iterator", "std::unordered_map::const_pointer", "std::unordered_map::const_reference", "std::unordered_map::difference_type", "std::unordered_map::hasher", "std::unordered_map::iterator", "std::unordered_map::key_equal", "std::unordered_map::key_type", "std::unordered_map::local_iterator", "std::unordered_map::mapped_type", "std::unordered_map::pointer", "std::unordered_map::reference", "std::unordered_map::size_type", "std::unordered_map::value_type", "std::unordered_map::at", "std::unordered_map::begin", "std::unordered_map::bucket", "std::unordered_map::bucket_count", "std::unordered_map::bucket_size", "std::unordered_map::cbegin", "std::unordered_map::cend", "std::unordered_map::clear", "std::unordered_map::contains", "std::unordered_map::count", "std::unordered_map::emplace", "std::unordered_map::emplace_hint", "std::unordered_map::empty", "std::unordered_map::end", "std::unordered_map::equal_range", "std::unordered_map::erase", "std::unordered_map::find", "std::unordered_map::get_allocator", "std::unordered_map::hash", "std::unordered_map::insert", "std::unordered_map::key_eq", "std::unordered_map::load_factor", "std::unordered_map::max_bucket_count", "std::unordered_map::max_load_factor", "std::unordered_map::max_size", "std::unordered_map::rehash", "std::unordered_map::size", "std::unordered_map::swap", "std::unordered_map::unordered_map", "std::unordered_map::allocator_type", "std::unordered_map::const_iterator", "std::unordered_map::const_local_iterator", "std::unordered_map::const_pointer", "std::unordered_map::const_reference", "std::unordered_map::difference_type", "std::unordered_map::hasher", "std::unordered_map::iterator", "std::unordered_map::key_equal", "std::unordered_map::key_type", "std::unordered_map::local_iterator", "std::unordered_map::mapped_type", "std::unordered_map::pointer", "std::unordered_map::reference", "std::unordered_map::size_type", "std::unordered_map::value_type", "std::unordered_map::at", "std::unordered_map::begin", "std::unordered_map::bucket", "std::unordered_map::bucket_count", "std::unordered_map::bucket_size", "std::unordered_map::cbegin", "std::unordered_map::cend", "std::unordered_map::clear", "std::unordered_map::count", "std::unordered_map::emplace", "std::unordered_map::emplace_hint", "std::unordered_map::empty", "std::unordered_map::end", "std::unordered_map::equal_range", "std::unordered_map::erase", "std::unordered_map::find", "std::unordered_map::get_allocator", "std::unordered_map::hash_function", "std::unordered_map::insert", "std::unordered_map::key_eq", "std::unordered_map::load_factor", "std::unordered_map::max_bucket_count", "std::unordered_map::max_load_factor", "std::unordered_map::max_size", "std::unordered_map::rehash", "std::unordered_map::size", "std::unordered_map::swap"] -ms.assetid: 7cf7cfa1-16e7-461c-a9b2-3b8d8ec24e0d ms.custom: devdivchpfy22 --- @@ -100,7 +99,7 @@ The allocator class. ## Remarks -The object orders the sequence it controls by calling two stored objects, a comparison function object of type [`unordered_map::key_equal`](#key_equal) and a hash function object of type [`unordered_map::hasher`](#hasher). You access the first stored object by calling the member function [`unordered_map::key_eq`](#key_eq)`()`; and you access the second stored object by calling the member function [`unordered_map::hash_function`](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_multimap` Class](../standard-library/unordered-multimap-class.md), an object of type `unordered_map` ensures that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys are unique.) +The object orders the sequence it controls by calling two stored objects, a comparison function object of type [`unordered_map::key_equal`](#key_equal) and a hash function object of type [`unordered_map::hasher`](#hasher). You access the first stored object by calling the member function [`unordered_map::key_eq`](#key_eq)`()`; and you access the second stored object by calling the member function [`unordered_map::hash_function`](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_multimap`](../standard-library/unordered-multimap-class.md), an object of type `unordered_map` ensures that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys are unique.) The object also stores a maximum load factor, which specifies the maximum desired average number of elements per bucket. If inserting an element causes [`unordered_map::load_factor`](#load_factor)`()` to exceed the maximum load factor, the container increases the number of buckets and rebuilds the hash table as needed. @@ -2781,4 +2780,4 @@ int main() ## See also [``](../standard-library/unordered-map.md)\ -[Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md)\ +[Thread Safety in the C++ Standard Library](../standard-library/thread-safety-in-the-cpp-standard-library.md) diff --git a/docs/standard-library/unordered-map-functions.md b/docs/standard-library/unordered-map-functions.md index 36f731bacf..20e3941dff 100644 --- a/docs/standard-library/unordered-map-functions.md +++ b/docs/standard-library/unordered-map-functions.md @@ -1,15 +1,13 @@ --- -description: "Learn more about: functions" title: " functions" -ms.date: "11/04/2016" +description: "Learn more about: functions" +ms.date: 11/04/2016 f1_keywords: ["unordered_map/std::swap", "unordered_map/std::swap (unordered_map)", "unordered_map/std::swap (unordered_multimap)"] -ms.assetid: cf2e4115-f205-4a0e-90be-a143ffcc1f44 helpviewer_keywords: ["std::swap (unordered_map/multimap)"] --- # `` functions -[swap (unordered_map)](#swap) -[swap (unordered_multimap)](#swap_function_multimap) +The `` header provides the following functions: ## swap (unordered_map) diff --git a/docs/standard-library/unordered-map-operators.md b/docs/standard-library/unordered-map-operators.md index 1e4e87c66d..5913612c65 100644 --- a/docs/standard-library/unordered-map-operators.md +++ b/docs/standard-library/unordered-map-operators.md @@ -1,16 +1,12 @@ --- -description: "Learn more about: operators" title: " operators" -ms.date: "11/04/2016" +description: "Learn more about: operators" +ms.date: 11/04/2016 f1_keywords: ["unordered_map/std::operator!=", "unordered_map/std::operator=="] -ms.assetid: 9d5add0b-84bd-4a79-bd82-3f58b55145ed --- # `` operators -[unordered_map::operator!=](#op_neq)\ -[unordered_map::operator==](#op_eq_eq)\ -[unordered_multimap::operator!=](#op_neq_multimap)\ -[unordered_multimap::operator==](#op_eq_eq_multimap) +The `` header provides the following operators: ## operator!= diff --git a/docs/standard-library/unordered-multimap-class.md b/docs/standard-library/unordered-multimap-class.md index 0f61a2cac0..aa702c0206 100644 --- a/docs/standard-library/unordered-multimap-class.md +++ b/docs/standard-library/unordered-multimap-class.md @@ -1,13 +1,12 @@ --- title: "unordered_multimap Class" description: "API overview for the C++ Standard Library container class `unordered_multimap`." -ms.date: "9/9/2020" +ms.date: 9/9/2020 f1_keywords: ["unordered_map/std::unordered_multimap", "unordered_map/std::unordered_multimap::allocator_type", "unordered_map/std::unordered_multimap::const_iterator", "unordered_map/std::unordered_multimap::const_local_iterator", "unordered_map/std::unordered_multimap::const_pointer", "unordered_map/std::unordered_multimap::const_reference", "unordered_map/std::unordered_multimap::difference_type", "unordered_map/std::unordered_multimap::hasher", "unordered_map/std::unordered_multimap::iterator", "unordered_map/std::unordered_multimap::key_equal", "unordered_map/std::unordered_multimap::key_type", "unordered_map/std::unordered_multimap::local_iterator", "unordered_map/std::unordered_multimap::mapped_type", "unordered_map/std::unordered_multimap::pointer", "unordered_map/std::unordered_multimap::reference", "unordered_map/std::unordered_multimap::size_type", "unordered_map/std::unordered_multimap::value_type", "unordered_map/std::unordered_multimap::begin", "unordered_map/std::unordered_multimap::bucket", "unordered_map/std::unordered_multimap::bucket_count", "unordered_map/std::unordered_multimap::bucket_size", "unordered_map/std::unordered_multimap::cbegin", "unordered_map/std::unordered_multimap::cend", "unordered_map/std::unordered_multimap::clear", "unordered_map/std::unordered_multimap::contains", "unordered_map/std::unordered_multimap::count", "unordered_map/std::unordered_multimap::emplace", "unordered_map/std::unordered_multimap::emplace_hint", "unordered_map/std::unordered_multimap::empty", "unordered_map/std::unordered_multimap::end", "unordered_map/std::unordered_multimap::equal_range", "unordered_map/std::unordered_multimap::erase", "unordered_map/std::unordered_multimap::find", "unordered_map/std::unordered_multimap::get_allocator", "unordered_map/std::unordered_multimap::hash", "unordered_map/std::unordered_multimap::insert", "unordered_map/std::unordered_multimap::key_eq", "unordered_map/std::unordered_multimap::load_factor", "unordered_map/std::unordered_multimap::max_bucket_count", "unordered_map/std::unordered_multimap::max_load_factor", "unordered_map/std::unordered_multimap::max_size", "unordered_map/std::unordered_multimap::rehash", "unordered_map/std::unordered_multimap::size", "unordered_map/std::unordered_multimap::swap", "unordered_map/std::unordered_multimap::unordered_multimap", "unordered_map/std::unordered_multimap::operator=", "unordered_map/std::unordered_multimap::hash_function"] helpviewer_keywords: ["std::unordered_multimap", "std::unordered_multimap::allocator_type", "std::unordered_multimap::const_iterator", "std::unordered_multimap::const_local_iterator", "std::unordered_multimap::const_pointer", "std::unordered_multimap::const_reference", "std::unordered_multimap::difference_type", "std::unordered_multimap::hasher", "std::unordered_multimap::iterator", "std::unordered_multimap::key_equal", "std::unordered_multimap::key_type", "std::unordered_multimap::local_iterator", "std::unordered_multimap::mapped_type", "std::unordered_multimap::pointer", "std::unordered_multimap::reference", "std::unordered_multimap::size_type", "std::unordered_multimap::value_type", "std::unordered_multimap::begin", "std::unordered_multimap::bucket", "std::unordered_multimap::bucket_count", "std::unordered_multimap::bucket_size", "std::unordered_multimap::cbegin", "std::unordered_multimap::cend", "std::unordered_multimap::clear", "std::unordered_multimap::contains", "std::unordered_multimap::count", "std::unordered_multimap::emplace", "std::unordered_multimap::emplace_hint", "std::unordered_multimap::empty", "std::unordered_multimap::end", "std::unordered_multimap::equal_range", "std::unordered_multimap::erase", "std::unordered_multimap::find", "std::unordered_multimap::get_allocator", "std::unordered_multimap::hash", "std::unordered_multimap::insert", "std::unordered_multimap::key_eq", "std::unordered_multimap::load_factor", "std::unordered_multimap::max_bucket_count", "std::unordered_multimap::max_load_factor", "std::unordered_multimap::max_size", "std::unordered_multimap::rehash", "std::unordered_multimap::size", "std::unordered_multimap::swap", "std::unordered_multimap::unordered_multimap", "std::unordered_multimap::operator=", "std::unordered_multimap::allocator_type", "std::unordered_multimap::const_iterator", "std::unordered_multimap::const_local_iterator", "std::unordered_multimap::const_pointer", "std::unordered_multimap::const_reference", "std::unordered_multimap::difference_type", "std::unordered_multimap::hasher", "std::unordered_multimap::iterator", "std::unordered_multimap::key_equal", "std::unordered_multimap::key_type", "std::unordered_multimap::local_iterator", "std::unordered_multimap::mapped_type", "std::unordered_multimap::pointer", "std::unordered_multimap::reference", "std::unordered_multimap::size_type", "std::unordered_multimap::value_type", "std::unordered_multimap::begin", "std::unordered_multimap::bucket", "std::unordered_multimap::bucket_count", "std::unordered_multimap::bucket_size", "std::unordered_multimap::cbegin", "std::unordered_multimap::cend", "std::unordered_multimap::clear", "std::unordered_multimap::count", "std::unordered_multimap::emplace", "std::unordered_multimap::emplace_hint", "std::unordered_multimap::empty", "std::unordered_multimap::end", "std::unordered_multimap::equal_range", "std::unordered_multimap::erase", "std::unordered_multimap::find", "std::unordered_multimap::get_allocator", "std::unordered_multimap::hash_function", "std::unordered_multimap::insert", "std::unordered_multimap::key_eq", "std::unordered_multimap::load_factor", "std::unordered_multimap::max_bucket_count", "std::unordered_multimap::max_load_factor", "std::unordered_multimap::max_size", "std::unordered_multimap::rehash", "std::unordered_multimap::size", "std::unordered_multimap::swap"] -ms.assetid: 4baead6c-5870-4b85-940f-a47d6b891c27 --- # unordered_multimap Class @@ -99,7 +98,7 @@ The allocator class. ## Remarks -The object orders the sequence it controls by calling two stored objects, a comparison function object of type [unordered_multimap::key_equal](#key_equal) and a hash function object of type [unordered_multimap::hasher](#hasher). You access the first stored object by calling the member function [unordered_multimap::key_eq](#key_eq)`()`; and you access the second stored object by calling the member function [unordered_multimap::hash_function](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [unordered_map Class](../standard-library/unordered-map-class.md), an object of type `unordered_multimap` does not ensure that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys need not be unique.) +The object orders the sequence it controls by calling two stored objects, a comparison function object of type [unordered_multimap::key_equal](#key_equal) and a hash function object of type [unordered_multimap::hasher](#hasher). You access the first stored object by calling the member function [unordered_multimap::key_eq](#key_eq)`()`; and you access the second stored object by calling the member function [unordered_multimap::hash_function](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_map`](../standard-library/unordered-map-class.md), an object of type `unordered_multimap` does not ensure that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys need not be unique.) The object also stores a maximum load factor, which specifies the maximum desired average number of elements per bucket. If inserting an element causes [unordered_multimap::load_factor](#load_factor)`()` to exceed the maximum load factor, the container increases the number of buckets and rebuilds the hash table as needed. diff --git a/docs/standard-library/unordered-multiset-class.md b/docs/standard-library/unordered-multiset-class.md index 1a08ac38ec..711f79b9ed 100644 --- a/docs/standard-library/unordered-multiset-class.md +++ b/docs/standard-library/unordered-multiset-class.md @@ -1,10 +1,9 @@ --- title: "unordered_multiset Class" description: "API reference for the C++ Standard Library container class `unordered_multiset`, which describes an object used for the storage and retrieval of data from a collection in which the values of the elements contained need not be unique and in which they serve as the key values. The data isn't automatically ordered." -ms.date: "9/10/2020" +ms.date: 9/10/2020 f1_keywords: ["unordered_set/std::unordered_multiset", "unordered_set/std::unordered_multiset::allocator_type", "unordered_set/std::unordered_multiset::const_iterator", "unordered_set/std::unordered_multiset::const_local_iterator", "unordered_set/std::unordered_multiset::const_pointer", "unordered_set/std::unordered_multiset::const_reference", "unordered_set/std::unordered_multiset::difference_type", "unordered_set/std::unordered_multiset::hasher", "unordered_set/std::unordered_multiset::iterator", "unordered_set/std::unordered_multiset::key_equal", "unordered_set/std::unordered_multiset::key_type", "unordered_set/std::unordered_multiset::local_iterator", "unordered_set/std::unordered_multiset::pointer", "unordered_set/std::unordered_multiset::reference", "unordered_set/std::unordered_multiset::size_type", "unordered_set/std::unordered_multiset::value_type", "unordered_set/std::unordered_multiset::begin", "unordered_set/std::unordered_multiset::bucket", "unordered_set/std::unordered_multiset::bucket_count", "unordered_set/std::unordered_multiset::bucket_size", "unordered_set/std::unordered_multiset::cbegin", "unordered_set/std::unordered_multiset::cend", "unordered_set/std::unordered_multiset::clear", "unordered_set/std::unordered_multiset::contains", "unordered_set/std::unordered_multiset::count", "unordered_set/std::unordered_multiset::emplace", "unordered_set/std::unordered_multiset::emplace_hint", "unordered_set/std::unordered_multiset::empty", "unordered_set/std::unordered_multiset::end", "unordered_set/std::unordered_multiset::equal_range", "unordered_set/std::unordered_multiset::erase", "unordered_set/std::unordered_multiset::find", "unordered_set/std::unordered_multiset::get_allocator", "unordered_set/std::unordered_multiset::hash", "unordered_set/std::unordered_multiset::insert", "unordered_set/std::unordered_multiset::key_eq", "unordered_set/std::unordered_multiset::load_factor", "unordered_set/std::unordered_multiset::max_bucket_count", "unordered_set/std::unordered_multiset::max_load_factor", "unordered_set/std::unordered_multiset::max_size", "unordered_set/std::unordered_multiset::rehash", "unordered_set/std::unordered_multiset::size", "unordered_set/std::unordered_multiset::swap", "unordered_set/std::unordered_multiset::unordered_multiset", "unordered_set/std::unordered_multiset::operator=", "unordered_set/std::unordered_multiset::hash_function"] helpviewer_keywords: ["std::unordered_multiset", "std::unordered_multiset::allocator_type", "std::unordered_multiset::const_iterator", "std::unordered_multiset::const_local_iterator", "std::unordered_multiset::const_pointer", "std::unordered_multiset::const_reference", "std::unordered_multiset::difference_type", "std::unordered_multiset::hasher", "std::unordered_multiset::iterator", "std::unordered_multiset::key_equal", "std::unordered_multiset::key_type", "std::unordered_multiset::local_iterator", "std::unordered_multiset::pointer", "std::unordered_multiset::reference", "std::unordered_multiset::size_type", "std::unordered_multiset::value_type", "std::unordered_multiset::begin", "std::unordered_multiset::bucket", "std::unordered_multiset::bucket_count", "std::unordered_multiset::bucket_size", "std::unordered_multiset::cbegin", "std::unordered_multiset::cend", "std::unordered_multiset::clear", "std::unordered_multiset::contains", "std::unordered_multiset::count", "std::unordered_multiset::emplace", "std::unordered_multiset::emplace_hint", "std::unordered_multiset::empty", "std::unordered_multiset::end", "std::unordered_multiset::equal_range", "std::unordered_multiset::erase", "std::unordered_multiset::find", "std::unordered_multiset::get_allocator", "std::unordered_multiset::hash", "std::unordered_multiset::insert", "std::unordered_multiset::key_eq", "std::unordered_multiset::load_factor", "std::unordered_multiset::max_bucket_count", "std::unordered_multiset::max_load_factor", "std::unordered_multiset::max_size", "std::unordered_multiset::rehash", "std::unordered_multiset::size", "std::unordered_multiset::swap", "std::unordered_multiset::unordered_multiset", "std::unordered_multiset::operator=", "std::unordered_multiset::allocator_type", "std::unordered_multiset::const_iterator", "std::unordered_multiset::const_local_iterator", "std::unordered_multiset::const_pointer", "std::unordered_multiset::const_reference", "std::unordered_multiset::difference_type", "std::unordered_multiset::hasher", "std::unordered_multiset::iterator", "std::unordered_multiset::key_equal", "std::unordered_multiset::key_type", "std::unordered_multiset::local_iterator", "std::unordered_multiset::pointer", "std::unordered_multiset::reference", "std::unordered_multiset::size_type", "std::unordered_multiset::value_type", "std::unordered_multiset::begin", "std::unordered_multiset::bucket", "std::unordered_multiset::bucket_count", "std::unordered_multiset::bucket_size", "std::unordered_multiset::cbegin", "std::unordered_multiset::cend", "std::unordered_multiset::clear", "std::unordered_multiset::count", "std::unordered_multiset::emplace", "std::unordered_multiset::emplace_hint", "std::unordered_multiset::empty", "std::unordered_multiset::end", "std::unordered_multiset::equal_range", "std::unordered_multiset::erase", "std::unordered_multiset::find", "std::unordered_multiset::get_allocator", "std::unordered_multiset::hash_function", "std::unordered_multiset::insert", "std::unordered_multiset::key_eq", "std::unordered_multiset::load_factor", "std::unordered_multiset::max_bucket_count", "std::unordered_multiset::max_load_factor", "std::unordered_multiset::max_size", "std::unordered_multiset::rehash", "std::unordered_multiset::size", "std::unordered_multiset::swap"] -ms.assetid: 70c8dfc5-492a-4af2-84f5-1aa9cb04b71c --- # unordered_multiset Class @@ -91,7 +90,7 @@ The allocator class. ## Remarks -The object orders the sequence it controls by calling two stored objects, a comparison function object of type [unordered_multiset::key_equal](#key_equal) and a hash function object of type [unordered_multiset::hasher](#hasher). You access the first stored object by calling the member function [unordered_multiset::key_eq](#key_eq)`()`; and you access the second stored object by calling the member function [unordered_multiset::hash_function](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [unordered_set Class](../standard-library/unordered-set-class.md), an object of type `unordered_multiset` does not ensure that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys need not be unique.) +The object orders the sequence it controls by calling two stored objects, a comparison function object of type [unordered_multiset::key_equal](#key_equal) and a hash function object of type [unordered_multiset::hasher](#hasher). You access the first stored object by calling the member function [unordered_multiset::key_eq](#key_eq)`()`; and you access the second stored object by calling the member function [unordered_multiset::hash_function](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_set`](../standard-library/unordered-set-class.md), an object of type `unordered_multiset` does not ensure that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys need not be unique.) The object also stores a maximum load factor, which specifies the maximum desired average number of elements per bucket. If inserting an element causes [unordered_multiset::load_factor](#load_factor)`()` to exceed the maximum load factor, the container increases the number of buckets and rebuilds the hash table as needed. diff --git a/docs/standard-library/unordered-set-class.md b/docs/standard-library/unordered-set-class.md index ab90d089af..1085adc704 100644 --- a/docs/standard-library/unordered-set-class.md +++ b/docs/standard-library/unordered-set-class.md @@ -1,7 +1,7 @@ --- title: "unordered_set Class" description: "API reference for the C++ Standard Library container class `unordered_set`, which is used to store and retrieve data from an unordered collection." -ms.date: "9/9/2020" +ms.date: 9/9/2020 f1_keywords: ["unordered_set/std::unordered_set", "unordered_set/std::unordered_set::allocator_type", "unordered_set/std::unordered_set::const_iterator", "unordered_set/std::unordered_set::const_local_iterator", "unordered_set/std::unordered_set::const_pointer", "unordered_set/std::unordered_set::const_reference", "unordered_set/std::unordered_set::difference_type", "unordered_set/std::unordered_set::hasher", "unordered_set/std::unordered_set::iterator", "unordered_set/std::unordered_set::key_equal", "unordered_set/std::unordered_set::key_type", "unordered_set/std::unordered_set::local_iterator", "unordered_set/std::unordered_set::pointer", "unordered_set/std::unordered_set::reference", "unordered_set/std::unordered_set::size_type", "unordered_set/std::unordered_set::value_type", "unordered_set/std::unordered_set::begin", "unordered_set/std::unordered_set::bucket", "unordered_set/std::unordered_set::bucket_count", "unordered_set/std::unordered_set::bucket_size", "unordered_set/std::unordered_set::cbegin", "unordered_set/std::unordered_set::cend", "unordered_set/std::unordered_set::clear", "unordered_set/std::unordered_set::count", "unordered_set/std::unordered_set::contains", "unordered_set/std::unordered_set::emplace", "unordered_set/std::unordered_set::emplace_hint", "unordered_set/std::unordered_set::empty", "unordered_set/std::unordered_set::end", "unordered_set/std::unordered_set::equal_range", "unordered_set/std::unordered_set::erase", "unordered_set/std::unordered_set::find", "unordered_set/std::unordered_set::get_allocator", "unordered_set/std::unordered_set::hash", "unordered_set/std::unordered_set::insert", "unordered_set/std::unordered_set::key_eq", "unordered_set/std::unordered_set::load_factor", "unordered_set/std::unordered_set::max_bucket_count", "unordered_set/std::unordered_set::max_load_factor", "unordered_set/std::unordered_set::max_size", "unordered_set/std::unordered_set::rehash", "unordered_set/std::unordered_set::size", "unordered_set/std::unordered_set::swap", "unordered_set/std::unordered_set::unordered_set", "unordered_set/std::unordered_set::operator=", "unordered_set/std::unordered_set::hash_function"] helpviewer_keywords: ["std::unordered_set", "std::unordered_set::allocator_type", "std::unordered_set::const_iterator", "std::unordered_set::const_local_iterator", "std::unordered_set::const_pointer", "std::unordered_set::const_reference", "std::unordered_set::difference_type", "std::unordered_set::hasher", "std::unordered_set::iterator", "std::unordered_set::key_equal", "std::unordered_set::key_type", "std::unordered_set::local_iterator", "std::unordered_set::pointer", "std::unordered_set::reference", "std::unordered_set::size_type", "std::unordered_set::value_type", "std::unordered_set::begin", "std::unordered_set::bucket", "std::unordered_set::bucket_count", "std::unordered_set::bucket_size", "std::unordered_set::cbegin", "std::unordered_set::cend", "std::unordered_set::clear", "std::unordered_set::contains", "std::unordered_set::count", "std::unordered_set::emplace", "std::unordered_set::emplace_hint", "std::unordered_set::empty", "std::unordered_set::end", "std::unordered_set::equal_range", "std::unordered_set::erase", "std::unordered_set::find", "std::unordered_set::get_allocator", "std::unordered_set::hash", "std::unordered_set::insert", "std::unordered_set::key_eq", "std::unordered_set::load_factor", "std::unordered_set::max_bucket_count", "std::unordered_set::max_load_factor", "std::unordered_set::max_size", "std::unordered_set::rehash", "std::unordered_set::size", "std::unordered_set::swap", "std::unordered_set::unordered_set", "std::unordered_set::operator=", "std::unordered_set::allocator_type", "std::unordered_set::const_iterator", "std::unordered_set::const_local_iterator", "std::unordered_set::const_pointer", "std::unordered_set::const_reference", "std::unordered_set::difference_type", "std::unordered_set::hasher", "std::unordered_set::iterator", "std::unordered_set::key_equal", "std::unordered_set::key_type", "std::unordered_set::local_iterator", "std::unordered_set::pointer", "std::unordered_set::reference", "std::unordered_set::size_type", "std::unordered_set::value_type", "std::unordered_set::begin", "std::unordered_set::bucket", "std::unordered_set::bucket_count", "std::unordered_set::bucket_size", "std::unordered_set::cbegin", "std::unordered_set::cend", "std::unordered_set::clear", "std::unordered_set::count", "std::unordered_set::emplace", "std::unordered_set::emplace_hint", "std::unordered_set::empty", "std::unordered_set::end", "std::unordered_set::equal_range", "std::unordered_set::erase", "std::unordered_set::find", "std::unordered_set::get_allocator", "std::unordered_set::hash_function", "std::unordered_set::insert", "std::unordered_set::key_eq", "std::unordered_set::load_factor", "std::unordered_set::max_bucket_count", "std::unordered_set::max_load_factor", "std::unordered_set::max_size", "std::unordered_set::rehash", "std::unordered_set::size", "std::unordered_set::swap"] --- @@ -97,7 +97,7 @@ The allocator class. ## Remarks -The object orders the sequence it controls by calling two stored objects, a comparison function object of type [`unordered_set::key_equal`](#key_equal) and a hash function object of type [`unordered_set::hasher`](#hasher). You access the first stored object by calling the member function [`unordered_set::key_eq`](#key_eq)`()`; and you access the second stored object by calling the member function [`unordered_set::hash_function`](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_multiset` Class](../standard-library/unordered-multiset-class.md), an object of type `unordered_set` ensures that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys are unique.) +The object orders the sequence it controls by calling two stored objects, a comparison function object of type [`unordered_set::key_equal`](#key_equal) and a hash function object of type [`unordered_set::hasher`](#hasher). You access the first stored object by calling the member function [`unordered_set::key_eq`](#key_eq)`()`; and you access the second stored object by calling the member function [`unordered_set::hash_function`](#hash)`()`. Specifically, for all values `X` and `Y` of type `Key`, the call `key_eq()(X, Y)` returns true only if the two argument values have equivalent ordering; the call `hash_function()(keyval)` yields a distribution of values of type `size_t`. Unlike class template [`unordered_multiset`](../standard-library/unordered-multiset-class.md), an object of type `unordered_set` ensures that `key_eq()(X, Y)` is always false for any two elements of the controlled sequence. (Keys are unique.) The object also stores a maximum load factor, which specifies the maximum desired average number of elements per bucket. If inserting an element causes [`unordered_set::load_factor`](#load_factor)`()` to exceed the maximum load factor, the container increases the number of buckets and rebuilds the hash table as needed. diff --git a/docs/standard-library/using-insertion-operators-and-controlling-format.md b/docs/standard-library/using-insertion-operators-and-controlling-format.md index 561261d466..e61172bb4d 100644 --- a/docs/standard-library/using-insertion-operators-and-controlling-format.md +++ b/docs/standard-library/using-insertion-operators-and-controlling-format.md @@ -87,7 +87,7 @@ int main( ) } ``` -The `width` member function is declared in ``. If you use `setw` or any other manipulator with arguments, you must include ``. In the output, strings print in a field of width 6 and integers in a field of width 10: +The `width` member function is declared in ``. If you use `setw` or any other manipulator with arguments, you must include ``. In the output, strings print in a field of width 7 and integers in a field of width 10: ```Output Zoot 1.23 diff --git a/docs/standard-library/utc-clock-class.md b/docs/standard-library/utc-clock-class.md index 285b3ce509..1521bfbe8e 100644 --- a/docs/standard-library/utc-clock-class.md +++ b/docs/standard-library/utc-clock-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: utc_clock class" title: "utc_clock class" +description: "Learn more about: utc_clock class" ms.date: 07/27/2021 f1_keywords: ["chrono/std::chrono::utc_clock", "chrono/std::chrono::utc_clock::now", "chrono/std::chrono::utc_clock::to_sys", "chrono/std::chrono::utc_clock::from_sys", "chrono/std::chrono::utc_clock::is_steady Constant"] helpviewer_keywords: ["std::chrono [C++], utc_clock"] @@ -65,7 +65,7 @@ UTC time, by definition, starts out 10 seconds behind TAI (atomic time). 10 seco |Name|Description| |----------|-----------------| -|[`utc_clock::is_steady constant]`(#is_steady_constant)|Indicates whether the clock type is steady. Its value is `false`.| +|[`utc_clock::is_steady` constant](#is_steady_constant)|Indicates whether the clock type is steady. Its value is `false`.| ## Requirements diff --git a/docs/standard-library/utility.md b/docs/standard-library/utility.md index 253764a553..266e984099 100644 --- a/docs/standard-library/utility.md +++ b/docs/standard-library/utility.md @@ -1,27 +1,23 @@ --- description: "Learn more about: " title: "" -ms.date: "11/04/2016" +ms.date: 11/14/2024 f1_keywords: [""] helpviewer_keywords: ["utility header"] -ms.assetid: c4491103-5da9-47a1-9c2b-ed8bc64b0599 --- # `` -Defines C++ Standard Library types, functions, and operators that help to construct and manage pairs of objects, which are useful whenever two objects need to be treated as if they were one. +Defines C++ Standard Library types, functions, and operators that help to construct and manage pairs of objects, which are useful whenever two objects should be treated as if they were one. ## Requirements -**Header:** \ +**Header:** `` -**Namespace:** std +**Namespace:** `std` ## Remarks -Pairs are widely used in the C++ Standard Library. They are required both as the arguments and return values for various functions and as element types for containers such as [map class](../standard-library/map-class.md) and [multimap class](../standard-library/multimap-class.md). The \ header is automatically included by \ to assist in managing their key/value pair type elements. - -> [!NOTE] -> The \ header uses the statement `#include `. It also refers to `class tuple` as defined in \. +Pairs are widely used in the C++ Standard Library. They're required both as the arguments and return values for various functions and as element types for associative containers like [`map`](../standard-library/map-class.md) and [`multimap`](../standard-library/multimap-class.md). ## Members @@ -29,57 +25,57 @@ Pairs are widely used in the C++ Standard Library. They are required both as the |Type|Description| |-|-| -|[chars_format](../standard-library/chars-format-class.md)|Floating-point format for primitive numerical conversion.| -|[tuple_element](../standard-library/tuple-element-class-tuple.md)|A class that wraps the type of a `pair` element.| -|[tuple_size](../standard-library/tuple-size-class-tuple.md)|A class that wraps `pair` element count.| +|[`chars_format`](../standard-library/chars-format-class.md)|Floating-point format for primitive numerical conversion.| +|[`tuple_element`](../standard-library/tuple-element-class-tuple.md)|Wraps the type of a `pair` element.| +|[`tuple_size`](../standard-library/tuple-size-class-tuple.md)|Wraps a `pair` element count.| ### Objects |Template|Description| |-|-| -|[index_sequence](../standard-library/utility-functions.md#index_sequence)|An alias template defined for the common case where `T` is `std::size_t` | -|[index_sequence_for](../standard-library/utility-functions.md#index_sequence_for)|Helper alias template to convert any type parameter pack into an index sequence of the same length| -|[make_index_sequence](../standard-library/utility-functions.md#make_index_sequence)| Helper alias template to simplify the creation of a `std::index_sequence` type. | -|[make_integer_sequence](../standard-library/utility-functions.md#make_integer_sequence)|Helper alias template to simplify the creation of a `std::integer_sequence` type.| +|[`index_sequence`](../standard-library/utility-functions.md#index_sequence)|An alias template defined for the common case where `T` is `std::size_t` | +|[`index_sequence_for`](../standard-library/utility-functions.md#index_sequence_for)|Helper alias template to convert any type parameter pack into an index sequence of the same length| +|[`make_index_sequence`](../standard-library/utility-functions.md#make_index_sequence)| Helper alias template to simplify the creation of a `std::index_sequence` type. | +|[`make_integer_sequence`](../standard-library/utility-functions.md#make_integer_sequence)|Helper alias template to simplify the creation of a `std::integer_sequence` type.| ### Functions |Function|Description| |-|-| -|[as_const](../standard-library/utility-functions.md#asconst)|Returns type.| -|[declval](../standard-library/utility-functions.md#declval)|Shorthand expression evaluation.| -|[exchange](../standard-library/utility-functions.md#exchange)|Assigns a new value to an object and returns its old value.| -|[forward](../standard-library/utility-functions.md#forward)|Preserves the reference type (either `lvalue` or `rvalue`) of the argument from being obscured by perfect forwarding.| -|[from_chars](../standard-library/utility-functions.md#from_chars)|| -|[get](../standard-library/utility-functions.md#get)|A function that gets an element from a `pair` object.| -|[make_pair](../standard-library/utility-functions.md#make_pair)|A template helper function used to construct objects of type `pair`, where the component types are based on the data types passed as parameters.| -|[move](../standard-library/utility-functions.md#move)|Returns the passed in argument as an `rvalue` reference.| -|[move_if_noexcept](../standard-library/utility-functions.md#moveif)|| -|[swap](../standard-library/utility-functions.md#swap)|Exchanges the elements of two `pair` objects.| -|[to_chars](../standard-library/utility-functions.md#to_chars)|Converts value into a character string.| +|[`as_const`](../standard-library/utility-functions.md#asconst)|Returns type.| +|[`declval`](../standard-library/utility-functions.md#declval)|Shorthand expression evaluation.| +|[`exchange`](../standard-library/utility-functions.md#exchange)|Assigns a new value to an object and returns its old value.| +|[`forward`](../standard-library/utility-functions.md#forward)|Preserves the reference type (either `lvalue` or `rvalue`) of the argument from being obscured by perfect forwarding.| +|[`from_chars`](../standard-library/utility-functions.md#from_chars)|| +|[`get`](../standard-library/utility-functions.md#get)|A function that gets an element from a `pair` object.| +|[`make_pair`](../standard-library/utility-functions.md#make_pair)|A template helper function used to construct objects of type `pair`, where the component types are based on the data types passed as parameters.| +|[`move`](../standard-library/utility-functions.md#move)|Returns the passed in argument as an `rvalue` reference.| +|[`move_if_noexcept`](../standard-library/utility-functions.md#moveif)|| +|[`swap`](../standard-library/utility-functions.md#swap)|Exchanges the elements of two `pair` objects.| +|[`to_chars`](../standard-library/utility-functions.md#to_chars)|Converts value into a character string.| ### Operators |Operator|Description| |-|-| -|[operator!=](../standard-library/utility-operators.md#op_neq)|Tests if the pair object on the left side of the operator is not equal to the pair object on the right side.| -|[operator==](../standard-library/utility-operators.md#op_eq_eq)|Tests if the pair object on the left side of the operator is equal to the pair object on the right side.| -|[operator\<](../standard-library/utility-operators.md#op_lt)|Tests if the pair object on the left side of the operator is less than the pair object on the right side.| -|[operator\<=](../standard-library/utility-operators.md#op_gt_eq)|Tests if the pair object on the left side of the operator is less than or equal to the pair object on the right side.| -|[operator>](../standard-library/utility-operators.md#op_gt)|Tests if the pair object on the left side of the operator is greater than the pair object on the right side.| -|[operator>=](../standard-library/utility-operators.md#op_gt_eq)|Tests if the pair object on the left side of the operator is greater than or equal to the pair object on the right side.| +|[`operator!=`](../standard-library/utility-operators.md#op_neq)|Tests if the pair object on the left side of the operator isn't equal to the pair object on the right side.| +|[`operator==`](../standard-library/utility-operators.md#op_eq_eq)|Tests if the pair object on the left side of the operator is equal to the pair object on the right side.| +|[`operator<`](../standard-library/utility-operators.md#op_lt)|Tests if the pair object on the left side of the operator is less than the pair object on the right side.| +|[`operator<=`](../standard-library/utility-operators.md#op_gt_eq)|Tests if the pair object on the left side of the operator is less than or equal to the pair object on the right side.| +|[`operator>`](../standard-library/utility-operators.md#op_gt)|Tests if the pair object on the left side of the operator is greater than the pair object on the right side.| +|[`operator>=`](../standard-library/utility-operators.md#op_gt_eq)|Tests if the pair object on the left side of the operator is greater than or equal to the pair object on the right side.| ### Structs |Struct|Description| |-|-| -|[from_chars_result](../standard-library/from-chars-result-structure.md)|A struct used for `from_chars`.| -|[identity](../standard-library/identity-structure.md)|A struct that provides a type definition as the template parameter.| -|[in_place_t](../standard-library/in-place-t-struct.md)|Also includes structs `in_place_type_t` and `in_place_index_t`.| -|[integer_sequence](../standard-library/integer-sequence-class.md)|Represents an integer sequence.| -|[pair](../standard-library/pair-structure.md)|A type that provides for the ability to treat two objects as a single object.| -|[piecewise_construct_t](../standard-library/piecewise-construct-t-structure.md)|A type used to keep separate constructor and function overloading.| -|[to_chars_result](../standard-library/to-chars-result-structure.md)|A struct used for `to_chars`.| +|[`from_chars_result`](../standard-library/from-chars-result-structure.md)|A struct used for `from_chars`.| +|[`identity`](../standard-library/identity-structure.md)|A struct that provides a type definition as the template parameter.| +|[`in_place_t`, `in_place_type_t`, `in_place_index_t`](../standard-library/in-place-t-struct.md)| Indicates how to create an object in place.| +|[`integer_sequence`](../standard-library/integer-sequence-class.md)|Represents an integer sequence.| +|[`pair`](../standard-library/pair-structure.md)|A type that provides for the ability to treat two objects as a single object.| +|[`piecewise_construct_t`](../standard-library/piecewise-construct-t-structure.md)|A type used to keep separate constructor and function overloading.| +|[`to_chars_result`](../standard-library/to-chars-result-structure.md)|A struct used for `to_chars`.| ## See also diff --git a/docs/standard-library/vector-bool-class.md b/docs/standard-library/vector-bool-class.md index ddfd8b5a20..8756473a9e 100644 --- a/docs/standard-library/vector-bool-class.md +++ b/docs/standard-library/vector-bool-class.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: vector Class" title: "vector Class" -ms.date: "11/04/2016" +description: "Learn more about: vector Class" +ms.date: 11/04/2016 f1_keywords: ["vector", "vector/std::vector::flip"] helpviewer_keywords: ["std::vector [C++], const_pointer", "std::vector [C++], const_reference", "std::vector [C++], pointer", "std::vector [C++], flip", "std::vector [C++], swap"] --- @@ -350,7 +350,7 @@ The original value of the 3rd element still stored in a bool: false ## `vector::swap` -Static member function that exchanges two elements of Boolean vectors ( `vector`) by using the proxy class [`vector::reference`](#reference_class). +Static member function that exchanges two elements of Boolean vectors (`vector`) by using the proxy class [`vector::reference`](#reference_class). ```cpp static void swap( diff --git a/docs/standard-library/vector-class.md b/docs/standard-library/vector-class.md index 85cb05379b..e715fe2ee4 100644 --- a/docs/standard-library/vector-class.md +++ b/docs/standard-library/vector-class.md @@ -13,13 +13,13 @@ The C++ Standard Library vector class is a class template for sequence container ```cpp template > -class vector +class vector; ``` ### Parameters *`Type`*\ -The element data type to be stored in the vector +The element data type to be stored in the vector. *`Allocator`*\ The type that represents the stored allocator object that encapsulates details about the vector's allocation and deallocation of memory. This argument is optional and the default value is `allocator`. @@ -46,7 +46,7 @@ The [`vector` reference class](../standard-library/vector-bool-class.md#re |Name|Description| |-|-| -|`[allocator_type]`(#allocator_type)|A type that represents the `allocator` class for the vector object.| +|[`allocator_type`](#allocator_type)|A type that represents the `allocator` class for the vector object.| |[`const_iterator`](#const_iterator)|A type that provides a random-access iterator that can read a **`const`** element in a vector.| |[`const_pointer`](#const_pointer)|A type that provides a pointer to a **`const`** element in a vector.| |[`const_reference`](#const_reference)|A type that provides a reference to a **`const`** element stored in a vector. It's used for reading and doing **`const`** operations.| @@ -152,7 +152,7 @@ First, `assign` erases any existing elements in a vector. Then, `assign` either ### Example ```cpp -/ vector_assign.cpp +// vector_assign.cpp // compile with: /EHsc #include #include @@ -169,33 +169,45 @@ int main() v1.push_back(50); cout << "v1 = "; - for (auto& v : v1){ + for (auto& v : v1) + { cout << v << " "; } cout << endl; v2.assign(v1.begin(), v1.end()); cout << "v2 = "; - for (auto& v : v2){ + for (auto& v : v2) + { cout << v << " "; } cout << endl; v3.assign(7, 4); cout << "v3 = "; - for (auto& v : v3){ + for (auto& v : v3) + { cout << v << " "; } cout << endl; v3.assign({ 5, 6, 7 }); - for (auto& v : v3){ + cout << "v3 = "; + for (auto& v : v3) + { cout << v << " "; } cout << endl; } ``` +```Output +v1 = 10 20 30 40 50 +v2 = 10 20 30 40 50 +v3 = 4 4 4 4 4 4 4 +v3 = 5 6 7 +``` + ## `at` Returns a reference to the element at a specified location in the vector. @@ -227,18 +239,18 @@ If the return value of `at` is assigned to a `const_reference`, the vector objec #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 20 ); + v1.push_back(10); + v1.push_back(20); - const int &i = v1.at( 0 ); - int &j = v1.at( 1 ); - cout << "The first element is " << i << endl; - cout << "The second element is " << j << endl; + const int &i = v1.at(0); + int &j = v1.at(1); + cout << "The first element is " << i << endl; + cout << "The second element is " << j << endl; } ``` @@ -275,22 +287,28 @@ When compiled by using [`_ITERATOR_DEBUG_LEVEL`](../standard-library/iterator-de #include #include -int main() { - using namespace std; - vector v1; +int main() +{ + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 11 ); + v1.push_back(10); + v1.push_back(11); - int& i = v1.back( ); - const int& ii = v1.front( ); + int& i = v1.back(); + const int& ii = v1.front(); - cout << "The last integer of v1 is " << i << endl; - i--; - cout << "The next-to-last integer of v1 is "<< ii << endl; + cout << "The last integer of v1 is " << i << endl; + i--; + cout << "The next-to-last integer of v1 is " << ii << endl; } ``` +```Output +The last integer of v1 is 11 +The next-to-last integer of v1 is 10 +``` + ## `begin` Returns a random-access iterator to the first element in the vector. @@ -378,18 +396,18 @@ The member function [`resize`](#resize) will be more efficient if sufficient mem #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 1 ); - cout << "The length of storage allocated is " - << v1.capacity( ) << "." << endl; + v1.push_back(1); + cout << "The length of storage allocated is " + << v1.capacity() << "." << endl; - v1.push_back( 2 ); - cout << "The length of storage allocated is now " - << v1.capacity( ) << "." << endl; + v1.push_back(2); + cout << "The length of storage allocated is now " + << v1.capacity() << "." << endl; } ``` @@ -419,8 +437,8 @@ You can use this member function in place of the `begin()` member function to gu ```cpp auto i1 = Container.begin(); // i1 is Container::iterator -auto i2 = Container.cbegin(); +auto i2 = Container.cbegin(); // i2 is Container::const_iterator ``` @@ -445,8 +463,8 @@ You can use this member function in place of the `end()` member function to guar ```cpp auto i1 = Container.end(); // i1 is Container::iterator -auto i2 = Container.cend(); +auto i2 = Container.cend(); // i2 is Container::const_iterator ``` @@ -468,18 +486,18 @@ void clear(); #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 20 ); - v1.push_back( 30 ); + v1.push_back(10); + v1.push_back(20); + v1.push_back(30); - cout << "The size of v1 is " << v1.size( ) << endl; - v1.clear( ); - cout << "The size of v1 after clearing is " << v1.size( ) << endl; + cout << "The size of v1 is " << v1.size() << endl; + v1.clear(); + cout << "The size of v1 after clearing is " << v1.size() << endl; } ``` @@ -538,22 +556,22 @@ A type `const_reference` can't be used to modify the value of an element. #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 20 ); + v1.push_back(10); + v1.push_back(20); - const vector v2 = v1; - const int &i = v2.front( ); - const int &j = v2.back( ); - cout << "The first element is " << i << endl; - cout << "The second element is " << j << endl; + const vector v2 = v1; + const int& i = v2.front(); + const int& j = v2.back(); + cout << "The first element is " << i << endl; + cout << "The second element is " << j << endl; - // The following line would cause an error as v2 is const - // v2.push_back( 30 ); + // The following line would cause an error as v2 is const + // v2.push_back(30); } ``` @@ -602,22 +620,22 @@ With the return value of `crbegin`, the `vector` object can't be modified. #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::iterator v1_Iter; - vector ::const_reverse_iterator v1_rIter; + using namespace std; + vector v1; + vector::iterator v1_Iter; + vector::const_reverse_iterator v1_rIter; - v1.push_back( 1 ); - v1.push_back( 2 ); + v1.push_back(1); + v1.push_back(2); - v1_Iter = v1.begin( ); - cout << "The first element of vector is " + v1_Iter = v1.begin(); + cout << "The first element of vector is " << *v1_Iter << "." << endl; - v1_rIter = v1.crbegin( ); - cout << "The first element of the reversed vector is " + v1_rIter = v1.crbegin(); + cout << "The first element of the reversed vector is " << *v1_rIter << "." << endl; } ``` @@ -657,17 +675,17 @@ The value returned by `crend` shouldn't be dereferenced. Only use it for compari #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::const_reverse_iterator v1_rIter; + using namespace std; + vector v1; + vector::const_reverse_iterator v1_rIter; - v1.push_back( 1 ); - v1.push_back( 2 ); + v1.push_back(1); + v1.push_back(2); - for ( v1_rIter = v1.rbegin( ) ; v1_rIter != v1.rend( ) ; v1_rIter++ ) - cout << *v1_rIter << endl; + for (v1_rIter = v1.rbegin(); v1_rIter != v1.rend(); v1_rIter++) + cout << *v1_rIter << endl; } ``` @@ -755,31 +773,31 @@ An [iterator](#iterator) is more commonly used to access a vector element. #include #include -int main( ) +int main() { - using namespace std; + using namespace std; - vector c1; - vector ::iterator c1_Iter, c2_Iter; + vector c1; + vector::iterator c1_Iter, c2_Iter; - c1.push_back( 30 ); - c1.push_back( 20 ); - c1.push_back( 30 ); - c1.push_back( 10 ); - c1.push_back( 30 ); - c1.push_back( 20 ); + c1.push_back(30); + c1.push_back(20); + c1.push_back(30); + c1.push_back(10); + c1.push_back(30); + c1.push_back(20); - c1_Iter = c1.begin( ); - c2_Iter = c1.end( ); + c1_Iter = c1.begin(); + c2_Iter = c1.end(); - vector ::difference_type df_typ1, df_typ2, df_typ3; + vector::difference_type df_typ1, df_typ2, df_typ3; - df_typ1 = count( c1_Iter, c2_Iter, 10 ); - df_typ2 = count( c1_Iter, c2_Iter, 20 ); - df_typ3 = count( c1_Iter, c2_Iter, 30 ); - cout << "The number '10' is in c1 collection " << df_typ1 << " times.\n"; - cout << "The number '20' is in c1 collection " << df_typ2 << " times.\n"; - cout << "The number '30' is in c1 collection " << df_typ3 << " times.\n"; + df_typ1 = count(c1_Iter, c2_Iter, 10); + df_typ2 = count(c1_Iter, c2_Iter, 20); + df_typ3 = count(c1_Iter, c2_Iter, 30); + cout << "The number '10' is in c1 collection " << df_typ1 << " times.\n"; + cout << "The number '20' is in c1 collection " << df_typ2 << " times.\n"; + cout << "The number '30' is in c1 collection " << df_typ3 << " times.\n"; } ``` @@ -824,32 +842,32 @@ Any insertion operation can be expensive, see [`vector` class](../standard-libra #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::iterator Iter; - - v1.push_back( 10 ); - v1.push_back( 20 ); - v1.push_back( 30 ); - - cout << "v1 =" ; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - -// initialize a vector of vectors by moving v1 - vector < vector > vv1; - - vv1.emplace( vv1.begin(), move( v1 ) ); - if ( vv1.size( ) != 0 && vv1[0].size( ) != 0 ) - { - cout << "vv1[0] ="; - for (Iter = vv1[0].begin( ); Iter != vv1[0].end( ); Iter++ ) - cout << " " << *Iter; - cout << endl; - } + using namespace std; + vector v1; + vector::iterator Iter; + + v1.push_back(10); + v1.push_back(20); + v1.push_back(30); + + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + // initialize a vector of vectors by moving v1 + vector> vv1; + + vv1.emplace(vv1.begin(), move(v1)); + if (vv1.size() != 0 && vv1[0].size() != 0) + { + cout << "vv1[0] ="; + for (Iter = vv1[0].begin(); Iter != vv1[0].end(); Iter++) + cout << " " << *Iter; + cout << endl; + } } ``` @@ -876,15 +894,16 @@ Constructor arguments. The function infers which constructor overload to invoke ```cpp #include + struct obj { - obj(int, double) {} + obj(int, double) {} }; int main() { - std::vector v; - v.emplace_back(1, 3.14); // obj in created in place in the vector + std::vector v; + v.emplace_back(1, 3.14); // obj in created in place in the vector } ``` @@ -908,17 +927,17 @@ bool empty() const; #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); + v1.push_back(10); - if ( v1.empty( ) ) - cout << "The vector is empty." << endl; - else - cout << "The vector is not empty." << endl; + if (v1.empty()) + cout << "The vector is empty." << endl; + else + cout << "The vector is not empty." << endl; } ``` @@ -951,17 +970,18 @@ If the return value of `end` is assigned to a variable of type `const_iterator`, // compile with: /EHsc #include #include -int main( ) + +int main() { - using namespace std; - vector v1; - vector ::iterator v1_Iter; + using namespace std; + vector v1; + vector::iterator v1_Iter; - v1.push_back( 1 ); - v1.push_back( 2 ); + v1.push_back(1); + v1.push_back(2); - for ( v1_Iter = v1.begin( ) ; v1_Iter != v1.end( ) ; v1_Iter++ ) - cout << *v1_Iter << endl; + for (v1_Iter = v1.begin(); v1_Iter != v1.end(); v1_Iter++) + cout << *v1_Iter << endl; } ``` @@ -1006,34 +1026,34 @@ An iterator that designates the first element remaining beyond any elements remo #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::iterator Iter; - - v1.push_back( 10 ); - v1.push_back( 20 ); - v1.push_back( 30 ); - v1.push_back( 40 ); - v1.push_back( 50 ); - - cout << "v1 =" ; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - - v1.erase( v1.begin( ) ); - cout << "v1 ="; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - - v1.erase( v1.begin( ) + 1, v1.begin( ) + 3 ); - cout << "v1 ="; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; + using namespace std; + vector v1; + vector::iterator Iter; + + v1.push_back(10); + v1.push_back(20); + v1.push_back(30); + v1.push_back(40); + v1.push_back(50); + + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + v1.erase(v1.begin()); + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + v1.erase(v1.begin() + 1, v1.begin() + 3); + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; } ``` @@ -1071,24 +1091,28 @@ When compiled by using [`_ITERATOR_DEBUG_LEVEL`](../standard-library/iterator-de #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 11 ); + v1.push_back(10); + v1.push_back(11); - int& i = v1.front( ); - const int& ii = v1.front( ); + int& i = v1.front(); - cout << "The first integer of v1 is "<< i << endl; - // by incrementing i, we move the front reference to the second element - i++; - cout << "Now, the first integer of v1 is "<< i << endl; + cout << "The first integer of v1 is " << i << endl; + // by incrementing i, we move the front reference to the second element + i++; + cout << "Now, the first integer of v1 is " << i << endl; } ``` +```Output +The first integer of v1 is 10 +Now, the first integer of v1 is 11 +``` + ## `get_allocator` Returns a copy of the allocator object used to construct the vector. @@ -1111,20 +1135,19 @@ Allocators for the vector class specify how the class manages storage. The defau // vector_get_allocator.cpp // compile with: /EHsc #include -#include -int main( ) +int main() { - using namespace std; - // The following lines declare objects that use the default allocator. - vector v1; - vector > v2 = vector >(allocator( )) ; + using namespace std; + // The following lines declare objects that use the default allocator. + vector v1; + vector> v2 = vector>(allocator()); - // v3 will use the same allocator class as v1 - vector v3( v1.get_allocator( ) ); + // v3 will use the same allocator class as v1 + vector v3(v1.get_allocator()); - vector::allocator_type xvec = v3.get_allocator( ); - // You can now call functions on the allocator class used by vec + vector::allocator_type xvec = v3.get_allocator(); + // You can now call functions on the allocator class used by vec } ``` @@ -1186,51 +1209,51 @@ As a precondition, *`first`* and *`last`* must not be iterators into the vector, #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::iterator Iter; - - v1.push_back( 10 ); - v1.push_back( 20 ); - v1.push_back( 30 ); - - cout << "v1 =" ; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - - v1.insert( v1.begin( ) + 1, 40 ); - cout << "v1 ="; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - v1.insert( v1.begin( ) + 2, 4, 50 ); - - cout << "v1 ="; - for ( Iter = v1.begin( ) ; Iter != v1.end( ) ; Iter++ ) - cout << " " << *Iter; - cout << endl; - - const auto v2 = v1; - v1.insert( v1.begin( )+1, v2.begin( )+2, v2.begin( )+4 ); - cout << "v1 ="; - for (Iter = v1.begin( ); Iter != v1.end( ); Iter++ ) - cout << " " << *Iter; - cout << endl; - -// initialize a vector of vectors by moving v1 - vector < vector > vv1; - - vv1.insert( vv1.begin(), move( v1 ) ); - if ( vv1.size( ) != 0 && vv1[0].size( ) != 0 ) - { - cout << "vv1[0] ="; - for (Iter = vv1[0].begin( ); Iter != vv1[0].end( ); Iter++ ) - cout << " " << *Iter; - cout << endl; - } + using namespace std; + vector v1; + vector::iterator Iter; + + v1.push_back(10); + v1.push_back(20); + v1.push_back(30); + + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + v1.insert(v1.begin() + 1, 40); + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + v1.insert(v1.begin() + 2, 4, 50); + + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + const auto v2 = v1; + v1.insert(v1.begin() + 1, v2.begin() + 2, v2.begin() + 4); + cout << "v1 ="; + for (Iter = v1.begin(); Iter != v1.end(); Iter++) + cout << " " << *Iter; + cout << endl; + + // initialize a vector of vectors by moving v1 + vector> vv1; + + vv1.insert(vv1.begin(), move(v1)); + if (vv1.size() != 0 && vv1[0].size() != 0) + { + cout << "vv1[0] ="; + for (Iter = vv1[0].begin(); Iter != vv1[0].end(); Iter++) + cout << " " << *Iter; + cout << endl; + } } ``` @@ -1278,17 +1301,21 @@ The maximum possible length of the vector. #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::size_type i; + using namespace std; + vector v1; + vector::size_type i; - i = v1.max_size( ); - cout << "The maximum possible length of the vector is " << i << "." << endl; + i = v1.max_size(); + cout << "The maximum possible length of the vector is " << i << "." << endl; } ``` +```Output +The maximum possible length of the vector is 4611686018427387903. +``` + ## `operator[]` Returns a reference to the vector element at a specified position. @@ -1322,19 +1349,23 @@ When compiled by using [`_ITERATOR_DEBUG_LEVEL`](../standard-library/iterator-de #include #include -int main( ) +int main() { - using namespace std; - vector v1; + using namespace std; + vector v1; - v1.push_back( 10 ); - v1.push_back( 20 ); + v1.push_back(10); + v1.push_back(20); - int& i = v1[1]; - cout << "The second integer of v1 is " << i << endl; + int& i = v1[1]; + cout << "The second integer of v1 is " << i << endl; } ``` +```Output +The second integer of v1 is 20 +``` + ## `operator=` Replaces the elements of the vector with a copy of another vector. @@ -1362,39 +1393,45 @@ After erasing any existing elements in a `vector`, `operator=` either copies or #include #include -int main( ) +int main() { - using namespace std; - vector v1, v2, v3; - vector::iterator iter; - - v1.push_back(10); - v1.push_back(20); - v1.push_back(30); - v1.push_back(40); - v1.push_back(50); - - cout << "v1 = " ; - for (iter = v1.begin(); iter != v1.end(); iter++) - cout << *iter << " "; - cout << endl; - - v2 = v1; - cout << "v2 = "; - for (iter = v2.begin(); iter != v2.end(); iter++) - cout << *iter << " "; - cout << endl; - -// move v1 into v2 - v2.clear(); - v2 = move(v1); - cout << "v2 = "; - for (iter = v2.begin(); iter != v2.end(); iter++) - cout << *iter << " "; - cout << endl; + using namespace std; + vector v1, v2, v3; + vector::iterator iter; + + v1.push_back(10); + v1.push_back(20); + v1.push_back(30); + v1.push_back(40); + v1.push_back(50); + + cout << "v1 = "; + for (iter = v1.begin(); iter != v1.end(); iter++) + cout << *iter << " "; + cout << endl; + + v2 = v1; + cout << "v2 = "; + for (iter = v2.begin(); iter != v2.end(); iter++) + cout << *iter << " "; + cout << endl; + + // move v1 into v2 + v2.clear(); + v2 = move(v1); + cout << "v2 = "; + for (iter = v2.begin(); iter != v2.end(); iter++) + cout << *iter << " "; + cout << endl; } ``` +```Output +v1 = 10 20 30 40 50 +v2 = 10 20 30 40 50 +v2 = 10 20 30 40 50 +``` + ## `pointer` A type that provides a pointer to an element in a vector. @@ -1415,12 +1452,12 @@ A type **`pointer`** can be used to modify the value of an element. #include #include -int main( ) +int main() { using namespace std; vector v; - v.push_back( 11 ); - v.push_back( 22 ); + v.push_back(11); + v.push_back(22); vector::pointer ptr = &v[0]; cout << *ptr << endl; @@ -1473,14 +1510,19 @@ The value to assign to the element added to the end of the vector. using namespace std; -template void print_elem(const T& t) { +template +void print_elem(const T& t) +{ cout << "(" << t << ") "; } -template void print_collection(const T& t) { +template +void print_collection(const T& t) +{ cout << " " << t.size() << " elements: "; - for (const auto& p : t) { + for (const auto& p : t) + { print_elem(p); } cout << endl; @@ -1489,7 +1531,8 @@ template void print_collection(const T& t) { int main() { vector v; - for (int i = 0; i < 10; ++i) { + for (int i = 0; i < 10; ++i) + { v.push_back(10 + i); } @@ -1497,13 +1540,31 @@ int main() print_collection(v); // pop_back() until it's empty, printing the last element as we go - while (v.begin() != v.end()) { - cout << "v.back(): "; print_elem(v.back()); cout << endl; + while (v.begin() != v.end()) + { + cout << "v.back(): "; + print_elem(v.back()); + cout << endl; v.pop_back(); } } ``` +```Output +vector data: + 10 elements: (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) +v.back(): (19) +v.back(): (18) +v.back(): (17) +v.back(): (16) +v.back(): (15) +v.back(): (14) +v.back(): (13) +v.back(): (12) +v.back(): (11) +v.back(): (10) +``` + ## `rbegin` Returns an iterator to the first element in a reversed vector. @@ -1529,22 +1590,22 @@ If the return value of `rbegin` is assigned to a `const_reverse_iterator`, the v #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::iterator v1_Iter; - vector ::reverse_iterator v1_rIter; + using namespace std; + vector v1; + vector::iterator v1_Iter; + vector::reverse_iterator v1_rIter; - v1.push_back( 1 ); - v1.push_back( 2 ); + v1.push_back(1); + v1.push_back(2); - v1_Iter = v1.begin( ); - cout << "The first element of vector is " + v1_Iter = v1.begin(); + cout << "The first element of vector is " << *v1_Iter << "." << endl; - v1_rIter = v1.rbegin( ); - cout << "The first element of the reversed vector is " + v1_rIter = v1.rbegin(); + cout << "The first element of the reversed vector is " << *v1_rIter << "." << endl; } ``` @@ -1597,17 +1658,17 @@ The value returned by `rend` shouldn't be dereferenced. Only use it for comparis #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::reverse_iterator v1_rIter; + using namespace std; + vector v1; + vector::reverse_iterator v1_rIter; - v1.push_back( 1 ); - v1.push_back( 2 ); + v1.push_back(1); + v1.push_back(2); - for ( v1_rIter = v1.rbegin( ) ; v1_rIter != v1.rend( ) ; v1_rIter++ ) - cout << *v1_rIter << endl; + for (v1_rIter = v1.rbegin(); v1_rIter != v1.rend(); v1_rIter++) + cout << *v1_rIter << endl; } ``` @@ -1637,18 +1698,17 @@ The minimum length of storage to be allocated for the vector. #include #include -int main( ) +int main() { - using namespace std; - vector v1; - //vector ::iterator Iter; - - v1.push_back( 1 ); - cout << "Current capacity of v1 = " - << v1.capacity( ) << endl; - v1.reserve( 20 ); - cout << "Current capacity of v1 = " - << v1.capacity( ) << endl; + using namespace std; + vector v1; + + v1.push_back(1); + cout << "Current capacity of v1 = " + << v1.capacity() << endl; + v1.reserve(20); + cout << "Current capacity of v1 = " + << v1.capacity() << endl; } ``` @@ -1721,16 +1781,20 @@ If the container's size is less than the requested size, *`new_size`*, `resize` using namespace std; -template void print(const string& s, const C& c) { +template +void print(const string& s, const C& c) +{ cout << s; - for (const auto& e : c) { + for (const auto& e : c) + { cout << e << " "; } cout << endl; } -void printvstats(const vector& v) { +void printvstats(const vector& v) +{ cout << " the vector's size is: " << v.size() << endl; cout << " the vector's capacity is: " << v.capacity() << endl; cout << " the vector's maximum size is: " << v.max_size() << endl; @@ -1742,7 +1806,7 @@ int main() vector v; // Show statistics about vector. - cout << endl << "After declaring an empty vector:" << endl; + cout << "After declaring an empty vector:" << endl; printvstats(v); print(" the vector's contents: ", v); @@ -1752,7 +1816,8 @@ int main() printvstats(v); print(" the vector's contents: ", v); - for (int i = 1; i < 10; ++i) { + for (int i = 1; i < 10; ++i) + { v.push_back(i); } cout << endl << "After adding 10 elements:" << endl; @@ -1786,6 +1851,54 @@ int main() } ``` +```Output +After declaring an empty vector: + the vector's size is: 0 + the vector's capacity is: 0 + the vector's maximum size is: 4611686018427387903 + the vector's contents: + +After adding an element: + the vector's size is: 1 + the vector's capacity is: 1 + the vector's maximum size is: 4611686018427387903 + the vector's contents: -1 + +After adding 10 elements: + the vector's size is: 10 + the vector's capacity is: 13 + the vector's maximum size is: 4611686018427387903 + the vector's contents: -1 1 2 3 4 5 6 7 8 9 + +After resizing to 6 elements without an initialization value: + the vector's size is: 6 + the vector's capacity is: 13 + the vector's maximum size is: 4611686018427387903 + the vector's contents: -1 1 2 3 4 5 + +After resizing to 9 elements with an initialization value of 999: + the vector's size is: 9 + the vector's capacity is: 13 + the vector's maximum size is: 4611686018427387903 + the vector's contents: -1 1 2 3 4 5 999 999 999 + +After resizing to 12 elements without an initialization value: + the vector's size is: 12 + the vector's capacity is: 13 + the vector's maximum size is: 4611686018427387903 + the vector's contents: -1 1 2 3 4 5 999 999 999 0 0 0 + +After vector::reserve(1000): + the vector's size is: 12 + the vector's capacity is: 1000 + the vector's maximum size is: 4611686018427387903 + +After vector::resize(2000): + the vector's size is: 2000 + the vector's capacity is: 2000 + the vector's maximum size is: 4611686018427387903 +``` + ## `reverse_iterator` A type that provides a random-access iterator that can read or modify any element in a reversed vector. @@ -1818,21 +1931,20 @@ void shrink_to_fit(); #include #include -int main( ) +int main() { - using namespace std; - vector v1; - //vector ::iterator Iter; - - v1.push_back( 1 ); - cout << "Current capacity of v1 = " - << v1.capacity( ) << endl; - v1.reserve( 20 ); - cout << "Current capacity of v1 = " - << v1.capacity( ) << endl; - v1.shrink_to_fit(); - cout << "Current capacity of v1 = " - << v1.capacity( ) << endl; + using namespace std; + vector v1; + + v1.push_back(1); + cout << "Current capacity of v1 = " + << v1.capacity() << endl; + v1.reserve(20); + cout << "Current capacity of v1 = " + << v1.capacity() << endl; + v1.shrink_to_fit(); + cout << "Current capacity of v1 = " + << v1.capacity() << endl; } ``` @@ -1862,19 +1974,19 @@ The current length of the vector. #include #include -int main( ) +int main() { - using namespace std; - vector v1; - vector ::size_type i; + using namespace std; + vector v1; + vector::size_type i; - v1.push_back( 1 ); - i = v1.size( ); - cout << "Vector length is " << i << "." << endl; + v1.push_back(1); + i = v1.size(); + cout << "Vector length is " << i << "." << endl; - v1.push_back( 2 ); - i = v1.size( ); - cout << "Vector length is now " << i << "." << endl; + v1.push_back(2); + i = v1.size(); + cout << "Vector length is now " << i << "." << endl; } ``` @@ -1924,26 +2036,26 @@ A vector whose elements are to be exchanged with the elements in the vector *`ri #include #include -int main( ) +int main() { - using namespace std; - vector v1, v2; + using namespace std; + vector v1, v2; - v1.push_back( 1 ); - v1.push_back( 2 ); - v1.push_back( 3 ); + v1.push_back(1); + v1.push_back(2); + v1.push_back(3); - v2.push_back( 10 ); - v2.push_back( 20 ); + v2.push_back(10); + v2.push_back(20); - cout << "The number of elements in v1 = " << v1.size( ) << endl; - cout << "The number of elements in v2 = " << v2.size( ) << endl; - cout << endl; + cout << "The number of elements in v1 = " << v1.size() << endl; + cout << "The number of elements in v2 = " << v2.size() << endl; + cout << endl; - v1.swap( v2 ); + v1.swap(v2); - cout << "The number of elements in v1 = " << v1.size( ) << endl; - cout << "The number of elements in v2 = " << v2.size( ) << endl; + cout << "The number of elements in v1 = " << v1.size() << endl; + cout << "The number of elements in v2 = " << v2.size() << endl; } ``` @@ -1975,12 +2087,12 @@ typedef typename Allocator::value_type value_type; #include #include -int main( ) +int main() { - using namespace std; - vector::value_type AnInt; - AnInt = 44; - cout << AnInt << endl; + using namespace std; + vector::value_type AnInt; + AnInt = 44; + cout << AnInt << endl; } ``` @@ -2061,82 +2173,92 @@ The ninth and tenth constructors copy the range [`first`, `last`) of a vector. int main() { using namespace std; - vector ::iterator v1_Iter, v2_Iter, v3_Iter, v4_Iter, v5_Iter, v6_Iter; + vector::iterator v1_Iter, v2_Iter, v3_Iter, v4_Iter, v5_Iter, v6_Iter; // Create an empty vector v0 - vector v0; + vector v0; // Create a vector v1 with 3 elements of default value 0 - vector v1(3); + vector v1(3); // Create a vector v2 with 5 elements of value 2 - vector v2(5, 2); + vector v2(5, 2); // Create a vector v3 with 3 elements of value 1 and with the allocator // of vector v2 - vector v3(3, 1, v2.get_allocator()); + vector v3(3, 1, v2.get_allocator()); // Create a copy, vector v4, of vector v2 - vector v4(v2); + vector v4(v2); // Create a new temporary vector for demonstrating copying ranges - vector v5(5); - for (auto i : v5) { + vector v5(5); + for (auto i : v5) + { v5[i] = i; } // Create a vector v6 by copying the range v5[ first, last) - vector v6(v5.begin() + 1, v5.begin() + 3); + vector v6(v5.begin() + 1, v5.begin() + 3); cout << "v1 ="; - for (auto& v : v1){ + for (auto& v : v1) + { cout << " " << v; } cout << endl; cout << "v2 ="; - for (auto& v : v2){ + for (auto& v : v2) + { cout << " " << v; } cout << endl; cout << "v3 ="; - for (auto& v : v3){ + for (auto& v : v3) + { cout << " " << v; } cout << endl; + cout << "v4 ="; - for (auto& v : v4){ + for (auto& v : v4) + { cout << " " << v; } cout << endl; cout << "v5 ="; - for (auto& v : v5){ + for (auto& v : v5) + { cout << " " << v; } cout << endl; cout << "v6 ="; - for (auto& v : v6){ + for (auto& v : v6) + { cout << " " << v; } cout << endl; // Move vector v2 to vector v7 - vector v7(move(v2)); - vector ::iterator v7_Iter; + vector v7(move(v2)); + vector::iterator v7_Iter; cout << "v7 ="; - for (auto& v : v7){ + for (auto& v : v7) + { cout << " " << v; } cout << endl; cout << "v8 ="; vector v8{ { 1, 2, 3, 4 } }; - for (auto& v : v8){ - cout << " " << v ; + for (auto& v : v8) + { + cout << " " << v; } cout << endl; } diff --git a/docs/standard-library/view-classes.md b/docs/standard-library/view-classes.md index 2a37ddfa86..a7c6a10b81 100644 --- a/docs/standard-library/view-classes.md +++ b/docs/standard-library/view-classes.md @@ -1,6 +1,6 @@ --- -description: "Learn more about the ranges view classes, which allow you to inexpensively transform ranges." title: "View classes" +description: "Learn more about the ranges view classes, which allow you to inexpensively transform ranges." ms.date: 12/20/2022 f1_keywords: ["RANGES/std::ranges::views", "RANGES/std::views"] helpviewer_keywords: ["RANGES/VIEWS/std", "VIEWS/std"] @@ -123,7 +123,7 @@ The following view classes are defined in the `std::ranges` namespace. | [`transform_view`](transform-view-class.md)C++20 | A view of an underlying sequence after a transformation function is applied to each element. | | [`values_view`](values-view-class.md)C++20 | A view over the second index into each tuple-like value in a collection. For example, given a range of `std::tuple` values, create a view that consists of the `int` elements from each tuple. | -Many of these classes have corresponding [range adaptors](range-adaptors.md) in the `std:views` namespace that creates instances of them. Prefer using an adaptor to create a view instead of creating view classes directly. The range adaptors are the intended way to create views, are easier to use, and in some cases are more efficient. +Many of these classes have corresponding [range adaptors](range-adaptors.md) in the `std::views` namespace that creates instances of them. Prefer using an adaptor to create a view instead of creating view classes directly. The range adaptors are the intended way to create views, are easier to use, and in some cases are more efficient. ## View classes characteristics diff --git a/docs/standard-library/wbuffer-convert-class.md b/docs/standard-library/wbuffer-convert-class.md index b70a646411..060e7db84f 100644 --- a/docs/standard-library/wbuffer-convert-class.md +++ b/docs/standard-library/wbuffer-convert-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: wbuffer_convert class" title: "wbuffer_convert class" +description: "Learn more about: wbuffer_convert class" ms.date: "11/29/2021" f1_keywords: ["xlocmon/stdext::cvt::wbuffer_convert"] helpviewer_keywords: ["wbuffer_convert class"] @@ -20,7 +20,7 @@ class wbuffer_convert ### Parameters *`Codecvt`*\ -The [`locale`](../standard-library/locale-class.md) facet that represents the conversion object. +The [`locale`](locale-class.md) facet that represents the conversion object. *`Elem`*\ The wide-character element type. @@ -36,5 +36,5 @@ Conversion between a sequence of `Elem` values and multibyte sequences is perfor An object of this class template stores: -- A pointer to its underlying byte stream buffer.\ -- A pointer to an allocated conversion facet object, which is freed when the `wbuffer_convert`is destroyed. +- A pointer to its underlying byte stream buffer. +- A pointer to an allocated conversion facet object, which is freed when the `wbuffer_convert` is destroyed. diff --git a/docs/standard-library/year-month-day-class.md b/docs/standard-library/year-month-day-class.md index bba8ce3854..e153349e08 100644 --- a/docs/standard-library/year-month-day-class.md +++ b/docs/standard-library/year-month-day-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: year_month_day class" title: "year_month_day class" +description: "Learn more about: year_month_day class" ms.date: "06/28/2021" f1_keywords: ["chrono/std::chrono::year_month_day", "chrono/std::chrono::year::operator+=", "chrono/std::chrono::year::operator-=", "chrono/std::chrono::year::sysdays", "chrono/std::chrono::year::localdays", "chrono/std::chrono::year::ok"] helpviewer_keywords: ["std::chrono [C++], year_month_day"] @@ -81,10 +81,10 @@ A `year_month_day_last` value. ### Remarks 1\) The default constructor doesn't initialize the month or day.\ -2\) Constructs a `year_month_day`with the specified year, month, and day.\ -3\) Constructs a `year_month_day`with the specified year, month, and day from *`ymdl`*\ -4\) Constructs a `year_month_day`with the same date as *`dp`*.\ -5\) Constructs a `year_month_day`with the same date as *`dp`* but as though constructed by `year_month_day(sys_days(dp.time_since_epoch()))`. +2\) Constructs a `year_month_day` with the specified year, month, and day.\ +3\) Constructs a `year_month_day` with the specified year, month, and day from *`ymdl`*\ +4\) Constructs a `year_month_day` with the same date as *`dp`*.\ +5\) Constructs a `year_month_day` with the same date as *`dp`* but as though constructed by `year_month_day(sys_days(dp.time_since_epoch()))`. For information about C++20 syntax used to specify dates, see [`operator/`](chrono-operators.md#op_/) diff --git a/docs/standard-library/year-month-weekday-class.md b/docs/standard-library/year-month-weekday-class.md index f88f88c341..58e7723486 100644 --- a/docs/standard-library/year-month-weekday-class.md +++ b/docs/standard-library/year-month-weekday-class.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: year_month_weekday class" title: "year_month_weekday class" +description: "Learn more about: year_month_weekday class" ms.date: "06/30/2021" f1_keywords: ["chrono/std::chrono::year_month_weekday", "chrono/std::chrono::year_month_weekday::weekday", "chrono/std::chrono::year_month_weekday::month", "chrono/std::chrono::year_month_weekday::index", "chrono/std::chrono::year_month_weekday::year", "chrono/std::chrono::year_month_weekday::weekday", "chrono/std::chrono::year_month_weekday::weekday_indexed", "chrono/std::chrono::year_month_weekday::sys_days", "chrono/std::chrono::year_month_weekday::local_days", "chrono/std::chrono::year_month_weekday::ok", "chrono/std::chrono::year_month_weekday::operator+=", "chrono/std::chrono::year_month_weekday::operator-=", "chrono/std::chrono::year_month_weekday::operator local_days", "chrono/std::chrono::year_month_weekday::operator sys_days"] helpviewer_keywords: ["std::chrono [C++], year_month_weekday"] @@ -325,5 +325,5 @@ The [`year`](year-class.md) value. [`year_month_day`](year-month-day-class.md)\ [`year_month_day_last`](year-month-day-last-class.md)\ [`year_month_weekday_last`](year-month-weekday-last-class.md)\ -[`operator/`](chrono-operators.md#op_/) -[Header Files Reference](cpp-standard-library-header-files.md) \ No newline at end of file +[`operator/`](chrono-operators.md#op_/)\ +[Header Files Reference](cpp-standard-library-header-files.md) diff --git a/docs/standard-library/zoned-time-class.md b/docs/standard-library/zoned-time-class.md index 976cc7416c..3817f02d55 100644 --- a/docs/standard-library/zoned-time-class.md +++ b/docs/standard-library/zoned-time-class.md @@ -1,8 +1,8 @@ --- -description: "Learn more about: zoned_time class" title: "zoned_time class" +description: "Learn more about: zoned_time class" ms.date: 05/31/2022 -f1_keywords: ["chrono/std::chrono::zoned_time::get_info", "chrono/std::chrono::zoned_time::get_local_time", "chrono/std::chrono::zoned_time::get_sys_time", "chrono/std::chrono::zoned_time::get_time_zone","chrono/std::chrono::zoned_time:operator=", "chrono/std::chrono::zoned_time:operator local_time", "chrono/std::chrono::zoned_time:operator sys_time"] +f1_keywords: ["chrono/std::chrono::zoned_time::get_info", "chrono/std::chrono::zoned_time::get_local_time", "chrono/std::chrono::zoned_time::get_sys_time", "chrono/std::chrono::zoned_time::get_time_zone","chrono/std::chrono::zoned_time::operator=", "chrono/std::chrono::zoned_time::operator local_time", "chrono/std::chrono::zoned_time::operator sys_time"] helpviewer_keywords: ["std::chrono [C++], zoned_time class", "std::chrono::zoned_time::get_info function", "std::chrono::zoned_time::get_local_time function", "std::chrono::zoned_time::get_sys_time function", "std::chrono::zoned_time::get_time_zone function"] dev_langs: ["C++"] --- @@ -423,4 +423,4 @@ int main() [`time_point`](time-point-class.md)\ [`time_zone`](time-zone-class.md)\ [`zoned_traits` struct](zoned-traits-struct.md)\ -[Header files reference](./cpp-standard-library-header-files.md) \ No newline at end of file +[Header files reference](./cpp-standard-library-header-files.md) diff --git a/docs/text/support-for-multibyte-character-sets-mbcss.md b/docs/text/support-for-multibyte-character-sets-mbcss.md index 5b1d9cd4de..2520d3d343 100644 --- a/docs/text/support-for-multibyte-character-sets-mbcss.md +++ b/docs/text/support-for-multibyte-character-sets-mbcss.md @@ -1,9 +1,8 @@ --- -description: "Learn more about: Support for Multibyte Character Sets (MBCSs)" title: "Support for Multibyte Character Sets (MBCSs)" +description: "Learn more about: Support for Multibyte Character Sets (MBCSs)" ms.date: "11/04/2016" helpviewer_keywords: ["MBCS [C++], about MBCS", "character sets [C++], multibyte", "multibyte characters [C++]", "MBCS [C++]"] -ms.assetid: b498733c-a1e1-45e3-8f26-d6da3cb5f2dd --- # Support for Multibyte Character Sets (MBCSs) @@ -36,7 +35,7 @@ The C run-time library and MFC support single-byte, MBCS, and Unicode programmin ### MBCS/Unicode portability -Using the tchar.h header file, you can build single-byte, MBCS, and Unicode applications from the same sources. Tchar.h defines macros prefixed with *_tcs* , which map to `str`, `_mbs`, or `wcs` functions, as appropriate. To build MBCS, define the symbol `_MBCS`. To build Unicode, define the symbol `_UNICODE`. By default, `_UNICODE` is defined for MFC applications. For more information, see [Generic-Text Mappings in tchar.h](../text/generic-text-mappings-in-tchar-h.md). +Using the tchar.h header file, you can build single-byte, MBCS, and Unicode applications from the same sources. Tchar.h defines macros prefixed with *_tcs*, which map to `str`, `_mbs`, or `wcs` functions, as appropriate. To build MBCS, define the symbol `_MBCS`. To build Unicode, define the symbol `_UNICODE`. By default, `_UNICODE` is defined for MFC applications. For more information, see [Generic-Text Mappings in tchar.h](../text/generic-text-mappings-in-tchar-h.md). > [!NOTE] > Behavior is undefined if you define both `_UNICODE` and `_MBCS`. @@ -59,5 +58,5 @@ For international portability, code your program with [Unicode](../text/support- ## See also -[Text and Strings](../text/text-and-strings-in-visual-cpp.md)
+[Text and Strings](../text/text-and-strings-in-visual-cpp.md)\ [MBCS Support in Visual C++](../text/mbcs-support-in-visual-cpp.md) diff --git a/docs/windows/adding-editing-or-deleting-controls.md b/docs/windows/adding-editing-or-deleting-controls.md index e068e19ef6..92993bd1f9 100644 --- a/docs/windows/adding-editing-or-deleting-controls.md +++ b/docs/windows/adding-editing-or-deleting-controls.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: How To: Add, Edit, or Delete Controls (C++)" title: "How To: Add, Edit, or Delete Controls (C++)" +description: "Learn more about: How To: Add, Edit, or Delete Controls (C++)" ms.date: "02/15/2019" f1_keywords: ["vc.controls.activex", "vc.editors.dialog.insertActiveXControls"] helpviewer_keywords: ["Dialog Editor [C++], creating controls", "dialog boxes [C++], adding controls to", "Toolbox [C++], Dialog Editor tab", "controls [C++], types", "syslink controls in dialog boxes", "custom controls [C++], dialog boxes", "controls [C++], standard", "Dialog Editor [C++], creating controls", "controls [C++], adding to dialog boxes", "controls [C++], adding multiple", "dialog box controls [C++], size", "controls [C++], sizing", "dialog boxes [C++], adding ActiveX controls", "ActiveX controls [C++], adding to dialog boxes", "Insert ActiveX Control dialog box [C++]", "controls [C++], editing properties", "ActiveX controls [C++], properties", "controls [C++], undoing changes", "controls [C++], editing properties", "dialog box controls [C++], editing properties", "dialog box controls [C++], deleting", "controls [C++], deleting", "Dialog Editor [C++], default control events", "controls [C++], default control events", "events [C++], controls", "dialog box controls [C++], events", "member variables, defining for controls", "variables, dialog box control member variables", "controls [C++], member variables", "Dialog Editor [C++], defining member variables for controls", "controls [C++], troubleshooting", "Dialog Editor [C++], troubleshooting", "dialog boxes [C++], troubleshooting", "InitCommonControls", "RichEdit 1.0 control", "rich edit controls [C++], RichEdit 1.0"] -ms.assetid: 73cef03f-5c8c-456a-87d1-1458dff185cf --- # How To: Add, Edit, or Delete Controls (C++) @@ -204,17 +203,17 @@ Win32 ## See also -[Manage Dialog Box Controls](controls-in-dialog-boxes.md)
-[How To: Layout Controls](arrangement-of-controls-on-dialog-boxes.md)
+[Manage Dialog Box Controls](controls-in-dialog-boxes.md)\ +[How To: Layout Controls](arrangement-of-controls-on-dialog-boxes.md)\ [How to: Define Control Access and Values](defining-mnemonics-access-keys.md) diff --git a/docs/windows/creating-an-icon-or-other-image-image-editor-for-icons.md b/docs/windows/creating-an-icon-or-other-image-image-editor-for-icons.md index 004896d77c..19767ebd32 100644 --- a/docs/windows/creating-an-icon-or-other-image-image-editor-for-icons.md +++ b/docs/windows/creating-an-icon-or-other-image-image-editor-for-icons.md @@ -1,24 +1,25 @@ --- -description: "Learn more about: How To: Create an Icon or Other Image" -title: "How To: Create an Icon or Other Image" -ms.date: "02/15/2019" +description: "Create an Icon or Other Image" +title: "Learn how to create a new image, bitmap, icon, cursor, or toolbar, and then use the Image Editor to customize its appearance." +ms.date: 03/21/2025 +ms.topic: how-to helpviewer_keywords: ["bitmaps [C++]", "images [C++], creating", "resources [C++], creating images", "bitmaps [C++], creating", "graphics [C++], creating", "Image editor [C++], creating images", "cursors [C++], creating", "image resources [C++], display devices", "icons [C++], creating", "cursors [C++], types", "icons [C++]", "Image editor [C++], icons and cursors", "cursors [C++]", "display devices [C++], creating icons for", "cursors [C++], hot spots", "icons [C++], types", "icons [C++], creating", "display devices [C++], creating image", "images [C++], creating for display devices", "icons [C++], inserting", "New Image Type dialog box [C++]", "Custom Image dialog box [C++]", "Open Image dialog box [C++]", "New Device Image command", "display devices [C++], adding images", "cursors [C++], adding", "icons, adding", "display devices [C++], copying images", "cursors [C++], copying", "icons, copying", "cursors [C++], deleting", "display devices [C++], deleting device image", "icons, erasing", "icons, deleting", "cursors [C++], undoing changes", "icons, undoing changes", "cursors [C++], screen regions", "inverse colors [C++], device images", "transparent regions, device images", "transparency, device images", "Image editor [C++], device images", "inverse regions, device images", "cursors [C++], transparent regions", "screen colors", "regions, transparent", "icons [C++], transparent regions", "display devices [C++], transparent and screen regions", "transparent regions in devices", "regions, inverse", "colors [C++], Image editor", "device projects [C++], transparent images", "icons [C++], screen regions", "256-color palette", "cursors [C++], color", "colors [C++], icons", "colors [C++], cursors", "icons, color", "colors [C++], icons and cursors", "color palettes, 256-color", "palettes, 256-color", "cursors [C++], hot spots", "hot spots", ".gif files [C++], saving bitmaps as", "jpg files [C++], saving bitmaps as", "jpeg files [C++], saving bitmaps as", ".jpg files [C++], saving bitmaps as", "Image editor [C++], converting image formats", "gif files [C++], saving bitmaps as", "bitmaps [C++], converting formats", ".jpeg files [C++], saving bitmaps as", "graphics [C++], converting formats", "images [C++], converting formats", "images [C++], stand-alone editing", "Image editor [C++], converting image formats", "graphics [C++], converting formats", "images [C++], converting formats"] ms.assetid: 66db3fb2-cfc1-48a2-9bdd-53f61eb7ee30 --- -# How To: Create an Icon or Other Image +# Create an icon or other image You can create a new image, bitmap, icon, cursor, or toolbar, and then use the **Image Editor** to customize its appearance. You can also create a new bitmap patterned after a [resource template](./how-to-create-a-resource-script-file.md). -## Icons and Cursors: Image Resources for Display Devices +## Icons and cursors: image resources for display devices -Icons and cursors are graphical resources that can contain multiple images in different sizes and color schemes for different types of display devices. A cursor also has a hot spot, the location Windows uses to track its position. Both icons and cursors are created and edited using the **Image Editor**, as are bitmaps and other images. +Icons and cursors are graphical resources that can contain multiple images in different sizes and color schemes for different types of display devices. A cursor also has a hot spot, which is the location that Windows uses to track its position. Both icons and cursors are created and edited using the **Image Editor**, as are bitmaps and other images. When you create a new icon or cursor, the **Image Editor** first creates an image of a standard type. The image is initially filled with the screen (transparent) color. If the image is a cursor, the hot spot is initially the upper-left corner with coordinates `0,0`. -By default, the **Image Editor** supports the creation of additional images for the devices shown in the following table. You can create images for other devices by typing width, height, and color-count parameters into the **Custom Image** dialog box. +By default, the **Image Editor** supports the creation of new images for the devices shown in the following table. You can create images for other devices by typing width, height, and color-count parameters into the **Custom Image** dialog box. |Color|Width (pixels)|Height (pixels)| -|-----------|----------------------|-----------------------| +|-----|--------------|---------------| |Monochrome|16|16| |Monochrome|32|32| |Monochrome|48|48| @@ -37,12 +38,12 @@ By default, the **Image Editor** supports the creation of additional images for ### Create a device image (icon or cursor) -When you create a new icon or cursor resource, the **Image Editor** first creates an image in a specific style (32 × 32, 16 colors for icons and 32 × 32, Monochrome for cursors). You can then add images in different sizes and styles to the initial icon or cursor and edit each additional image, as needed, for the different display devices. You can also edit an image by using a cut-and-paste operation from an existing image type or from a bitmap created in a graphics program. +When you create a new icon or cursor resource, the **Image Editor** first creates an image in a specific style: 32 × 32 pixels and 16 colors for icons; 32 × 32 pixels and monochrome for cursors. You can then add images in different sizes and styles to the initial icon or cursor, and edit each additional image, as needed, for the different display devices. You can also edit an image by using a cut-and-paste operation from an existing image type or from a bitmap created in a graphics program. When you open the icon or cursor resource in the [Image Editor](../windows/image-editor-for-icons.md), the image most closely matching the current display device is opened by default. > [!NOTE] -> If your project doesn't already contain an .rc file, see [Creating a New Resource Script File](../windows/how-to-create-a-resource-script-file.md). +> If your project doesn't already contain an *`.rc`* file, see [Create Resources (C++)](../windows/how-to-create-a-resource-script-file.md). The **New \ Image Type** dialog box enables you to create a new device image of a specified type. To open the **New \ Image** dialog box, go to menu **Image** > **New Image Type**. The following properties included are **Target Image Type** and **Custom**. @@ -50,40 +51,46 @@ The **Target Image Type** property lists the available image types where you sel :::row::: :::column span=""::: - 16 x 16, 16 colors\ - 32 x 32, 16 colors\ - 48 x 48, 16 colors\ - 64 x 64, 16 colors\ - 96 x 96, 16 colors + 16 x 16, 1 bit (monochrome)\ + 16 x 16, 24 bit (16 million colors)\ + 16 x 16, 4 bit (16 colors)\ + 128 x 128, 1 bit (monochrome)\ + 128 x 128, 24 bit (16 million colors)\ + 128 x 128, 4 bit (16 colors)\ + 128 x 128, 8 bit (256 colors) :::column-end::: :::column span=""::: - 16 x 16, 256 colors\ - 32 x 32, 256 colors\ - 48 x 48, 256 colors\ - 64 x 64, 256 colors\ - 96 x 96, 256 colors + 256 x 256, 1 bit (monochrome)\ + 256 x 256, 24 bit (16 million colors)\ + 256 x 256, 4 bit (16 colors)\ + 256 x 256, 8 bit (256 colors)\ + 32 x 32, 1 bit (monochrome)\ + 32 x 32, 24 bit (16 million colors)\ + 32 x 32, 4 bit (16 colors) :::column-end::: :::column span=""::: - 16 x 16, Monochrome\ - 32 x 32, Monochrome\ - 48 x 48, Monochrome\ - 64 x 64, Monochrome\ - 96 x 96, Monochrome + 48 x 48, 1 bit (monochrome)\ + 48 x 48, 24 bit (16 million colors)\ + 48 x 48, 4 bit (16 colors)\ + 64 x 64, 1 bit (monochrome)\ + 64 x 64, 24 bit (16 million colors)\ + 64 x 64, 4 bit (16 colors)\ + 64 x 64, 8 bit (256 colors) :::column-end::: :::row-end::: > [!NOTE] -> Any existing images will not be displayed in this list. +> Existing images are not displayed in this list. The **Custom** property opens the **Custom Image** dialog box in which you can create a new image with a custom size and number of colors. -The **Custom Image** dialog box enables you to create a new image with a custom size and number of colors. The following properties included are: +The **Custom Image** dialog box allows you to create a new image with a custom size and number of colors. The following properties included are: |Property|Description| |---|---| -|**Width**|Provides a space for you to enter the width of the custom image in pixels (1 - 512, limit of 2048).| -|**Height**|Provides a space for you to enter the height for the custom image in pixels (1 - 512, limit of 2048).| -|**Colors**|Provides a space for you to choose the number of colors for the custom image: 2, 16, or 256.| +|**Width**|Provides a space for you to enter the width of the custom image in pixels (1 - 512, limit of 2048)| +|**Height**|Provides a space for you to enter the height for the custom image in pixels (1 - 512, limit of 2048)| +|**Colors**|Provides a space for you to choose the number of bits for color for the custom image: 1, 4, 8, 24| Use the **Open \ Image** dialog box to open device images in C++ projects. It lists existing device images in the current resource (images that are part of the current resource). The following property included is: @@ -93,9 +100,9 @@ Use the **Open \ Image** dialog box to open device images in C++ project #### To create a new icon or cursor -1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *.rc* file, then choose **Insert Resource**. If you already have an existing image resource in your *.rc* file, such as a cursor, you can right-click the **Cursor** folder and select **Insert Cursor**. +1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *`.rc`* file, then choose **Add Resource**. If you already have an existing image resource in your *`.rc`* file, such as a cursor, you can right-click the **Cursor** folder and select **Insert Cursor**. -1. In the [Insert Resource dialog box](./how-to-create-a-resource-script-file.md), select **Icon** or **Cursor** and choose **New**. For icons, this action creates an icon resource with a 32 × 32, 16-color icon. For cursors, a 32 × 32, Monochrome (2-color) image is created. +1. In the [Add Resource dialog box](./how-to-create-a-resource-script-file.md), select **Icon** or **Cursor** and choose **New**. For icons, this action creates an icon resource with a 32 × 32, 16-color icon. For cursors, a 32 × 32, monochrome image is created. If a plus sign (**+**) appears next to the image resource type in the **Insert Resource** dialog box, it means that toolbar templates are available. Select the plus sign to expand the list of templates, select a template, and choose **New**. @@ -120,11 +127,11 @@ Use the **Open \ Image** dialog box to open device images in C++ project While the icon image is displayed in the **Image Editor**, go to menu **Image** > **Delete Device Image**. When you delete the last icon image in the resource, the resource is also deleted. > [!NOTE] -> When you press the **Del** key, the images and colors you have drawn on an icon are deleted but the icon remains and you can now redesign it. If you press **Del** by mistake, press **Ctrl**+**Z** to undo the action. +> When you press the **Del** key, the images and colors you drew on an icon are deleted but the icon remains and you can now redesign it. If you press **Del** by mistake, press **Ctrl**+**Z** to undo the action. ### To create transparent or inverse regions in device images -In the [Image Editor](../windows/image-editor-for-icons.md), the initial icon or cursor image has a transparent attribute. Although icon and cursor images are rectangular, many don't appear so because parts of the image are transparent and the underlying image on the screen shows through the icon or cursor. When you drag an icon, parts of the image may appear in an inverted color. You create this effect by setting the screen color and inverse color in the [Colors window](./image-editor-for-icons.md). +In the [Image Editor](../windows/image-editor-for-icons.md), the initial icon or cursor image has a transparent attribute. Although icon and cursor images are rectangular, many don't appear so because parts of the image are transparent and the underlying image on the screen shows through the icon or cursor. When you drag an icon, parts of the image might appear in an inverted color. You create this effect by setting the screen color and inverse color in the [Colors window](./image-editor-for-icons.md). The screen and inverse colors you apply to icons and cursors either shape and color the derived image or assign inverse regions. The colors indicate parts of the image that have those attributes. You can change the colors that represent the screen-color and inverse-color attributes in editing. These changes don't affect the appearance of the icon or cursor in your application. @@ -154,9 +161,9 @@ Using the **Image Editor**, icons and cursors can be sized large (64 × 64) with #### To create a 256-color icon or cursor -1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *.rc* file, then choose **Insert Resource**. If you already have an existing image resource in your *.rc* file, such as a cursor, you can right-click the **Cursor** folder and select **Insert Cursor**. +1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *`.rc`* file, then choose **Add Resource**. If you already have an existing image resource in your *`.rc`* file, such as a cursor, you can right-click the **Cursor** folder and select **Insert Cursor**. -1. In the [Insert Resource dialog box](./how-to-create-a-resource-script-file.md), select **Icon** or **Cursor** and choose **New**. +1. In the [Add Resource dialog box](./how-to-create-a-resource-script-file.md), select **Icon** or **Cursor** and choose **New**. 1. Go to menu **Image** > **New Device Image** and select the 256-color image style you want. @@ -168,7 +175,7 @@ To draw with a selection from the 256-color palette, you need to select the colo 1. Choose a color from the 256 colors displayed in the **Colors** palette in the **Colors** window. - The color selected will become the current color in the **Colors** palette in the **Colors** window. + The color selected becomes the current color in the **Colors** palette in the **Colors** window. > [!NOTE] > The initial palette used for 256-color images matches the palette returned by the `CreateHalftonePalette` Windows API. All icons intended for the Windows shell should use this palette to prevent flicker during palette realization. @@ -183,9 +190,9 @@ The hot spot of a cursor is the point to which Windows refers in tracking the cu The **Hotspot** property in the **Properties** window displays the new coordinates. -### To create and save a bitmap as a .gif or .jpeg +### To create and save a bitmap as GIF or JPEG -When you create a bitmap, the image is created in bitmap format (.bmp). You can, however, save the image as a GIF or JPEG or in other graphic formats. +When you create a bitmap, the image is created in bitmap format (*`.bmp`*). You can, however, save the image as a *`.gif`* or *`.jpeg`* or in other graphic formats. > [!NOTE] > This process doesn't apply to icons and cursors. @@ -203,7 +210,7 @@ When you create a bitmap, the image is created in bitmap format (.bmp). You can, 1. In the **Save File As** dialog box, type the name you want to give the file and the extension that denotes the file format you want in the **File Name** box. For example, *myfile.gif*. > [!NOTE] - > You must create or open the bitmap outside of your project in order to save it as another file format. If you create or open it within your project, the **Save As** command will be unavailable. For more information, see [Viewing Resources in a Resource Script File Outside of a Project (Standalone)](./how-to-create-a-resource-script-file.md). + > You must create or open the bitmap outside of your project in order to save it as another file format. If you create or open it within your project, the **Save As** command is unavailable. For more information, see [Viewing Resources in a Resource Script File Outside of a Project (Standalone)](./how-to-create-a-resource-script-file.md). 1. Select **Save**. @@ -221,11 +228,11 @@ You can open GIF or JPEG images in the **Image Editor** and save them as bitmaps ### To add a new image resource to an unmanaged C++ project -1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *.rc* file, then choose **Insert Resource**. If you already have an existing image resource in your *.rc* file, such as a cursor, you can simply right-click the **Cursor** folder and select **Insert Cursor**. +1. In [Resource View](how-to-create-a-resource-script-file.md#create-resources), right-click your *`.rc`* file, then choose **Add Resource**. If you already have an existing image resource in your *`.rc`* file, such as a cursor, you can right-click the **Cursor** folder and select **Insert Cursor**. -1. In the [Insert Resource dialog box](./how-to-create-a-resource-script-file.md), select the type of image resource you'd like to create (**Bitmap**, for example) then choose **New**. +1. In the [Add Resource dialog box](./how-to-create-a-resource-script-file.md), select the type of image resource you'd like to create (**Bitmap**, for example) then choose **New**. - If a plus sign (**+**) appears next to the image resource type in the **Insert Resource** dialog box, it means that toolbar templates are available. Select the plus sign to expand the list of templates, select a template, and choose **New**. + If a plus sign (**+**) appears next to the image resource type in the **Add Resource** dialog box, it means that toolbar templates are available. Select the plus sign to expand the list of templates, select a template, and choose **New**. ### To add a new image resource to a project in a .NET programming language @@ -239,17 +246,13 @@ You can open GIF or JPEG images in the **Image Editor** and save them as bitmaps The resource is added to your project in **Solution Explorer** and the resource opens in the [Image Editor](../windows/image-editor-for-icons.md). You can now use all the tools available in the **Image Editor** to modify your image. For more information on adding images to a managed project, see [Loading a Picture at Design Time](/dotnet/framework/winforms/controls/how-to-load-a-picture-using-the-designer-windows-forms). -## Requirements - -None - ## See also -[Image Editor for Icons](../windows/image-editor-for-icons.md)
-[How to: Edit an Image](../windows/selecting-an-area-of-an-image-image-editor-for-icons.md)
-[How to: Use a Drawing Tool](../windows/using-a-drawing-tool-image-editor-for-icons.md)
-[How to: Work with Color](../windows/working-with-color-image-editor-for-icons.md)
-[Accelerator Keys](../windows/accelerator-keys-image-editor-for-icons.md)
+- [Image Editor for Icons](../windows/image-editor-for-icons.md) +- [How to: Edit an Image](../windows/selecting-an-area-of-an-image-image-editor-for-icons.md) +- [How to: Use a Drawing Tool](../windows/using-a-drawing-tool-image-editor-for-icons.md) +- [How to: Work with Color](../windows/working-with-color-image-editor-for-icons.md) +- [Accelerator Keys](../windows/accelerator-keys-image-editor-for-icons.md)